[julia-users] Re: [Announcement] Moving to Discourse

2016-11-16 Thread Uwe Fechner
Thanks!

On Wednesday, November 16, 2016 at 12:39:02 PM UTC+1, Johan Sigfrids wrote:
>
> You can put the code inside triple back ticks:
>
> ```
> function hello()
> "Hello"
> end
> ```
>
> On Wednesday, November 16, 2016 at 12:49:09 PM UTC+2, Uwe Fechner wrote:
>>
>> Hello,
>> how can I paste Julia code in Discourse, such that it has syntax 
>> highlighting?
>>
>> Uwe
>>
>> On Wednesday, November 16, 2016 at 3:45:55 AM UTC+1, Valentin Churavy 
>> wrote:
>>>
>>> I would like to accelerate the move of `julia-users` to 
>>> https://discourse.julialang.org. In the original announcement (
>>> https://groups.google.com/d/msg/julia-users/Ov1J6MOVly0/cD7vNKOUAgAJ) I 
>>> mentioned a evaluation period of 4 weeks, but since then members of the 
>>> community have been approaching me if we could speed that up. If you take 
>>> issue with speeding things up please let me know.
>>>
>>> The timeline for the move is as follows:
>>>
>>>- Discourse is available from now on and we encourage everybody to 
>>>post new topics there.
>>>- On Monday November 21th,  9am JST julia-users will be set to 
>>>read-only mode.
>>>- We are not doing an automated migration, because we want to give 
>>>people the choice of opt-in; as such, we won't move over previous 
>>> content 
>>>or previous accounts.
>>>
>>> A common concern is whether or not you have to use Discourse as a forum 
>>> or if you can still participate purely through e-mails. 
>>> The short answer to that is that yes, you can! For the long answer head 
>>> over to http://discourse.julialang.org/t/discourse-as-a-mailing-list for 
>>> a description on how to set it up.
>>>
>>> If you have any concerns about this move please chime in either here or 
>>> at 
>>> https://discourse.julialang.org/t/migration-of-google-groups-to-discourse/
>>>
>>> All the best,
>>> Valentin
>>>
>>

[julia-users] Re: [Announcement] Moving to Discourse

2016-11-16 Thread Uwe Fechner
Hello,
how can I paste Julia code in Discourse, such that it has syntax 
highlighting?

Uwe

On Wednesday, November 16, 2016 at 3:45:55 AM UTC+1, Valentin Churavy wrote:
>
> I would like to accelerate the move of `julia-users` to 
> https://discourse.julialang.org. In the original announcement (
> https://groups.google.com/d/msg/julia-users/Ov1J6MOVly0/cD7vNKOUAgAJ) I 
> mentioned a evaluation period of 4 weeks, but since then members of the 
> community have been approaching me if we could speed that up. If you take 
> issue with speeding things up please let me know.
>
> The timeline for the move is as follows:
>
>- Discourse is available from now on and we encourage everybody to 
>post new topics there.
>- On Monday November 21th,  9am JST julia-users will be set to 
>read-only mode.
>- We are not doing an automated migration, because we want to give 
>people the choice of opt-in; as such, we won't move over previous content 
>or previous accounts.
>
> A common concern is whether or not you have to use Discourse as a forum or 
> if you can still participate purely through e-mails. 
> The short answer to that is that yes, you can! For the long answer head 
> over to http://discourse.julialang.org/t/discourse-as-a-mailing-list for 
> a description on how to set it up.
>
> If you have any concerns about this move please chime in either here or at 
> https://discourse.julialang.org/t/migration-of-google-groups-to-discourse/
>
> All the best,
> Valentin
>


Re: [julia-users] Benchmarking a function with parameters

2016-11-15 Thread Uwe Fechner
This was not the problem.

The problem was, that I was using "Run" from within Juno. In that case, the 
result 
of @benchmark is not printed.
Using:
println(@benchmark )
solved the problem.

Uwe

On Monday, November 14, 2016 at 3:12:31 PM UTC+1, Yichao Yu wrote:
>
> On Mon, Nov 14, 2016 at 8:16 AM, Uwe Fechner <uwe.fec...@gmail.com 
> > wrote: 
> > Hello, 
> > 
> > why does the following code not work (no benchmark result shown, no 
> error 
> > message or warning): 
> > using BenchmarkTools 
> > 
> > function add2!(vec, result) 
> > """ Calculate the sum of two 3d vectors and store the result in the 
> > second parameter. """ 
> >[result[i] =  vec[i] + result[i] for i in [1, 2, 3]] 
> >return nothing 
> > end 
> > 
> > function main() 
> > vec1=(1.0,2.0, 3.0) 
> > result=zeros(3) 
> > add2!(vec1, result) 
> > println(result) 
> > @benchmark add2!($vec1, $result) 
> > end 
> > 
> > main() 
> > 
> > Any hints welcome! 
>
> Use @benchmark in global scope and don't use comprehension as loop. 
>
> > 
> > Uwe 
>


[julia-users] Benchmarking a function with parameters

2016-11-14 Thread Uwe Fechner
Hello,

why does the following code not work (no benchmark result shown, no error 
message or warning):
using BenchmarkTools

function add2!(vec, result)
""" Calculate the sum of two 3d vectors and store the result in the 
second parameter. """
   [result[i] =  vec[i] + result[i] for i in [1, 2, 3]]
   return nothing
end

function main()
vec1=(1.0,2.0, 3.0)
result=zeros(3)
add2!(vec1, result)
println(result)
@benchmark add2!($vec1, $result)
end

main()

Any hints welcome!

Uwe


[julia-users] Re: [Announcement] Moving to Discourse (Statement of Intent)

2016-11-14 Thread Uwe Fechner
If you move to discourse, the links on the Julia homepage in the section 
"Community->Mailing Lists" should be updated. This did not happen for 
Julia-Dev.

Uwe

On Tuesday, November 1, 2016 at 2:43:50 PM UTC+1, Valentin Churavy wrote:
>
> The Julia community has been growing rapidly over the last few years and 
> discussions are happening at many different places: there are several 
> Google Groups (julia-users, julia-dev, ...), IRC, Gitter, and a few other 
> places. Sometimes packages or organisations also have their own forums and 
> chat rooms.
>
>
> In the past, Discourse has been brought up as an alternative platform that 
> we could use instead of Google Groups and that would allow us to invite the 
> entire Julia community into one space. 
>
> Changing something established is tricky and so we decided to move slowly 
> on this.
>
> Right now, we are only moving julia-dev to Discourse (see the 
> corresponding post on julia-dev for a timeline).
>
>
> We would like to solicit feedback from the broader Julia community about 
> moving julia-users to Discourse as well, and potentially other mailing 
> lists like julia-stats.
> If you are interested in trying it out, please visit 
> http://discourse.julialang.org.
>
>
> Discourse is organised by categories so *Development* is the new home for 
> julia-dev and *General* would be the future home of julia-users.
>
> If we are happy with Discourse as a solution, we will move forward with 
> the migration. The timetable would be roughly as follows:
>
>
>
>- About 4 weeks after the move of julia-dev, decision to be made if we 
>move julia-users
>- Announcement on the mailing list, one week before the move.
>- Setting julia-users into read-only mode.
>- Final announcement.
>
> If you have feedback or comments, please post them at 
> http://discourse.julialang.org/t/migration-of-google-groups-to-discourse or 
> in this thread.
>


[julia-users] Simulink alternative, based on Julia?

2016-11-01 Thread Uwe Fechner
Hello,

from my point of view, Julia is already a viable alternative to Matlab for 
flight
and energy system simulations.

What still is missing is a block editor for dynamic systems like Simulink.

The best, open source alternative to Simulink that I know of is XCos, 
which is part of Scilab.
XCos is a block diagram editor and GUI for the hybrid simulator

I think, that the XCos GUI is implemented in Java.
See: https://www.scilab.org/scilab/features/xcos

What would be a reasonable approach for implementing a block diagram
editor for Julia? Using QML.jl? Or could such an editor be implemented
with web technologies, based on Atom?

Any ideas welcome.

Uwe Fechner


[julia-users] Re: Juno workspace variable display.

2016-09-12 Thread Uwe Fechner
It works for me:
Try to open the command palette (Cmd-Shift-P on mac, I guess Ctrl-Shift-P 
on linux and windows), and type 'julia open workspace'. It opens a window 
showing all variables and functions in scope.

On Monday, September 12, 2016 at 11:46:31 PM UTC+2, Patrick Belliveau wrote:
>
> Hi all,
>   In his JuliaCon 2016 talk 
>  on Juno's new graphical 
> debugging capabilities, Mike Innes also showed off a workspace pane in Juno 
> that displays currently defined variable values from an interactive Julia 
> session. My impression from the video is that this feature should be 
> available in the latest version of Juno but I can't get it to show up. As 
> far as I can tell, the feature is not included in my version of Juno. Am I 
> missing something or has this functionality not been released yet? I'm on 
> linux, running 
>
> Julia 0.5.0-rc4+0
> atom 1.9.9
> master branches of Atom.jl,CodeTools.jl,Juno.jl checked out and up to date
> ink 0.5.1
> julia-client 0.5.2
> language-julia 0.6
> uber-juno 0.1.1
>
> Thanks, Patrick
>
> P.S. I've just started using Juno and in general I'm really liking it, 
> especially the debugging gui features. Great work Juno team!
>


[julia-users] Re: Cannot start Julia in Atom

2016-09-10 Thread Uwe Fechner
I uninstalled julia-client and reinstalled it from within Atom as suggested 
by rogerwhitney.
(http://discuss.junolab.org/t/start-julia-error-loading-atom-jl-package/853/2) 
This fixed it for me.

On Saturday, September 10, 2016 at 9:39:39 AM UTC+2, Chris Rackauckas wrote:
>
> The context is important: 
> http://stackoverflow.com/questions/39419502/cannot-start-julia-in-atom-loaderror-argumenterror-juno-not-found-in-path/39420874#39420874
>
> Or the bottom of this: 
> https://gitter.im/JunoLab/atom-ink/archives/2016/09/09
>
> It's known. It's a bad tag. Either just clone Juno.jl or wait for the tag.
>
> On Friday, September 9, 2016 at 8:13:05 PM UTC-7, Yuanchu Dang wrote:
>>
>> ERROR: LoadError: ArgumentError: Juno not found in path
>>  in require at loading.jl:249
>>  in include at boot.jl:261
>>  in include_from_node1 at loading.jl:320
>>  in process_options at client.jl:280
>>  in _start at client.jl:378
>> while loading C:\Users\think\.atom\packages\julia-client\script\boot.jl, 
>> in expression starting on line 36
>>
>

[julia-users] Re: Cell array of images like Matlab

2016-09-10 Thread Uwe Fechner
Sorry, but this is not a complete example that I could run to reproduce the 
problem.

On Saturday, September 10, 2016 at 2:19:19 AM UTC+2, Drew Mahedy wrote:
>
> In Julia, if I try and concatenate two images together of type:
>
> Array{ColorTypes.Gray{FixedPointNumbers.UFixed{UInt8,8}},2} via
>
> cat( 3, img, img ),
>
> I get the following error:
>
> Only two-dimensional images are supported
>
> On Wednesday, September 7, 2016 at 7:24:14 PM UTC-7, Uwe Fechner wrote:
>>
>> Could you post code, that reproduces the problem? 
>>
>> On Thursday, September 8, 2016 at 1:28:00 AM UTC+2, Drew Mahedy wrote:
>>>
>>> I'm just wondering if there is a way to load several RGB .jpg images 
>>> into a 4-D array like can be done in MATLAB using cell array. I have the 
>>> Images package installed but concatenating 2 images in the 3rd or 4th 
>>> dimension says that 'only two-dimensional images are supported in assert2d' 
>>> when I try.
>>>
>>

[julia-users] Re: ANN: Julia 0.5.0-rc4 now available

2016-09-09 Thread Uwe Fechner
Nice work! The regression of RC3 on the load time packages is fixed.

On Friday, September 9, 2016 at 9:39:38 AM UTC+2, Tony Kelman wrote:
>
> I have just tagged and uploaded release candidate 4 for Julia version 
> 0.5.0. Binaries are available from
>
>
> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc4-linux-x86_64.tar.gz
>  
>
> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc4-linux-i686.tar.gz
>
> https://s3.amazonaws.com/julialang/bin/linux/arm/0.5/julia-0.5.0-rc4-linux-arm.tar.gz
>  
>
> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc4-osx10.7+.dmg
>  
>
> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc4-win64.exe
>  
>
> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc4-win32.exe
>  
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc4.sha256 
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc4.md5 
> For gpg signatures (with this key http://julialang.org/juliareleases.asc) 
> of the Linux tar.gz binaries, append .asc to the filename.
>
> Sorry there was a bit of a delay, one of the precompilation-related 
> backports just after RC3 had a bug that took some time to get fixed. Please 
> test this and report any issues. Unless anything major comes up over the 
> weekend or early next week, I plan doing at most a handful more very small 
> backports then tagging 0.5.0 final. Bugfixes will continue to be backported 
> to the release-0.5 branch for an 0.5.1 patch release roughly a month after 
> that.
>
> -Tony
>
>

[julia-users] Re: Cell array of images like Matlab

2016-09-07 Thread Uwe Fechner
Could you post code, that reproduces the problem? 

On Thursday, September 8, 2016 at 1:28:00 AM UTC+2, Drew Mahedy wrote:
>
> I'm just wondering if there is a way to load several RGB .jpg images into 
> a 4-D array like can be done in MATLAB using cell array. I have the Images 
> package installed but concatenating 2 images in the 3rd or 4th dimension 
> says that 'only two-dimensional images are supported in assert2d' when I 
> try.
>


[julia-users] Re: julia error in Atom

2016-09-05 Thread Uwe Fechner
Which operation system are you using? Which Julia version?
Did you try to run 
Pkg.add("Atom")

in the Julia repl?
If yes, which message was displayed?

Uwe

On Monday, September 5, 2016 at 11:49:54 AM UTC+2, bineethz wrote:
>
>
>
> Please help me. I am getting this error when I try to integrate julia with 
> atom.
>
>
>
> [image: Inline images 1]
>
> *Thanks and Regards, *
>
> *Bineeth Kuriakose*
>
>

[julia-users] Re: Is it better to call Julia from C++ or call C++ from Julia?

2016-09-04 Thread Uwe Fechner
Could you explain your fix? I have the same error.

Uwe

On Sunday, September 4, 2016 at 6:22:36 AM UTC+2, K leo wrote:
>
> The error of adding Cxx was eliminated by changing small bits in the 
> makefile.  It builds successfully.  I am so surprised to find that it is 
> such a huge package with over 1GB in size.
>
> On Sunday, September 4, 2016 at 6:41:28 AM UTC+8, K leo wrote:
>>
>> Thanks very much for the advise.
>>
>> One question is whether Cxx is mature enough to be usable at this stage. 
>>  I tried to add it with Julia 0.5 and got the following errors:
>>
>> julia> Pkg.add("Cxx")
>> INFO: Installing Cxx v0.0.1
>> INFO: Building Cxx
>> writing path.jl file
>> Tuning for julia installation at: /home/xxx/Software/julia-e6f843b073/bin
>>  g++ -D_GLIBCXX_USE_CXX11_ABI=0 -fno-rtti -DLIBRARY_EXPORTS -fPIC -O0 -g 
>> -std=c++11   -I/home/xxx/Software/julia-e6f843b073/bin/../../src/support 
>> -I/home/xxx/Software/julia-e6f843b073/bin/../include -Isrc/clang-3.7.1/lib 
>> -Ibuild/clang-3.7.1/include -Isrc/clang-3.7.1/include 
>> -Isrc/llvm-3.7.1/include -Ibuild/llvm-3.7.1/include  -DLLVM_NDEBUG -c 
>> ../src/bootstrap.cpp -o build/bootstrap.o
>> ../src/bootstrap.cpp:19:35: fatal error: llvm/ADT/DenseMapInfo.h: No such 
>> file or directory
>> compilation terminated.
>> BuildBootstrap.Makefile:131: recipe for target 'build/bootstrap.o' failed
>> make: *** [build/bootstrap.o] Error 1
>> =[ ERROR: Cxx 
>> ]=
>>
>> LoadError: failed process: Process(`make -j2 -f BuildBootstrap.Makefile 
>> BASE_JULIA_HOME=/home/xxx/Software/julia-e6f843b073/bin`, ProcessExited(2)) 
>> [2]
>> while loading /home/xxx/.julia/v0.5/Cxx/deps/build.jl, in expression 
>> starting on line 31
>>
>>
>> 
>>
>> [ BUILD ERRORS 
>> ]
>>
>> WARNING: Cxx had build errors.
>>
>>  - packages with build errors remain installed in /home/xxx/.julia/v0.5
>>  - build the package(s) and all dependencies with `Pkg.build("Cxx")`
>>  - build a single package by running its `deps/build.jl` script
>>
>>
>> 
>> INFO: Package database updated
>>
>> On Saturday, September 3, 2016 at 9:17:38 AM UTC+8, Steven G. Johnson 
>> wrote:
>>>
>>>
>>>
>>> On Friday, September 2, 2016 at 8:51:21 PM UTC-4, K leo wrote:

 While the majority of my analytics are in Julia, I will need to use an 
 external event handling API which is implemented in C++.  It looks that I 
 have two options: 1) write the main code in C++ with the API and call 
 Julia 
 function for analytics; 2) write the main code also in Julia that work 
 seamlessly with my analytics and call the C++ API for events.

 Which would be the better path in terms of ease of coding and 
 performance?

>>>
>>> Much easier to call C++ from Julia, particularly with the Cxx.jl package 
>>> .   Performance-wise, it shouldn't 
>>> matter, but it is always easier to write glue code in a higher-level 
>>> language than in a lower-level language. 
>>>
>>

Re: [julia-users] Re: 0.5.0 rc3 error

2016-08-24 Thread Uwe Fechner
If you want to see the real error, do not use parallel make.
Just type "make" instead of "make -j4".
My guess: You don't have libssl-dev installed.

On Wednesday, August 24, 2016 at 5:22:54 PM UTC+2, Henri Girard wrote:
>
> git clone git://github.com/JuliaLang/julia.git
>
> after : git checkout release-0.5
>
> Before I got all dependances from ubuntu sudo apt build-dep julia (I have 
> the 0.5 binary in repo) but I would like to get the dev rc3.
>
>
>
> Le 24/08/2016 à 14:47, Uwe Fechner a écrit :
>
> Where did you get the source code from?
>
> Which command did you execute, that resulted in this error?
>
> On Wednesday, August 24, 2016 at 12:26:30 PM UTC+2, Henri Girard wrote: 
>>
>> I have this error on ubuntu 16.04, any help ?
>>
>>
>> checking usable gmp.h at link time... yes
>> checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... yes
>> checking for __gmpz_init in -lgmp... yes
>> checking if gmp.h version and libgmp version are the same... 
>> (6.1.0/6.1.0) yes
>> checking for GMP library vs header correctness... yes
>> checking for double-to-integer conversion bug... no
>> checking if gmp_printf supports "%jd"... yes
>> checking if gmp_printf supports "%hhd"... yes
>> checking if gmp_printf supports "%lld"... yes
>> checking if gmp_printf supports "%Lf"... yes
>> checking if gmp_printf supports "%td"... yes
>> checking for __gmpn_rootrem... yes
>> checking for __gmpn_sbpi1_divappr_q... yes
>> checking that generated files are newer than configure... done
>> configure: creating ./config.status
>> config.status: creating Makefile
>> config.status: creating doc/Makefile
>> config.status: creating src/Makefile
>> config.status: creating tests/Makefile
>> config.status: creating tune/Makefile
>> config.status: creating src/mparam.h
>> config.status: executing depfiles commands
>> config.status: executing libtool commands
>> Makefile:81 : la recette pour la cible « julia-deps » a échouée
>> make: *** [julia-deps] Erreur 2
>> pi@pc:~/julia$ 
>>
>>
>

[julia-users] Re: 0.5.0 rc3 error

2016-08-24 Thread Uwe Fechner
Where did you get the source code from?

Which command did you execute, that resulted in this error?

On Wednesday, August 24, 2016 at 12:26:30 PM UTC+2, Henri Girard wrote:
>
> I have this error on ubuntu 16.04, any help ?
>
>
> checking usable gmp.h at link time... yes
> checking for GMP_NUMB_BITS and sizeof(mp_limb_t) consistency... yes
> checking for __gmpz_init in -lgmp... yes
> checking if gmp.h version and libgmp version are the same... (6.1.0/6.1.0) 
> yes
> checking for GMP library vs header correctness... yes
> checking for double-to-integer conversion bug... no
> checking if gmp_printf supports "%jd"... yes
> checking if gmp_printf supports "%hhd"... yes
> checking if gmp_printf supports "%lld"... yes
> checking if gmp_printf supports "%Lf"... yes
> checking if gmp_printf supports "%td"... yes
> checking for __gmpn_rootrem... yes
> checking for __gmpn_sbpi1_divappr_q... yes
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating doc/Makefile
> config.status: creating src/Makefile
> config.status: creating tests/Makefile
> config.status: creating tune/Makefile
> config.status: creating src/mparam.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
> Makefile:81 : la recette pour la cible « julia-deps » a échouée
> make: *** [julia-deps] Erreur 2
> pi@pc:~/julia$ 
>
>

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Uwe Fechner
Well, your test with 0.4.5 includes the time of the precompilation, your 
test with 0.5 rc2 not, so this is not a valid comparison.
I compared only the time without precompilation, the second time of using 
the module, but after restarting julia.

Uwe

On Wednesday, August 17, 2016 at 2:32:42 PM UTC+2, Henri Girard wrote:
>
> Thank you... The first one is my mistake when I copy it I started by the 
> second line for the second one I will look further in the doc.
>
> (By the way I did your regression test : First is first time runing in 
> julia second is straight after
>
> 0.4.5 
>
> julia> tic();using PyPlot;toc() 
> INFO: Precompiling module PyPlot... 
> elapsed time: 85.385106597 seconds 
> 85.385106597 
>
> julia> tic();using PyPlot;toc() 
> elapsed time: 0.000178282 seconds 
> 0.000178282 
>
> 0.5 rc2 
>
> julia> tic(); using PyPlot; toc(); 
> elapsed time: 8.056058961 seconds 
>
> julia> tic(); using PyPlot; toc(); 
> elapsed time: 0.000141473 seconds 
>
>
>
> Le vendredi 12 août 2016 14:38:20 UTC+2, Tony Kelman a écrit :
>>
>> I have just tagged and uploaded release candidate 2 for Julia version 
>> 0.5.0. Binaries are available from
>>
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc2-linux-x86_64.tar.gz
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc2-linux-i686.tar.gz
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc2-osx10.7+.dmg
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc2-win64.exe
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc2-win32.exe
>>  
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.sha256 
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.md5 
>> For gpg signatures (with this key http://julialang.org/juliareleases.asc) 
>> of the Linux tar.gz binaries, append .asc to the filename.
>>
>> (arm binaries are taking a while to build, I will upload them later - we 
>> will also put links to this release candidate on the web site soon)
>>
>> The primary thing this does not yet include that we do plan on getting 
>> into the final 0.5.0 release is proxy support for the package manager. A 
>> preliminary version of that has been merged to master but still has some 
>> build system issues that need to be worked out. We will put out a release 
>> candidate 3 next week that will hopefully have this resolved, along with 
>> any other major bug fixes that happen by then. If all goes well and no 
>> major blocking issues come up after that, RC3 could possibly be the last 
>> release candidate and promoted to final, but we will see how it goes next 
>> week. Follow the progress at 
>> https://github.com/JuliaLang/julia/issues/17418 and please report any 
>> issues you find.
>>
>> -Tony
>>
>>

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-17 Thread Uwe Fechner
Hello,
first, I had to move the line:
gangoffourplot(P,tf(1))
after the line, where you define P. This plot works fine.

Next, I can reproduce that 
stepplot(CLs)
doesn't work. But it does not work on Julia 0.4.6 either, so this problem 
is not related to
Julia 5.0 RC2.

Uwe, Ubuntu 14.04, 64 bit

On Wednesday, August 17, 2016 at 11:38:29 AM UTC+2, Henri Girard wrote:
>
> Using 0.5 RC2, this morning I couldn't get the second plot, the first is 
> ok, but the second doesn't display, and worse even in julia console.
> I will try the regression test 
>
> using ControlSystems, Plots
> gangoffourplot(P,tf(1))
>
> J = 2.0
> b = 0.04
> K = 1.0
> R = 0.08
> L = 1e-4
>
> # Create the model transfer function
> s = tf("s")
> P = K/(s*((J*s + b)*(L*s + R) + K^2))
> # This generates the system
> # TransferFunction:
> #1.0
> # -
> # 0.0002s^3 + 0.160004s^2 + 1.0032s
> #
> #Continuous-time transfer function model
>
> # Create an array of closed loop systems for different values of Kp
> CLs = TransferFunction[kp*P/(1 + kp*P) for kp = [1, 5, 15]];
>
> # Plot the step response of the controllers
> stepplot(CLs);
> # Add legend. This is specific to the PyPlot back-end, see documentation 
> for more info.
> PyPlot.legend(["Kp = 1", "Kp = 5", "Kp = 15"])
>
> Le vendredi 12 août 2016 14:38:20 UTC+2, Tony Kelman a écrit :
>>
>> I have just tagged and uploaded release candidate 2 for Julia version 
>> 0.5.0. Binaries are available from
>>
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc2-linux-x86_64.tar.gz
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc2-linux-i686.tar.gz
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc2-osx10.7+.dmg
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc2-win64.exe
>>  
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc2-win32.exe
>>  
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.sha256 
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.md5 
>> For gpg signatures (with this key http://julialang.org/juliareleases.asc) 
>> of the Linux tar.gz binaries, append .asc to the filename.
>>
>> (arm binaries are taking a while to build, I will upload them later - we 
>> will also put links to this release candidate on the web site soon)
>>
>> The primary thing this does not yet include that we do plan on getting 
>> into the final 0.5.0 release is proxy support for the package manager. A 
>> preliminary version of that has been merged to master but still has some 
>> build system issues that need to be worked out. We will put out a release 
>> candidate 3 next week that will hopefully have this resolved, along with 
>> any other major bug fixes that happen by then. If all goes well and no 
>> major blocking issues come up after that, RC3 could possibly be the last 
>> release candidate and promoted to final, but we will see how it goes next 
>> week. Follow the progress at 
>> https://github.com/JuliaLang/julia/issues/17418 and please report any 
>> issues you find.
>>
>> -Tony
>>
>>

Re: [julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-15 Thread Uwe Fechner
I created an issue regarding the performance regression loading precompiled 
packages:
https://github.com/JuliaLang/julia/issues/18030

Uwe

On Saturday, August 13, 2016 at 6:19:42 PM UTC+2, Uwe Fechner wrote:
>
> Hello,
>
> sorry for the late reply. I did the profiling now, but on a different
> machine. Here the results:
>
> Julia 0.5.0-rc2
> @time include("Plotting.jl")
>  11.840783 seconds (7.71 M allocations: 402.976 MB, 2.82% gc time)
>
> You can find the profile in the attached file 
> Julia_profile_0.5.0rc2.txt.zip.
>
>
> Julia 0.4.6
> @time include("Plotting.jl")
>   6.501451 seconds (6.75 M allocations: 286.402 MB, 1.60% gc time)
>
> You can find the profile in the attached file Julia_profile_0.4.6.txt.zip.
>
> One thing, I noticed is that most of the time is spent in the file
> inference.jl .
>
> Best regards:
>
> Uwe Fechner
>
> Am 12.08.2016 um 19:05 schrieb Tony Kelman:
>
> Could you try to profile and see where the time is spent? LLVM 3.7 (used 
> on 0.5) is known to be significantly slower in compile time than LLVM 3.3 
> (used on 0.4).
>
>
> On Friday, August 12, 2016 at 8:52:42 AM UTC-7, Uwe Fechner wrote: 
>>
>> Thanks your hard work!
>>
>> Nevertheless I am a little bit disappointed with the time, needed for 
>> including my own code.
>> With Julia 0.5.0rc2 it needs 11.5 s, with Julia 0.4.6 it was only 6.34 s. 
>> Is this to be expected?
>>
>> I am using packages like PyPlot and JuMP, but I think they are 
>> precompiled.
>>
>> (On Ubuntu 16.06, 64 bits).
>>
>> Julia 0.5.0 rc2
>>
>> julia> tic();include("Plotting.jl");toc()
>> Min (nonlinear expression)
>> Subject to
>>  1 nonlinear constraint
>>  0.15 ≤ area ≤ 2500
>>  60 ≤ height ≤ 500
>> elapsed time: 11.500368527 seconds
>> 11.500368527
>>
>> julia> tic();aenarete();toc()
>>
>>
>> **
>> This program contains Ipopt, a library for large-scale nonlinear 
>> optimization.
>>  Ipopt is released as open source code under the Eclipse Public License 
>> (EPL).
>>  For more information visit http://projects.coin-or.org/Ipopt
>>
>> **
>>
>> elapsed time: 7.29577799 seconds
>> 7.29577799
>>
>>
>> --
>>
>> Julia 0.4.6
>>
>> julia> tic();include("Plotting.jl");toc()
>> Min (nonlinear expression)
>> Subject to
>>  1 nonlinear constraint
>>  0.15 ≤ area ≤ 2500
>>  60 ≤ height ≤ 500
>> elapsed time: 6.347609088 seconds
>> 6.347609088
>>
>> julia> tic();aenarete();toc()
>>
>>
>> **
>> This program contains Ipopt, a library for large-scale nonlinear 
>> optimization.
>>  Ipopt is released as open source code under the Eclipse Public License 
>> (EPL).
>>  For more information visit http://projects.coin-or.org/Ipopt
>>
>> **
>>
>> elapsed time: 6.116511336 seconds
>> 6.116511336
>>
>
>

[julia-users] Re: ANN: Optim v0.6

2016-08-14 Thread Uwe Fechner
Thanks. I did not expect these icons to be links. 
It would be nice to have an explicit link at the end of the README, too.

Uwe 

On Sunday, August 14, 2016 at 1:12:19 AM UTC+2, Kristoffer Carlsson wrote:
>
> It is linked right at the top in the README?
>
> On Saturday, August 13, 2016 at 11:40:24 PM UTC+2, Uwe Fechner wrote:
>>
>> Hello,
>> in the README it says, "for more information, see the documentation".
>> Is the documentation online available? I cannot find it.
>>
>> Uwe 
>>
>> On Saturday, August 13, 2016 at 10:07:57 PM UTC+2, Patrick Kofod Mogensen 
>> wrote:
>>>
>>> We are happy to announce that Optim v0.6 has been released.
>>>
>>> Since v0.5, we've seen some great additions and changes to the package. 
>>> Much
>>> of this has happened with the help of new and old contributors, and 
>>> therefore
>>> this version tag should really be dedicated to them. We've had nine 
>>> contributors
>>> in this minor tag (@pkofod, @ranjanan, @ahwillia, @bjarthur, @Ace139, 
>>> @rgiordan,
>>> @abieler, @matthieugomez, and @amroamroamro). This brings us up to 36 
>>> contributors
>>> in total (I'm not counting you @gitter-badger!), and 15 this year alone. 
>>> It is
>>> great to see so many volunteering their time for this open source 
>>> project.
>>>
>>> In this version we have the following changes
>>> * Added NEWS.md
>>> * Added proper documentation using Documenter.jl
>>> * Changed old solver: Nelder-Mead w/ Adaptive parameters (breaking)
>>> * Julia v0.5 deprecation fixes
>>> * Added solver: NewtonTrustRegion
>>> * Added solver: ParticleSwarm
>>> * Added box constraints to Levenberg Marquardt
>>> * Changed Automatic Differentiation to ForwardDiff
>>> * Various bug fixes
>>>
>>> Worth noting here is that we have some changes to the Nelder-Mead API. 
>>> It is
>>> documented in the new documentation.
>>>
>>> We also have two new solvers: the NewtonTrustRegion solver, and the 
>>> ParticleSwarm
>>> solver. A lot of focus and effort has gone into first order solvers, so 
>>> it's interesting
>>> to see both a new zeroth and second order solver in Optim.
>>>
>>> Box contrains in Levenberg-Marquardt was added, and we switched to 
>>> ForwardDiff for
>>> automatic differentiation, such that you can now obtain Hessians for the 
>>> two Newton
>>> solvers.
>>>
>>> There's plenty of work in the pipeline, so stay tuned for more Optim 
>>> improvements
>>> in the future. We are looking into code refactoring to easy use of the 
>>> code in more
>>> flexible ways, better benchmarking, better testing, and more.
>>>
>>> As always, please report bugs or feature requests to the issue tracker
>>> (https://github.com/JuliaOpt/Optim.jl/issues), and join the chat at 
>>> gitter
>>> (https://gitter.im/JuliaOpt/Optim.jl).
>>>
>>> Optim.jl / JuliaOpt
>>>
>>>

[julia-users] Re: ANN: Optim v0.6

2016-08-13 Thread Uwe Fechner
Hello,
in the README it says, "for more information, see the documentation".
Is the documentation online available? I cannot find it.

Uwe 

On Saturday, August 13, 2016 at 10:07:57 PM UTC+2, Patrick Kofod Mogensen 
wrote:
>
> We are happy to announce that Optim v0.6 has been released.
>
> Since v0.5, we've seen some great additions and changes to the package. 
> Much
> of this has happened with the help of new and old contributors, and 
> therefore
> this version tag should really be dedicated to them. We've had nine 
> contributors
> in this minor tag (@pkofod, @ranjanan, @ahwillia, @bjarthur, @Ace139, 
> @rgiordan,
> @abieler, @matthieugomez, and @amroamroamro). This brings us up to 36 
> contributors
> in total (I'm not counting you @gitter-badger!), and 15 this year alone. 
> It is
> great to see so many volunteering their time for this open source project.
>
> In this version we have the following changes
> * Added NEWS.md
> * Added proper documentation using Documenter.jl
> * Changed old solver: Nelder-Mead w/ Adaptive parameters (breaking)
> * Julia v0.5 deprecation fixes
> * Added solver: NewtonTrustRegion
> * Added solver: ParticleSwarm
> * Added box constraints to Levenberg Marquardt
> * Changed Automatic Differentiation to ForwardDiff
> * Various bug fixes
>
> Worth noting here is that we have some changes to the Nelder-Mead API. It 
> is
> documented in the new documentation.
>
> We also have two new solvers: the NewtonTrustRegion solver, and the 
> ParticleSwarm
> solver. A lot of focus and effort has gone into first order solvers, so 
> it's interesting
> to see both a new zeroth and second order solver in Optim.
>
> Box contrains in Levenberg-Marquardt was added, and we switched to 
> ForwardDiff for
> automatic differentiation, such that you can now obtain Hessians for the 
> two Newton
> solvers.
>
> There's plenty of work in the pipeline, so stay tuned for more Optim 
> improvements
> in the future. We are looking into code refactoring to easy use of the 
> code in more
> flexible ways, better benchmarking, better testing, and more.
>
> As always, please report bugs or feature requests to the issue tracker
> (https://github.com/JuliaOpt/Optim.jl/issues), and join the chat at gitter
> (https://gitter.im/JuliaOpt/Optim.jl).
>
> Optim.jl / JuliaOpt
>
>

[julia-users] Re: ANN: Julia 0.5.0-rc2 now available

2016-08-12 Thread Uwe Fechner
Thanks your hard work!

Nevertheless I am a little bit disappointed with the time, needed for 
including my own code.
With Julia 0.5.0rc2 it needs 11.5 s, with Julia 0.4.6 it was only 6.34 s. 
Is this to be expected?

I am using packages like PyPlot and JuMP, but I think they are precompiled.

(On Ubuntu 16.06, 64 bits).

Julia 0.5.0 rc2

julia> tic();include("Plotting.jl");toc()
Min (nonlinear expression)
Subject to
 1 nonlinear constraint
 0.15 ≤ area ≤ 2500
 60 ≤ height ≤ 500
elapsed time: 11.500368527 seconds
11.500368527

julia> tic();aenarete();toc()

**
This program contains Ipopt, a library for large-scale nonlinear 
optimization.
 Ipopt is released as open source code under the Eclipse Public License 
(EPL).
 For more information visit http://projects.coin-or.org/Ipopt
**

elapsed time: 7.29577799 seconds
7.29577799

--

Julia 0.4.6

julia> tic();include("Plotting.jl");toc()
Min (nonlinear expression)
Subject to
 1 nonlinear constraint
 0.15 ≤ area ≤ 2500
 60 ≤ height ≤ 500
elapsed time: 6.347609088 seconds
6.347609088

julia> tic();aenarete();toc()

**
This program contains Ipopt, a library for large-scale nonlinear 
optimization.
 Ipopt is released as open source code under the Eclipse Public License 
(EPL).
 For more information visit http://projects.coin-or.org/Ipopt
**

elapsed time: 6.116511336 seconds
6.116511336

On Friday, August 12, 2016 at 2:38:20 PM UTC+2, Tony Kelman wrote:
>
> I have just tagged and uploaded release candidate 2 for Julia version 
> 0.5.0. Binaries are available from
>
>
> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc2-linux-x86_64.tar.gz
>  
>
> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc2-linux-i686.tar.gz
>  
>
> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc2-osx10.7+.dmg
>  
>
> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc2-win64.exe
>  
>
> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc2-win32.exe
>  
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.sha256 
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc2.md5 
> For gpg signatures (with this key http://julialang.org/juliareleases.asc) 
> of the Linux tar.gz binaries, append .asc to the filename.
>
> (arm binaries are taking a while to build, I will upload them later - we 
> will also put links to this release candidate on the web site soon)
>
> The primary thing this does not yet include that we do plan on getting 
> into the final 0.5.0 release is proxy support for the package manager. A 
> preliminary version of that has been merged to master but still has some 
> build system issues that need to be worked out. We will put out a release 
> candidate 3 next week that will hopefully have this resolved, along with 
> any other major bug fixes that happen by then. If all goes well and no 
> major blocking issues come up after that, RC3 could possibly be the last 
> release candidate and promoted to final, but we will see how it goes next 
> week. Follow the progress at 
> https://github.com/JuliaLang/julia/issues/17418 and please report any 
> issues you find.
>
> -Tony
>
>

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-11 Thread Uwe Fechner
I did not read about it in any documentation, I just debugged my code in 
the repl and found a solution, that works.

But the following code is ugly:

if Pkg.installed("ForwardDiff") < v"0.2"
Dual1 = ForwardDiff.GradientNumber
else
Dual1 = ForwardDiff.Dual
end

"""
Helper function to round the value of an optimization results, but also
simple real values.
"""
round_me(result::Dual1, n=2) = round(ForwardDiff.value(result), n)
round_me(result::Real, n=2) = round(result, n)
round_me(res_vector::Vector, n=2) = [round_me(result, n) for result in 
res_vector]

Any hints, how to write this code in a cleaner way?

Uwe

On Tuesday, August 9, 2016 at 1:15:08 PM UTC+2, Kristoffer Carlsson wrote:
>
> I didn't think there were any documentation about GradientNumbers in the 
> ForwardDiff documentation hence an implementation detail. Where did you 
> read about it?



Re: [julia-users] Re: map(mean, zip(v...)) doesn't scale

2016-08-10 Thread Uwe Fechner
Here:
rc1+1 on the release-0.5 branch has the bug fixed, and may be more useful 
to test against:

https://s3.amazonaws.com/julianightlies/bin/linux/x64/0.5/julia-0.5.0-acfd04c18b-linux64.tar.gz

Uwe


On Wednesday, August 10, 2016 at 1:12:57 PM UTC+2, Tamas Papp wrote:
>
> Where can I find (64bit, Linux) binaries for rc1+1? 
>
> On Wed, Aug 10 2016, Andreas Lobinger wrote: 
>
> > There is a memory allocation(?) bug in 0.5.0-rc1+0, recommendation is to 
> go 
> > to rc1+1. 
> > 
> > On Wednesday, August 10, 2016 at 12:04:36 PM UTC+2, Tamas Papp wrote: 
> >> 
> >> Thanks. Forgot to say that I am using v"0.5.0-rc1+0". 
> >> 
> >> 
>
>

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-08 Thread Uwe Fechner
Ok, I replaced all occurrences of GradientNumber in my code with Dual (not 
DualNumber!),
and now the code works again.

But this is NOT an implementation detail. It could be an implementation 
detail, if a function for converting
Dual or GradientNumber to real would be part of the package, but it is not.

Therefore it would be nice, if this info could be added to the upgrading 
guide.

Best regards:

Uwe

On Monday, August 8, 2016 at 10:18:10 PM UTC+2, Kristoffer Carlsson wrote:
>
> It is more of an implementation detail but there is DualNumber now.
>
> On Monday, August 8, 2016 at 7:27:42 PM UTC+2, Uwe Fechner wrote:
>>
>> Well, but in the upgrading guide there is no replacement for 
>> GradientNumber mentioned.
>>
>> Any idea?
>>
>> Uwe
>>
>> On Monday, August 8, 2016 at 7:14:45 PM UTC+2, Miles Lubin wrote:
>>>
>>> ForwardDiff 0.2 introduced some breaking changes, you will need to 
>>> update your code (GradientNumber is no longer defined). See the upgrading 
>>> guide <http://www.juliadiff.org/ForwardDiff.jl/upgrade.html>.
>>>
>>> On Monday, August 8, 2016 at 11:10:50 AM UTC-6, Uwe Fechner wrote:
>>>>
>>>> Hello,
>>>> I updated, and now I get the following error:
>>>> julia> include("Plotting.jl")
>>>> INFO: Recompiling stale cache file 
>>>> /home/ufechner/.julia/lib/v0.4/JuMP.ji for module JuMP.
>>>> INFO: Recompiling stale cache file 
>>>> /home/ufechner/.julia/lib/v0.4/ReverseDiffSparse.ji for module 
>>>> ReverseDiffSparse.
>>>> INFO: Recompiling stale cache file 
>>>> /home/ufechner/.julia/lib/v0.4/ForwardDiff.ji for module ForwardDiff.
>>>> INFO: Recompiling stale cache file 
>>>> /home/ufechner/.julia/lib/v0.4/HDF5.ji for module HDF5.
>>>> ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: 
>>>> GradientNumber not defined
>>>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Projects.jl, 
>>>> in expression starting on line 433
>>>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Model.jl, in 
>>>> expression starting on line 19
>>>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Optimizer.jl, 
>>>> in expression starting on line 13
>>>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, 
>>>> in expression starting on line 22
>>>>
>>>> The code, that fails is the following:
>>>> """
>>>> Helper function to convert the value of an optimization results, but 
>>>> also
>>>> simple real values.
>>>> """
>>>> my_value(value::ForwardDiff.GradientNumber) = ForwardDiff.value(value)
>>>> my_value(value::Real) = value
>>>> my_value(val_vector::Vector) = [my_value(value) for value in val_vector]
>>>>
>>>> Any idea how to fix this?
>>>>
>>>> Uwe
>>>>
>>>> On Monday, August 8, 2016 at 4:57:16 PM UTC+2, Miles Lubin wrote:
>>>>>
>>>>> The JuMP team is happy to announce the release of JuMP 0.14. The 
>>>>> release should clear most, if not all, deprecation warnings on Julia 0.5 
>>>>> and is compatible with ForwardDiff 0.2. The full release notes are 
>>>>> here 
>>>>> <https://github.com/JuliaOpt/JuMP.jl/blob/master/NEWS.md#version-0140-august-7-2016>,
>>>>>  
>>>>> and I'd just like to highlight a few points:
>>>>>
>>>>> - *All JuMP users read this*: As previously announced 
>>>>> <https://groups.google.com/d/msg/julia-opt/vUK1NHEHqfk/WD-6lSbMCAAJ>, we 
>>>>> will be deprecating the sum{}, prod{}, and norm{} syntax in favor of 
>>>>> using 
>>>>> Julia 0.5's new syntax for generator statements, e.g., sum(x[i] for i 
>>>>> in 1:N) instead of sum{x[i], i in 1:N}. In this release, the new 
>>>>> syntax is available for testing if using Julia 0.5. No deprecation 
>>>>> warnings 
>>>>> are printed yet. In JuMP 0.15, which will drop support for Julia 0.4, we 
>>>>> will begin printing deprecation warnings for the old syntax.
>>>>>
>>>>> - *Advanced JuMP users read this*: We have introduced a new syntax 
>>>>> for "anonymous" objects, which means that when declaring an optimization 
>>>>> variable, constraint, expression, or parameter, you may omit the name of 

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-08 Thread Uwe Fechner
Well, but in the upgrading guide there is no replacement for GradientNumber 
mentioned.

Any idea?

Uwe

On Monday, August 8, 2016 at 7:14:45 PM UTC+2, Miles Lubin wrote:
>
> ForwardDiff 0.2 introduced some breaking changes, you will need to update 
> your code (GradientNumber is no longer defined). See the upgrading guide 
> <http://www.juliadiff.org/ForwardDiff.jl/upgrade.html>.
>
> On Monday, August 8, 2016 at 11:10:50 AM UTC-6, Uwe Fechner wrote:
>>
>> Hello,
>> I updated, and now I get the following error:
>> julia> include("Plotting.jl")
>> INFO: Recompiling stale cache file /home/ufechner/.julia/lib/v0.4/JuMP.ji 
>> for module JuMP.
>> INFO: Recompiling stale cache file 
>> /home/ufechner/.julia/lib/v0.4/ReverseDiffSparse.ji for module 
>> ReverseDiffSparse.
>> INFO: Recompiling stale cache file 
>> /home/ufechner/.julia/lib/v0.4/ForwardDiff.ji for module ForwardDiff.
>> INFO: Recompiling stale cache file /home/ufechner/.julia/lib/v0.4/HDF5.ji 
>> for module HDF5.
>> ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: 
>> GradientNumber not defined
>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Projects.jl, in 
>> expression starting on line 433
>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Model.jl, in 
>> expression starting on line 19
>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Optimizer.jl, 
>> in expression starting on line 13
>> while loading /home/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, in 
>> expression starting on line 22
>>
>> The code, that fails is the following:
>> """
>> Helper function to convert the value of an optimization results, but also
>> simple real values.
>> """
>> my_value(value::ForwardDiff.GradientNumber) = ForwardDiff.value(value)
>> my_value(value::Real) = value
>> my_value(val_vector::Vector) = [my_value(value) for value in val_vector]
>>
>> Any idea how to fix this?
>>
>> Uwe
>>
>> On Monday, August 8, 2016 at 4:57:16 PM UTC+2, Miles Lubin wrote:
>>>
>>> The JuMP team is happy to announce the release of JuMP 0.14. The release 
>>> should clear most, if not all, deprecation warnings on Julia 0.5 and is 
>>> compatible with ForwardDiff 0.2. The full release notes are here 
>>> <https://github.com/JuliaOpt/JuMP.jl/blob/master/NEWS.md#version-0140-august-7-2016>,
>>>  
>>> and I'd just like to highlight a few points:
>>>
>>> - *All JuMP users read this*: As previously announced 
>>> <https://groups.google.com/d/msg/julia-opt/vUK1NHEHqfk/WD-6lSbMCAAJ>, we 
>>> will be deprecating the sum{}, prod{}, and norm{} syntax in favor of using 
>>> Julia 0.5's new syntax for generator statements, e.g., sum(x[i] for i 
>>> in 1:N) instead of sum{x[i], i in 1:N}. In this release, the new syntax 
>>> is available for testing if using Julia 0.5. No deprecation warnings are 
>>> printed yet. In JuMP 0.15, which will drop support for Julia 0.4, we will 
>>> begin printing deprecation warnings for the old syntax.
>>>
>>> - *Advanced JuMP users read this*: We have introduced a new syntax for 
>>> "anonymous" objects, which means that when declaring an optimization 
>>> variable, constraint, expression, or parameter, you may omit the name of 
>>> the object within the macro. The macro will instead return the object 
>>> itself which you can assign to a variable if you'd like. Example:
>>>
>>> # instead of @variable(m, l[i] <= x[i=1:N] <= u[i]):
>>> x = @variable(m, [i=1:N], lowerbound=l[i], upperbound=u[i]) 
>>>
>>> This syntax should be comfortable for advanced use cases of JuMP (e.g., 
>>> within a library) and should obviate some confusions about JuMP's variable 
>>> scoping rules.
>>>
>>> - We also have a new input form for nonlinear expressions that has the 
>>> potential to extend JuMP's scope as an AD tool. Previously all nonlinear 
>>> expressions needed to be input via macros, which isn't convenient if the 
>>> expression is generated programmatically. You can now set nonlinear 
>>> objectives and add nonlinear constraints by providing a Julia Expr 
>>> object directly with JuMP variables spliced in. This means that you can now 
>>> generate expressions via symbolic manipulation and add them directly to a 
>>> JuMP model. See the example in the documentation 
>>> <http://www.juliaopt.org/JuMP.jl/0.14/nlp.html#raw-expression-input>.
>>>
>>> Finally, I'd like to thank Joaquim Dias Garcia, Oscar Dowson, Mehdi 
>>> Madani, and Jarrett Revels for contributions to this release which are 
>>> cited in the release notes.
>>>
>>> Miles, Iain, and Joey
>>>
>>>
>>>

[julia-users] Re: ANN: JuMP 0.14 released

2016-08-08 Thread Uwe Fechner
Hello,
I updated, and now I get the following error:
julia> include("Plotting.jl")
INFO: Recompiling stale cache file /home/ufechner/.julia/lib/v0.4/JuMP.ji 
for module JuMP.
INFO: Recompiling stale cache file 
/home/ufechner/.julia/lib/v0.4/ReverseDiffSparse.ji for module 
ReverseDiffSparse.
INFO: Recompiling stale cache file 
/home/ufechner/.julia/lib/v0.4/ForwardDiff.ji for module ForwardDiff.
INFO: Recompiling stale cache file /home/ufechner/.julia/lib/v0.4/HDF5.ji 
for module HDF5.
ERROR: LoadError: LoadError: LoadError: LoadError: UndefVarError: 
GradientNumber not defined
while loading /home/ufechner/00PythonSoftware/FastSim/src/Projects.jl, in 
expression starting on line 433
while loading /home/ufechner/00PythonSoftware/FastSim/src/Model.jl, in 
expression starting on line 19
while loading /home/ufechner/00PythonSoftware/FastSim/src/Optimizer.jl, in 
expression starting on line 13
while loading /home/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, in 
expression starting on line 22

The code, that fails is the following:
"""
Helper function to convert the value of an optimization results, but also
simple real values.
"""
my_value(value::ForwardDiff.GradientNumber) = ForwardDiff.value(value)
my_value(value::Real) = value
my_value(val_vector::Vector) = [my_value(value) for value in val_vector]

Any idea how to fix this?

Uwe

On Monday, August 8, 2016 at 4:57:16 PM UTC+2, Miles Lubin wrote:
>
> The JuMP team is happy to announce the release of JuMP 0.14. The release 
> should clear most, if not all, deprecation warnings on Julia 0.5 and is 
> compatible with ForwardDiff 0.2. The full release notes are here 
> ,
>  
> and I'd just like to highlight a few points:
>
> - *All JuMP users read this*: As previously announced 
> , we 
> will be deprecating the sum{}, prod{}, and norm{} syntax in favor of using 
> Julia 0.5's new syntax for generator statements, e.g., sum(x[i] for i in 
> 1:N) instead of sum{x[i], i in 1:N}. In this release, the new syntax is 
> available for testing if using Julia 0.5. No deprecation warnings are 
> printed yet. In JuMP 0.15, which will drop support for Julia 0.4, we will 
> begin printing deprecation warnings for the old syntax.
>
> - *Advanced JuMP users read this*: We have introduced a new syntax for 
> "anonymous" objects, which means that when declaring an optimization 
> variable, constraint, expression, or parameter, you may omit the name of 
> the object within the macro. The macro will instead return the object 
> itself which you can assign to a variable if you'd like. Example:
>
> # instead of @variable(m, l[i] <= x[i=1:N] <= u[i]):
> x = @variable(m, [i=1:N], lowerbound=l[i], upperbound=u[i]) 
>
> This syntax should be comfortable for advanced use cases of JuMP (e.g., 
> within a library) and should obviate some confusions about JuMP's variable 
> scoping rules.
>
> - We also have a new input form for nonlinear expressions that has the 
> potential to extend JuMP's scope as an AD tool. Previously all nonlinear 
> expressions needed to be input via macros, which isn't convenient if the 
> expression is generated programmatically. You can now set nonlinear 
> objectives and add nonlinear constraints by providing a Julia Expr object 
> directly with JuMP variables spliced in. This means that you can now 
> generate expressions via symbolic manipulation and add them directly to a 
> JuMP model. See the example in the documentation 
> .
>
> Finally, I'd like to thank Joaquim Dias Garcia, Oscar Dowson, Mehdi 
> Madani, and Jarrett Revels for contributions to this release which are 
> cited in the release notes.
>
> Miles, Iain, and Joey
>
>
>

[julia-users] Re: new installation of julia

2016-08-07 Thread Uwe Fechner
The informations, that you give are not precise enough.
Which Windows version do you have?
How do you launch julia?
Are you sure, that you do not have to versions of julia on your computer?

On Linux, for me the following was sufficient to upgrade julia 0.4 to  
0.4.7-pre+3:

git pull
git checkout v0.4.6
make -j4
./julia

If I type git checkout again, I get the same message:
HEAD ist jetzt bei 2e358ce... Tag v0.4.6

Sometimes it is needed to do 
make clean
make distclean
make -j4

For details on Windows look here:
https://github.com/JuliaLang/julia/blob/master/README.windows.md

Good luck!

And: Installing the binary distribution as explained in the link above (no 
installer,
just extracting the downloaded file) is probably the easiest way to go.


On Sunday, August 7, 2016 at 3:59:11 PM UTC+2, digxx wrote:
>
> Hey thx for ur answer. Somewhere I read it is recommended more to compile 
> it urself than using the precompiled binaries.
> Apart from that I tried once using them and it didnt work somehow.
> Or are u talking about the windows installer for me?
>
> Btw, does it have any effect after compiling and installing Julia to git 
> checkout v0.4.6 coz it still tells me
> HEAD is now at 2e358ce... Tag v0.4.6
> and I'm not sure what it means
>


[julia-users] Re: new installation of julia

2016-08-07 Thread Uwe Fechner
Is there a reason, why you want to compile Julia yourself? 
It might be easier to use a precompiled version, that you can download from 
http://julialang.org/downloads/ .

ln -s creates a symbolic link to the executable, such that is in the search 
path. This is the way to go 
on Linux, but I don't know if it works with mingw on Windows, that you are 
using.

On Linux, you can check with
which julia
in which directory the julia executable is found. Perhaps you have two 
versions on your computer
and you execute the old version because it is in the search path before 
your new version?

On Sunday, August 7, 2016 at 3:14:24 PM UTC+2, digxx wrote:
>
> hey thx,
> So i did git checkout v0.4.6 and compiled and in julia versioninfo() still 
> says 0.4.0 ??!
> u sure I need to do git checkout 0.4.6 or git checkout v0.4.6
>
> About this sudo In -s:
> I dont quite understand, so I write
>
> make sudo In -s /julia/usr/bin/julia4.6 ???
>
> What does the In or ln ( is it i or l ) stand for?
>


[julia-users] Re: Announcing 0.5.0-rc0 and binaries available

2016-08-04 Thread Uwe Fechner
Which bug (issue) was it?

On Thursday, August 4, 2016 at 3:53:29 PM UTC+2, Tony Kelman wrote:
>
> 0.5.0-rc1 has been tagged and binaries are now available.
>
>
> https://s3.amazonaws.com/julialang/bin/linux/arm/0.5/julia-0.5.0-rc1-linux-arm.tar.gz
>
> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc1-linux-x86_64.tar.gz
>
> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc1-linux-i686.tar.gz
>
> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc1-osx10.7+.dmg
>
> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc1-win64.exe
>
> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc1-win32.exe
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc1.sha256
> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc1.md5
>
> (append .asc to the linux .tar.gz links for gpg signatures)
>
>
> There will be a RC2 next week. An especially nasty bug was introduced on 
> master right before we branched for release-0.5 and I unfortunately missed 
> it in my testing. I had a PkgEval run going but tagged before it was 
> finished, in order to get binaries building. I won't be repeating that 
> mistake next time.
>
>
> On Sunday, July 31, 2016 at 3:27:29 PM UTC-7, Viral Shah wrote:
>>
>> Hello everyone,
>>
>> You may have noticed 0.5.0-rc0 being tagged last week. The binaries are 
>> now all ready and available for testing. This is a good point for package 
>> developers to make their packages ready for 0.5, and for users to test 
>> their codes on the new release.
>>
>>
>> https://s3.amazonaws.com/julialang/bin/linux/arm/0.5/julia-0.5.0-rc0-linux-arm.tar.gz
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x64/0.5/julia-0.5.0-rc0-linux-x86_64.tar.gz
>>
>> https://s3.amazonaws.com/julialang/bin/linux/x86/0.5/julia-0.5.0-rc0-linux-i686.tar.gz
>>
>> https://s3.amazonaws.com/julialang/bin/osx/x64/0.5/julia-0.5.0-rc0-osx10.7+.dmg
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x64/0.5/julia-0.5.0-rc0-win64.exe
>>
>> https://s3.amazonaws.com/julialang/bin/winnt/x86/0.5/julia-0.5.0-rc0-win32.exe
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc0.sha256
>> https://s3.amazonaws.com/julialang/bin/checksums/julia-0.5.0-rc0.md5
>>
>> We expect to have a new rc roughly every week until all the dust settles 
>> and 0.5.0 is finally released. Follow the progress at:
>>
>> https://github.com/JuliaLang/julia/issues/17418
>>
>> -viral
>>
>>

Re: [julia-users] How to install julia-0.5.0-rc0 on Ubuntu Linux

2016-07-29 Thread Uwe Fechner
Thanks.

On Thursday, July 28, 2016 at 5:37:38 PM UTC+2, Andreas Lobinger wrote:
>
>
>
> On Thursday, July 28, 2016 at 4:37:24 PM UTC+2, Uwe Fechner wrote:
>>
>> The following command fixed the problem:
>> sudo apt-get install libssl-dev
>>
>> Perhaps this command could be mentioned in the section "Ubuntu" of 
>> Readme.md 
>>
>  
> it actually is, in section Required Build Tools and External Libraries 
>


Re: [julia-users] How to install julia-0.5.0-rc0 on Ubuntu Linux

2016-07-28 Thread Uwe Fechner
The following command fixed the problem:
sudo apt-get install libssl-dev

Perhaps this command could be mentioned in the section "Ubuntu" of 
Readme.md ?

On Thursday, July 28, 2016 at 3:37:28 PM UTC+2, Andreas Lobinger wrote:
>
> As the error message relates to a missing OpenSSL ->
> try to find setttings for: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR, it 
> might be an idea to install the openSSL development package.
>
>

Re: [julia-users] How to install julia-0.5.0-rc0 on Ubuntu Linux

2016-07-28 Thread Uwe Fechner
I did. Took very long, but now there is a better error message:

100   375  100   3750 0797  0 --:--:-- --:--:-- --:--:--   
797
100 4077k  100 4077k0 0  1915k  0  0:00:02  0:00:02 --:--:-- 
2714k
patching file CMakeLists.txt
Hunk #1 succeeded at 343 (offset -11 lines).
patching file src/transports/ssh.c
patching file CMakeLists.txt
Hunk #1 succeeded at 274 (offset 57 lines).
patching file src/openssl_stream.c
-- The C compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") 
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC
-- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed
-- Performing Test HAVE_STRUCT_STAT_NSEC
-- Performing Test HAVE_STRUCT_STAT_NSEC - Success
-- checking for module 'libcurl'
--   package 'libcurl' not found
CMake Error at /usr/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.
cmake:138 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES
  OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.2/Modules/FindPackageHandleStandardArgs.cmake:374 (
_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.2/Modules/FindOpenSSL.cmake:334 (
find_package_handle_standard_args)
  CMakeLists.txt:277 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also 
"/home/ufechner/00Software/julia-0.5.0-rc0/deps/build/libgit2-211e117a0590583a720c53172406f34186c543bd/CMakeFiles/CMakeOutput.log"
.
See also 
"/home/ufechner/00Software/julia-0.5.0-rc0/deps/build/libgit2-211e117a0590583a720c53172406f34186c543bd/CMakeFiles/CMakeError.log"
.
make[1]: *** [build/libgit2-211e117a0590583a720c53172406f34186c543bd/
Makefile] Error 1
make: *** [julia-deps] Error 2

Any idea, how to fix this?

Best regards:

Uwe 


On Thursday, July 28, 2016 at 11:07:20 AM UTC+2, Milan Bouchet-Valat wrote:
>
> Le jeudi 28 juillet 2016 à 01:58 -0700, Uwe Fechner a écrit : 
> > Hello, 
> > 
> > I am trying to install julia-0.5.0-rc0 . 
> > 
> > I downloaded it from Github, unpacked it and executed 
> > make -j4 
> > 
> > The building failed after 10 minutes with the following 
> > message: 
> > 
> > 
> >  cblas_zhpr2  PASSED THE COMPUTATIONAL TESTS (   577 CALLS) 
> >  cblas_zhpr2  PASSED THE COMPUTATIONAL TESTS (   577 CALLS) 
> > 
> >  END OF TESTS 
> > OK. 
> > 
> >  OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE) 
> > 
> >   OS   ... Linux  
> >   Architecture ... x86_64
> >   BINARY   ... 64bit  
> >   Use 64 bits int(equivalent to "-i8" in Fortran)   
> >   C compiler   ... GCC  (command line : gcc -m64) 
> >   Fortran compiler ... GFORTRAN  (command line : gfortran -m64) 
> >   Library Name ... libopenblas64_p-r0.2.18.a (Multi threaded; Max 
> > num-threads is 16) 
> > 
> > To install the library, you can run "make 
> > PREFIX=/path/to/your/installation install". 
> > 
> > make: *** [julia-deps] Error 2 
> > ufechner@TUD277255:~/00Software/julia-0.5.0-rc0$ 
> > 
> > 
> > How can I fix this? 
> > 
> > I am using Ubuntu 14.04. 
> Can you run it without -j4 and post the last messages? Those reported 
> here don't seem related to the failure. 
>
>
> Regards 
>


[julia-users] How to install julia-0.5.0-rc0 on Ubuntu Linux

2016-07-28 Thread Uwe Fechner
Hello,

I am trying to install julia-0.5.0-rc0 .

I downloaded it from Github, unpacked it and executed
make -j4

The building failed after 10 minutes with the following
message:


 cblas_zhpr2  PASSED THE COMPUTATIONAL TESTS (   577 CALLS)
 cblas_zhpr2  PASSED THE COMPUTATIONAL TESTS (   577 CALLS)

 END OF TESTS
OK.

 OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)

  OS   ... Linux 
  Architecture ... x86_64   
  BINARY   ... 64bit 
  Use 64 bits int(equivalent to "-i8" in Fortran)  
  C compiler   ... GCC  (command line : gcc -m64)
  Fortran compiler ... GFORTRAN  (command line : gfortran -m64)
  Library Name ... libopenblas64_p-r0.2.18.a (Multi threaded; Max 
num-threads 
is 16)

To install the library, you can run "make PREFIX=/path/to/your/installation 
install".

make: *** [julia-deps] Error 2
ufechner@TUD277255:~/00Software/julia-0.5.0-rc0$ 


How can I fix this?

I am using Ubuntu 14.04.

Best regards:

Uwe


Re: [julia-users] What is a gc frame?

2016-07-24 Thread Uwe Fechner
Thanks for your answer. Some more questions:
- is a gc frame just a pointer?
- if not, which information does it hold? In which file is the gc frame 
type/
  structure defined?
- is there exactly one gc frame for each local variable?
- why is it called "frame"? The term implies, that it is around something.
  Is this the case?

On Sunday, July 24, 2016 at 1:56:05 PM UTC+2, Yichao Yu wrote:
>
> On Sun, Jul 24, 2016 at 6:03 AM, Uwe Fechner <uwe.fec...@gmail.com 
> > wrote: 
> > Hello, 
> > in the issues on github I see a lot that refer to gc frames. 
> > 
> > What is a gc frame? I know how garbage collection works in general, 
> > but I don't understand the meaning of gc frames in the context of Julia. 
> > 
> > Could someone explain: 
> > - What they are used for? 
>
> Keep reference to local variables. 
>
> > - When they need to be created? 
>
> When there's local variables that are heap allocated. 
>
> > - If they have a lifetime, that needs to be managed. 
>
> They are stack allocated. 
>
> > 
> > Thank you very much! 
> > 
> > Uwe 
>


[julia-users] What is a gc frame?

2016-07-24 Thread Uwe Fechner
Hello,
in the issues on github I see a lot that refer to gc frames.

What is a gc frame? I know how garbage collection works in general,
but I don't understand the meaning of gc frames in the context of Julia.

Could someone explain:
- What they are used for?
- When they need to be created?
- If they have a lifetime, that needs to be managed.

Thank you very much!

Uwe


Re: [julia-users] Re: How to install 0.4.5 on Ubuntu?

2016-07-15 Thread Uwe Fechner
Well, the ppa is up-to-date and works well.

On Ubuntu a ppa is (nearly) always better than generic binaries, because
the package manager can be used to keep Julia up-to-date.

Only if a ppa is not maintained generic binaries are an alternative.

Uwe

Am 15.07.2016 um 19:37 schrieb Tony Kelman:
> The PPA is deprecated and not actively maintianed. Use the generic Linux 
> binaries. Download and extract the tarball, then run bin/julia.



Re: [julia-users] Re: How to install 0.4.5 on Ubuntu?

2016-07-15 Thread Uwe Fechner
Which Ubuntu version do you have?

There is no problem for me on 14.04, 64bit.

Have a look in the folder:
/etc/apt/sources.list.d

Perhaps you find there a file containing the name

|julianightlies ? If so, delete it and try again. Uwe |


On 15.07.2016 17:21, Ahmed Mazari wrote:
> yes but it installs  the version 0.5
>
> On Fri, Jul 15, 2016 at 4:39 PM, Uwe Fechner
> <uwe.fechner@gmail.com <mailto:uwe.fechner@gmail.com>> wrote:
>
> Did you try:
>
> sudo add-apt-repository ppa:staticfloat/juliareleases
>
> sudo add-apt-repository ppa:staticfloat/julia-deps
>
> sudo apt-get update
>
> sudo apt-get install julia
>
>
> You need to have the correct ppa enabled!
>
>
> Uwe
>
>
>
> On Friday, July 15, 2016 at 3:49:04 PM UTC+2, Ahmed Mazari wrote:
>
> How to install julia 0.4.6 in ubuntu ?
>
> l tried 
> sudo apt-get install julia=v0.4.6 but it's not working
>
> On Sunday, May 22, 2016 at 12:27:37 PM UTC+2, Nils Gudat wrote:
>
> Slightly stupid question from someone who is forced to use
> Linux on a server: how can I get the latest stable version
> as opposed ot the dev release?
> I followed the instructions from here
> (http://julialang.org/downloads/platform.html), but always
> end up with a 44-day old 0.5 master version installed...
>
>



[julia-users] Re: How to install 0.4.5 on Ubuntu?

2016-07-15 Thread Uwe Fechner
Did you try:

sudo add-apt-repository ppa:staticfloat/juliareleases

sudo add-apt-repository ppa:staticfloat/julia-deps

sudo apt-get update

sudo apt-get install julia


You need to have the correct ppa enabled!


Uwe


On Friday, July 15, 2016 at 3:49:04 PM UTC+2, Ahmed Mazari wrote:
>
> How to install julia 0.4.6 in ubuntu ?
>
> l tried  
> sudo apt-get install julia=v0.4.6 but it's not working
>
> On Sunday, May 22, 2016 at 12:27:37 PM UTC+2, Nils Gudat wrote:
>>
>> Slightly stupid question from someone who is forced to use Linux on a 
>> server: how can I get the latest stable version as opposed ot the dev 
>> release? 
>> I followed the instructions from here (
>> http://julialang.org/downloads/platform.html), but always end up with a 
>> 44-day old 0.5 master version installed...
>>
>

[julia-users] Re: ERROR: LoadError: __precompile__(true) but require failed to create a precompiled cache file

2016-06-28 Thread Uwe Fechner
Sorry for the noise, but this was just a programming error of me.

Back to the orignal question: Would it be possible to improve the following 
error message:
ERROR: LoadError: __precompile__(true) but require failed to create a 
precompiled cache file
Such that it says:
Please try to restart Julia and try again?

Uwe

On Tuesday, June 28, 2016 at 9:51:33 PM UTC+2, Uwe Fechner wrote:
>
> Ok, I restarted Julia, tried to include my program again. It failed again. 
> Did another Pkg.update() and tried to include my program again.
> It failed again, but now with a different error:
>
> julia> include("Plotting.jl")
> ERROR: LoadError: LoadError: LoadError: LoadError: MethodError: `*` has no 
> method matching *(::Array{Any,1}, ::Array{Any,1})
> Closest candidates are:
>   *(::Any, ::Any, ::Any, ::Any...)
>   
> *{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression}}(::Union{Array{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression},2},SparseMatrixCSC{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression},Ti<:Integer}},
>  
> ::Union{Array{T,1},Array{T,2},SparseMatrixCSC{Tv,Ti<:Integer}})
>   
> *{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},S}(::Union{DenseArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2},SubArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64,LD}},
>  
> ::Union{DenseArray{S,1},SubArray{S,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64,LD}})
>   ...
>  in call at /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl:91
>  in call at /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl:175
>  in include at ./boot.jl:261
>  in include_from_node1 at ./loading.jl:320
>  in require at ./loading.jl:259
>  in include at ./boot.jl:261
>  in include_from_node1 at ./loading.jl:320
>  in include at ./boot.jl:261
>  in include_from_node1 at ./loading.jl:320
>  in include at ./boot.jl:261
>  in include_from_node1 at ./loading.jl:320
> while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl, 
> in expression starting on line 336
> while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Model.jl, in 
> expression starting on line 19
> while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Optimizer.jl, 
> in expression starting on line 13
> while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, 
> in expression starting on line 22
>
> julia> 
>
> Any idea?
>
> On Tuesday, June 28, 2016 at 12:17:10 PM UTC+2, Steven G. Johnson wrote:
>>
>> Restart Julia and try again.  (This is because the old Compat module was 
>> already loaded, so the new precompiled one couldn't load.)
>>
>

[julia-users] Re: ERROR: LoadError: __precompile__(true) but require failed to create a precompiled cache file

2016-06-28 Thread Uwe Fechner
Ok, I restarted Julia, tried to include my program again. It failed again. 
Did another Pkg.update() and tried to include my program again.
It failed again, but now with a different error:

julia> include("Plotting.jl")
ERROR: LoadError: LoadError: LoadError: LoadError: MethodError: `*` has no 
method matching *(::Array{Any,1}, ::Array{Any,1})
Closest candidates are:
  *(::Any, ::Any, ::Any, ::Any...)
  
*{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression}}(::Union{Array{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression},2},SparseMatrixCSC{T<:Union{JuMP.AbstractJuMPScalar,JuMP.GenericNormExpr{2,Float64,JuMP.Variable},JuMP.GenericNorm{P,Float64,JuMP.Variable},JuMP.NonlinearExpression},Ti<:Integer}},
 
::Union{Array{T,1},Array{T,2},SparseMatrixCSC{Tv,Ti<:Integer}})
  
*{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},S}(::Union{DenseArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2},SubArray{T<:Union{Complex{Float32},Complex{Float64},Float32,Float64},2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64,LD}},
 
::Union{DenseArray{S,1},SubArray{S,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64,LD}})
  ...
 in call at /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl:91
 in call at /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl:175
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in require at ./loading.jl:259
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Projects.jl, 
in expression starting on line 336
while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Model.jl, in 
expression starting on line 19
while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Optimizer.jl, 
in expression starting on line 13
while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, 
in expression starting on line 22

julia> 

Any idea?

On Tuesday, June 28, 2016 at 12:17:10 PM UTC+2, Steven G. Johnson wrote:
>
> Restart Julia and try again.  (This is because the old Compat module was 
> already loaded, so the new precompiled one couldn't load.)
>


[julia-users] ERROR: LoadError: __precompile__(true) but require failed to create a precompiled cache file

2016-06-27 Thread Uwe Fechner
Hello, 

I get the following error message after upgrading Compat.jl (I had it fixed 
before):

julia> include("Plotting.jl")
INFO: Recompiling stale cache file 
/home/ufechner/.julia/lib/v0.4/FixedPointNumbers.ji for module 
FixedPointNumbers.
WARNING: Module Compat uuid did not match cache file
  This is likely because module Compat does not support  precompilation but 
is imported by a module that does.
WARNING: deserialization checks failed while attempting to load cache from 
/home/ufechner/.julia/lib/v0.4/FixedPointNumbers.ji
INFO: Precompiling module FixedPointNumbers...
INFO: Recompiling stale cache file 
/home/ufechner/.julia/lib/v0.4/FixedPointNumbers.ji for module 
FixedPointNumbers.
WARNING: Module Compat uuid did not match cache file
  This is likely because module Compat does not support  precompilation but 
is imported by a module that does.
ERROR: LoadError: __precompile__(true) but require failed to create a 
precompiled cache file
 in require at ./loading.jl:268
 in stale_cachefile at loading.jl:457
 in recompile_stale at loading.jl:474
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:235
 in stale_cachefile at loading.jl:457
 in recompile_stale at loading.jl:474
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:235
 in stale_cachefile at loading.jl:457
 in recompile_stale at loading.jl:474
 in _require_from_serialized at loading.jl:83
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:235
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
while loading /mnt/ssd/ufechner/00PythonSoftware/FastSim/src/Plotting.jl, 
in expression starting on line 21

julia> 

Any idea, how to fix this?

Uwe Fechner


[julia-users] Re: FFT speed much slower than Octave

2016-06-18 Thread Uwe Fechner
For a fair comparison, the Julia function rfft() should be compared with 
the Octave function fft2(). Both do a 2-D transform.
I don't see any significant differences between Julia (with 2 threads) and 
Octave.

Perhaps the discussion can be continued on github: 
https://github.com/JuliaLang/julia/issues/17000

On Saturday, June 18, 2016 at 7:56:28 AM UTC+2, Ethan Anderes wrote:
>
> In Julia, fft of a matrix is a 2-d transform. I think the corresponding 
> fft function in matlab just takes the 1-d fft of the columns. This might 
> explain part of the discrepancy. 
>
> On Friday, June 17, 2016 at 8:24:48 PM UTC-7, Logan Williams wrote:
>>
>> A small improvement, but still much slower than Octave.
>>
>> julia> R = rand(512,512)
>>
>> julia> @time rfft(R);
>>
>>   0.012027 seconds (93 allocations: 2.012 MB)
>>
>>
>> julia> R = rand(5000,5000);
>>
>> julia> @time rfft(R);
>>
>>   1.461964 seconds (99 allocations: 190.816 MB, 1.16% gc time)
>>
>>
>> Unfortunately, I don't know exactly how many threads Octave uses by 
>> default.
>>
>>
>> Logan
>>
>> On Friday, June 17, 2016 at 8:04:49 PM UTC-7, Scott Jones wrote:
>>>
>>> Your processor can handle 4 simultaneous threads with HyperThreading.
>>> What are your results if you try setting the number of threads to 4?
>>> Do you know how many threads Octave uses for FFTW on your machine?
>>>
>>> -Scott
>>>
>>> On Friday, June 17, 2016 at 3:01:45 PM UTC-4, Logan Williams wrote:

 Followup: setting FFTW.set_num_threads(2) (my machine only has two 
 cores) and using rfft closes the gap somewhat, but there's still a 
 substantial difference.

 julia> R = rand(5000,5000);

 julia> @time rfft(R);

   1.736385 seconds (99 allocations: 190.816 MB, 0.95% gc time)


 julia> R = rand(512,512);

 julia> @time rfft(R);

   0.018692 seconds (93 allocations: 2.012 MB)



 On Friday, June 17, 2016 at 11:56:44 AM UTC-7, Logan Williams wrote:
>
> Hi,
>
> I'm finding that a 2D FFT in Julia is an order of magnitude slower 
> than GNU Octave. Does anyone know why this is happening?
>
> Thanks,
> Logan
>
> In Octave:
>
> >> R = rand(512,512);
> >> tic; fft2(R); toc;
> Elapsed time is 0.00377011 seconds.
>
> In Julia:
>
> julia> R = rand(512,512);
>
> julia> @time fft(R);
>
>   0.042149 seconds (76 allocations: 8.003 MB)
>
>
> In Octave with non-power of 2 size:
>
>
> >> R = rand(5000,5000);
>
> >> tic; fft2(R); toc;
>
> Elapsed time is 0.556037 seconds.
>
>
> In Julia with non-power of 2 size:
>
>
> julia> R = rand(5000,5000);
>
> julia> @time fft(R);
>
>   6.212666 seconds (76 allocations: 762.943 MB, 1.17% gc time)
>


[julia-users] Re: ANN: Documenter.jl

2016-06-17 Thread Uwe Fechner
Hello,

I installed Documenter and followed the tutorial. Now I would like to 
convert the documentation in html WITHOUT deploying
it to github. How can I do this?

Uwe

On Friday, June 17, 2016 at 11:07:26 AM UTC+2, Michael Hatherly wrote:
>
> I’m please to announce the initial release of Documenter.jl 
>  — a documentation generator 
> for Julia.
>
> The package docs are here 
> .
>
> The package is still a work-in-progress, but now has sufficient features 
> to make a stable release worth while. Major breaking changes should 
> hopefully be few and far between from now on.
>
> If you have already been making use of the package, which quite a few of 
> the community have been, then I’d would like to extend my thanks to you for 
> helping file bug reports, feature requests, and pull requests.
>
> Please do upgrade your .travis.yml configuration to reflect the fact that 
> Documenter is now tagged and available from METADATA. All that should be 
> needed is to replace either
>
> Pkg.clone("https://github.com/MichaelHatherly/Documenter.jl;)
>
> or, more recently,
>
> Pkg.clone("https://github.com/JuliaDocs/Documenter.jl;)
>
> with
>
> Pkg.add("Documenter")
>
> and your build scripts should work fine. Any problems you happen to run 
> into should, as always, be reported on the GitHub issue tracker 
> . master will be more 
> unstable from this point on.
>
> If you do have a publicly available package that is making use of 
> Documenter, then please do add a link to the Examples 
>  page if 
> you’d like.
>
> Finally: I’d like to thank one of our Google Summer of Code students, 
> Morten Piibeleht, who is developing some great new features for the package 
> over the summer.
>
> — Mike
>
>
>
>

[julia-users] Re: Julia Plugins

2016-06-06 Thread Uwe Fechner
Well, you can load modules on demand in the following way (in this way I 
load the module PyPlot on demand):
eval(Expr(:using, :PyPlot))

To load a module from any path, push the directory, where you module lives 
into the load path: 
cd("/home/ufechner/00PythonSoftware/FastSim")
push!(LOAD_PATH, pwd())

To create an incremental precompiled module file, add __precompile__() at 
the top of your module file (before the module starts).

I hope, this answers your questions.


On Sunday, June 5, 2016 at 12:30:04 PM UTC+2, Leonardo wrote:
>
> Hi all,
> I want realize a pluggable architecture in Julia, loading dinamically some 
> precompiled code from any path (for sure functions, but also types, and 
> maybe entire modules).
> Excluding load of source files with include(), can I load some .ji file 
> containing chunks of code (also encapulated in function, types, modules) or 
> - better - some indipendent precompiled code (like llvm code instead native 
> code)?
>
> Many thanks in advance for your attention
>
> Leonardo
>
>

[julia-users] Re: ANN: POSIXClock - writing hard real-time Julia code

2016-06-06 Thread Uwe Fechner
I am very happy about your work. I had the hope, that the built-in method 
sleep could be improved to reach this level of performance: 
https://github.com/JuliaLang/julia/issues/12770

But perhaps it is better to have this in a separate package.

Uwe

On Monday, June 6, 2016 at 10:07:22 AM UTC+2, Islam Badreldin wrote:
>
> Hi,
>
> I'm excited to announce the first release of POSIXClock, a package that 
> provides Julia bindings to clock_*() functions from POSIX real-time 
> extensions (librt on Linux).
> https://github.com/ibadr/POSIXClock.jl
>
> But first, a full disclosure: I'm very new to Julia programming as well as 
> to real-time programming. That being said, I think this first release is 
> working as expected, and I tested it on a laptop powered by Intel Celeron 
> processor running Julia v0.4.5 as well as on a BeagleBone Black board 
> powered by AM335x armv7-based processor running Julia v0.5.0-dev nightly 
> build.
>
> The focus of the first release was on showing a proof-of-concept 
> demonstration that it's possible to execute hard real-time Julia code, with 
> emphasis on wrapping the clock_gettime() and the clock_nanosleep() 
> functions using CLOCK_MONOTONIC and absolute-time sleeps. Special care was 
> devoted to completely avoiding memory allocations in the real-time section 
> of the code by using in-place operations and pre-allocating all the needed 
> variables, as well as by disabling the garbage collector. The latency 
> histogram (see README.md) demonstrates such hard real-time functionality, 
> with worst-case latency of 40 us on a simple Intel Celeron processor. A 
> similar histogram was obtained for the BeagleBone Black, albeit with 
> worst-case latency of up to 140 us.
>
> This package should appeal to roboticists interested in Julia (I have 
> successfully tested this package with blinking a GPIO on the BeagleBone 
> Black using the mraa library), as well as to scientists conducting 
> closed-loop experiments with soft or hard real-time requirements. (Hard 
> real-time performance requires a recent Linux kernel with the PREEMPT_RT 
> patch.)
>
> In addition to this announcement, I have a couple of questions pertaining 
> to best practices for writing real-time Julia code and avoiding memory 
> allocations, as well as to sharing arrays between two Julia instances (one 
> is real-time and the other is regular). Is it best to post these questions 
> in this thread, or to create a new thread for these questions?
>
> Cheers,
> Islam
>


[julia-users] Re: Using Julia for real time astronomy

2016-05-30 Thread Uwe Fechner
I think, that would be difficult.

As soon as you use any packages for image conversion or estimation you have 
to assume that they use dynamic memory allocation.

The garbage collector of Julia is fast, but not suitable for hard real-time 
requirements. Implementing a garbage collector for hard real-time
applications is possible, but a lot of work and will probably not happen in 
the near future.

Their was an issue on this topic, that was closed as "won't fix":
https://github.com/JuliaLang/julia/issues/8543

Uwe

On Monday, May 30, 2016 at 12:00:13 PM UTC+2, John leger wrote:
>
> Hi everyone,
>
> I am working in astronomy and we are thinking of using Julia for a real 
> time, high performance adaptive optics system on a solar telescope.
>
> This is how the system is supposed to work: 
>1) the image is read from the camera
>2) some correction are applied
>3) the atmospheric turbulence is numerically estimated in order to 
> calculate the command to be sent to the deformable mirror
>
> The overall process should be executed in less than 1ms so that it can be 
> integrated to the chain (closed loop).
>
> Do you think it is possible to do all the computation in Julia or would it 
> be better to code some part in C/C++. What I fear the most is the GC but in 
> our case we can pre-allocate everything, so once we launch the system there 
> will not be any memory allocated during the experiment and it will run for 
> days.
>
> So, what do you think? Considering the current state of Julia will I be 
> able to get the performances I need. Will the garbage collector be an 
> hindrance ?
>
> Thank you.
>


[julia-users] Re: ANN: JuMP 0.13 released (or, JuMP dumps camelCase)

2016-05-01 Thread Uwe Fechner
In the announcement you wrote: "*no existing code should break after 
updating to JuMP 0.13*".

Well, it broke my code, as described in the following issue:
https://github.com/JuliaOpt/JuMP.jl/issues/753

But I found a solution:
Replace  registerNLFunction "registerNLFunction" with "JuMP.register".

It took be a while to find the correct name in the documentation.

Nevertheless, keep up the good work!

Uwe

On Saturday, April 30, 2016 at 2:33:07 AM UTC+2, Miles Lubin wrote:
>
> The JuMP team is happy to announce the release of JuMP 0.13.
>
> This is the most visible JuMP release in quite a while since *all of 
> JuMP's macros and most exported methods have been renamed* to avoid the 
> camelCase convention. The original naming scheme was put in place before 
> the 0.1 release of Julia and was never updated after the Julia community 
> converged to its current naming conventions. We don't take this change 
> lightly since it will require an update of all existing JuMP code, but we 
> believe that now, before a JuMP 1.0 release, is the best time to take these 
> steps to correct previous decisions so that we can continue to grow and 
> remain visually appealing to new users. All of these changes are simple 
> renamings, and it is sufficient to perform a find and replace on existing 
> code in order to update it. We have put deprecation warnings in place so 
> that *no existing code should break after updating to JuMP 0.13*. We 
> expect to leave these deprecations in place for quite a while (at least 6 
> months) to minimize the impact. For the definitive list of the new names, 
> see our deprecation list 
> 
> .
>
> Here's a preview of the new names:
>
> m = Model()
> @variable(m, x >= 0)
> @variable(m, y >= 0)
> @objective(m, Max, 3x-2y)
> @constraint(m, x+y <= 1)
> @constraint(m, 2x+y <= 3)
> status = solve(m)
> @show getvalue(x)
>
> Or, using the pretty block syntax:
>
> m = Model()
> @variables(m, begin
> x >= 0
> y >= 0
> end)
> @objective(m, Max, 3x-2y)
> @constraints(m, begin
> x+y <= 1
> 2x+y <= 3
> end)
> status = solve(m)
> @show getvalue(x)
>
> We request the help of the community to update existing code that may be 
> posted on the internet. If you've written a blog post, stackoverflow post, 
> public Jupyter notebook, or book(! ) 
> containing JuMP code, please make an effort to update it to the new naming 
> scheme to avoid confusing new users.
>
> I'd like to thank those who participated in the various discussions (here 
>  and here 
> ) which helped steer this 
> change in the right direction. While this release focused on simple 
> renaming, we may have some more interesting syntax changes or additions in 
> the next release, so keep an eye on the JuMP repository if you are 
> interested. For a more complete list of changes in this release, see the 
> NEWS  entry.
>
> Miles, Iain, and Joey
>
>

[julia-users] Re: Is Ubuntu's PPA needed for installing Julia?

2016-04-01 Thread Uwe Fechner
Which is a pity, because a PPA (that is maintained) provides a way to 
automatically
get updates. 

Perhaps Ubuntu 16.04 will provide an easier way to provide up-to-date 
Ubuntu packages
using the Snappy format.

On Friday, April 1, 2016 at 5:14:37 PM UTC+2, Kristoffer Carlsson wrote:
>
> Nope. I think the PPA is getting removed. 



[julia-users] Re: GUI toolkits for Julia: Gtk vs Tk vs others

2016-03-27 Thread Uwe Fechner
I would like to add:
QML.jl -- 33 commits, 2 contributors

The very first release was just tagged. Already useful for simple but 
beautiful GUI's.

C++ libraries need a C++ wrapper. Cxx.jl is still very difficult to 
install. An alternative, CxxWrap.jl is just becoming available.

Uwe  

On Monday, March 28, 2016 at 2:09:51 AM UTC+2, Daniel Carrera wrote:
>
> Hello,
>
> When it comes to GUI toolkits in Julia, Gtk seems to be the main choice, 
> followed by Tk. At least in terms of development effort:
>
> Gtk.jl -- 444 commits, 23 contributors
> Tk.jl -- 235 commits, 28 contributors
> PySide.jl -- 35 commits, 2 contributors
>
>
> Although I like Gtk, I'm curious. Is there a reason Gtk gets more 
> attention? Maybe Tk is just easier to support, so it doesn't need as many 
> commits. But Tk also has less documentation. So I do get the impression Gtk 
> gets more attention. Why would Gtk or Tk be preferred in the context of 
> Julia?
>
> My understanding is that Gtk is great on Linux but doesn't work so well on 
> Windows and Mac. Tk has historically been considered ugly ("looks like 
> Motif") but my impression is that this was fixed long ago. Gtk has more 
> widgets than Tk and I think also more inputs. Qt is supposed to be great on 
> other platforms. Are C++ toolkits more difficult to support? Oh, there is 
> no package for wxWidgets, and that's also a C++ toolkit. Maybe that's a 
> factor? Or maybe people just like the look of Gtk.
>
>
> Cheers,
> Daniel.
>


[julia-users] Re: Understanding QML.jl

2016-03-26 Thread Uwe Fechner
Hello Bart,

Thanks a lot for your detailed explanations.

Perhaps you could close the issues 8, 9, 10 and 11 of QML.jl? 
I think, this is all working now.

Uwe

On Friday, March 25, 2016 at 11:46:58 PM UTC+1, Bart Janssens wrote:
>
> Hi Uwe,
>
> See below for inline answers. As a general note, I mostly started the QML 
> module as a proof-of-concept and a real-world test for CppWraper (soon 
> CxxWrap.jl). I'm having a lot of fun with it at the moment, but I can't 
> promise I'll be able to turn this into a feature-complete GUI toolkit. For 
> now it supports julia callbacks in QML, context properties that can be set 
> from Julia and QTimer support for background tasks.
>
> On Friday, March 25, 2016 at 6:07:44 PM UTC+1, Uwe Fechner wrote:
>
>> 1. When shall I use Julia strings, when a QByteArray?
>>
>
> QByteArray is only used in set_data, to set QML code directly from Julia, 
> as in
> https://github.com/barche/QML.jl/blob/master/test/qqmlcomponent.jl
>
> For QUrl and QString, the conversion to and from Julia strings is 
> implicit. I chose not to do this for QByteArray because it can contain 
> binary data.
>  
>
>>
>> 2. Are some or all methods of QT classes, e.g. of QByteArray exposed to 
>> Julia?
>>If only a subset of the methods is exposed, how was it choosen?
>>
>
> QByteArray only has a constructor exposed, here:
>
> https://github.com/barche/QML.jl/blob/master/deps/src/qml_wrapper/wrap_qml.cpp#L326
> Methods are chosen based on the functionality that is needed. 
>
>  
>
>> As far as I can see, the following QT classes are currently 
>> wrapped: 
>> How is the ownership of objects of these classes handled? Are they
>> carbage collected by the Julia garbage collector?
>>
>
> Any object created using the Julia constructor gets a finalizer that calls 
> delete on the C++ object, so they are collected. When a function returns an 
> existing object that is managed by Qt (e.g. root_context) such a finalizer 
> is not created because Qt will delete it on its own when needed.
>  
>
>>
>> 3. I can see the type JuliaSlot. How is the signal-slot communication 
>> implemented?
>>Is it using a message queue? If yes, is the the QT message queue?
>>
>
> This was mostly for working with QTimer. The connect_timeout function 
> takes a QTimer and a JuliaSlot to do a normal Qt signal-slot connection. 
> For the time being I don't see an easy way to generalize this. It's 
> probably easier to set connections like this on the QML side.
>
> Cheers,
>
> Bart 
>


[julia-users] Understanding QML.jl

2016-03-25 Thread Uwe Fechner
The development of the QML bindings (see: 
https://github.com/barche/QML.jl/) 
make nice progress.

I have some general questions:

1. When shall I use Julia strings, when a QByteArray?

2. Are some or all methods of QT classes, e.g. of QByteArray exposed to 
Julia?
   If only a subset of the methods is exposed, how was it choosen?

As far as I can see, the following QT classes are currently 
wrapped: 
QApplication  
QByteArray
QObject   
QQmlApplicationEngine 
QQmlComponent 
QQmlContext   
QQmlEngine
QQuickItem
QQuickView 
QQuickWindow 
QTimer 
How is the ownership of objects of these classes handled? Are they
carbage collected by the Julia garbage collector?

3. I can see the type JuliaSlot. How is the signal-slot communication 
implemented?
   Is it using a message queue? If yes, is the the QT message queue?

Thanks for the good work!

Uwe


Re: [julia-users] Re: calling files in Julia

2016-03-24 Thread Uwe Fechner
Hello,

do not try to use variables, that you have defined in one function within 
another function.

I would suggest the following approach, if you need to modify variables in 
multiple functions:

```
# if you need to modify multiple variables in multiple functions,
# define a data type that holds all your variables
type Data
a::Number
b::Number
c::Number
end

# declaring data as const has the main meaning, that the type stays the 
same,
# you CAN change the values of the fields later
const data = Data(1,2,3)

# pass an instance of the type Data to your function
function test1(dat, x, y)
dat.a*x + dat.b*y
end

# to a second function, pass the same variable
function test2(dat, x1, y1)
# you can change the value of the fields in the function
dat.a += 1
dat.b *= 2
dat.a^x1 + dat.b^y1
end

x = 1.0
y = 3.0

println(test1(data, x, y))
println(data.a, " ", data.b)

println()
println(test2(data, x, y))
println(data.a, " ", data.b)
```

If you want to define your function in different files, that put the type 
definition in a third file and include
this file in both files, that define your functions.

Performance wise it should not make much of a difference, if you define 
many functions in one file or in
different files.

Uwe

On Thursday, March 24, 2016 at 7:42:54 PM UTC+1, new to Julia wrote:
>
> Thank you very much for your reply. I am wondering that if I put two 
> functions in two files (same as Matlab did), does it slow the coding speed? 
> If not, how can I use variables already defined in one function? 
>
> On Thursday, March 24, 2016 at 1:34:08 PM UTC-5, Tim Holy wrote:
>>
>> We usually talk about calling "functions" rather than "files." If you're 
>> coming 
>> from a Matlab background, one thing to note about julia is that you can 
>> put 
>> multiple functions in one file: 
>>
>> square_and_mult_by_c(x, c) = c*x*x 
>>
>> smc(X::AbstractVector, c) = [square_and_mult_by_c(x, c) for x in X] 
>>
>> Note the second function calls the first, but you can put both of these 
>> in the 
>> same disk file. Once loaded, you can also call either of these functions 
>> from 
>> the command line. 
>>
>> Functions can have more than one argument, so you can pass both `x` and 
>> `c` 
>> from one function to another. You might also be interested in the manual 
>> sections on default and keyword arguments. 
>>
>> Best, 
>> --Tim 
>>
>> On Thursday, March 24, 2016 09:29:16 AM new to Julia wrote: 
>> > Got it. Thank you so much. I am wondering that what about variable? I 
>> may 
>> > need to define it in the function, right? How to make it be called by 
>> other 
>> > files? 
>> > 
>> > On Thursday, March 24, 2016 at 1:30:26 AM UTC-5, Uwe Fechner wrote: 
>> > > If c is a constant, that you want to define in the file test.jl, than 
>> you 
>> > > can define it e.g. at the top of the file 
>> > > OUTSIDE of the function like this: 
>> > > const c=2 
>> > > 
>> > > On Thursday, March 24, 2016 at 5:42:24 AM UTC+1, new to Julia wrote: 
>> > >> Thank you so much for your reply. I am still not very clear about 
>> what to 
>> > >> do. Could you explain to me again? 
>> > >> On Wednesday, March 23, 2016 at 2:48:40 PM UTC-5, Christopher 
>> Alexander 
>> > >> 
>> > >> wrote: 
>> > >>> No, you can call files using "include", but you are only going to 
>> > >>> import essentially the functions, types, and global variables 
>> defined in 
>> > >>> those files (you should not include a file inside of a function). 
>>  You 
>> > >>> do 
>> > >>> see though how your variable "c" in "test" would not be accessible 
>> > >>> anywhere 
>> > >>> else, right? 
>> > >>> 
>> > >>> Chris 
>> > >>> 
>> > >>> On Wednesday, March 23, 2016 at 3:39:10 PM UTC-4, new to Julia 
>> wrote: 
>> > >>>> Thanks for your reply. Does it mean that calling files in Julia is 
>> > >>>> impossible? 
>> > >>>> 
>> > >>>> On Wednesday, March 23, 2016 at 1:57:16 PM UTC-5, Christopher 
>> Alexander 
>> > >>>> 
>> > >>>> wrote: 
>> > >>>>> How is test2 supposed to know what "c" is?  It is only defined 
>> inside 
>> > >>>>> the scope of the function "test&quo

[julia-users] Re: calling files in Julia

2016-03-24 Thread Uwe Fechner
If c is a constant, that you want to define in the file test.jl, than you 
can define it e.g. at the top of the file
OUTSIDE of the function like this:
const c=2

On Thursday, March 24, 2016 at 5:42:24 AM UTC+1, new to Julia wrote:
>
>
> Thank you so much for your reply. I am still not very clear about what to 
> do. Could you explain to me again? 
> On Wednesday, March 23, 2016 at 2:48:40 PM UTC-5, Christopher Alexander 
> wrote:
>>
>> No, you can call files using "include", but you are only going to 
>> import essentially the functions, types, and global variables defined in 
>> those files (you should not include a file inside of a function).  You do 
>> see though how your variable "c" in "test" would not be accessible anywhere 
>> else, right?
>>
>> Chris
>>
>> On Wednesday, March 23, 2016 at 3:39:10 PM UTC-4, new to Julia wrote:
>>>
>>> Thanks for your reply. Does it mean that calling files in Julia is 
>>> impossible? 
>>>
>>> On Wednesday, March 23, 2016 at 1:57:16 PM UTC-5, Christopher Alexander 
>>> wrote:

 How is test2 supposed to know what "c" is?  It is only defined inside 
 the scope of the function "test", so it won't be accessible anywhere else.

 Chris

 On Wednesday, March 23, 2016 at 2:41:29 PM UTC-4, new to Julia wrote:
>
> I have a question for calling files in Julia:
>
> I have two jl files. And I can call one file from the other file. 
> However, the variable or constant defined in that file cannot be used in 
> the other file. I am wondering that how to fix this? The following is a 
> simple example. 
>
> function test(x)
>   c=2;
>   y1=6*x;
>   y2=x/5;
>   y1,y2
> end
> pwd()
>
>
> ## test and test2 are used for calling functions in Julia
> function test2(x)
>   include("test.jl")
>   yold,ynew=test(x/c);
>   y3=yold+10;
>   y4=ynew-10;
>   yold2,ynew2=test(x)
>   y5=yold2+20;
>   y6=ynew2-20;
>   y3,y4,y5,y6
> end
> y3,y4,y5,y6=test2(100)
>
>
> However, when I run this test2, there is a error comes out: saying 
> that c is not defined.
>
> Thank you very much.
>
>

Re: [julia-users] Re: Control system library for Julia?

2016-03-23 Thread Uwe Fechner
Very nice!

Is the time coming for a JuliaControl organization?

I am thinking of wrapping the ACADO toolkit: http://acado.github.io/

Regards:

Uwe

On Wednesday, March 23, 2016 at 3:40:43 PM UTC+1, Fredrik Bagge Carlson 
wrote:
>
> For those finding this page in search for a control systems toolbox:
> The package ControlSystems.jl has seen extensive developement recently, 
> and developement is still ongoing
> https://github.com/JuliaControl/ControlSystems.jl
>
>
> On Wednesday, October 1, 2014 at 10:10:56 AM UTC+2, Uwe Fechner wrote:
>>
>> I created the following issue to track the progress on this:
>> https://github.com/JuliaLang/julia/issues/8543
>>
>> On Tuesday, September 30, 2014 3:29:01 PM UTC+2, Spencer Russell wrote:
>>>
>>> I'm looking forward to some sort of flag or option to turn on the 
>>> incremental GC, and trying to understand a bit more about the design space. 
>>> My naive thought process goes something like this:
>>>
>>>1. The total time to collect garbage probably grows with number of 
>>>objects and total size to be freed (though maybe size doesn't matter 
>>> much 
>>>here?)
>>>2. An incremental GC will collect until it runs out of time, then 
>>>hand control back to the application until it's time to run again
>>>3. It seems like there's a rate of garbage generation where you're 
>>>building up garbage faster than the GC can collect it without missing 
>>> its 
>>>deadline
>>>4. It seems like if you stay below this rate you can consider your 
>>>maximum pause time to be bounded and memory won't be leaking. We hold 
>>> hands 
>>>and sing songs.
>>>5. So the issue is what to do when you're above that rate. Either 
>>>you:
>>>   1. make sure memory consumption doesn't grow indefinitely by 
>>>   having some heuristic for when the GC decides to give up on the 
>>> deadline, OR
>>>   2. make sure the GC never violates its deadline and run the risk 
>>>   of running out of memory
>>>   
>>> Are there other options besides those two?
>>>
>>> I would definitely welcome an actual hard-realtime bounded-pause-time 
>>> GC, but it also seems valuable (and possibly more feasible) to have a GC 
>>> where the pause time is bounded with caveats and more careful programming. 
>>> I'm not sure whether this qualifies as *hard *realtime, though it seems 
>>> like it might if you can make those guarantees about your application code.
>>>
>>> It's also worth mentioning for other folks interested in latency that 
>>> that JIT compilation is a killer as well, so you need to guarantee that 
>>> you're pre-compiled all the possible methods that might get dispatched to.
>>>
>>>
>>> peace,
>>> s
>>>
>>> On Mon, Sep 29, 2014 at 4:25 PM, Stefan Karpinski <ste...@karpinski.org> 
>>> wrote:
>>>
>>>> On Mon, Sep 29, 2014 at 4:21 PM, Uwe Fechner <uwe.fec...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Jeff Bezanson suggested in the following discussion ( 
>>>>> https://github.com/JuliaLang/julia/pull/5227 ):
>>>>> > It would be great to have the option to build with a low-pause GC 
>>>>> for users who might want that.
>>>>>
>>>>> This is exactly what I am looking for: To have two different garbage 
>>>>> collectors for Julia, a fast collector for non-real-time applications and 
>>>>> a 
>>>>> low-latency GC
>>>>> for real-time applications. Uwe
>>>>>
>>>>
>>>> Yeah, that would be great. 
>>>>
>>>
>>>

[julia-users] Re: Announcing JuDE: autocomplete and jump to definition support for Atom

2016-03-20 Thread Uwe Fechner
Today I thought multiple times: How nice would it be to have a "goto 
definition" function in Juno/Atom. And now it is already there! 
Very nice. :)

Uwe

On Sunday, March 20, 2016 at 7:58:15 PM UTC+1, James Dang wrote:
>
> Hi All, Julia has been great for me, and I wanted to give back a little. 
> LightTable and Atom are great editors, but I was really starting to miss 
> good intellisense-like autocomplete and basic navigation features like 
> jump-to-definition, especially on larger codebases. It's really quite a 
> slog to remember exactly where in which file a function was defined, or 
> what its exact arguments are. And maybe with better tooling, more people 
> will be drawn to the community. So I put a bit of work into a new package 
> for Atom that gives you that!
>
> https://atom.io/packages/jude
>
>
> 
>
>
> This is a bit different from what you get out of julia-client and 
> autocomplete-julia because it does a full syntax parsing and scope 
> resolution of your codebase without executing it in a Julia process. It 
> reparses very quickly on the fly without needing to save. And the matching 
> is precise, not fuzzy, giving you exactly what names are available in the 
> scope you are in currently. It's quite new and unpolished, but please try 
> it out and let me know what you think!
>
> Cheers,
> James
>
>

[julia-users] Calling a function on a remote worker

2016-03-20 Thread Uwe Fechner
Hello,

I am trying to build a responsive GUI program. QML.jl (see: 
https://github.com/barche/QML.jl ) works
already nicely in providing a GUI, but for performance reasons I have to do 
the heavy work in the
background.

I am doing the following (very simple test):

addprocs(2)
remotecall(2, include, "remote.jl")

This works. Now I try to execute a function remotely:

remotecall(2, plotme)

This doesn't work:
ERROR: UndefVarError: plotme not defined

The remote module looks like this:

module remote
export plotme

using PyPlot

function plotme()
println("Hello!")
end
end

If I now execute:

julia> tic();using remote;toc()
WARNING: replacing module remote
elapsed time: 6.517559409 seconds
6.517559409

julia> 

I get the warning:
WARNING: replacing module remote

Why is there this warning? I do not want to import the module twice.
Furthermore this is extremely slow. I loose the speed gain, that I intend
my using multiple processes in the first place.

The remote call works now:
julia> remotecall(2, plotme)
RemoteRef{Channel{Any}}(2,1,8)

julia> From worker 2:Hello!

Question:
How can I call a function in a remote worker that imports large libraries
that are slow to import without importing these libraries in the main
process?

Any hints welcome.

Uwe


[julia-users] Re: QML (Qt5) binding for Julia (GSOC?)

2016-03-19 Thread Uwe Fechner
Hello,

unluckily it does not work for me yet.

I get the following error:

julia> Pkg.test("QML")
INFO: Testing QML
/usr/bin/julia: symbol lookup error: 
/home/ufechner/.julia/v0.4/QML/deps/usr/lib/libqml_wrapper.so: undefined 
symbol: 
_ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject
=[ ERROR: QML 
]=

failed process: Process(`/usr/bin/julia --check-bounds=yes 
--code-coverage=none --color=yes 
/home/ufechner/.julia/v0.4/QML/test/runtests.jl`, ProcessExited(127)) [127]


ERROR: QML had test errors
 in error at ./error.jl:21
 in test at pkg/entry.jl:803
 in anonymous at pkg/dir.jl:31
 in cd at file.jl:22
 in cd at pkg/dir.jl:31
 in test at pkg.jl:71

julia> 


I am using Ubuntu 14.04 and QT 5.5.1 . 

Any idea?

On Tuesday, March 15, 2016 at 9:46:34 AM UTC+1, Bart Janssens wrote:
>
> I just couldn't resist taking a stab at this using CppWrapper. At 
> https://github.com/barche/QML.jl there is a small example on how to 
> launch a QML file from Julia (tested in v0.4). To make this useful, we 
> would need to add some kind of interface to the "embedding julia" 
> interface, to allow binding Julia functions to QML signals. It should be 
> relatively easy to write a custom Qt class to do that. The above QML.jl is 
> set up to run moc if needed.
>
> Cheers,
>
> Bart
>
> On Friday, March 11, 2016 at 4:35:27 PM UTC+1, Maurice Diamantini wrote:
>>
>> While trying to find some Qt5 binding for Julia, I only found the Qt5 
>> startup projet from Tom Breloff https://github.com/tbreloff/Qt5.jl which 
>> is intended to bind the full feature from Qt5. This is a huge task and will 
>> take some time.
>>
>> So I wonder if there is some interest for a QML binding which would 
>> allows Julia code to display simple QML file (with callback to Julia 
>> methods!).
>>
>> I just found a git repository about two QML library which could serve as 
>> a basis  and as an example:
>>
>>
>>- https://github.com/seanchas116/*libqmlbind* 
>> A C library for creating 
>>QML bindings for other languages easily
>>- https://github.com/seanchas116/*ruby-qml* 
>> a Ruby binding for QML 
>>which uses libqmlbind
>>
>> Being able to build Qt interface directly from Julia without the need of 
>>  the anaconda would be a great advantage for Julia users.
>>
>> That seems to be a true Julia GSOC candidate project (i.e. which could 
>> not be affected to another language...)
>>
>> Regard,
>>
>> -- Maurice
>>
>>

[julia-users] Re: QML (Qt5) binding for Julia (GSOC?)

2016-03-19 Thread Uwe Fechner
Ok, I disabled my .juliarc.jl file.

Now I get another error:

julia> Pkg.test("QML")
INFO: Testing QML
QQmlApplicationEngine failed to load component 
file:///home/ufechner/.julia/v0.4/QML/test/main.qml:1 module "QtQuick" 
version 2.5 is not installed

Any idea?

On Wednesday, March 16, 2016 at 8:10:49 PM UTC+1, Uwe Fechner wrote:
>
> I am now on a different computer, and "using QML" now works.
>
> Pkg.test("QML") still fails, but with a different error:
>
> julia> Pkg.test("QML")
> INFO: Testing QML
> QQmlApplicationEngine failed to load component 
> file:///home/ufechner/00PythonSoftware/FastSim/main.qml:-1 File not found
>
> Which file main.qml should I use for testing?
> I have many files with this name on my computer.
>
> Best regards:
>
> Uwe Fechner
>
>
> On Wednesday, March 16, 2016 at 7:49:10 PM UTC+1, Bart Janssens wrote:
>>
>> Hi,
>>
>> I think this is because the dynamic linker can't find your Qt libs. I 
>> have pushed a fix that should add the correct library to the rpath. After 
>> pulling the change, you may need to delete .julia/v0.4/QML/deps/usr and 
>> .julia/v0.4/QML/deps/builds 
>> for Pkg.build to detect the change. If it still fails after that it may 
>> be best to open an issue, to avoid clutter here.
>>
>> Cheers,
>>
>> Bart
>>
>>
>> On Wednesday, March 16, 2016 at 4:39:31 PM UTC+1, Uwe Fechner wrote:
>>>
>>> Hello,
>>>
>>> unluckily it does not work for me yet.
>>>
>>> I get the following error:
>>>
>>> julia> Pkg.test("QML")
>>> INFO: Testing QML
>>> /usr/bin/julia: symbol lookup error: 
>>> /home/ufechner/.julia/v0.4/QML/deps/usr/lib/libqml_wrapper.so: undefined 
>>> symbol: 
>>> _ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject
>>>
>>>

Re: [julia-users] Registering / renaming CppWrapper

2016-03-19 Thread Uwe Fechner
>From my point of view both names are fine, both CppWrapper.jl and 
CxxWrapper.jl .
It's your choice. Just go ahead!

I am waiting for this nice package to be registered.

Uwe

On Friday, March 18, 2016 at 2:17:12 PM UTC+1, Erik Schnetter wrote:
>
> The abbreviation "cpp" often stands for "C pre-processor". If you call 
> "cpp" on the command line, you'll get the preprocessor; only c++ or 
> cxx might get the C++ compiler. 
>
> The name "CxxWrapper" might thus be better. 
>
> -erik 
>
> On Fri, Mar 18, 2016 at 4:52 AM, Bart Janssens  > wrote: 
> > Hi, 
> > 
> > I'd like to register the CppWrapper package: 
> > https://github.com/barche/CppWrapper 
> > 
> > At the very least, I'll have to rename the github repo to CppWrapper.jl, 
> but 
> > while I'm at it I'd like to ask if there are any suggestions for a 
> better 
> > name? The package is meant to "wrap" a C++ library in a set of Julia 
> > functions and types. Unlike Cxx.jl, there is no direct way to call C++ 
> > functions, but a C++ file has to be written and compiled into a shared 
> > library that can then be loaded using CppWrapper. 
> > 
> > Cheers, 
> > 
> > Bart 
>
>
>
> -- 
> Erik Schnetter  
> http://www.perimeterinstitute.ca/personal/eschnetter/ 
>


[julia-users] Re: QML (Qt5) binding for Julia (GSOC?)

2016-03-19 Thread Uwe Fechner
I am now on a different computer, and "using QML" now works.

Pkg.test("QML") still fails, but with a different error:

julia> Pkg.test("QML")
INFO: Testing QML
QQmlApplicationEngine failed to load component 
file:///home/ufechner/00PythonSoftware/FastSim/main.qml:-1 File not found

Which file main.qml should I use for testing?
I have many files with this name on my computer.

Best regards:

Uwe Fechner


On Wednesday, March 16, 2016 at 7:49:10 PM UTC+1, Bart Janssens wrote:
>
> Hi,
>
> I think this is because the dynamic linker can't find your Qt libs. I have 
> pushed a fix that should add the correct library to the rpath. After 
> pulling the change, you may need to delete .julia/v0.4/QML/deps/usr and 
> .julia/v0.4/QML/deps/builds 
> for Pkg.build to detect the change. If it still fails after that it may be 
> best to open an issue, to avoid clutter here.
>
> Cheers,
>
> Bart
>
>
> On Wednesday, March 16, 2016 at 4:39:31 PM UTC+1, Uwe Fechner wrote:
>>
>> Hello,
>>
>> unluckily it does not work for me yet.
>>
>> I get the following error:
>>
>> julia> Pkg.test("QML")
>> INFO: Testing QML
>> /usr/bin/julia: symbol lookup error: 
>> /home/ufechner/.julia/v0.4/QML/deps/usr/lib/libqml_wrapper.so: undefined 
>> symbol: 
>> _ZN9QMetaType22registerNormalizedTypeERK10QByteArrayPFvPvEPFS3_S3_PKvEi6QFlagsINS_8TypeFlagEEPK11QMetaObject
>>
>>

[julia-users] Re: QML (Qt5) binding for Julia (GSOC?)

2016-03-19 Thread Uwe Fechner
Great, now it is working!

I will do some more testing tomorrow.

Uwe

On Wednesday, March 16, 2016 at 10:45:16 PM UTC+1, Bart Janssens wrote:
>
> This could be either a missing Qt package, or the version is not recent 
> enough. I don't use any recent QML commands, so it's safe to use QtQuick 
> 2.0 and Controls and Layouts version 1.0. I have updated the main.qml in 
> the repo.
>
> If you pass just QString("main.qml") as argument to QQmlApplicationEngine 
> it will look in the current working directory. You should also be able to 
> pass an absolute path. By default, the test runs in the test directory of 
> the package, so the test looks for .julia/v0.4/QML/test/main.qml. maybe 
> your .juliarc.jl did an override on that.
>
> Cheers,
>
> Bart
>
> On Wednesday, March 16, 2016 at 8:22:29 PM UTC+1, Uwe Fechner wrote:
>>
>> Ok, I disabled my .juliarc.jl file.
>>
>> Now I get another error:
>>
>> julia> Pkg.test("QML")
>> INFO: Testing QML
>> QQmlApplicationEngine failed to load component 
>> file:///home/ufechner/.julia/v0.4/QML/test/main.qml:1 module "QtQuick" 
>> version 2.5 is not installed
>>
>> Any idea?
>>
>> On Wednesday, March 16, 2016 at 8:10:49 PM UTC+1, Uwe Fechner wrote:
>>>
>>> I am now on a different computer, and "using QML" now works.
>>>
>>> Pkg.test("QML") still fails, but with a different error:
>>>
>>> julia> Pkg.test("QML")
>>> INFO: Testing QML
>>> QQmlApplicationEngine failed to load component 
>>> file:///home/ufechner/00PythonSoftware/FastSim/main.qml:-1 File not found
>>>
>>> Which file main.qml should I use for testing?
>>> I have many files with this name on my computer.
>>>
>>>
>>>
>>>>

Re: [julia-users] QML (Qt5) binding for Julia (GSOC?)

2016-03-14 Thread Uwe Fechner


On Monday, March 14, 2016 at 8:01:01 PM UTC+1, Uwe Fechner wrote:
>
> Hello,
>
> perhaps I could become mentor of such a project?
> At least I know a little bit of Julia and a little bit of QML.
>
> I am currently implementing optimizations and simulations
> in Julia, and a QML GUI would be nice.
>
> What would be needed to offer such a project?
> How much workload would be expected for a mentor?
>
> Regards:
>
> Uwe Fechner, TU Delft
>
> On Monday, March 14, 2016 at 2:23:32 PM UTC+1, Maurice Diamantini wrote:
>>
>>
>>
>> Le lundi 14 mars 2016 13:24:13 UTC+1, Uwe Fechner a écrit :
>>  
>>
>>> What Julia is missing is mainly an easy to use GUI toolkit, and QML 
>>> could play that role.
>>>
>>
>> That's exactly why I think a QML binding would be easier to do than a Qt5 
>> one, and sufficient for most use case from Julia : no need to be able to 
>> use yet another string type et socket or http or..., just application GUI 
>> with callback to Julia methods.
>>  
>>
>>> Implementing a Julia - QML binding sound not so difficult as there is 
>>> already a C binding.
>>>
>>> I do not understand the following sentence:
>>> "Being able to build Qt interface directly from Julia without the need 
>>> of  the anaconda 
>>> would be a great advantage for Julia users."
>>>
>>
>> Because I know there already exists a Python binding Qt4 (or there will 
>> be some day for Qt5) but it require about 1.2 G bytes in the 
>> `pkgs/v0.4/Conda` 
>> of the Julia directory.
>>
>>
>> If you would write a QML wrapper for the C binding, the C/ C++ code from 
>>> the C wrapper
>>> would still need to be compiled included in the package in some way 
>>> (binutils). So there
>>> would still be a dependency on C/C++ code (pre-compiled or not), that is 
>>> always a little
>>> bit difficult to install and to maintain.
>>>
>>
>> Yes, but this extension should be more robust because less sensible to 
>> the Qt core changes...
>>
>>  -- Maurice
>>
>>

Re: [julia-users] QML (Qt5) binding for Julia (GSOC?)

2016-03-14 Thread Uwe Fechner
Hello,

perhaps I could become mentor of such a project?
At least I know a little bit of Julia and a little bit of QML.

I am currently implementing optimizations and simulations
in Julia, and a QML GUI would be nice.

What would be needed to offer such a project?
Who much workload would be expected for a mentor?

Regards:

Uwe Fechner, TU Delft

On Monday, March 14, 2016 at 2:23:32 PM UTC+1, Maurice Diamantini wrote:
>
>
>
> Le lundi 14 mars 2016 13:24:13 UTC+1, Uwe Fechner a écrit :
>  
>
>> What Julia is missing is mainly an easy to use GUI toolkit, and QML could 
>> play that role.
>>
>
> That's exactly why I think a QML binding would be easier to do than a Qt5 
> one, and sufficient for most use case from Julia : no need to be able to 
> use yet another string type et socket or http or..., just application GUI 
> with callback to Julia methods.
>  
>
>> Implementing a Julia - QML binding sound not so difficult as there is 
>> already a C binding.
>>
>> I do not understand the following sentence:
>> "Being able to build Qt interface directly from Julia without the need of 
>>  the anaconda 
>> would be a great advantage for Julia users."
>>
>
> Because I know there already exists a Python binding Qt4 (or there will be 
> some day for Qt5) but it require about 1.2 G bytes in the `pkgs/v0.4/Conda` 
> of the Julia directory.
>
>
> If you would write a QML wrapper for the C binding, the C/ C++ code from 
>> the C wrapper
>> would still need to be compiled included in the package in some way 
>> (binutils). So there
>> would still be a dependency on C/C++ code (pre-compiled or not), that is 
>> always a little
>> bit difficult to install and to maintain.
>>
>
> Yes, but this extension should be more robust because less sensible to the 
> Qt core changes...
>
>  -- Maurice
>
>

Re: [julia-users] QML (Qt5) binding for Julia (GSOC?)

2016-03-14 Thread Uwe Fechner
Well, I am not an expert on QML, but as far as I understand, QML is mainly 
for writing GUIs, whereas
the QT library contains a lot of functions for a lot of other tasks.

What Julia is missing is mainly an easy to use GUI toolkit, and QML could 
play that role.

Implementing a Julia - QML binding sound not so difficult as there is 
already a C binding.

I do not understand the following sentence:
"Being able to build Qt interface directly from Julia without the need of 
 the anaconda 
would be a great advantage for Julia users."

If you would write a QML wrapper for the C binding, the C/ C++ code from 
the C wrapper
would still need to be compiled included in the package in some way 
(binutils). So there
would still be a dependency on C/C++ code (pre-compiled or not), that is 
always a little
bit difficult to install and to maintain.

Sounds like a great project!

Uwe



On Monday, March 14, 2016 at 11:04:02 AM UTC+1, Maurice Diamantini wrote:
>
> My interest in QML/Qt5 is limited as a user which is looking for a 
> reliable multi-platform toolbox for building gui applications (with 
> native menu, open and save box...). 
>
> There is the old designes Tk-8.6 which works everywere. But Julia 
> seams only to install Tk8.5. 
>
> Gtk is not (yet) really multi-platform although it claims to. 
> It is very promising... for years, much like the D language before 
> Go and Julia appear. 
> Also there is no much example on the github page. 
>
> So Qt5 would be the best solution (true multi-platform GUI, full feature 
> and very good documentation). 
> But Qt5 is a C++ code and even with the Cxx.jl package, I guess there 
> is much time before someone (Tom ;-) has time to build such an interface. 
> Also The library should be maintained. 
>
> In the meantime, I thought a QML binding would be easier to do (not by 
> me :) and above all easier to maintained because most features are 
> available in QML and there has no need  (I think) to have its Julia 
> associated method. 
>
> Can someone who know QML confirm that? 
> Also what feature are provided by Qt5 which are not available with QML? 
>
> Regard, 
> -- Maurice 
>
> Le 13 mars 2016 à 18:33, Mike Innes  a 
> écrit : 
>
> > Hey Maurice, 
> > 
> > Glad to see your interest in this project! I don't know a lot about this 
> area personally, but you might be able to learn more about the approaches 
> and issues involved by looking at Gtk.jl, which is a fairly complete effort 
> in a similar area. Other than that, a simple protoype might help us to 
> evaluate the idea. 
> > 
> > I'd be interested in your take on the relative pros and cons of wrapping 
> Qt5 wholesale vs. taking the QML approach you've described. 
> > 
> > Cheers, 
> > Mike 
> > 
> > On Fri, 11 Mar 2016 at 15:35 Maurice Diamantini  > wrote: 
> > While trying to find some Qt5 binding for Julia, I only found the Qt5 
> startup projet from Tom Breloff https://github.com/tbreloff/Qt5.jl which 
> is intended to bind the full feature from Qt5. This is a huge task and will 
> take some time. 
> > 
> > So I wonder if there is some interest for a QML binding which would 
> allows Julia code to display simple QML file (with callback to Julia 
> methods!). 
> > 
> > I just found a git repository about two QML library which could serve as 
> a basis  and as an example: 
> > 
> > 
> > • https://github.com/seanchas116/libqmlbind A C library for 
> creating QML bindings for other languages easily 
> > • https://github.com/seanchas116/ruby-qml a Ruby binding for 
> QML which uses libqmlbind 
> > 
> > Being able to build Qt interface directly from Julia without the need of 
>  the anaconda would be a great advantage for Julia users. 
> > 
> > That seems to be a true Julia GSOC candidate project (i.e. which could 
> not be affected to another language...) 
> > 
> > Regard, 
> > 
> > -- Maurice 
> > 
> > 
>
>

Re: [julia-users] Custom type to store scalars and vectors

2016-03-13 Thread Uwe Fechner
Thanks for the hint with the array comprehension.

Nevertheless I think, my approach fits better for my problem:
I write the data once, but I read and process it very often.

So converting the data into the form that I need it for processing
while storing it makes sense to me.

Furthermore, if I would use your approach I would have to write
two show functions, one for projects and one for vectors of projects
(the second one would then need an array comprehension for
each field).

But my original question is not answered yet:

Is there a way to write generic code for the functions "copy"
and "push_project!", perhaps with macros?

Best regards:

Uwe

On Sunday, March 13, 2016 at 3:17:50 PM UTC+1, FQ wrote:
>
> to get the parameters as a matrix, you could use a comprehension, for 
> example: 
>
> [getfield(project,fn) for fn in fieldnames(project), project in projects] 
>
> or to get a vector in case you are only interested for  one specific 
> parameter of each project 
>
> [project.rel_drum_diameter for project in projects] 
>
> hope that helps 
>
>
> Am 13.03.2016 um 15:12 schrieb Uwe Fechner: 
> > Thanks for the hint with the type alias. 
> > 
> > Using an array of projects does not help me, because I want to have an 
> > easy way to plot any of the numbers in the 
> > list of projects. And I don't know any easy way to convert one field of 
> > an array of projects into a one dimensional 
> > vector that can be plotted. 
> > 
> > Furthermore I use the type Number because I use OpenOpt with automatic 
> > differentiation. The numbers can also 
> > have the type ForwardDiff.GradientNumber . 
> > 
> > Best regards: 
> > 
> > Uwe 
> > 
> > On Sunday, March 13, 2016 at 3:05:31 PM UTC+1, FQ wrote: 
> > 
> > I'm not an expert on this, but instead of 
> > 
> > NumberOrVector = Union{Number, Vector} 
> > 
> > one should probably always use 
> > 
> > typealias NumberOrVector Union{Number, Vector} 
> > 
> > which makes the names equivalent statically, opposed to the =, which 
> > assigns a value (Union{Number,Vector}) to the variable 
> NumberOrVector 
> > which could be changed later, so this is probably bad if the 
> compiler 
> > tries to optimze things. 
> > 
> > Can you describe in words what you are trying to accomplish with the 
> > code in that gist? It looks like you implement the whole 
> NumberOrVector 
> > type just so you could have multiple "Project"s in a single instance 
> of 
> > "Project", which does not make sense semantically. Judging from your 
> > variable names, it looks like a single project has serveral 
> parameters, 
> > each of which is just a single number. This is not good design. You 
> > could simply make 'projects' an Array{Project,1} like so: 
> > 
> > julia> type Project 
> >p_el_nom::Number 
> >rel_drum_diameter::Number 
> >end 
> > 
> > julia> projects = Array{Project,1}() 
> > 0-element Array{project,1} 
> > 
> > julia> p1 = project(1.4,3) 
> > project(1.4,3) 
> > 
> > julia> p2 = project(-4,99) 
> > project(-4,99) 
> > 
> > julia> push!(projects,p1) 
> > 1-element Array{project,1}: 
> >  project(1.4,3) 
> > 
> > julia> push!(projects,p2) 
> > 2-element Array{project,1}: 
> >  project(1.4,3) 
> >  project(-4,99) 
> > 
> > julia> projects 
> > 2-element Array{project,1}: 
> >  project(1.4,3) 
> >  project(-4,99) 
> > 
> > julia> projects[2].p_el_nom 
> > -4 
> > 
> > The 1 in Array{Project,1} means "one-dimensional"; if it were 2 (or 
> >     more) it would create an n-dimensional matrix, but that does not 
> > seem to 
> > make sense for your case. 
> > 
> > Also, you might wish to be a little more specific with your types. 
> > "Number" is very general, and might also be a complex number for 
> > instance. Judging from your variable names, AbstractFloat would 
> > probably 
> > be a good idea. If any of your parameters is always a whole number, 
> you 
> > could also use Int for that. 
> > 
> > regards 
> > fq 
> > 
> > Am 13.03.2016 um 13:58 schrieb Uwe Fechner: 
> > > Hello, 
> > > 
> > > I need a custom type, that can hold scalars or vectors, that I can 
> > 

Re: [julia-users] Custom type to store scalars and vectors

2016-03-13 Thread Uwe Fechner
Thanks for the hint with the type alias.

Using an array of projects does not help me, because I want to have an easy 
way to plot any of the numbers in the
list of projects. And I don't know any easy way to convert one field of an 
array of projects into a one dimensional
vector that can be plotted.

Furthermore I use the type Number because I use OpenOpt with automatic 
differentiation. The numbers can also 
have the type ForwardDiff.GradientNumber .

Best regards:

Uwe

On Sunday, March 13, 2016 at 3:05:31 PM UTC+1, FQ wrote:
>
> I'm not an expert on this, but instead of 
>
> NumberOrVector = Union{Number, Vector} 
>
> one should probably always use 
>
> typealias NumberOrVector Union{Number, Vector} 
>
> which makes the names equivalent statically, opposed to the =, which 
> assigns a value (Union{Number,Vector}) to the variable NumberOrVector 
> which could be changed later, so this is probably bad if the compiler 
> tries to optimze things. 
>
> Can you describe in words what you are trying to accomplish with the 
> code in that gist? It looks like you implement the whole NumberOrVector 
> type just so you could have multiple "Project"s in a single instance of 
> "Project", which does not make sense semantically. Judging from your 
> variable names, it looks like a single project has serveral parameters, 
> each of which is just a single number. This is not good design. You 
> could simply make 'projects' an Array{Project,1} like so: 
>
> julia> type Project 
>p_el_nom::Number 
>rel_drum_diameter::Number 
>end 
>
> julia> projects = Array{Project,1}() 
> 0-element Array{project,1} 
>
> julia> p1 = project(1.4,3) 
> project(1.4,3) 
>
> julia> p2 = project(-4,99) 
> project(-4,99) 
>
> julia> push!(projects,p1) 
> 1-element Array{project,1}: 
>  project(1.4,3) 
>
> julia> push!(projects,p2) 
> 2-element Array{project,1}: 
>  project(1.4,3) 
>  project(-4,99) 
>
> julia> projects 
> 2-element Array{project,1}: 
>  project(1.4,3) 
>  project(-4,99) 
>
> julia> projects[2].p_el_nom 
> -4 
>
> The 1 in Array{Project,1} means "one-dimensional"; if it were 2 (or 
> more) it would create an n-dimensional matrix, but that does not seem to 
> make sense for your case. 
>
> Also, you might wish to be a little more specific with your types. 
> "Number" is very general, and might also be a complex number for 
> instance. Judging from your variable names, AbstractFloat would probably 
> be a good idea. If any of your parameters is always a whole number, you 
> could also use Int for that. 
>
> regards 
> fq 
>
> Am 13.03.2016 um 13:58 schrieb Uwe Fechner: 
> > Hello, 
> > 
> > I need a custom type, that can hold scalars or vectors, that I can print 
> > and copy. 
> > 
> > I created an example: 
> > https://gist.github.com/ufechner7/8545f18ad6d65b80b334 
> > 
> > Is this good programming style? 
> > 
> > Is it a good idea to use a union like: 
> > NumberOrVector = Union{Number, Vector} 
> > 
> > Is there a way to implement the copy and the push! functions in a 
> > generic way, so they 
> > do not need to be modified if I add fields? 
> > 
> > Perhaps there is also a generic way to implement the constructor: 
> > Project(f::Vector) 
> > 
> > Any hints appreciated! 
> > 
> > Uwe Fechner 
> > 
> > 
>
>

[julia-users] Custom type to store scalars and vectors

2016-03-13 Thread Uwe Fechner
Hello,

I need a custom type, that can hold scalars or vectors, that I can print 
and copy.

I created an example:
https://gist.github.com/ufechner7/8545f18ad6d65b80b334

Is this good programming style?

Is it a good idea to use a union like:
NumberOrVector = Union{Number, Vector}

Is there a way to implement the copy and the push! functions in a generic 
way, so they
do not need to be modified if I add fields?

Perhaps there is also a generic way to implement the constructor:
Project(f::Vector)

Any hints appreciated!

Uwe Fechner




[julia-users] Julia and Atom

2016-03-08 Thread Uwe Fechner
Hello,

I gave Atom a try.

One question: When I close Atom and restart it it doesn't remember the 
window size.

Is it possible to convince Atom to start with a wider window?

Best regards:

Uwe


Re: [julia-users] Plots library example not working: @gif not defined

2016-03-06 Thread Uwe Fechner
Well, no this error went away, but the effect is nevertheless problematic:

It launches PyPlot, and then opens hundreds of windows until the computer
stalls.

Any idea?

On Sunday, March 6, 2016 at 10:09:20 PM UTC+1, Tom Breloff wrote:
>
> I should tag a new version. Pkg.checkout("Plots") should do the trick. 
>
> On Sunday, March 6, 2016, Uwe Fechner <uwe.fec...@gmail.com > 
> wrote:
>
>> Hello,
>>
>> I am trying to fun the following example from 
>> http://plots.readthedocs.org/en/latest/
>>
>> using Plots
>> pyplot(size=(300,300))
>> # initialize the attractor
>> n = 3000
>> dt = 0.02
>> σ, ρ, β = 10., 28., 8/3
>> x, y, z = 1., 1., 1.
>> X, Y, Z = [x], [y], [z]
>> # build an animated gif, saving every 10th frame@gif for i=1:n
>> dx = σ*(y - x);  x += dt * dx; push!(X,x)
>> dy = x*(ρ - z) - y;  y += dt * dy; push!(Y,y)
>> dz = x*y - β*z;  z += dt * dz; push!(Z,z)
>> plot3d(X,Y,Z)end every 10
>>
>> I get the error message:
>>
>> ERROR: LoadError: UndefVarError: @gif not defined
>>
>> Any idea, where @gif should be defined?
>>
>> Best regards:
>>
>> Uwe
>>
>>

[julia-users] Plots library example not working: @gif not defined

2016-03-06 Thread Uwe Fechner


Hello,

I am trying to fun the following example from 
http://plots.readthedocs.org/en/latest/

using Plots
pyplot(size=(300,300))
# initialize the attractor
n = 3000
dt = 0.02
σ, ρ, β = 10., 28., 8/3
x, y, z = 1., 1., 1.
X, Y, Z = [x], [y], [z]
# build an animated gif, saving every 10th frame@gif for i=1:n
dx = σ*(y - x);  x += dt * dx; push!(X,x)
dy = x*(ρ - z) - y;  y += dt * dy; push!(Y,y)
dz = x*y - β*z;  z += dt * dz; push!(Z,z)
plot3d(X,Y,Z)end every 10

I get the error message:

ERROR: LoadError: UndefVarError: @gif not defined

Any idea, where @gif should be defined?

Best regards:

Uwe



[julia-users] Re: Using Latex in PyPlot

2016-03-02 Thread Uwe Fechner
I found out how to do it. The following code works fine for me:

using LaTeXStrings
using PyCall

PyDict(pyimport("matplotlib")["rcParams"])["text.usetex"] = [true]
PyDict(pyimport("matplotlib")["rcParams"])["font.family"] = ["serif"]
PyDict(pyimport("matplotlib")["rcParams"])["grid.alpha"] = [0.25]
PyDict(pyimport("matplotlib")["rcParams"])["text.latex.preamble"] = 
["\\usepackage{amsmath}"]
PyDict(pyimport("matplotlib")["rcParams"])["axes.labelsize"] = [18]
PyDict(pyimport("matplotlib")["rcParams"])["xtick.labelsize"] = [18]
PyDict(pyimport("matplotlib")["rcParams"])["ytick.labelsize"] = [18]
PyDict(pyimport("matplotlib")["rcParams"])["font.size"] = [18]

Sorry for the noise!

Uwe

On Wednesday, March 2, 2016 at 5:58:24 PM UTC+1, Uwe Fechner wrote:
>
> Hello,
>
> does anybody know, how to enable latex rendering in PyPlot?
>
> Best regards:
>
> Uwe
>


Re: [julia-users] Scalar and array version of a function

2016-02-28 Thread Uwe Fechner
Thank's a lot!

My code looks now like this:

const Z_REF = 10.0# reference height for wind profile law
const ALPHA = 0.23375 # exponent of the wind profile law for Cabauw

""" 
calcWindAtHeight(v_wind_gnd, z)

Calculate the average wind speed for the given ground wind speed 
`v_wind_gnd` at a given height `z`. 
The ground wind speed is measured at the height `Z_REF`, a constant, that 
must have been defined
before. The exponential wind profile law is used in combination with the 
exponent `ALPHA`, that must
have been defined before, too. If `z` is an array, the method will return 
an array.
"""
function calcWindAtHeight(v_wind_gnd, z::AbstractFloat)
v_wind_gnd * (z / Z_REF)^ALPHA
end

function calcWindAtHeight(v_wind_gnd, Z::AbstractArray)
[calcWindAtHeight(v_wind_gnd, z) for z in Z]
end

I tried to write the comment only once, now. Is this the correct way to 
document
a method with two functions?

Uwe

On Sunday, February 28, 2016 at 8:56:57 PM UTC+1, FQ wrote:
>
> you can get the vectorized version in one line using a comprehension: 
>
> calcWindAtHeight(v_wind_gnd, Z::AbstractArray) = 
> [calcWindAtHeight(v_wind_gnd,z) for z in Z] 
>
> i did a quick test and it seems to be about the same speed/slightly 
> faster than your version. 
>
> you could also use map and a lambda function: 
> calcWindAtHeight(v_wind_gnd, Z::AbstractArray) = 
> map((z)->calcWindAtHeight(v_wind_gnd,z),Z) 
>
> this seems to be significantly slower though, so i'd recommend the 
> comprehension. 
>
> PS: if you do want to do speed tests, you can use the @time macro, just 
> put it in front of your function call 
>


[julia-users] Scalar and array version of a function

2016-02-28 Thread Uwe Fechner
Hello,

what is the best way to implement a scalar and a vectorized version of a 
function?

My code:

const Z_REF = 10.0# reference height for wind profile law
const ALPHA = 0.23375 # exponent of the wind profile law for Cabauw

""" 
calcWindAtHeight(v_wind_gnd, z)

Calculate the average wind speed for the given ground wind speed 
`v_wind_gnd` at a given height `z`. 
The ground wind speed is measured at the height `Z_REF`, a constant, that 
must have been defined
before. The exponential wind profile law is used in combination with the 
exponent `ALPHA`, that must
have been defined before, too.
"""
function calcWindAtHeight(v_wind_gnd, z::AbstractFloat)
v_wind_gnd * (z / Z_REF)^ALPHA
end

"""
calcWindAtHeight(v_wind_gnd, Z)

Calculate the average wind speed for the given ground wind speed 
`v_wind_gnd` at a given height `Z`. 
The ground wind speed is measured at the height `Z_REF`, a constant, that 
must have been defined
before. The exponential wind profile law is used in combination with the 
exponent `ALPHA`, that must
have been defined before, too. If `Z` is an array, the function will return 
an array.
"""
function calcWindAtHeight(v_wind_gnd, Z::AbstractArray)
result = similar(Z)
for i in eachindex(Z) 
result[i] = calcWindAtHeight(v_wind_gnd, Z[i])
end
result
end

Is this good programming style? Could it be improved?

Regards:

Uwe Fechner


Re: [julia-users] Re: Non-uniform interpolation in 1D

2016-02-28 Thread Uwe Fechner
Hello,

thanks for your explanations.

Nevertheless I like the syntax of the package Dierckx much more.
The expression Gridded(Linear()) is very confusing for me. What is gridded,
in this example?

Furthermore the Readme file of Interpolations is missing the information, 
how
to use it for the given problem.

Best regards:

Uwe

On Saturday, February 27, 2016 at 4:57:07 PM UTC+1, Matt Bauman wrote:
>
> Interpolations is very similar, but it currently only supports linear and 
> nearest-neighbor schemes for gridded interpolations:
>
> using Interpolations
>
> itp = interpolate((P_NOM,), ETA, Gridded(Linear())) # You pass the 
> x-values as a tuple, since this generalizes to multi-dimensional coordinates
> println(itp[3.5])
>
> x = linspace(1.5, 14.9, 1024)
> y = itp[x]
>
> plot(x,y)
>
>
>
> On Saturday, February 27, 2016 at 10:10:28 AM UTC-5, Uwe Fechner wrote:
>>
>> Thanks. The following code works:
>>
>> using Dierckx
>>
>> P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9]
>> ETA   = [93., 94., 94., 95., 95., 95.5, 95.5]
>> calc_eta = Spline1D(P_NOM, ETA, k=1)
>>
>> println(calc_eta(3.5))
>>
>> Nevertheless I would be interested how to do that with Interpolations.jl. 
>> Sometimes you don't have Fortran available.
>>
>> Best regards:
>>
>> Uwe
>>
>> On Saturday, February 27, 2016 at 3:58:11 PM UTC+1, Yichao Yu wrote:
>>>
>>>
>>>
>>> On Sat, Feb 27, 2016 at 9:40 AM, Uwe Fechner <uwe.fec...@gmail.com> 
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I don't think, that this works on a non-uniform grid. The array xg is 
>>>> evenly spaced, and it 
>>>> is NOT passed to the function InterpGrid.
>>>>
>>>>
>>> I've recently tried Dierckx which support non-uniform interpolation. I 
>>> only need very basic functions so I don't know if it has all the 
>>> flexibility you need but it's probably worth a look if you haven't.
>>>  
>>>
>>>> Uwe
>>>>
>>>>
>>>> On Saturday, February 27, 2016 at 3:33:06 PM UTC+1, Cedric St-Jean 
>>>> wrote:
>>>>>
>>>>> Hi Uwe,
>>>>>
>>>>> Have you tried Grid.jl? I haven't tried it, but this example looks 
>>>>> like it might work with a non-uniform grid.
>>>>>
>>>>> # Let's define a quadratic function in one dimension, and evaluate it on 
>>>>> an evenly-spaced grid of 5 points:
>>>>> c = 2.3  # center
>>>>> a = 8.1  # quadratic coefficient
>>>>> o = 1.6  # vertical offset
>>>>> qfunc = x -> a*(x-c).^2 + o
>>>>> xg = Float64[1:5]
>>>>> y = qfunc(xg)
>>>>> yi = InterpGrid(y, BCnil, InterpQuadratic)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Saturday, February 27, 2016 at 9:21:53 AM UTC-5, Uwe Fechner wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am trying to port the following function from python to julia:
>>>>>>
>>>>>> # -*- coding: utf-8 -*-
>>>>>> from scipy.interpolate import InterpolatedUnivariateSpline
>>>>>> import numpy as np
>>>>>> from pylab import plot
>>>>>>
>>>>>> P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9]
>>>>>> ETA   = [93., 94., 94., 95., 95., 95.5, 95.5]
>>>>>>
>>>>>> calc_eta = InterpolatedUnivariateSpline(P_NOM, ETA, k=1)
>>>>>>
>>>>>> # plotting code, only for testing
>>>>>> if __name__ == "__main__":
>>>>>> X = np.linspace(1.5, 14.9, 1024, endpoint=True)
>>>>>> ETA = []
>>>>>> for alpha in X:
>>>>>> eta = calc_eta(alpha)
>>>>>> ETA.append(eta)
>>>>>> plot(X, ETA)
>>>>>>
>>>>>> The resulting plot is shown at the end of this posting.
>>>>>>
>>>>>> How can I port this to Julia?
>>>>>>
>>>>>> I am trying to use the package "Interpolations.jl", but I do not see 
>>>>>> any
>>>>>> example, that shows the interpolation on a non-uniform grid.
>>>>>>
>>>>>> For now I need only linear interpolation, but I want to use B-Splines
>>>>>> later.
>>>>>>
>>>>>> Any hint appreciated!
>>>>>>
>>>>>> Uwe Fechner
>>>>>>
>>>>>>
>>>>>>
>>>>>> <https://lh3.googleusercontent.com/-8OofwCQWohg/VtGwKR-1BOI/AQI/UTLksCCMIPo/s1600/LinearInterpolation.png>
>>>>>>
>>>>>
>>>

Re: [julia-users] Re: Non-uniform interpolation in 1D

2016-02-27 Thread Uwe Fechner
Thanks. The following code works:

using Dierckx

P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9]
ETA   = [93., 94., 94., 95., 95., 95.5, 95.5]
calc_eta = Spline1D(P_NOM, ETA, k=1)

println(calc_eta(3.5))

Nevertheless I would be interested how to do that with Interpolations.jl. 
Sometimes you don't have Fortran available.

Best regards:

Uwe

On Saturday, February 27, 2016 at 3:58:11 PM UTC+1, Yichao Yu wrote:
>
>
>
> On Sat, Feb 27, 2016 at 9:40 AM, Uwe Fechner <uwe.fec...@gmail.com 
> > wrote:
>
>> Hello,
>>
>> I don't think, that this works on a non-uniform grid. The array xg is 
>> evenly spaced, and it 
>> is NOT passed to the function InterpGrid.
>>
>>
> I've recently tried Dierckx which support non-uniform interpolation. I 
> only need very basic functions so I don't know if it has all the 
> flexibility you need but it's probably worth a look if you haven't.
>  
>
>> Uwe
>>
>>
>> On Saturday, February 27, 2016 at 3:33:06 PM UTC+1, Cedric St-Jean wrote:
>>>
>>> Hi Uwe,
>>>
>>> Have you tried Grid.jl? I haven't tried it, but this example looks like 
>>> it might work with a non-uniform grid.
>>>
>>> # Let's define a quadratic function in one dimension, and evaluate it on an 
>>> evenly-spaced grid of 5 points:
>>> c = 2.3  # center
>>> a = 8.1  # quadratic coefficient
>>> o = 1.6  # vertical offset
>>> qfunc = x -> a*(x-c).^2 + o
>>> xg = Float64[1:5]
>>> y = qfunc(xg)
>>> yi = InterpGrid(y, BCnil, InterpQuadratic)
>>>
>>>
>>>
>>>
>>> On Saturday, February 27, 2016 at 9:21:53 AM UTC-5, Uwe Fechner wrote:
>>>>
>>>> Hello,
>>>>
>>>> I am trying to port the following function from python to julia:
>>>>
>>>> # -*- coding: utf-8 -*-
>>>> from scipy.interpolate import InterpolatedUnivariateSpline
>>>> import numpy as np
>>>> from pylab import plot
>>>>
>>>> P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9]
>>>> ETA   = [93., 94., 94., 95., 95., 95.5, 95.5]
>>>>
>>>> calc_eta = InterpolatedUnivariateSpline(P_NOM, ETA, k=1)
>>>>
>>>> # plotting code, only for testing
>>>> if __name__ == "__main__":
>>>> X = np.linspace(1.5, 14.9, 1024, endpoint=True)
>>>> ETA = []
>>>> for alpha in X:
>>>> eta = calc_eta(alpha)
>>>> ETA.append(eta)
>>>> plot(X, ETA)
>>>>
>>>> The resulting plot is shown at the end of this posting.
>>>>
>>>> How can I port this to Julia?
>>>>
>>>> I am trying to use the package "Interpolations.jl", but I do not see any
>>>> example, that shows the interpolation on a non-uniform grid.
>>>>
>>>> For now I need only linear interpolation, but I want to use B-Splines
>>>> later.
>>>>
>>>> Any hint appreciated!
>>>>
>>>> Uwe Fechner
>>>>
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-8OofwCQWohg/VtGwKR-1BOI/AQI/UTLksCCMIPo/s1600/LinearInterpolation.png>
>>>>
>>>
>

[julia-users] Non-uniform interpolation in 1D

2016-02-27 Thread Uwe Fechner
Hello,

I am trying to port the following function from python to julia:

# -*- coding: utf-8 -*-
from scipy.interpolate import InterpolatedUnivariateSpline
import numpy as np
from pylab import plot

P_NOM = [1.5, 2.2, 3.7, 5.6, 7.5, 11.2, 14.9]
ETA   = [93., 94., 94., 95., 95., 95.5, 95.5]

calc_eta = InterpolatedUnivariateSpline(P_NOM, ETA, k=1)

# plotting code, only for testing
if __name__ == "__main__":
X = np.linspace(1.5, 14.9, 1024, endpoint=True)
ETA = []
for alpha in X:
eta = calc_eta(alpha)
ETA.append(eta)
plot(X, ETA)

The resulting plot is shown at the end of this posting.

How can I port this to Julia?

I am trying to use the package "Interpolations.jl", but I do not see any
example, that shows the interpolation on a non-uniform grid.

For now I need only linear interpolation, but I want to use B-Splines
later.

Any hint appreciated!

Uwe Fechner


<https://lh3.googleusercontent.com/-8OofwCQWohg/VtGwKR-1BOI/AQI/UTLksCCMIPo/s1600/LinearInterpolation.png>


[julia-users] Re: Communicate thru COM Ports (Serial)

2015-10-29 Thread Uwe Fechner
Did you try:
https://github.com/rennis250/Arduino.jl

On Thursday, October 29, 2015 at 1:49:32 PM UTC+1, endowdly wrote:
>
> I'd like to read and write text and strings (STDIN and STDOUT) via COM1 or 
> COM2 (standard baud rates). 
>
> Short story short, I'd like to control one or two systems with one script. 
> I need to do shell scripting, read and write, data analysis, and simple 
> math operations--preferably from one master script or control program. 
> Julia seems to be perfect for this, so I have started implementing this 
> idea with some julia code. The hangup is getting Julia to talk thru the 
> serial port. So far, all I can come up with is doing some ccalls and using 
> c to open the ports and read any incoming data. 
>
> It doesn't seem to be in the documentation, and I've just started to 
> scratch through the registered packages, but can julia be used to network 
> through the COM interfaces? Thx.
>


Re: [julia-users] Re: Julia garbage collection - question on status and future (and interaction when using with other languages)

2015-10-24 Thread Uwe Fechner
You wrote:
"... note that `malloc/free` are not hard real time either, you 
basically cannot have any sort of memory allocation for that. "

It is an old myth, that you cannot have any memory allocation for hard
real-time applications.

For me, and probably also for other people who do real-time simulations
or audio processing, lower latencies are always welcome.

Julia 0.4 is already much better then Julia 0.3, but the garbage collector
of Lua has still at least one order of magnitude less latency and is 
suitable
for "Hard real-time Control and Coordination of Robot Tasks".

Having (optionally) such a garbage collector in Julia would increase the 
user
base of Julia in the control community a lot.

For more details see:
https://github.com/JuliaLang/julia/issues/8543

On Friday, October 23, 2015 at 4:49:17 PM UTC+2, Yichao Yu wrote:
>
> On Fri, Oct 23, 2015 at 10:40 AM, Jonathan Malmaud  > wrote: 
> > 
> > 
> > 
> > On Tuesday, October 20, 2015 at 8:10:07 AM UTC-4, Páll Haraldsson wrote: 
> >> 
> >> 
> >> A. I know Julia had stop the world garbage collection (GC) and changed 
> to 
> >> generational GC in 0.4 that is faster (I've seen 10x mentioned). 
> >> 
> >> As far as I know, there are no knobs to turn (except possible to just 
> to 
> >> turn if off..), and the GC algorithm isn't selectable (except by 
> choosing 
> >> the older 0.3 version, but seems to be no upside to that..). 
> >> 
> >> 
> >> In Go 1.5, they changed their GC (and have some impressive latency (of 
> GC) 
> >> numbers): 
> >> 
> >> "To create a garbage collector for the next decade, we turned to an 
> >> algorithm from decades ago. Go's new garbage collector is a concurrent, 
> >> tri-color, mark-sweep collector, an idea first proposed by Dijkstra in 
> 1978. 
> >> This is a deliberate divergence from most "enterprise" grade garbage 
> >> collectors of today, and one that we believe is well suited to the 
> >> properties of modern hardware and the latency requirements of modern 
> >> software. 
> >> [..] 
> >> At a higher level, one approach to solving performance problems is to 
> add 
> >> GC knobs, one for each performance issue. The programmer can then turn 
> the 
> >> knobs in search of appropriate settings for their application. The 
> downside 
> >> is that after a decade with one or two new knobs each year you end up 
> with 
> >> the GC Knobs Turner Employment Act. Go is not going down that path. 
> Instead 
> >> we provide a single knob, called GOGC" 
> >> 
> >> 
> >> They are not going for hard real-time GC (a hard problem.. there are 
> hard 
> >> real-time JVMs), it seems, but soft real-time. Just do get an overview 
> >> picture, do we have a similar implementation? Generational, pushes down 
> >> latency, but I think the focus in Julia is still throughput more than 
> >> latency (or both?). 
> >> 
> >> 
> >> Without being an expert on Go (or Julia) it seems the languages are 
> >> similar enough, that we could have a GC with the same properties if we 
> just 
> >> wanted. But maybe the Julia community just doesn't want to, or at least 
> as a 
> >> priority.. Would selectable GC algorithms with different properties be 
> >> desirable? 
> >> 
> >> 
> > I don't think the throughput of Go's GC is all that much better than 
> better 
> > than Julia's - it's really its latency that is much better. But latency 
> is 
> > fairly irrelevant for large batch jobs, which I suspect is what most 
> people 
> > using Julia are concerned with. 
> >> 
> >> 
> >> 
> >> 
> >> B. A side question, I've noticed Libc.malloc etc. Say for hard (or just 
> >> soft) real-time stuff. It seems you could use manual memory 
> >> management/malloc/free (and would have to disable the GC I guess?). Is 
> it 
> >> just crazy talk/very naive that you could run Julia without the GC 
> >> continuously (say in a game)? Or is that the intention of Libc.malloc 
> >> access? It seems the D language allows both GC and without, is Julia 
> just 
> >> similar, or "not recommended in Julia"? I do not know about Go, if it 
> allows 
> >> both.. 
> >> 
> >> 
> > 
> > You can use Libc.malloc if you want and it will work for fine: 
> > x=pointer_to_array(convert(Ptr{Float64}, 
> Libc.malloc(10sizeof(Float64))), 
> > 10, false) 
> > x[4]=5.2 
> > ... 
> > 
> > You don't have disable the GC For this to work: the last parameter to 
> > 'pointer_to_array' indicates to the GC to not touch this memory. 
> > 
>
> You probably want to pass `true`, which will let the GC call `free` on 
> it automatically. 
>
> If you want to manually manage the pointer, you can pass `false`. Note 
> that this will 
> still allocate the `Array` object and pass `false` will probably not 
> make the GC run 
> less frequently. 
>
> Also note that `malloc/free` are not hard real time either, you 
> basically cannot have 
> any sort of memory allocation for that. 
>
> > 
> > 
> > 
> > 
> >> 
> >> C. An idea I had, and see the D guys also: 
> >> 
> >> 

[julia-users] Re: Crowdsourced Julia development

2015-09-25 Thread Uwe Fechner
I just created a bounty for implementing a low latency garbage collector:
https://www.bountysource.com/issues/5020251-implement-a-low-latency-incremental-garbage-collector

Uwe

Am Freitag, 25. September 2015 17:31:11 UTC+2 schrieb Jonathan Malmaud:
>
> $5 to the first person to take transposes seriously 
> https://www.bountysource.com/issues/1333116-taking-vector-transposes-seriously/backers
>
> On Friday, September 25, 2015 at 10:45:30 AM UTC-4, Tom Breloff wrote:
>>
>> Moving the discussion from the matlab thread...
>>
>> The idea was brought up about being able to contribute money to package 
>> development to motivate developers... a quick search brought up this: 
>> https://www.bountysource.com/
>>
>> Does anyone have any experience with this?  Are there other similar 
>> options?  Are there users out there that would pledge money for specific 
>> bug fixes and functionality right now?  
>>
>

[julia-users] Re: Optimal Control using Dynamic Programming

2015-09-25 Thread Uwe Fechner
Hello,
as far as I know, there is no ready-made package for optimal control.
There is one package on control design:
https://github.com/JuliaControl/Control.jl

And there are a lot of packages for solving optimization problems.

Could you be a little bit more specific about your problem?

How do you want to describe the system, that you want to control?
Is it a linear system?

Uwe

Am Freitag, 25. September 2015 07:25:19 UTC+2 schrieb Narayani Vedam:
>
> Hi,
>   I am new to Julia. I need to solve an optimal control problem using 
> dynamic programming. Are there pre-defined functions/packages that I could 
> use?
>
> Thanks.
>


Re: [julia-users] Re: IDE for Julia

2015-09-23 Thread Uwe Fechner
 Keno's Cxx.jl " currently requires the head version of LLVM. This is 
fragile, but furthermore the compilation with
the newest version of LLVM is very slow. These are issues that are 
currently being addressed (see:
https://github.com/JuliaLang/julia/issues/9336)  but probably not fixed 
before Julia 0.5.

With "available by default" I mean, that a pre-compiled version of Julia 
can be used.

Am Mittwoch, 23. September 2015 12:46:21 UTC+2 schrieb Páll Haraldsson:
>
> Sorry, kind of of-topic for the thread, mostly about Cxx.jl/C++:
>
> On Friday, September 18, 2015 at 8:05:07 AM UTC, Uwe Fechner wrote:
>>
>> I like QT a lot. There is more then one open source, QT based IDE out 
>> there, e.g. QT Creator.
>> QT has a GUI builder, that is much better then the GUI builders for GTK 
>> (in my opinion).
>> And you can use the java-script like QML language for building the user 
>> interface, if you want to.
>>
>> Tutorial for PyQT:
>> https://pythonspot.com/qml-and-pyqt-creating-a-gui-tutorial/
>>
>> As soon as the Julia/C++ integration is available by default (hopefully 
>> in Julia 0.5), QT integration
>> should be easy.
>>
>
> What do you mean by default? That is, I thought Keno's Cxx.jl "just 
> works".. (and requires 0.4). Do you mean that it will be somehow integrated 
> into Base? Or that something is needed in Julia so that Cxx.jl works even 
> better? I'm just curious if there is a "problem with it.. If there is would 
> it somehow be specific to QT [Creator]/QML (I can't really see how, but do 
> not really know QT Creator..).
>
> What kind of specific problems can/do you run into with QT (or 
> otherwise..)?
>  
>
>> For those, that want to play with Julia and QT now already, have a look 
>> at:
>>
>> https://github.com/jverzani/PySide.jl
>>
>> (very experimental)
>>
>
> [Here QT is "outsourced" to Python so that, only PyCall.jl has to work, 
> and Cxx.jl is not needed if I recall.]
>
>

Re: [julia-users] Re: IDE for Julia

2015-09-23 Thread Uwe Fechner
Julia, including 0.4RC2 is using LLVM 3.5 as default. Cxx.jl needs LLVM 3.7 
or LLVM 3.8SVN (I am not sure, but it does not work with older LLVM 
versions).
Julia can be compiled against LLVM 3.7 (and sometimes also against LLVM 
SVN), but then the just-in-time compilation of Julia is much slower than
whith LLVM 3.5 (about factor of two). 

Please open a new thread, if you want to discuss this issue further.

Am Mittwoch, 23. September 2015 16:30:12 UTC+2 schrieb Páll Haraldsson:
>
> [Sorry, again, off-topic, a follow-up question about Cxx.jl and some 
> extra.]
>
> On Wednesday, September 23, 2015 at 11:30:45 AM UTC, Uwe Fechner wrote:
>>
>> Keno's Cxx.jl " currently requires the head version of LLVM. This is 
>> fragile, but furthermore the compilation with
>> the newest version of LLVM is very slow.
>>
>
> A.
> You mean very slow, just for Cxx.jl, or in general?
>  
>
>> These are issues that are currently being addressed (see:
>> https://github.com/JuliaLang/julia/issues/9336)  but probably not fixed 
>> before Julia 0.5.
>>
>
> About this issue, I see "No milestone" and "up for grabs", while I'm not 
> sure this is for newbies.. Or is it (for those how can at least just 
> compile)? All the checkboxes are checked except for two, and they do not 
> have issue numbers.
>
> My understanding was that Cxx.jl needed 0.4 (for staged functions) and I 
> thought it worked (for a long time now) with 0.4 (pre-rc). I'm confused, or 
> maybe you are? LLVM is a dependency/"part of" of Julia. I'm not sure if it 
> is compiled in or whatever (and for most stuff I don't need to know/care, 
> Cxx.jl seems to be the exception). Are you saying I just need to recompile 
> my own Julia with a newer LLVM (and not change/provide patches to core 
> 0.4.0-rc2), or even just provide a newer one as a shared library somehow?
>
> With "available by default" I mean, that a pre-compiled version of Julia 
>> can be used.
>>
>
> What you mean then is not just a "bundle" (such as with Juno+Julia)? And 
> 0,5 is not needed? If stuff that is needed is in master right now and not 
> in 0.40-rc2, is it not then likely, that it will be backported to 0.4.x?
>
>
> B.
> I might use C++ libraries (or recommend to others that you can), but not 
> for GUI/"enterprise" applications, however curious about the potential for 
> GUI (I think I'll stick to trying web stuff out). One outside perspective I 
> hear, is that nothing can really compete against Java for "enterprise" by a 
> long shot (not because of merit of language, but Java is just so dominant, 
> has many programmers, for other languages to catch up). That guy even 
> excluded other languages, e.g. Scala, targeting the JVM, so not a 
> library/framework issue. 
>
>
>
>> Am Mittwoch, 23. September 2015 12:46:21 UTC+2 schrieb Páll Haraldsson:
>>>
>>> Sorry, kind of of-topic for the thread, mostly about Cxx.jl/C++:
>>>
>>> On Friday, September 18, 2015 at 8:05:07 AM UTC, Uwe Fechner wrote:
>>>>
>>>> I like QT a lot. There is more then one open source, QT based IDE out 
>>>> there, e.g. QT Creator.
>>>> QT has a GUI builder, that is much better then the GUI builders for GTK 
>>>> (in my opinion).
>>>> And you can use the java-script like QML language for building the user 
>>>> interface, if you want to.
>>>>
>>>> Tutorial for PyQT:
>>>> https://pythonspot.com/qml-and-pyqt-creating-a-gui-tutorial/
>>>>
>>>> As soon as the Julia/C++ integration is available by default (hopefully 
>>>> in Julia 0.5), QT integration
>>>> should be easy.
>>>>
>>>
>>> What do you mean by default? That is, I thought Keno's Cxx.jl "just 
>>> works".. (and requires 0.4). Do you mean that it will be somehow integrated 
>>> into Base? Or that something is needed in Julia so that Cxx.jl works even 
>>> better? I'm just curious if there is a "problem with it.. If there is would 
>>> it somehow be specific to QT [Creator]/QML (I can't really see how, but do 
>>> not really know QT Creator..).
>>>
>>> What kind of specific problems can/do you run into with QT (or 
>>> otherwise..)?
>>>  
>>>
>>>> For those, that want to play with Julia and QT now already, have a look 
>>>> at:
>>>>
>>>> https://github.com/jverzani/PySide.jl
>>>>
>>>> (very experimental)
>>>>
>>>
>>> [Here QT is "outsourced" to Python so that, only PyCall.jl has to work, 
>>> and Cxx.jl is not needed if I recall.]
>>>
>>>

Re: [julia-users] Re: IDE for Julia

2015-09-21 Thread Uwe Fechner
Did anyone ask Forio if they would change the license (as they are 
obviously not longer
interested in the project)?

Uwe

Am Montag, 21. September 2015 13:52:57 UTC+2 schrieb Christof Stocker:
>
> I did consider looking into that but as soon as I saw the license I ran 
> for my life. Its a similar issue with Julietta. Although what is an issue 
> to me doesn't have to be an issue to others
>
> On 2015-09-21 13:48, Steven Sagaert wrote:
>
> +1  
> & to add to Uwe's post: AFAIK JuliaStudio is based on Qt (& QtCreator I 
> believe). I thought that JuliaStudio was a nice start (also based on 
> QtCreator). I wish a group would fork it and develop it further in the 
> direction of RStudio.
>
> On Friday, September 18, 2015 at 10:08:23 AM UTC+2, Christof Stocker 
> wrote: 
>>
>> I would be a huge fan of an RStudio like Julia IDE
>>
>> On 2015-09-18 10:05, Uwe Fechner wrote:
>>
>> I like QT a lot. There is more then one open source, QT based IDE out 
>> there, e.g. QT Creator.
>> QT has a GUI builder, that is much better then the GUI builders for GTK 
>> (in my opinion).
>> And you can use the java-script like QML language for building the user 
>> interface, if you want to.
>>
>> Tutorial for PyQT:
>> https://pythonspot.com/qml-and-pyqt-creating-a-gui-tutorial/
>>
>> As soon as the Julia/C++ integration is available by default (hopefully 
>> in Julia 0.5), QT integration
>> should be easy. For those, that want to play with Julia and QT now 
>> already, have a look at:
>>
>> https://github.com/jverzani/PySide.jl
>>
>> (very experimental)
>>
>> Am Freitag, 18. September 2015 08:25:44 UTC+2 schrieb Daniel Carrera: 
>>>
>>> There are no Qt bindings for Julia yet. I also don't know what text 
>>> editing component is provided by Qt or what its features are. I began 
>>> working with Gtk in part because the Julia Gtk bindings seem to be the most 
>>> developed. 
>>>
>>> Is there a reason you like Qt besides it being cross-platform?
>>>
>>>
>>> On 17 September 2015 at 23:50, SrAceves <mauri.c...@gmail.com> wrote:
>>>
>>>> What about Qt? RStudio is fantastic: Qt based, multi-platoform. 
>>>> Everything anyone ever wanted of an IDE.
>>>>
>>>> El martes, 15 de septiembre de 2015, 8:13:04 (UTC-5), Daniel Carrera 
>>>> escribió: 
>>>>>
>>>>>
>>>>> Last night I started experimenting with Gtk, and started making a 
>>>>> sketch of what a Julia IDE might look like. In the process I am writing 
>>>>> down a list of things that are probably needed before a Julia IDE
>>>>>
>>>>>
>>>>>  getting a list of things that probably need to exist before a Julia 
>>>>> IDE can be completed. This is what I have so far:
>>>>> 1) A Julia package for the GNOME Docking Library
>>>>>
>>>>> I think most people expect that an IDE has docking 
>>>>>
>>>>> Despite the name, it does not depend on any GNOME libraries, only Gtk. 
>>>>> This is what Anjuta and MonoDevelop use to get docking windows. I think 
>>>>> most people expect to be able to move things around in an IDE.
>>>>>
>>>>> https://developer.gnome.org/gdl/
>>>>>
>>>>>
>>>>> 2)
>>>>>
>>>>>
>>>>>
>>>>> On 14 September 2015 at 17:10, <jonatha...@alumni.epfl.ch> wrote:
>>>>>
>>>>>> Gtk, the code isn't published but it's very similar to Julietta: 
>>>>>>
>>>>>> <https://github.com/tknopp/Julietta.jl>https://github.com/tknopp/
>>>>>> Julietta.jl
>>>>>>
>>>>>
>>>>>
>>>
>>
>

Re: [julia-users] Re: IDE for Julia

2015-09-21 Thread Uwe Fechner
On their homepage they say:
"As a desktop replacement for Julia Studio, Forio recommends Juno 
<http://www.junolab.org>"

Uwe

Am Montag, 21. September 2015 18:49:13 UTC+2 schrieb Daniel Carrera:
>
> How do you know they are not interested?
>
> On 21 September 2015 at 15:05, Uwe Fechner <uwe.fec...@gmail.com 
> > wrote:
>
>> Did anyone ask Forio if they would change the license (as they are 
>> obviously not longer
>> interested in the project)?
>>
>> Uwe
>>
>> Am Montag, 21. September 2015 13:52:57 UTC+2 schrieb Christof Stocker:
>>>
>>> I did consider looking into that but as soon as I saw the license I ran 
>>> for my life. Its a similar issue with Julietta. Although what is an issue 
>>> to me doesn't have to be an issue to others
>>>
>>> On 2015-09-21 13:48, Steven Sagaert wrote:
>>>
>>> +1  
>>> & to add to Uwe's post: AFAIK JuliaStudio is based on Qt (& QtCreator I 
>>> believe). I thought that JuliaStudio was a nice start (also based on 
>>> QtCreator). I wish a group would fork it and develop it further in the 
>>> direction of RStudio.
>>>
>>> On Friday, September 18, 2015 at 10:08:23 AM UTC+2, Christof Stocker 
>>> wrote: 
>>>>
>>>> I would be a huge fan of an RStudio like Julia IDE
>>>>
>>>> On 2015-09-18 10:05, Uwe Fechner wrote:
>>>>
>>>> I like QT a lot. There is more then one open source, QT based IDE out 
>>>> there, e.g. QT Creator.
>>>> QT has a GUI builder, that is much better then the GUI builders for GTK 
>>>> (in my opinion).
>>>> And you can use the java-script like QML language for building the user 
>>>> interface, if you want to.
>>>>
>>>> Tutorial for PyQT:
>>>> https://pythonspot.com/qml-and-pyqt-creating-a-gui-tutorial/
>>>>
>>>> As soon as the Julia/C++ integration is available by default (hopefully 
>>>> in Julia 0.5), QT integration
>>>> should be easy. For those, that want to play with Julia and QT now 
>>>> already, have a look at:
>>>>
>>>> https://github.com/jverzani/PySide.jl
>>>>
>>>> (very experimental)
>>>>
>>>> Am Freitag, 18. September 2015 08:25:44 UTC+2 schrieb Daniel Carrera: 
>>>>>
>>>>> There are no Qt bindings for Julia yet. I also don't know what text 
>>>>> editing component is provided by Qt or what its features are. I began 
>>>>> working with Gtk in part because the Julia Gtk bindings seem to be the 
>>>>> most 
>>>>> developed. 
>>>>>
>>>>> Is there a reason you like Qt besides it being cross-platform?
>>>>>
>>>>>
>>>>> On 17 September 2015 at 23:50, SrAceves <mauri.c...@gmail.com> wrote:
>>>>>
>>>>>> What about Qt? RStudio is fantastic: Qt based, multi-platoform. 
>>>>>> Everything anyone ever wanted of an IDE.
>>>>>>
>>>>>> El martes, 15 de septiembre de 2015, 8:13:04 (UTC-5), Daniel Carrera 
>>>>>> escribió: 
>>>>>>>
>>>>>>>
>>>>>>> Last night I started experimenting with Gtk, and started making a 
>>>>>>> sketch of what a Julia IDE might look like. In the process I am writing 
>>>>>>> down a list of things that are probably needed before a Julia IDE
>>>>>>>
>>>>>>>
>>>>>>>  getting a list of things that probably need to exist before a Julia 
>>>>>>> IDE can be completed. This is what I have so far:
>>>>>>> 1) A Julia package for the GNOME Docking Library
>>>>>>>
>>>>>>> I think most people expect that an IDE has docking 
>>>>>>>
>>>>>>> Despite the name, it does not depend on any GNOME libraries, only 
>>>>>>> Gtk. This is what Anjuta and MonoDevelop use to get docking windows. I 
>>>>>>> think most people expect to be able to move things around in an IDE.
>>>>>>>
>>>>>>> https://developer.gnome.org/gdl/
>>>>>>>
>>>>>>>
>>>>>>> 2)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 14 September 2015 at 17:10, <jonatha...@alumni.epfl.ch> wrote:
>>>>>>>
>>>>>>>> Gtk, the code isn't published but it's very similar to Julietta: 
>>>>>>>>
>>>>>>>> <https://github.com/tknopp/Julietta.jl>https://github.com/tknopp/
>>>>>>>> Julietta.jl
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>
>

Re: [julia-users] Re: IDE for Julia

2015-09-18 Thread Uwe Fechner
I like QT a lot. There is more then one open source, QT based IDE out 
there, e.g. QT Creator.
QT has a GUI builder, that is much better then the GUI builders for GTK (in 
my opinion).
And you can use the java-script like QML language for building the user 
interface, if you want to.

Tutorial for PyQT:
https://pythonspot.com/qml-and-pyqt-creating-a-gui-tutorial/

As soon as the Julia/C++ integration is available by default (hopefully in 
Julia 0.5), QT integration
should be easy. For those, that want to play with Julia and QT now already, 
have a look at:

https://github.com/jverzani/PySide.jl

(very experimental)

Am Freitag, 18. September 2015 08:25:44 UTC+2 schrieb Daniel Carrera:
>
> There are no Qt bindings for Julia yet. I also don't know what text 
> editing component is provided by Qt or what its features are. I began 
> working with Gtk in part because the Julia Gtk bindings seem to be the most 
> developed.
>
> Is there a reason you like Qt besides it being cross-platform?
>
>
> On 17 September 2015 at 23:50, SrAceves  > wrote:
>
>> What about Qt? RStudio is fantastic: Qt based, multi-platoform. 
>> Everything anyone ever wanted of an IDE.
>>
>> El martes, 15 de septiembre de 2015, 8:13:04 (UTC-5), Daniel Carrera 
>> escribió:
>>>
>>>
>>> Last night I started experimenting with Gtk, and started making a sketch 
>>> of what a Julia IDE might look like. In the process I am writing down a 
>>> list of things that are probably needed before a Julia IDE
>>>
>>>
>>>  getting a list of things that probably need to exist before a Julia IDE 
>>> can be completed. This is what I have so far:
>>> 1) A Julia package for the GNOME Docking Library
>>>
>>> I think most people expect that an IDE has docking 
>>>
>>> Despite the name, it does not depend on any GNOME libraries, only Gtk. 
>>> This is what Anjuta and MonoDevelop use to get docking windows. I think 
>>> most people expect to be able to move things around in an IDE.
>>>
>>> https://developer.gnome.org/gdl/
>>>
>>>
>>> 2)
>>>
>>>
>>>
>>> On 14 September 2015 at 17:10,  wrote:
>>>
 Gtk, the code isn't published but it's very similar to Julietta:

 https://github.com/tknopp/Julietta.jl

>>>
>>>
>

Re: [julia-users] Re: IDE for Julia

2015-09-14 Thread Uwe Fechner
Well, Gambas for example:
https://en.wikipedia.org/wiki/Gambas

Am Montag, 14. September 2015 14:54:27 UTC+2 schrieb Sheehan Olver:
>
> Are there any open source languages with a "good" native IDE? 
>
> I think IDEs are probably too painful to develop unless paid to do so.. 
>
> > On 14 Sep 2015, at 10:31 pm, Tamas Papp  
> wrote: 
> > 
> >> On Mon, Sep 14 2015, Joshua Ballanco  
> wrote: 
> >> 
> >> It was really only later that projects were started to build “true” 
> Clojure IDEs, and still I don’t think any of these surpass (or even really 
> approach) the utility of the IDE plugins (the three IDEs of which I’m aware 
> are: LightTable, NightCode, and clooj). 
> >> 
> >> One important element that allowed much of this for Clojure was the 
> early development of nREPL, the network-enabled REPL. With this, all 
> editors/IDE plugins stand on equal footing with access to the REPL. I 
> noticed in the code to REPL.jl there’s a function `start_repl_server`, but 
> it doesn’t seem to be used anywhere. 
> >> 
> >> If I had to pick someplace to focus effort on improving tooling for 
> Julia in general, I’d look at improving/adding a network interface to the 
> REPL. 
> > 
> > I very much agree. Currently the Emacs interface uses ESS for Julia, 
> > which is not well-adapted to Julia for historical reasons. Having 
> > something like Swank or nREPL would make things much easier 
> > (non-blocking evaluation, integrated introspection, debugging, etc). 
> > 
> > Best, 
> > 
> > Tamas 
>


[julia-users] Re: IDE for Julia

2015-09-14 Thread Uwe Fechner
While I understand your point, the success of a new programming language 
depends on the availability of a good IDE. Apart from the projects, 
mentioned so far I also want to mention spyder. Integrating Julia support 
would be easy and it would make the transition for Python users easier.
Not everyone, who needs some programming in for example in science wants to 
become a "hardcore hacker".

https://github.com/spyder-ide/spyder 

Am Sonntag, 13. September 2015 23:40:46 UTC+2 schrieb Daniel Carrera:
>
>
>
> On Saturday, 5 September 2015 21:03:28 UTC+2, kike wrote:
>>
>> They say that Julia is a language that is simple and fast with a great 
>> future ... but if they want to extend and reach non-programrs, there is 
>> that make things easier and simple ... that is to say a IDE JuliaEstudio 
>> type. 
>>
>
>
> How do you make a programming language for non-programmers?
>
> Look, there is no programming language or IDE in the world that will allow 
> you to write a program without your having to learn programming. Here is my 
> advice:
>
> 1) Forget IDEs. Just download a reasonable text editor (e.g. Notepad++ on 
> Windows).
>
> 2) Download Julia.
>
> 3) Run the Julia interactive shell and go through the manual:
>
> http://docs.julialang.org/en/release-0.3/#manual
>
>  
>
>> There are more non-programrs, developers, which means that while for 
>> developers experts is necessary the integration of different languages in 
>> different applications and to work in the cloud, for the non- programrs 
>> with a high-level language fast, convenient to install and also with a 
>> great deal of support from the community in terms of packages that is 
>> Julia, but if you need to do a master to simply install it, something is 
>> amiss.
>>
>> This is a comment from a simple non-developer.
>>
>
> Programming languages are designed for programmers. It takes a certain 
> amount of time and effort to learn how to program in any language. Julia is 
> easier to learn than most.
>
> Daniel.
>  
>
>
>

Re: [julia-users] PyPlot does not work with Julia Version 0.4.0-rc1+5

2015-09-10 Thread Uwe Fechner
Yes, I can.

I fixed the first problem with:
sudo pip install matplotlib==1.4.3

With other words, PyPlot is using the system libraries, even though I use a 
virtual 
conda environment. This is just ignored.

Now everything works fine with Julia 0.3 and 0.4, as long as I do not use 
precompilation.

After I did:
Pkg.checkout("PyCall")
Pkg.checkout("PyPlot")
Pkg.build("PyCall")

both libraries get precompiled on 0.4, but now I get the following error:

julia> using PyPlot
/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/__init__.py:1155:
 
UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
ERROR: InitError: PyError (:PyImport_ImportModule) 
ImportError('/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/sip.so:
 
undefined symbol: PyProperty_Type',)
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/pyplot.py",
 
line 98, in 
_backend_mod, new_figure_manager, draw_if_interactive, _show = 
pylab_setup()
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
 
line 28, in pylab_setup
globals(),locals(),[backend_name],0)
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
 
line 13, in 
from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
 
line 25, in 
from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/qt4_compat.py",
 
line 36, in 
import sip

 [inlined code] from /home/ufechner/.julia/v0.4/PyCall/src/exception.jl:82
 in pyimport at /home/ufechner/.julia/v0.4/PyCall/src/PyCall.jl:315
 in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:245
 in _require_from_serialized at loading.jl:84
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:186
during initialization of module PyPlot

Any idea?





Am Donnerstag, 10. September 2015 18:20:52 UTC+2 schrieb Mauro:
>
> Works for me.  The error suggests that matplotlib doesn't work.  Can you 
> import in python itself? 
>
> $ python 
>
> >>> import matplotlib 
>
> On Thu, 2015-09-10 at 18:06, Uwe Fechner <uwe.fec...@gmail.com 
> > wrote: 
> > Hello, 
> > 
> > I have a problem with PyPlot on Julia 0.4.0-rc1: 
> > 
> > julia> using PyPlot 
> > ERROR: InitError: Failed to pyimport("matplotlib"): PyPlot will not work 
> > until you have a functioning matplotlib module.  PyError 
> > (:PyImport_ImportModule)  
> > ImportError('cannot import name scimath',) 
> >   File 
> > 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py",
>  
>
> > line 180, in  
> > from matplotlib.cbook import is_string_like 
> >   File 
> > 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py",
>  
>
> > line 33, in  
> > import numpy as np 
> >   File 
> > 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py",
>  
>
> > line 170, in  
> > from . import add_newdocs 
> >   File 
> > 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py",
>  
>
> > line 13, in  
> > from numpy.lib import add_newdoc 
> >   File 
> > 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py",
>  
>
> > line 17, in  
> > from . import scimath as emath 
> > 
> >  in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:232 
> >  in _require_from_serialized at loading.jl:84 
> >  in _require_from_serialized at ./loading.jl:109 
> >  in require at ./loading.jl:186 
> > during initialization of module PyPlot 
> > 
> > julia> 
> > 
> > Any idea? 
> > 
> > Uwe Fechner 
>
>

[julia-users] PyPlot does not work with Julia Version 0.4.0-rc1+5

2015-09-10 Thread Uwe Fechner
Hello,

I have a problem with PyPlot on Julia 0.4.0-rc1:

julia> using PyPlot
ERROR: InitError: Failed to pyimport("matplotlib"): PyPlot will not work 
until you have a functioning matplotlib module.  PyError 
(:PyImport_ImportModule) 
ImportError('cannot import name scimath',)
  File 
"/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py",
 
line 180, in 
from matplotlib.cbook import is_string_like
  File 
"/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py",
 
line 33, in 
import numpy as np
  File 
"/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py",
 
line 170, in 
from . import add_newdocs
  File 
"/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py",
 
line 13, in 
from numpy.lib import add_newdoc
  File 
"/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py",
 
line 17, in 
from . import scimath as emath

 in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:232
 in _require_from_serialized at loading.jl:84
 in _require_from_serialized at ./loading.jl:109
 in require at ./loading.jl:186
during initialization of module PyPlot

julia> 

Any idea?

Uwe Fechner



[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5

2015-09-10 Thread Uwe Fechner
I tried it also with Julia 0.3.11.
Same error.

If I use ipython, import matplotlib works fine.
In [2]: matplotlib.__version__
Out[2]: '1.4.3'

In [3]: 

I used conda on ubuntu 14.04, 64 bit to install matplotlib.

Am Donnerstag, 10. September 2015 18:06:30 UTC+2 schrieb Uwe Fechner:
>
> Hello,
>
> I have a problem with PyPlot on Julia 0.4.0-rc1:
>
> julia> using PyPlot
> ERROR: InitError: Failed to pyimport("matplotlib"): PyPlot will not work 
> until you have a functioning matplotlib module.  PyError 
> (:PyImport_ImportModule) 
> ImportError('cannot import name scimath',)
>   File 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/__init__.py",
>  
> line 180, in 
> from matplotlib.cbook import is_string_like
>   File 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/matplotlib/cbook.py",
>  
> line 33, in 
> import numpy as np
>   File 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/__init__.py",
>  
> line 170, in 
> from . import add_newdocs
>   File 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/add_newdocs.py",
>  
> line 13, in 
> from numpy.lib import add_newdoc
>   File 
> "/home/ufechner/miniconda/envs/numba2/lib/python2.7/site-packages/numpy/lib/__init__.py",
>  
> line 17, in 
> from . import scimath as emath
>
>  in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:232
>  in _require_from_serialized at loading.jl:84
>  in _require_from_serialized at ./loading.jl:109
>  in require at ./loading.jl:186
> during initialization of module PyPlot
>
> julia> 
>
> Any idea?
>
> Uwe Fechner
>
>

[julia-users] Re: PyPlot does not work with Julia Version 0.4.0-rc1+5

2015-09-10 Thread Uwe Fechner
This is not yet fixed.

I deleted .jula/v0.4/PyCall and .jula/v0.4/PyPlot.
Then I did:
Pkg.update()
Pkg.checkout("PyCall")
Pkg.checkout("PyPlot")
Pkg.build("PyCall")
using PyPlot

This works fine. But if I restart Julia
and do using PyPlot again, I get the error:

julia> tic(); using PyPlot; toc();
/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/__init__.py:1155:
 
UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
ERROR: LoadError: InitError: PyError (:PyImport_ImportModule) 
ImportError('/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/sip.so:
 
undefined symbol: PyProperty_Type',)
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/pyplot.py",
 
line 98, in 
_backend_mod, new_figure_manager, draw_if_interactive, _show = 
pylab_setup()
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
 
line 28, in pylab_setup
globals(),locals(),[backend_name],0)
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
 
line 13, in 
from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
 
line 25, in 
from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
  File 
"/home/ufechner/miniconda/envs/kitepower/lib/python2.7/site-packages/matplotlib/backends/qt4_compat.py",
 
line 36, in 
import sip

 [inlined code] from /home/ufechner/.julia/v0.4/PyCall/src/exception.jl:82
 in pyimport at /home/ufechner/.julia/v0.4/PyCall/src/PyCall.jl:315
 in __init__ at /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl:245
 in include at ./boot.jl:260
 in include_from_node1 at ./loading.jl:271
 in require at ./loading.jl:210
during initialization of module PyPlot
while loading /home/ufechner/.julia/v0.4/PyPlot/src/PyPlot.jl, in 
expression starting on line 653

Any idea?

Uwe Fechner


Am Donnerstag, 10. September 2015 18:51:32 UTC+2 schrieb Steven G. Johnson:
>
> Just merged a fix, I think.
>
> I've fallen behind a bit on PyCall and PyPlot issues, but I'll be cleaning 
> things up over the next few days since I need these for my class soon.
>


[julia-users] 0.4 enters stabilizing period

2015-09-09 Thread Uwe Fechner
Hello,
there are no more issues blocking the 0.4 release.
https://github.com/JuliaLang/julia/milestones/0.4.0

Hooray!

Waiting for the release candidate.

Uwe Fechner, TU Delft




[julia-users] Re: [ANN] Conda.jl: using conda package manager for Julia

2015-09-02 Thread Uwe Fechner
Julia does have a very good internal package manager, that can also install 
binary dependencies cross-platform.
Why would you want to add another package manager?

Am Dienstag, 1. September 2015 14:42:31 UTC+2 schrieb Luthaf:
>
> Hi Julians! 
>
> I am happy to present you the Conda.jl 
>  package, a binary dependencies 
> manager for Julia based on the open-source conda 
>  package manager.
>
> Some interesting features of the Conda package manager:
>  - You can easily add your own software and use your own channel for 
> software distribution;
>  - You can install packages as non root on Linux;
>  - Conda is cross-plateforme, and you can use it for all your binary 
> dependencies, provided the binaries have been uploaded.
>
> I'll love to have your input on the code or the functionalities.
>
> Cheers
> Guillaume
>


[julia-users] Re: Very poor performance on Linux

2015-08-26 Thread Uwe Fechner
Can you tell a little bit more about your machine?
Which CPU? How much RAM? Which Linux version?

Uwe

Am Mittwoch, 26. August 2015 17:12:48 UTC+2 schrieb Chris:

 Hello,

 I recently got access to a new Linux machine, and I've been trying to run 
 some of my code there. I tried downloading a binary and using that, but 
 after I saw the performance issues, I built Julia from source, and the 
 issues persist. First:

  julia @time versioninfo()
 Julia Version 0.3.12-pre+5
 Commit 24138e7 (2015-08-20 17:19 UTC)
 Platform Info:
   System: Linux (x86_64-linux-gnu)
   CPU: Intel(R) Xeon(R) CPU E5-4650 0 @ 2.70GHz
   WORD_SIZE: 64
   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
   LAPACK: libopenblas
   LIBM: libopenlibm
   LLVM: libLLVM-3.3
 elapsed time: 40.533040322 seconds (142031648 bytes allocated, 2.89% gc 
 time)

 You can see that is quite a long time for the command to run (on my 
 Windows machine, it takes about 1.3 seconds). Startup itself is quite slow, 
 and even typing input immediately after startup is slow (the characters 
 take a few seconds just to show up). Loading a module that I use a lot on 
 Windows takes about 20 seconds, but loading that same module on the Linux 
 machine takes almost 9 minutes!

 Obviously something is wrong here, and I'm stumped. Any ideas?

 Thanks,
 Chris



Re: [julia-users] Re: What is the fastest way to perform 100k blocking IO operations in parallel?

2015-08-24 Thread Uwe Fechner
Did you try the DNS servers from Google, e.g. 8.8.8.8 ?
I never saw a reply that needs more than one second.
(Well, in our university network.)

Am Montag, 24. August 2015 16:25:06 UTC+2 schrieb Seth:

 Name resolution delays are generally an issue with network latency. Trying 
 to resolve 1000 uncached names will take a while on any system:

 seth@schroeder:~$ time host www.julialang.org
 www.julialang.org is an alias for julialang.github.io.
 julialang.github.io is an alias for github.map.fastly.net.
 github.map.fastly.net has address 23.235.47.133


 real 0m3.268s
 user 0m0.003s
 sys 0m0.020s

 Unless your server is localhost, you're going to have delays.

 On Monday, August 24, 2015 at 6:49:47 AM UTC-7, Jonathan Malmaud wrote:

 Thanks for the report, Andrei - Would you mind filing this is an issue at 
 https://github.com/JuliaWeb/Requests.jl? 

 On Mon, Aug 24, 2015 at 9:17 AM, Andrei Zh faithle...@gmail.com wrote:

 Jonathan, thanks for your support. So far I noticed that DNS gives 
 pretty large delay. E.g. resolving IP addresses for 1000 URLs took 80 
 seconds in serial code and 26 seconds in muli-task code: 


 Serial execution: 

 julia @time for url in urls
begin
Base.getaddrinfo(URI(url).host)
end
end
 elapsed time: 80.071810293 seconds (732400 bytes allocated)


 Multitask execution:


 julia @time @sync for url in urls
@async begin   
Base.getaddrinfo(URI(url).host)
end
end

 elapsed time: 26.241893516 seconds (4277968 bytes allocated)

 So I'll try to pre-resolve IPs and test again. 


 On Monday, August 24, 2015 at 4:01:44 PM UTC+3, Jonathan Malmaud wrote:

 As one of the maintainers of Requests.jl, I'm especially interested in 
 its use for high-performance applications so don't hesitate to file an 
 issue if it gives you any performance problems.

 On Sunday, August 23, 2015 at 7:40:08 PM UTC-4, Andrei Zh wrote:

 Hi Steven, 

 thanks for your answer! It turns out I misunderstood @async long time 
 ago, assuming it also makes a remote call to other processes and thus 
 introduces true multi-tasking. So now I need to rethink my approach 
 before 
 going further. 

 Just to clarify: my goal is to perform as many requests as possible at 
 the same time, so I want to use both - multiple processes (to start 
 several 
 requests at several cores in parallel) and tasks (to launch new requests 
 while old ones are still waiting for IO to complete). 

 So I will update my approach and come back with results or new 
 questions. 



 On Monday, August 24, 2015 at 2:13:23 AM UTC+3, Steven G. Johnson 
 wrote:

 @parallel in Julia is for executing separate parallel processes (true 
 multi-tasking, with separate address spaces).  @async is for tasks, 
 which 
 are green threads and represent cooperative multitasking (within the 
 same 
 process and the same address space).

 I/O in Julia is asynchronous — while one task is blocked waiting on 
 I/O, another task will wake up and start running.  (This is based on the 
 libuv library, which is designed for high-performance asynchronous I/O.)

 The first question is whether you want to fetch URLs in separate OS 
 processes, or you want to use green threads within the same process.  It 
 sounds like you want the latter, in which case @async is the right thing.

 The second question is whether something about the Requests.jl 
 package is serializing things somehow; for that you might file an issue 
 at 
 Requests.jl.




Re: [julia-users] Creating a new version of a package

2015-08-23 Thread Uwe Fechner
Thanks for the detailed explanation!
Actually, I did not set up my github ssh keys yet, but I am using HTTPS.
Uwe

Am Sonntag, 23. August 2015 18:17:10 UTC+2 schrieb Timothée Poisot:

 If you use 2-factors authentication, it seems that you have to push 
 METADATA manually. https://github.com/JuliaLang/julia/issues/8228 seems 
 to say it's possible, but I never managed to get it to work. 

 Le samedi 22 août 2015 à 22:26 -0700, Tony Kelman a écrit : 
  Most likely your github ssh keys were not set up? Or needed to be 
  reset? 
  
  
  On Saturday, August 22, 2015 at 11:02:53 AM UTC-7, Uwe Fechner wrote: 
   
   Ok, publishing METADATA manually worked: 
   
   Publishing METADATA manually 
   
   If Pkg.publish() 

   http://julia.readthedocs.org/en/latest/stdlib/pkg/#Base.Pkg.publish 

   fails you can follow these instructions to manually publish your 
   package. 
   
   By “forking” the main METADATA repository, you can create a 
   personal copy 
   (of METADATA.jl) under your GitHub account. Once that copy exists, 
   you can 
   push your local changes to your copy (just like any other GitHub 
   project). 
   
   1. go to https://github.com/JuliaLang/METADATA.jl/fork and create 
   your 
   own fork. 
   
   2. add your fork as a remote repository for the METADATA repository 
   on 
   your local computer (in the terminal where USERNAME is your github 
   username): 
   
   cd ~/.julia/v0.4/METADATAgit remote add USERNAME 
   https://github.com/USERNAME/METADATA.jl.git 
   
   
  1. 
   
  push your changes to your fork: 
   
  git push USERNAME metadata-v2 
   
   
   4. If all of that works, then go back to the GitHub page for your 
   fork, 
   and click the “pull request” link. 
   
   
   But I still would like to understand why Pkg.publish() fails. 
   
   
   Uwe 
   
   
   Am Samstag, 22. August 2015 19:42:25 UTC+2 schrieb Uwe Fechner: 

Well, it is not that easy. 

I did: 
Pkg.tag(NaNMath,:minor) 

which worked well. 

Pkg.pubish() did not work. 

First I had to do: 
git config --global github.user ufechner7 

which worked fine. 

Than I had to do: 
Pkg.add(JSON) 

It would be nice if the error message of the missing JSON package 
would 
come earlier, but OK. 

But Pkg.publish() still fails: 

julia Pkg.publish() 
INFO: Validating METADATA 
INFO: Pushing NaNMath permanent tags: v0.1.0 
Username for 'https://github.com': ufechner7 
Password for 'https://ufechn...@github.com': 
INFO: Submitting METADATA changes 
INFO: Forking JuliaLang/METADATA.jl to ufechner7 
INFO: Recompiling stale cache file 
/home/ufechner/.julia/lib/v0.4/Compat.ji for module Compat. 
Enter host password for user 'ufechner7': 
INFO: Pushing changes as branch pull-request/d2ff6d30 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 
ERROR: failed process: Process(`git 
--work-tree=/home/ufechner/.julia/v0.4/METADATA 
--git-dir=/home/ufechner/.julia/v0.4/METADATA/.git push -q 
g...@github.com:ufechner7/METADATA.jl.git 
d2ff6d308410429da335674b372a763978d65bad:refs/heads/pull 
-request/d2ff6d30`, 
ProcessExited(128)) [128] 
 in pipeline_error at process.jl:517 
 in run at process.jl:493 
 in pull_request at pkg/entry.jl:324 
 in publish at pkg/entry.jl:387 
 in anonymous at pkg/dir.jl:31 
 in cd at file.jl:22 
 in cd at pkg/dir.jl:31 
 in publish at pkg.jl:61 

Any idea how to fix this? 

Uwe 


Am Samstag, 22. August 2015 19:04:30 UTC+2 schrieb Miles Lubin: 
 
 Pkg.tag(NaNMath) 
 Pkg.publish() 
 
 is all you should have to do. 
 
 -- 
 Timothée Poisot, PhD 

 Professeur adjoint 
 Département des sciences biologiques 
 Université de Montréal 

 phone  : 514 343-7691 
 web: http://poisotlab.io 
 twitter: @PoisotLab 
 meeting: https://tpoisot.youcanbook.me/ 



Re: [julia-users] Creating a new version of a package

2015-08-22 Thread Uwe Fechner
Well, it is not that easy.

I did: 
Pkg.tag(NaNMath,:minor)

which worked well.

Pkg.pubish() did not work.

First I had to do:
git config --global github.user ufechner7

which worked fine.

Than I had to do:
Pkg.add(JSON)

It would be nice if the error message of the missing JSON package would 
come earlier, but OK.

But Pkg.publish() still fails:

julia Pkg.publish()
INFO: Validating METADATA
INFO: Pushing NaNMath permanent tags: v0.1.0
Username for 'https://github.com': ufechner7
Password for 'https://ufechn...@github.com': 
INFO: Submitting METADATA changes
INFO: Forking JuliaLang/METADATA.jl to ufechner7
INFO: Recompiling stale cache file /home/ufechner/.julia/lib/v0.4/Compat.ji 
for module Compat.
Enter host password for user 'ufechner7':
INFO: Pushing changes as branch pull-request/d2ff6d30
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: failed process: Process(`git 
--work-tree=/home/ufechner/.julia/v0.4/METADATA 
--git-dir=/home/ufechner/.julia/v0.4/METADATA/.git push -q 
g...@github.com:ufechner7/METADATA.jl.git 
d2ff6d308410429da335674b372a763978d65bad:refs/heads/pull-request/d2ff6d30`, 
ProcessExited(128)) [128]
 in pipeline_error at process.jl:517
 in run at process.jl:493
 in pull_request at pkg/entry.jl:324
 in publish at pkg/entry.jl:387
 in anonymous at pkg/dir.jl:31
 in cd at file.jl:22
 in cd at pkg/dir.jl:31
 in publish at pkg.jl:61

Any idea how to fix this?

Uwe


Am Samstag, 22. August 2015 19:04:30 UTC+2 schrieb Miles Lubin:

 Pkg.tag(NaNMath)
 Pkg.publish()

 is all you should have to do.



Re: [julia-users] Creating a new version of a package

2015-08-22 Thread Uwe Fechner
Ok, publishing METADATA manually worked:

Publishing METADATA manually 

If Pkg.publish() 
http://julia.readthedocs.org/en/latest/stdlib/pkg/#Base.Pkg.publish fails 
you can follow these instructions to manually publish your package.

By “forking” the main METADATA repository, you can create a personal copy 
(of METADATA.jl) under your GitHub account. Once that copy exists, you can 
push your local changes to your copy (just like any other GitHub project).

1. go to https://github.com/JuliaLang/METADATA.jl/fork and create your own 
fork.

2. add your fork as a remote repository for the METADATA repository on your 
local computer (in the terminal where USERNAME is your github username):

cd ~/.julia/v0.4/METADATAgit remote add USERNAME 
https://github.com/USERNAME/METADATA.jl.git


   1. 
   
   push your changes to your fork:
   
   git push USERNAME metadata-v2
   
   
4. If all of that works, then go back to the GitHub page for your fork, and 
click the “pull request” link.


But I still would like to understand why Pkg.publish() fails.


Uwe


Am Samstag, 22. August 2015 19:42:25 UTC+2 schrieb Uwe Fechner:

 Well, it is not that easy.

 I did: 
 Pkg.tag(NaNMath,:minor)

 which worked well.

 Pkg.pubish() did not work.

 First I had to do:
 git config --global github.user ufechner7

 which worked fine.

 Than I had to do:
 Pkg.add(JSON)

 It would be nice if the error message of the missing JSON package would 
 come earlier, but OK.

 But Pkg.publish() still fails:

 julia Pkg.publish()
 INFO: Validating METADATA
 INFO: Pushing NaNMath permanent tags: v0.1.0
 Username for 'https://github.com': ufechner7
 Password for 'https://ufechn...@github.com': 
 INFO: Submitting METADATA changes
 INFO: Forking JuliaLang/METADATA.jl to ufechner7
 INFO: Recompiling stale cache file 
 /home/ufechner/.julia/lib/v0.4/Compat.ji for module Compat.
 Enter host password for user 'ufechner7':
 INFO: Pushing changes as branch pull-request/d2ff6d30
 Permission denied (publickey).
 fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
 and the repository exists.
 ERROR: failed process: Process(`git 
 --work-tree=/home/ufechner/.julia/v0.4/METADATA 
 --git-dir=/home/ufechner/.julia/v0.4/METADATA/.git push -q 
 g...@github.com:ufechner7/METADATA.jl.git 
 d2ff6d308410429da335674b372a763978d65bad:refs/heads/pull-request/d2ff6d30`, 
 ProcessExited(128)) [128]
  in pipeline_error at process.jl:517
  in run at process.jl:493
  in pull_request at pkg/entry.jl:324
  in publish at pkg/entry.jl:387
  in anonymous at pkg/dir.jl:31
  in cd at file.jl:22
  in cd at pkg/dir.jl:31
  in publish at pkg.jl:61

 Any idea how to fix this?

 Uwe


 Am Samstag, 22. August 2015 19:04:30 UTC+2 schrieb Miles Lubin:

 Pkg.tag(NaNMath)
 Pkg.publish()

 is all you should have to do.



[julia-users] Creating a new version of a package

2015-08-22 Thread Uwe Fechner
Hello,

I was invited to tag a new version of the package NaNMath.jl .
https://github.com/mlubin/NaNMath.jl

Does anyone know, how to do this?

Best regards:

Uwe Fechner



Re: [julia-users] Creating a new version of a package

2015-08-22 Thread Uwe Fechner
Ok. As far as I understand, I first have to create a tag in the NaNMath.jl 
repository.

Then I have to fork METADATA.jl. (I did this).

But what next?

Am Samstag, 22. August 2015 18:31:03 UTC+2 schrieb Timothée Poisot:

 Yes! There is a good documentation here: 
 http://julia.readthedocs.org/en/latest/manual/packages/

 It works for 0.3 as well as 0.4.

 t
 Le 2015-08-22 12:20, Uwe Fechner uwe.fec...@gmail.com javascript: a 
 écrit :

 Hello,

 I was invited to tag a new version of the package NaNMath.jl .
 https://github.com/mlubin/NaNMath.jl

 Does anyone know, how to do this?

 Best regards:

 Uwe Fechner



  1   2   >