Re: [julia-users] Setting up Stan in Ubuntu

2016-09-01 Thread Rob J. Goedman
Chris,

Do you mind continuing this discussion in issue # 1 of Stan.jl as it is exactly 
the issue Doug raised there.

I’ve not helped by recently upgrading Stan.jl to work on Julia 0.5 and now a 
new install on Julia 0.4 gets the ‘old’ Stan 0.3.2 and Pkg.checkout(“Stan”) 
won’t work anymore on Julia 0.5 nor contain fixes as provided by Doug and Tomas 
for non-OSX usage.

The warning are ok for now (mostly switching packages to Julia 0.5- related).

Can you edit src/Stan.jl in .julia/v0.4/Stan?

If so, you could insert a line like:

global const CMDSTAN_HOME = ENV["CMDSTAN_HOME"]

Regards,
Rob

> On Sep 1, 2016, at 07:15, Christopher Fisher <fishe...@miamioh.edu> wrote:
> 
> Once again, thanks for your help. After mastering the installation on Mac, 
> Linux seems to be a bit more tricky. Here is what I get after calling Stan
> 
> 
> WARNING: New definition 
> +(AbstractArray, DataArrays.DataArray) at 
> /home/dfish/.julia/v0.4/DataArrays/src/operators.jl:276
> is ambiguous with: 
> +(WoodburyMatrices.SymWoodbury, AbstractArray{T<:Any, 2}) at 
> /home/dfish/.julia/v0.4/WoodburyMatrices/src/SymWoodburyMatrices.jl:107.
> To fix, define 
> +(WoodburyMatrices.SymWoodbury, DataArrays.DataArray{T<:Any, 2})
> before the new definition.
> WARNING: New definition 
> +(AbstractArray, DataArrays.AbstractDataArray) at 
> /home/dfish/.julia/v0.4/DataArrays/src/operators.jl:300
> is ambiguous with: 
> +(WoodburyMatrices.SymWoodbury, AbstractArray{T<:Any, 2}) at 
> /home/dfish/.julia/v0.4/WoodburyMatrices/src/SymWoodburyMatrices.jl:107.
> To fix, define 
> +(WoodburyMatrices.SymWoodbury, DataArrays.AbstractDataArray{T<:Any, 2})
> before the new definition.
> WARNING: Base.String is deprecated, use AbstractString instead.
>   likely near /home/dfish/.julia/v0.4/Graphs/src/common.jl:3
> WARNING: Base.String is deprecated, use AbstractString instead.
>   likely near /home/dfish/.julia/v0.4/Graphs/src/dot.jl:80
> WARNING: New definition 
> promote_rule(Type{Mamba.ScalarLogical}, Type{##267#T<:Real}) at 
> /home/dfish/.julia/v0.4/Mamba/src/variate.jl:20
> is ambiguous with: 
> promote_rule(Type{#A<:Real}, Type{ForwardDiff.Dual{#N<:Any, #B<:Real}}) 
> at /home/dfish/.julia/v0.4/ForwardDiff/src/dual.jl:154.
> To fix, define 
> promote_rule(Type{Mamba.ScalarLogical}, Type{ForwardDiff.Dual{#N<:Any, 
> #B<:Real}})
> before the new definition.
> WARNING: New definition 
> promote_rule(Type{Mamba.ScalarStochastic}, Type{##270#T<:Real}) at 
> /home/dfish/.julia/v0.4/Mamba/src/variate.jl:20
> is ambiguous with: 
> promote_rule(Type{#A<:Real}, Type{ForwardDiff.Dual{#N<:Any, #B<:Real}}) 
> at /home/dfish/.julia/v0.4/ForwardDiff/src/dual.jl:154.
> To fix, define 
> promote_rule(Type{Mamba.ScalarStochastic}, Type{ForwardDiff.Dual{#N<:Any, 
> #B<:Real}})
> before the new definition.
> 
> 
> Environment variable CMDSTAN_HOME not found.
> Environment variable JULIA_SVG_BROWSER not found.
> 
> I'm not sure what the first warning is exactly. I get that for Gadfly but it 
> seems not to affect its functionality. 
> 
> When I submit CMDSTAN_HOME I get:
> 
> " "
> 
> Based on your folder structure, I pointed my variable to 
> 
> CMDSTAN_HOME="/home/dfish/cmdstan-2.11.0"
> 
> in the juliarc.jl file. 
> 
> A picture of my folder structure is included as an attachment. 
> 
> Thanks,
> 
> Chris 
> 
> 
> 
> On Thursday, September 1, 2016 at 9:36:50 AM UTC-4, Rob J Goedman wrote:
> Hi Chris,
> 
> Can you see what Ubuntu comes up with after:
> 
> 
> julia> using Stan
> INFO: Recompiling stale cache file 
> /Users/rob/.julia/lib/v0.5/Distributions.ji for module Distributions.
> INFO: Recompiling stale cache file /Users/rob/.julia/lib/v0.5/DataArrays.ji 
> for module DataArrays.
> INFO: Recompiling stale cache file /Users/rob/.julia/lib/v0.5/Gadfly.ji for 
> module Gadfly.
> INFO: Recompiling stale cache file /Users/rob/.julia/lib/v0.5/DataFrames.ji 
> for module DataFrames.
> INFO: Recompiling stale cache file 
> /Users/rob/.julia/lib/v0.5/KernelDensity.ji for module KernelDensity.
> 
> julia> CMDSTAN_HOME
> "/Users/rob/Projects/Stan/cmdstan"
> 
> This should point to the top level:
> 
> 
> 
> Regards,
> Rob
> 
>> On Sep 1, 2016, at 03:24, Christopher Fisher <fish...@ <>miamioh.edu 
>> <http://miamioh.edu/>> wrote:
>> 
>> Correction. The paths should have  " " around them. 
>> 
>> On Thursday, September 1, 2016 at 6:19:00 AM UTC-4, Christopher Fisher wrote:
>> Also, I've tried adding a path in the .juliarc file. Its not clear to me 
>&

Re: [julia-users] Bizarre Segfault during ccall on OSX

2016-05-30 Thread Rob J. Goedman
Helge,

Not sure if this helps, but below the (successful) output on my machine. I’m on 
OS X 11.6-beta, but I don’t think that is important. I do remember installing 
an updated Xcode.

Regards,
Rob

> On May 30, 2016, at 08:41, Helge Eichhorn <he...@helgeeichhorn.de> wrote:
> 
> 
> 
> Hi!
> 
> I am having a strange problem with a segfault that seemingly appeared out of 
> nowhere while calling Fortran code on OSX.
> 
> When I try to run the tests of my Dopri.jl 
> <https://github.com/helgee/Dopri.jl> package on Julia 0.4.5 on OSX 10.11.5 
> the process consistently fails with this error message:
> signal (11): Segmentation fault: 11
> unknown function (ip: 0x0)
> 
> Tests pass on master and 0.3.12. Could somebody try to reproduce this 
> behavior on their machine? What puzzles me is that this did not happen 23 
> days ago when I fixed the lastest issue with the package. In the meantime I 
> did not change anything about neither the code nor the Julia runtime. I did 
> install an OS update, though.
> 
> Any ideas?
> 
> The only other data point I have is that the tests also segfault on 0.3 on 
> Travis but not consistently. On the third to fourth re-run the build usually 
> succeeds. I have attached the log.
> 
> Cheers,
> Helge
> 


julia> Pkg.add("Dopri")
INFO: No packages to install, update or remove
INFO: Package database updated

julia> using Dopri

julia> Pkg.test("Dopri")
INFO: Testing Dopri
ERROR: LoadError: could not spawn 
setenv(`/Users/rob/.julia/v0.4/Dopri/deps/testrunner`,Union{ASCIIString,UTF8String}["LD_LIBRARY_PATH=/Users/rob/.julia/v0.4/Dopri/deps"]):
 no such file or directory (ENOENT)
 in _jl_spawn at process.jl:262
 in anonymous at process.jl:415
 in setup_stdio at process.jl:403
 in spawn at process.jl:414
 in open at process.jl:478
 in open at process.jl:492
 in include at 
/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in include_from_node1 at 
/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in process_options at 
/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 in _start at 
/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/rob/.julia/v0.4/Dopri/test/runtests.jl, in expression 
starting on line 9
===[ ERROR: Dopri 
]===

failed process: 
Process(`/Applications/Julia-0.4.5.app/Contents/Resources/julia/bin/julia 
--check-bounds=yes --code-coverage=none --color=yes 
/Users/rob/.julia/v0.4/Dopri/test/runtests.jl`, ProcessExited(1)) [1]

==
ERROR: Dopri had test errors
 in error at 
/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib
 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> Pkg.build("Dopri")
INFO: Building Dopri

julia> Pkg.test("Dopri")
INFO: Testing Dopri
INFO: Dopri tests passed

julia> versioninfo()
Julia Version 0.4.5
Commit 2ac304d (2016-03-18 00:58 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

shell> gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper
Target: x86_64-apple-darwin15.0.0
Configured with: ../configure --build=x86_64-apple-darwin15.0.0 
--prefix=/usr/local/Cellar/gcc/5.3.0 
--libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 
--enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 
--with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr 
--with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl 
--with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking 
--enable-checking=release --enable-lto --with-build-config=bootstrap-debug 
--disable-werror --with-pkgversion='Homebrew gcc 5.3.0' 
--with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin 
--disable-nls --enable-multilib
Thread model: posix
gcc version 5.3.0 (Homebrew gcc 5.3.0) 



[julia-users] Re: Trouble with PyPlot

2016-05-25 Thread Rob J Goedman
Thanks Cedric. Pkg.checkout("PyCall") and updating the Conda distribution 
do not solve this issue for me. Just filed an issue on PyCall.jl.

On Wednesday, May 25, 2016 at 6:28:39 AM UTC-7, Cedric St-Jean wrote:
>
> PyCall has had a few hiccups since last release, most of them have been 
> fixed, but not tagged yet. You can try 
>
> Pkg.checkout("PyCall")
>
> If the problem persists, please file an issue on PyCall.jl 
>
> On Wednesday, May 25, 2016 at 8:36:04 AM UTC-4, Ed Scheinerman wrote:
>>
>> It seems, perhaps, that the problem is actually with PyCall. Other 
>> packages that I regularly use are now causing problems ...
>>
>>
>> On Wednesday, May 25, 2016 at 8:22:07 AM UTC-4, Ed Scheinerman wrote:
>>>
>>> I use PyPlot a lot with my Julia work so I've got a big problem in that 
>>> PyPlot has suddenly stopped working after the latest Pkg.update()
>>>
>>> julia> using PyPlot
>>>
>>> INFO: Precompiling module PyPlot... 
>>> ERROR: LoadError: InitError: cfunction: pyjlwrap_repr does not return 
>>>  in __init__ at /Users/ers/.julia/v0.4/PyCall/src/pyinit.jl:88 
>>>  in _require_from_serialized at loading.jl:84 
>>>  in _require_from_serialized at /Applications/Julia-0.4.5.app/Contents/
>>> Resources/julia/lib/julia/sys.dylib 
>>>  in require at /Applications/Julia-0.4.5.app/Contents/Resources/julia/
>>> lib/julia/sys.dylib 
>>>  in include at /Applications/Julia-0.4.5.app/Contents/Resources/julia/
>>> lib/julia/sys.dylib 
>>>  in include_from_node1 at /Applications/Julia-0.4.5.app/Contents/
>>> Resources/julia/lib/julia/sys.dylib 
>>>  [inlined code] from none:2 
>>>  in anonymous at no file:0 
>>>  in process_options at /Applications/Julia-0.4.5.app/Contents/Resources/
>>> julia/lib/julia/sys.dylib 
>>>  in _start at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib
>>> /julia/sys.dylib 
>>> during initialization of module PyCall 
>>> while loading /Users/ers/.julia/v0.4/PyPlot/src/PyPlot.jl, in 
>>> expression starting on line 5 
>>> ERROR: Failed to precompile PyPlot to /Users/ers/.julia/lib/v0.4/PyPlot.ji 
>>>
>>>  in error at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/
>>> julia/sys.dylib 
>>>  in compilecache at loading.jl:400 
>>>  in require at /Applications/Julia-0.4.5.app/Contents/Resources/julia/
>>> lib/julia/sys.dylib
>>> Enter code here...
>>>
>>>
>>>

[julia-users] Re: Changing a package name

2016-05-17 Thread Rob
Thanks for the clear suggestion

On Sunday, 15 May 2016 10:37:17 UTC+2, Tony Kelman wrote:
>
> Renaming an existing package can cause problems if anyone else has started 
> using or depending on it. You can deprecate the existing name of the 
> package by adding an upper Julia version number bound on all existing tags 
> of the package in METADATA, so it will no longer be installable once newer 
> versions of Julia are released. Then register the new name as a new 
> package, using a separate repository for development.
>
>
> On Sunday, May 15, 2016 at 12:59:17 AM UTC-7, Rob wrote:
>>
>> Does anyone have any tips on changing a packages name? I am looking to 
>> expand EEG.jl to encompass other electrophysiological techniques, and think 
>> the name Electrophysiology.jl would be more accurate.
>>
>> Is the general consensus to keep the old repo around and provide a 
>> warning?
>> Or, change the name of the repo in github? I imagine this will cause 
>> issues with METADATA.jl?
>>
>> Any tips to ease the transition would be appreciated.
>>
>

Re: [julia-users] Julia text editor on iPad?

2016-05-17 Thread Rob J. Goedman
Thanks Viral,

Let me know if I can be of any help testing a newer version of Jupyter (if 
installing a newer version is feasible and not too time consuming). Or I could 
point my iPad to a test version, whatever is easiest.

As far as testing dedicated compute engines is concerned I am also very 
interested, not just for Stan, but more so for some components of item 3 in 
below’s postscript

Inspired by another utopia thread on this list, the dream here is to make this 
awesome tripleJ-some (Julia, Jupyter and Juliabox) a solid foundation for 
cloud-based EDx courses.

Regards,
Rob

> On May 16, 2016, at 11:23, Viral Shah <vi...@mayin.org> wrote:
> 
> Perhaps we need to update to a newer version of Jupyter for the arrow keys?
> 
> On the reliability front, Sheehan can you tell us what kind of instabilities 
> are you facing? We are quite keen to make this reliable, and generally there 
> are thousands of sessions every week. The sessions are retstricted for memory 
> and compute, and time out after 4 hours - so perhaps that is the instability 
> you may be seeing.
> 
> For serious computations, we are soon going to launch a service that gives 
> you dedicated compute machines (no sharing or multiplexing). Would be great 
> if you can try it out.
> 
> -viral
> 
> 
>> On 16-May-2016, at 11:28 AM, Rob J. Goedman <goed...@icloud.com> wrote:
>> 
>> My apologies. The remark on the arrow keys is not correct. I should have 
>> gone to try.jupyter.org before sending the email.
>> 
>> From that site the arrow keys on the iPad work fine!
>> 
>> Viral or Tanmay, could this be specific to JuliaBox?
>> 
>> Rob
>> 
>>> On May 16, 2016, at 09:05, Rob J. Goedman <goed...@icloud.com> wrote:
>>> 
>>> Sheehan,
>>> 
>>> Interesting link to computableapp.com. 
>>> 
>>> Have you ever seen the arrow keys work on IJulia or JuliaBox? I’ve 
>>> certainly seen them work in other apps, e.g. Textastic, just not in IJulia. 
>>> My guess is that the key codes have changed. Neither do they work on the 
>>> older bluetooth keyboard. This is more a Jupyter issue than an Julia issue 
>>> I would expect.
>>> 
>>> For serious computation JuliaBox is probably not the answer, but for less 
>>> demanding situations (classroom experiments, teaching Julia, exploratory 
>>> programming) it should work reliably. I wonder if we could confirm your 
>>> Amazon maintenance assumption as in July I’ll be traveling in Europe and 
>>> will certainly try it throughout the day. Could it also be network issues?
>>> 
>>> Rob
>>> 
>>>> On May 11, 2016, at 17:17, Sheehan Olver <dlfivefi...@gmail.com> wrote:
>>>> 
>>>> 
>>>> The arrows sometimes work for me…and sometimes not.It’s too bad the 
>>>> native IPython app didn’t survive:
>>>> 
>>>>http://computableapp.com
>>>> 
>>>> The biggest problem I have is that JuliaBox still doesn’t seem very 
>>>> reliable.  This may be since Australia is the middle of the night in the 
>>>> US, which Amazon may feel is an appropriate time to do server maintenance. 
>>>>   
>>>> 
>>>> I wonder if buying a personal Amazon Web Server is a better idea, 
>>>> especially for doing serious computation.
>>>> 
>>>> Sheehan
>>>> 
>>>> 
>>>>> On 12 May 2016, at 1:13 AM, Rob J. Goedman <goed...@icloud.com> wrote:
>>>>> 
>>>>> Yes, that definitely works.
>>>>> 
>>>>> I actually bought the iPad Pro + keyboard + pen to make JuliaBox better 
>>>>> usable on an iPad. And that certainly is the case for me, I can now try 
>>>>> Julia constructs while on the road. Just having easy access to 
>>>>> Shift-Return was key to me.
>>>>> 
>>>>> The combination of Juliabox + uploads from iCloud (or Dropbox or Google 
>>>>> drive) also is nice.
>>>>> 
>>>>> A minor inconvenience is that the 4 arrow keys on the Pro keyboard don’t 
>>>>> work, in those cases it’s ‘back to the pen’. 
>>>>> 
>>>>> It took me a while to discover for e.g. \lambda-Tab the Tap needs to be 
>>>>> Option-Tab. 
>>>>> 
>>>>> Rob
>>>>> 
>>>>> 
>>>>>> On May 11, 2016, at 04:42, Sheehan Olver <dlfivefi...@gmail.com> wrote:
>>>>>> 
>>>>>> It works! I'm using the textmate mode
>>>>>> 
>>>>>> https://github.com/JuliaLang/Julia.tmbundle
>>>>>> 
>>>>>> Sent from my iPad
>>>>>> 
>>>>>>> On 11 May 2016, at 9:02 PM, cormull...@mac.com wrote:
>>>>>>> 
>>>>>>> Textastic can use TextMate definitions: 
>>>>>>> http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
>>>>>>> 
>>>>>>> Koder, another main contender, doesn't let you add syntax highlighting 
>>>>>>> yet.
>>>>> 
>>>> 
>>> 
>> 
> 



Re: [julia-users] Julia text editor on iPad?

2016-05-17 Thread Rob J. Goedman
Thanks Viral,

Let me know if I can be of any help testing a newer version of Jupyter (if 
installing a newer version is feasible and not too time consuming). Or I could 
point my iPad to a test version, whatever is easiest.

As far as testing dedicated compute engines is concerned I am also very 
interested, not just for Stan, but more so for some other applications.

Inspired by another utopia thread on this list, the dream here is to make this 
awesome tripleJ-some (Julia, Jupyter and Juliabox) a solid foundation for 
cloud-based EDx courses.

Regards,
Rob

> On May 16, 2016, at 11:23, Viral Shah <vi...@mayin.org> wrote:
> 
> Perhaps we need to update to a newer version of Jupyter for the arrow keys?
> 
> On the reliability front, Sheehan can you tell us what kind of instabilities 
> are you facing? We are quite keen to make this reliable, and generally there 
> are thousands of sessions every week. The sessions are retstricted for memory 
> and compute, and time out after 4 hours - so perhaps that is the instability 
> you may be seeing.
> 
> For serious computations, we are soon going to launch a service that gives 
> you dedicated compute machines (no sharing or multiplexing). Would be great 
> if you can try it out.
> 
> -viral
> 
> 
>> On 16-May-2016, at 11:28 AM, Rob J. Goedman <goed...@icloud.com> wrote:
>> 
>> My apologies. The remark on the arrow keys is not correct. I should have 
>> gone to try.jupyter.org before sending the email.
>> 
>> From that site the arrow keys on the iPad work fine!
>> 
>> Viral or Tanmay, could this be specific to JuliaBox?
>> 
>> Rob
>> 
>>> On May 16, 2016, at 09:05, Rob J. Goedman <goed...@icloud.com> wrote:
>>> 
>>> Sheehan,
>>> 
>>> Interesting link to computableapp.com. 
>>> 
>>> Have you ever seen the arrow keys work on IJulia or JuliaBox? I’ve 
>>> certainly seen them work in other apps, e.g. Textastic, just not in IJulia. 
>>> My guess is that the key codes have changed. Neither do they work on the 
>>> older bluetooth keyboard. This is more a Jupyter issue than an Julia issue 
>>> I would expect.
>>> 
>>> For serious computation JuliaBox is probably not the answer, but for less 
>>> demanding situations (classroom experiments, teaching Julia, exploratory 
>>> programming) it should work reliably. I wonder if we could confirm your 
>>> Amazon maintenance assumption as in July I’ll be traveling in Europe and 
>>> will certainly try it throughout the day. Could it also be network issues?
>>> 
>>> Rob
>>> 
>>>> On May 11, 2016, at 17:17, Sheehan Olver <dlfivefi...@gmail.com> wrote:
>>>> 
>>>> 
>>>> The arrows sometimes work for me…and sometimes not.It’s too bad the 
>>>> native IPython app didn’t survive:
>>>> 
>>>>http://computableapp.com
>>>> 
>>>> The biggest problem I have is that JuliaBox still doesn’t seem very 
>>>> reliable.  This may be since Australia is the middle of the night in the 
>>>> US, which Amazon may feel is an appropriate time to do server maintenance. 
>>>>   
>>>> 
>>>> I wonder if buying a personal Amazon Web Server is a better idea, 
>>>> especially for doing serious computation.
>>>> 
>>>> Sheehan
>>>> 
>>>> 
>>>>> On 12 May 2016, at 1:13 AM, Rob J. Goedman <goed...@icloud.com> wrote:
>>>>> 
>>>>> Yes, that definitely works.
>>>>> 
>>>>> I actually bought the iPad Pro + keyboard + pen to make JuliaBox better 
>>>>> usable on an iPad. And that certainly is the case for me, I can now try 
>>>>> Julia constructs while on the road. Just having easy access to 
>>>>> Shift-Return was key to me.
>>>>> 
>>>>> The combination of Juliabox + uploads from iCloud (or Dropbox or Google 
>>>>> drive) also is nice.
>>>>> 
>>>>> A minor inconvenience is that the 4 arrow keys on the Pro keyboard don’t 
>>>>> work, in those cases it’s ‘back to the pen’. 
>>>>> 
>>>>> It took me a while to discover for e.g. \lambda-Tab the Tap needs to be 
>>>>> Option-Tab. 
>>>>> 
>>>>> Rob
>>>>> 
>>>>> 
>>>>>> On May 11, 2016, at 04:42, Sheehan Olver <dlfivefi...@gmail.com> wrote:
>>>>>> 
>>>>>> It works! I'm using the textmate mode
>>>>>> 
>>>>>> https://github.com/JuliaLang/Julia.tmbundle
>>>>>> 
>>>>>> Sent from my iPad
>>>>>> 
>>>>>>> On 11 May 2016, at 9:02 PM, cormull...@mac.com wrote:
>>>>>>> 
>>>>>>> Textastic can use TextMate definitions: 
>>>>>>> http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
>>>>>>> 
>>>>>>> Koder, another main contender, doesn't let you add syntax highlighting 
>>>>>>> yet.
>>>>> 
>>>> 
>>> 
>> 
> 



Re: [julia-users] Julia text editor on iPad?

2016-05-16 Thread Rob J. Goedman
My apologies. The remark on the arrow keys is not correct. I should have gone 
to try.jupyter.org before sending the email.

From that site the arrow keys on the iPad work fine!

Viral or Tanmay, could this be specific to JuliaBox?

Rob

> On May 16, 2016, at 09:05, Rob J. Goedman <goed...@icloud.com> wrote:
> 
> Sheehan,
> 
> Interesting link to computableapp.com <http://computableapp.com/>. 
> 
> Have you ever seen the arrow keys work on IJulia or JuliaBox? I’ve certainly 
> seen them work in other apps, e.g. Textastic, just not in IJulia. My guess is 
> that the key codes have changed. Neither do they work on the older bluetooth 
> keyboard. This is more a Jupyter issue than an Julia issue I would expect.
> 
> For serious computation JuliaBox is probably not the answer, but for less 
> demanding situations (classroom experiments, teaching Julia, exploratory 
> programming) it should work reliably. I wonder if we could confirm your 
> Amazon maintenance assumption as in July I’ll be traveling in Europe and will 
> certainly try it throughout the day. Could it also be network issues?
> 
> Rob
> 
>> On May 11, 2016, at 17:17, Sheehan Olver <dlfivefi...@gmail.com 
>> <mailto:dlfivefi...@gmail.com>> wrote:
>> 
>> 
>> The arrows sometimes work for me…and sometimes not.It’s too bad the 
>> native IPython app didn’t survive:
>> 
>>  http://computableapp.com <http://computableapp.com/>
>> 
>> The biggest problem I have is that JuliaBox still doesn’t seem very 
>> reliable.  This may be since Australia is the middle of the night in the US, 
>> which Amazon may feel is an appropriate time to do server maintenance.   
>> 
>> I wonder if buying a personal Amazon Web Server is a better idea, especially 
>> for doing serious computation.
>> 
>> Sheehan
>> 
>> 
>>> On 12 May 2016, at 1:13 AM, Rob J. Goedman <goed...@icloud.com 
>>> <mailto:goed...@icloud.com>> wrote:
>>> 
>>> Yes, that definitely works.
>>> 
>>> I actually bought the iPad Pro + keyboard + pen to make JuliaBox better 
>>> usable on an iPad. And that certainly is the case for me, I can now try 
>>> Julia constructs while on the road. Just having easy access to Shift-Return 
>>> was key to me.
>>> 
>>> The combination of Juliabox + uploads from iCloud (or Dropbox or Google 
>>> drive) also is nice.
>>> 
>>> A minor inconvenience is that the 4 arrow keys on the Pro keyboard don’t 
>>> work, in those cases it’s ‘back to the pen’. 
>>> 
>>> It took me a while to discover for e.g. \lambda-Tab the Tap needs to be 
>>> Option-Tab. 
>>> 
>>> Rob
>>> 
>>> 
>>>> On May 11, 2016, at 04:42, Sheehan Olver <dlfivefi...@gmail.com 
>>>> <mailto:dlfivefi...@gmail.com>> wrote:
>>>> 
>>>> It works! I'm using the textmate mode
>>>> 
>>>> https://github.com/JuliaLang/Julia.tmbundle 
>>>> <https://github.com/JuliaLang/Julia.tmbundle>
>>>> 
>>>> Sent from my iPad
>>>> 
>>>>> On 11 May 2016, at 9:02 PM, cormull...@mac.com 
>>>>> <mailto:cormull...@mac.com> wrote:
>>>>> 
>>>>> Textastic can use TextMate definitions: 
>>>>> http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
>>>>>  
>>>>> <http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html>
>>>>> 
>>>>> Koder, another main contender, doesn't let you add syntax highlighting 
>>>>> yet.
>>> 
>> 
> 



Re: [julia-users] Julia text editor on iPad?

2016-05-16 Thread Rob J. Goedman
Sheehan,

Interesting link to computableapp.com. 

Have you ever seen the arrow keys work on IJulia or JuliaBox? I’ve certainly 
seen them work in other apps, e.g. Textastic, just not in IJulia. My guess is 
that the key codes have changed. Neither do they work on the older bluetooth 
keyboard. This is more a Jupyter issue than an Julia issue I would expect.

For serious computation JuliaBox is probably not the answer, but for less 
demanding situations (classroom experiments, teaching Julia, exploratory 
programming) it should work reliably. I wonder if we could confirm your Amazon 
maintenance assumption as in July I’ll be traveling in Europe and will 
certainly try it throughout the day. Could it also be network issues?

Rob

> On May 11, 2016, at 17:17, Sheehan Olver <dlfivefi...@gmail.com 
> <mailto:dlfivefi...@gmail.com>> wrote:
> 
> 
> The arrows sometimes work for me…and sometimes not.It’s too bad the 
> native IPython app didn’t survive:
> 
>   http://computableapp.com <http://computableapp.com/>
> 
> The biggest problem I have is that JuliaBox still doesn’t seem very reliable. 
>  This may be since Australia is the middle of the night in the US, which 
> Amazon may feel is an appropriate time to do server maintenance.   
> 
> I wonder if buying a personal Amazon Web Server is a better idea, especially 
> for doing serious computation.
> 
> Sheehan
> 
> 
>> On 12 May 2016, at 1:13 AM, Rob J. Goedman <goed...@icloud.com 
>> <mailto:goed...@icloud.com>> wrote:
>> 
>> Yes, that definitely works.
>> 
>> I actually bought the iPad Pro + keyboard + pen to make JuliaBox better 
>> usable on an iPad. And that certainly is the case for me, I can now try 
>> Julia constructs while on the road. Just having easy access to Shift-Return 
>> was key to me.
>> 
>> The combination of Juliabox + uploads from iCloud (or Dropbox or Google 
>> drive) also is nice.
>> 
>> A minor inconvenience is that the 4 arrow keys on the Pro keyboard don’t 
>> work, in those cases it’s ‘back to the pen’. 
>> 
>> It took me a while to discover for e.g. \lambda-Tab the Tap needs to be 
>> Option-Tab. 
>> 
>> Rob
>> 
>> 
>>> On May 11, 2016, at 04:42, Sheehan Olver <dlfivefi...@gmail.com 
>>> <mailto:dlfivefi...@gmail.com>> wrote:
>>> 
>>> It works! I'm using the textmate mode
>>> 
>>> https://github.com/JuliaLang/Julia.tmbundle 
>>> <https://github.com/JuliaLang/Julia.tmbundle>
>>> 
>>> Sent from my iPad
>>> 
>>>> On 11 May 2016, at 9:02 PM, cormull...@mac.com <mailto:cormull...@mac.com> 
>>>> wrote:
>>>> 
>>>> Textastic can use TextMate definitions: 
>>>> http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
>>>>  
>>>> <http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html>
>>>> 
>>>> Koder, another main contender, doesn't let you add syntax highlighting yet.
>> 
> 



Re: [julia-users] Symbolic mathematics language v 0.0.6

2016-05-16 Thread Rob J. Goedman
Hi Tom,

Thanks for jumping in. Yes, I had noticed the two packages might interfere 
through possibly a __precompile__ setting?

I’m ok to have SJulia (and Unitful, which is another one of my favorite 
packages) only work on 0.5 for now. 

Plots.jl for now I’m using mainly on 0.4 to work on the diff.eq. streamplot 
stuff. I do update all packages on both 0.4 and 0.5 basically on a daily basis. 
The d.e. part is getting there and I have started looking in more detail at 
quiver & co.

Regards,
Rob


> On May 16, 2016, at 08:19, Tom Breloff <t...@breloff.com> wrote:
> 
> The SymPy error you see is related to Plots, but I'd need to review his code 
> again to understand why it's doing that.  Most likely it's because you are on 
> a recent version of Plots and SymPy hasn't caught up yet.  (and you might not 
> have installed a recent Plots on 0.5?)
> 
> On Mon, May 16, 2016 at 11:14 AM, Rob J. Goedman <goed...@icloud.com 
> <mailto:goed...@icloud.com>> wrote:
> Hi,
> 
> As I use Mathematica quite a bit, I’m very interested in SJulia!
> 
> I’m wondering if I need an additional Module or library to get around below 
> issue. This is on OS X and Julia 0.5-
> 
> ERROR: InitError: PyError (:PyImport_ImportModule)  'exceptions.ImportError'>
> ImportError('No module named mpmath',)
> 
>  [inlined code] from /Users/rob/.julia/v0.5/PyCall/src/exception.jl:56
>  in pyimport(::String) at /Users/rob/.julia/v0.5/PyCall/src/PyCall.jl:285
>  [inlined code] from /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:3
>  in import_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:23
>  in init_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:677
>  in __init__() at /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:64
>  in _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at 
> ./loading.jl:174
>  in require(::Symbol) at ./loading.jl:365
>  in eval(::Module, ::Any) at ./boot.jl:226
> during initialization of module Julia
> 
> On Julia 4.0 SymPy won’t work on my system (it complains about precompiling):
> 
> julia> using SymPy
> INFO: Precompiling module SymPy...
> ERROR: LoadError: LoadError: UndefVarError: _apply_recipe not defined
> 
> But on Julia 5.0:
> 
> 
> julia> using SymPy
> 
> x = symbols("x")
> x
> 
> julia> a = [x 1; 1 x]
> 2×2 Array{SymPy.Sym,2}
> ⎡x  1⎤
> ⎢⎥
> ⎣1  x⎦
> 
> julia> det(a)
>   ⎛1⎞
> x⋅⎜x - ─⎟
>   ⎝x⎠
> 
> julia> versioninfo
> versioninfo (generic function with 4 methods)
> 
> julia> versioninfo()
> Julia Version 0.5.0-dev+4110
> Commit 5d52f02 (2016-05-16 02:25 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.5.0)
>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.7.1 (ORCJIT, haswell)
> 
>> On May 12, 2016, at 19:47, lapeyre.math1...@gmail.com 
>> <mailto:lapeyre.math1...@gmail.com> wrote:
>> 
>> The symbolic mathematics language project that I announced last year has 
>> been greatly expanded.
>> 
>> Here is the link: https://github.com/jlapeyre/SJulia.jl 
>> <https://github.com/jlapeyre/SJulia.jl>
>> 
>> The best way to find what is new is to look at the tests 
>> https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest 
>> <https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest>
> 
> 



Re: [julia-users] Symbolic mathematics language v 0.0.6

2016-05-16 Thread Rob J. Goedman
Thanks Kevin,

That solved the problem!

I used 'condo install mpmath’ in addition to ‘pip install mpmath’, just to make 
sure (shows I am way too rusty on Python stuff), and then reinstalled both 
SymPy and Julia.

Thanks a lot, will certainly track Julia development!

Regards,
Rob

> On May 16, 2016, at 08:19, Kevin Squire <kevin.squ...@gmail.com> wrote:
> 
> Hi Rob,
> 
> You'll need to install the `mpmath` package for python.  
> 
> If you use `pip`, you should just be able to run `pip install mpmath`.  
> 
> Otherwise, you'll have to find and install the package using your preferred 
> method.
> 
> (I also ran into this.  John, you should probably mention this in the README.)
> 
> Cheers,
>Kevin
> 
> On Mon, May 16, 2016 at 8:14 AM, Rob J. Goedman <goed...@icloud.com 
> <mailto:goed...@icloud.com>> wrote:
> Hi,
> 
> As I use Mathematica quite a bit, I’m very interested in SJulia!
> 
> I’m wondering if I need an additional Module or library to get around below 
> issue. This is on OS X and Julia 0.5-
> 
> ERROR: InitError: PyError (:PyImport_ImportModule)  'exceptions.ImportError'>
> ImportError('No module named mpmath',)
> 
>  [inlined code] from /Users/rob/.julia/v0.5/PyCall/src/exception.jl:56
>  in pyimport(::String) at /Users/rob/.julia/v0.5/PyCall/src/PyCall.jl:285
>  [inlined code] from /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:3
>  in import_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:23
>  in init_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:677
>  in __init__() at /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:64
>  in _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at 
> ./loading.jl:174
>  in require(::Symbol) at ./loading.jl:365
>  in eval(::Module, ::Any) at ./boot.jl:226
> during initialization of module Julia
> 
> On Julia 4.0 SymPy won’t work on my system (it complains about precompiling):
> 
> julia> using SymPy
> INFO: Precompiling module SymPy...
> ERROR: LoadError: LoadError: UndefVarError: _apply_recipe not defined
> 
> But on Julia 5.0:
> 
> 
> julia> using SymPy
> 
> x = symbols("x")
> x
> 
> julia> a = [x 1; 1 x]
> 2×2 Array{SymPy.Sym,2}
> ⎡x  1⎤
> ⎢⎥
> ⎣1  x⎦
> 
> julia> det(a)
>   ⎛1⎞
> x⋅⎜x - ─⎟
>   ⎝x⎠
> 
> julia> versioninfo
> versioninfo (generic function with 4 methods)
> 
> julia> versioninfo()
> Julia Version 0.5.0-dev+4110
> Commit 5d52f02 (2016-05-16 02:25 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.5.0)
>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.7.1 (ORCJIT, haswell)
> 
>> On May 12, 2016, at 19:47, lapeyre.math1...@gmail.com 
>> <mailto:lapeyre.math1...@gmail.com> wrote:
>> 
>> The symbolic mathematics language project that I announced last year has 
>> been greatly expanded.
>> 
>> Here is the link: https://github.com/jlapeyre/SJulia.jl 
>> <https://github.com/jlapeyre/SJulia.jl>
>> 
>> The best way to find what is new is to look at the tests 
>> https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest 
>> <https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest>
> 
> 



Re: [julia-users] Symbolic mathematics language v 0.0.6

2016-05-16 Thread Rob J. Goedman
Hi,

As I use Mathematica quite a bit, I’m very interested in SJulia!

I’m wondering if I need an additional Module or library to get around below 
issue. This is on OS X and Julia 0.5-

ERROR: InitError: PyError (:PyImport_ImportModule) 
ImportError('No module named mpmath',)

 [inlined code] from /Users/rob/.julia/v0.5/PyCall/src/exception.jl:56
 in pyimport(::String) at /Users/rob/.julia/v0.5/PyCall/src/PyCall.jl:285
 [inlined code] from /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:3
 in import_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:23
 in init_sympy() at /Users/rob/.julia/v0.5/SJulia/src/sympy.jl:677
 in __init__() at /Users/rob/.julia/v0.5/SJulia/src/SJulia.jl:64
 in _require_from_serialized(::Int64, ::Symbol, ::String, ::Bool) at 
./loading.jl:174
 in require(::Symbol) at ./loading.jl:365
 in eval(::Module, ::Any) at ./boot.jl:226
during initialization of module Julia

On Julia 4.0 SymPy won’t work on my system (it complains about precompiling):

julia> using SymPy
INFO: Precompiling module SymPy...
ERROR: LoadError: LoadError: UndefVarError: _apply_recipe not defined

But on Julia 5.0:


julia> using SymPy

x = symbols("x")
x

julia> a = [x 1; 1 x]
2×2 Array{SymPy.Sym,2}
⎡x  1⎤
⎢⎥
⎣1  x⎦

julia> det(a)
  ⎛1⎞
x⋅⎜x - ─⎟
  ⎝x⎠

julia> versioninfo
versioninfo (generic function with 4 methods)

julia> versioninfo()
Julia Version 0.5.0-dev+4110
Commit 5d52f02 (2016-05-16 02:25 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.5.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

> On May 12, 2016, at 19:47, lapeyre.math1...@gmail.com wrote:
> 
> The symbolic mathematics language project that I announced last year has been 
> greatly expanded.
> 
> Here is the link: https://github.com/jlapeyre/SJulia.jl
> 
> The best way to find what is new is to look at the tests 
> https://github.com/jlapeyre/SJulia.jl/tree/master/sjtest



[julia-users] Changing a package name

2016-05-15 Thread Rob
Does anyone have any tips on changing a packages name? I am looking to 
expand EEG.jl to encompass other electrophysiological techniques, and think 
the name Electrophysiology.jl would be more accurate.

Is the general consensus to keep the old repo around and provide a warning?
Or, change the name of the repo in github? I imagine this will cause issues 
with METADATA.jl?

Any tips to ease the transition would be appreciated.


Re: [julia-users] Julia text editor on iPad?

2016-05-11 Thread Rob J. Goedman
Yes, that definitely works.

I actually bought the iPad Pro + keyboard + pen to make JuliaBox better usable 
on an iPad. And that certainly is the case for me, I can now try Julia 
constructs while on the road. Just having easy access to Shift-Return was key 
to me.

The combination of Juliabox + uploads from iCloud (or Dropbox or Google drive) 
also is nice.

A minor inconvenience is that the 4 arrow keys on the Pro keyboard don’t work, 
in those cases it’s ‘back to the pen’. 

It took me a while to discover for e.g. \lambda-Tab the Tap needs to be 
Option-Tab. 

Rob


> On May 11, 2016, at 04:42, Sheehan Olver <dlfivefi...@gmail.com> wrote:
> 
> It works! I'm using the textmate mode
> 
> https://github.com/JuliaLang/Julia.tmbundle
> 
> Sent from my iPad
> 
>> On 11 May 2016, at 9:02 PM, cormull...@mac.com wrote:
>> 
>> Textastic can use TextMate definitions: 
>> http://www.textasticapp.com/v6/manual/lessons/How_can_I_add_my_own_syntax_definitions__themes_and_templates.html
>> 
>> Koder, another main contender, doesn't let you add syntax highlighting yet.



Re: [julia-users] git protocol packages

2016-03-31 Thread Rob J. Goedman
Just upgraded 0.5 and now it seems to work using https:// !

Not ideal, but way better!

> On Mar 31, 2016, at 08:40, Erik Schnetter <schnet...@gmail.com> wrote:
> 
> I see the same symptoms.
> 
> -erik
> 
> On Thu, Mar 31, 2016 at 11:17 AM, Rob J. Goedman <goed...@icloud.com> wrote:
>> Thanks for the pointers! Having also struggled with private packages on 0.5
>> for a while now, I tried below steps (a few times). No such luck.
>> 
>> Also, using https: for a private package on 0.5 on my system hangs
>> Pkg.update(). After ^C it states it’s updating TP but that is not the case.
>> 
>> Could that have to do with:
>> 
>> If I neglect step 6, then the callback ("credentials_cb") gets called
>> indefinitely (noted via print debugging), so it seems that we are missing
>> some step to make ssh-agent unlock the key pair (which happens via system
>> prompt on OS X).
>> 
>> 
>> Pkg.clone() works.
>> 
>> Regards,
>> Rob
>> 
>>   _
>>   _   _ _(_)_ |  A fresh approach to technical computing
>>  (_) | (_) (_)|  Documentation: http://docs.julialang.org
>>   _ _   _| |_  __ _   |  Type "?help" for help.
>>  | | | | | | |/ _` |  |
>>  | | |_| | | | (_| |  |  Version 0.5.0-dev+3344 (2016-03-31 06:13 UTC)
>> _/ |\__'_|_|_|\__'_|  |  master/c7f5926 (fork: 57 commits, 4 days)
>> |__/   |  x86_64-apple-darwin15.4.0
>> 
>> julia> Pkg.update()
>> INFO: Updating METADATA...
>> INFO: Updating Unitful master...
>> INFO: Updating CSoM master...
>> Username for 'https://github.com/goedman/TP.jl.git':goedman
>> Password for 'goedman@https://github.com/goedman/TP.jl.git':
>> ^CWARNING: fetch: InterruptException()
>> INFO: Updating TP master...
>> INFO: Updating Benchmarks master...
>> INFO: Updating NMfE master...
>> INFO: Updating Jags master...
>> INFO: Updating ASCIIPlots master...
>> INFO: Computing changes...
>> INFO: No packages to install, update or remove
>> 
>> 
>> On Mar 30, 2016, at 06:54, Isaiah Norton <isaiah.nor...@gmail.com> wrote:
>> 
>> I'm not sure if this is supposed to be officially supported yet, but I was
>> able to get ssh:// to work on OS X:
>> 
>> 1. `brew install libssh2`
>> 2. from julia root dir: `cd deps && make configure-libgit2 VERBOSE=1`
>> 3. copy the cmake command printed by above, and re-run it manually. For some
>> reason PKG_CONFIG_MODULE didn't detect libgit2 the first time (discovered by
>> trial-and-error, verified by `make distclean-libgit2` and doing the process
>> again).
>> 
>>  it should look something like:
>> 
>> `cmake {HOME}/git/jl71/deps/srccache/libgit2/
>> -DCMAKE_INSTALL_PREFIX:PATH={HOME}/git/jl71/usr -DCMAKE_VERBOSE_MAKEFILE=ON
>> -DCMAKE_C_COMPILER="clang" -DCMAKE_C_COMPILER_ARG1="-m64 "
>> -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_CXX_COMPILER_ARG1="-m64 "
>> -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release`
>> 
>> 
>> 4. in julia root directory: `make clean && make`
>> 5. start ssh-agent. in bash: "$ eval `ssh-agent`"
>> 6. run something that causes ssh-agent to unlock the key, for example
>> regular command line git clone'ing a repository via ssh.
>> 
>> After those steps, the following works:
>> 
>> julia> Pkg.clone("ssh://g...@github.com/johnmyleswhite/ASCIIPlots.jl.git")
>> 
>> If I neglect step 6, then the callback ("credentials_cb") gets called
>> indefinitely (noted via print debugging), so it seems that we are missing
>> some step to make ssh-agent unlock the key pair (which happens via system
>> prompt on OS X).
>> 
>> So: it looks like this is almost-supported, but we need to fix build issues
>> and teach the libgit2 wrapper to set up ssh-agent credentials correctly on
>> its own (at least on OS X). Presumably the situation is the same or better
>> on Linux. On Windows, building against libssh2 is explicitly disabled by our
>> Makefile.
>> 
>> 
>> On Mon, Mar 28, 2016 at 4:01 PM, Blake Johnson <blakejohnso...@gmail.com>
>> wrote:
>>> 
>>> Is there a way to still support git protocol (as opposed to https)
>>> packages with the new libgit2 based package system? I have a fair number of
>>> private packages on a local server, and it sure would be nice to be able to
>>> fetch those with SSH key authentication.
>> 
>> 
>> 
> 
> 
> 
> -- 
> Erik Schnetter <schnet...@gmail.com>
> http://www.perimeterinstitute.ca/personal/eschnetter/



Re: [julia-users] git protocol packages

2016-03-31 Thread Rob J. Goedman
Thanks for the pointers! Having also struggled with private packages on 0.5 for 
a while now, I tried below steps (a few times). No such luck.

Also, using https: for a private package on 0.5 on my system hangs 
Pkg.update(). After ^C it states it’s updating TP but that is not the case.

Could that have to do with:
> If I neglect step 6, then the callback ("credentials_cb") gets called 
> indefinitely (noted via print debugging), so it seems that we are missing 
> some step to make ssh-agent unlock the key pair (which happens via system 
> prompt on OS X).


Pkg.clone() works.

Regards,
Rob

   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+3344 (2016-03-31 06:13 UTC)
 _/ |\__'_|_|_|\__'_|  |  master/c7f5926 (fork: 57 commits, 4 days)
|__/   |  x86_64-apple-darwin15.4.0

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating Unitful master...
INFO: Updating CSoM master...
Username for 'https://github.com/goedman/TP.jl.git':goedman
Password for 'goedman@https://github.com/goedman/TP.jl.git':
^CWARNING: fetch: InterruptException()
INFO: Updating TP master...
INFO: Updating Benchmarks master...
INFO: Updating NMfE master...
INFO: Updating Jags master...
INFO: Updating ASCIIPlots master...
INFO: Computing changes...
INFO: No packages to install, update or remove


> On Mar 30, 2016, at 06:54, Isaiah Norton <isaiah.nor...@gmail.com> wrote:
> 
> I'm not sure if this is supposed to be officially supported yet, but I was 
> able to get ssh:// to work on OS X:
> 
> 1. `brew install libssh2`
> 2. from julia root dir: `cd deps && make configure-libgit2 VERBOSE=1`
> 3. copy the cmake command printed by above, and re-run it manually. For some 
> reason PKG_CONFIG_MODULE didn't detect libgit2 the first time (discovered by 
> trial-and-error, verified by `make distclean-libgit2` and doing the process 
> again).
> 
>   it should look something like:
> 
>  `cmake {HOME}/git/jl71/deps/srccache/libgit2/ 
> -DCMAKE_INSTALL_PREFIX:PATH={HOME}/git/jl71/usr -DCMAKE_VERBOSE_MAKEFILE=ON 
> -DCMAKE_C_COMPILER="clang" -DCMAKE_C_COMPILER_ARG1="-m64 " 
> -DCMAKE_CXX_COMPILER="clang++" -DCMAKE_CXX_COMPILER_ARG1="-m64 " 
> -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release`
> 
> 
> 4. in julia root directory: `make clean && make`
> 5. start ssh-agent. in bash: "$ eval `ssh-agent`"
> 6. run something that causes ssh-agent to unlock the key, for example regular 
> command line git clone'ing a repository via ssh.
> 
> After those steps, the following works:
> 
> julia> Pkg.clone("ssh://g...@github.com/johnmyleswhite/ASCIIPlots.jl.git 
> <http://usern...@github.com/johnmyleswhite/ASCIIPlots.jl.git>")
> 
> If I neglect step 6, then the callback ("credentials_cb") gets called 
> indefinitely (noted via print debugging), so it seems that we are missing 
> some step to make ssh-agent unlock the key pair (which happens via system 
> prompt on OS X).
> 
> So: it looks like this is almost-supported, but we need to fix build issues 
> and teach the libgit2 wrapper to set up ssh-agent credentials correctly on 
> its own (at least on OS X). Presumably the situation is the same or better on 
> Linux. On Windows, building against libssh2 is explicitly disabled by our 
> Makefile.
> 
> 
> On Mon, Mar 28, 2016 at 4:01 PM, Blake Johnson <blakejohnso...@gmail.com 
> <mailto:blakejohnso...@gmail.com>> wrote:
> Is there a way to still support git protocol (as opposed to https) packages 
> with the new libgit2 based package system? I have a fair number of private 
> packages on a local server, and it sure would be nice to be able to fetch 
> those with SSH key authentication.
> 



[julia-users] Re: Pkg.tag "fatal: Not a valid commit name" error

2016-02-21 Thread Rob
Thanks for the help I managed to retag all versions with the command 

Pkg.tag("EEG", v"0.0.2", "eb110a6c7d11ec72ea06e9db9292d33be6248c95", force=
true)

But now when running `Pkg.publish()` I get the following error

ERROR: EEG v0.0.1 SHA1 changed in METADATA – refusing to publish


Any tips on how to solve this?



On Saturday, 20 February 2016 17:39:54 UTC+1, SundaraRaman R wrote:
>
>
>
> On Saturday, February 20, 2016 at 9:52:25 PM UTC+5:30, SundaraRaman R 
> wrote:
>>
>> you can do a force tagging via Pkg.tag("EEG", v"0.0.3", force=true) 
>>
> force isn't a keyword arg, so this should've been just Pkg.tag("EEG", 
> v"0.0.3", true) 
>  
>
>> However, it may be better to go back and tag each version from 0.0.1 (or 
>> whichever your first version was) with the correct commit ID, as seen with 
>> *git 
>> log --tags* now. 
>>
>
> Just for completion's sake, this would be done as Pkg.tag("EEG", v"0.0.1", 
> true, "") , where the 
>  is the sha1 commit ID of tag 0.0.1 
> as emitted by the *git log *command (and similarly for v"0.0.2"). 
>
>
>

[julia-users] Re: Pkg.tag "fatal: Not a valid commit name" error

2016-02-20 Thread Rob
Specifying a version [Pkg.tag("EEG", v"0.0.3")] number also fails 

On Saturday, 20 February 2016 11:19:55 UTC+1, Rob wrote:
>
> I recently needed to remove some sensitive information from my package and 
> used bfg as described by github 
> <https://help.github.com/articles/remove-sensitive-data/>.
>
> Now when I try to tag my package I get the following error
>
> julia> Pkg.tag("EEG")
> fatal: Not a valid commit name 66e78bde1a6bb0ec6b4b1a29c18bb41b32da9c6d
> ERROR: failed process: Process(`git 
> --work-tree=/Users/rluke/.julia/v0.4/EEG 
> --git-dir=/Users/rluke/.julia/v0.4/EEG/.git merge-base 
> 66e78bde1a6bb0ec6b4b1a29c18bb41b32da9c6d 
> e24530c6b9336db73f78892afada86ea28050990`, ProcessExited(128)) [128]
>  in pipeline_error at process.jl:555
>  in readbytes at process.jl:515
>  in anonymous at pkg/entry.jl:570
>  in filter at array.jl:940
>  in tag at pkg/entry.jl:570
>  in tag at pkg/entry.jl:559
>  in anonymous at pkg/dir.jl:31
>  in cd at file.jl:22
>  in cd at pkg/dir.jl:31
>  in tag at pkg.jl:51
>
> Does anyone know how I can resolve this error and publish a new package 
> version?
>


[julia-users] Pkg.tag "fatal: Not a valid commit name" error

2016-02-20 Thread Rob
I recently needed to remove some sensitive information from my package and 
used bfg as described by github 
.

Now when I try to tag my package I get the following error

julia> Pkg.tag("EEG")
fatal: Not a valid commit name 66e78bde1a6bb0ec6b4b1a29c18bb41b32da9c6d
ERROR: failed process: Process(`git 
--work-tree=/Users/rluke/.julia/v0.4/EEG 
--git-dir=/Users/rluke/.julia/v0.4/EEG/.git merge-base 
66e78bde1a6bb0ec6b4b1a29c18bb41b32da9c6d 
e24530c6b9336db73f78892afada86ea28050990`, ProcessExited(128)) [128]
 in pipeline_error at process.jl:555
 in readbytes at process.jl:515
 in anonymous at pkg/entry.jl:570
 in filter at array.jl:940
 in tag at pkg/entry.jl:570
 in tag at pkg/entry.jl:559
 in anonymous at pkg/dir.jl:31
 in cd at file.jl:22
 in cd at pkg/dir.jl:31
 in tag at pkg.jl:51

Does anyone know how I can resolve this error and publish a new package 
version?


Re: [julia-users] Remove Gadfly gridlines?

2016-02-01 Thread Rob J. Goedman
Thanks Tom,

Gets a bit further. Final subplot(rand(100,2)) works fine.

Regards, Rob

julia> using Plots

julia> gadfly(size=(400,200))
Plots.GadflyPackage()

julia> subplot(rand(100,2), grid=[true, false])
[Plots.jl] Initializing backend: gadfly
ERROR: TypeError: non-boolean (Array{Bool,1}) used in boolean context
 in updateGadflyPlotTheme at 
/Users/rob/.julia/v0.4/Plots/src/backends/gadfly.jl:490
 in _postprocess_subplot at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:270
 in subplot! at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:350
 in subplot at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:186

julia> Pkg.installed("Plots")
v"0.5.1+"

julia> Pkg.installed("Gadfly")
v"0.4.2"

julia> subplot(rand(100,2))

julia> 

> On Feb 1, 2016, at 10:48, Tom Breloff <t...@breloff.com> wrote:
> 
> This should work on master.  Do Pkg.checkout("Plots").  Before that, you 
> would do "gadfly(); default(size=(400,200))"
> 
> On Mon, Feb 1, 2016 at 1:12 PM, Rob J. Goedman <goed...@icloud.com 
> <mailto:goed...@icloud.com>> wrote:
> Hi Tom,
> 
> Which version of Plots are you using?
> 
> Rob
> 
> 
> 
> 
> julia> using Plots
> 
> julia> gadfly(size=(400,200))
> ERROR: ArgumentError: function gadfly does not accept keyword arguments
> 
> julia> Pkg.installed("Plots")
> v"0.5.1"
> 
> julia> versioninfo()
> Julia Version 0.4.3
> Commit a2f713d (2016-01-12 21:37 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin13.4.0)
>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
> 
> 
>> On Feb 1, 2016, at 06:38, Tom Breloff <t...@breloff.com 
>> <mailto:t...@breloff.com>> wrote:
>> 
>> It's certainly possible, as I can do this:
>> 
>> 
>> 
>> Looking at my source 
>> (https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492
>>  
>> <https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492>)
>>  it seems like I'm setting the "grid_color" keyword in the "Gadfly.Theme" 
>> constructor to match the background color.  However that seems to be what 
>> you already tried, so I'm not sure what's different.  I tried this is IJulia 
>> and at the REPL... both results were the same for me.
>> 
>> On Mon, Feb 1, 2016 at 8:58 AM, Jon Norberg <jon.norb...@ecology.su.se 
>> <mailto:jon.norb...@ecology.su.se>> wrote:
>> I have searched and tried a few things but cannot remove the background 
>> grids in Gadfly. Its probably simple and I am missing something 
>> obvious...Any suggestions would be appreciated.
>> 
>> layer(x=E,y=wetness(E,10.0), Geom.line,Theme(default_color=a[1], 
>> line_width=2pt, grid_color=colorant"white")
>> 
>> also tried grid_line_width=0pt
>> 
>> but they still show up ( I save it as SVG, but also output in jupiter shows 
>> them)
>> 
> 
> 



Re: [julia-users] Remove Gadfly gridlines?

2016-02-01 Thread Rob J. Goedman
Thanks Tom, that works fine.

> On Feb 1, 2016, at 13:15, Tom Breloff <t...@breloff.com> wrote:
> 
> You are passing in a vector for the grid argument... it needs to be a matrix 
> (1 x 2).
> 
> In Plots, the arguments are sliced up into columns before building the plot.  
> So in my example, the call is similar to:
> 
> subplot(plot(rand(100), grid=true), plot(rand(100), grid=false))
> 
> however your call is similar to:
> 
> subplot(plot(rand(100), grid=[true, false]), plot(rand(100), grid=[true, 
> false]))
> 
> You're passing a boolean vector to both series, whereas I am passing a 
> boolean.  Let me know if you need any more explanation.
> 
> On Mon, Feb 1, 2016 at 2:33 PM, Rob J. Goedman <goed...@icloud.com 
> <mailto:goed...@icloud.com>> wrote:
> Thanks Tom,
> 
> Gets a bit further. Final subplot(rand(100,2)) works fine.
> 
> Regards, Rob
> 
> julia> using Plots
> 
> julia> gadfly(size=(400,200))
> Plots.GadflyPackage()
> 
> julia> subplot(rand(100,2), grid=[true, false])
> [Plots.jl] Initializing backend: gadfly
> ERROR: TypeError: non-boolean (Array{Bool,1}) used in boolean context
>  in updateGadflyPlotTheme at 
> /Users/rob/.julia/v0.4/Plots/src/backends/gadfly.jl:490
>  in _postprocess_subplot at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:270
>  in subplot! at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:350
>  in subplot at /Users/rob/.julia/v0.4/Plots/src/subplot.jl:186
> 
> julia> Pkg.installed("Plots")
> v"0.5.1+"
> 
> julia> Pkg.installed("Gadfly")
> v"0.4.2"
> 
> julia> subplot(rand(100,2))
> 
> julia> 
> 
>> On Feb 1, 2016, at 10:48, Tom Breloff <t...@breloff.com 
>> <mailto:t...@breloff.com>> wrote:
>> 
>> This should work on master.  Do Pkg.checkout("Plots").  Before that, you 
>> would do "gadfly(); default(size=(400,200))"
>> 
>> On Mon, Feb 1, 2016 at 1:12 PM, Rob J. Goedman <goed...@icloud.com 
>> <mailto:goed...@icloud.com>> wrote:
>> Hi Tom,
>> 
>> Which version of Plots are you using?
>> 
>> Rob
>> 
>> 
>> 
>> 
>> julia> using Plots
>> 
>> julia> gadfly(size=(400,200))
>> ERROR: ArgumentError: function gadfly does not accept keyword arguments
>> 
>> julia> Pkg.installed("Plots")
>> v"0.5.1"
>> 
>> julia> versioninfo()
>> Julia Version 0.4.3
>> Commit a2f713d (2016-01-12 21:37 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin13.4.0)
>>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>   LAPACK: libopenblas64_
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>> 
>> 
>>> On Feb 1, 2016, at 06:38, Tom Breloff <t...@breloff.com 
>>> <mailto:t...@breloff.com>> wrote:
>>> 
>>> It's certainly possible, as I can do this:
>>> 
>>> 
>>> 
>>> Looking at my source 
>>> (https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492
>>>  
>>> <https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492>)
>>>  it seems like I'm setting the "grid_color" keyword in the "Gadfly.Theme" 
>>> constructor to match the background color.  However that seems to be what 
>>> you already tried, so I'm not sure what's different.  I tried this is 
>>> IJulia and at the REPL... both results were the same for me.
>>> 
>>> On Mon, Feb 1, 2016 at 8:58 AM, Jon Norberg <jon.norb...@ecology.su.se 
>>> <mailto:jon.norb...@ecology.su.se>> wrote:
>>> I have searched and tried a few things but cannot remove the background 
>>> grids in Gadfly. Its probably simple and I am missing something 
>>> obvious...Any suggestions would be appreciated.
>>> 
>>> layer(x=E,y=wetness(E,10.0), Geom.line,Theme(default_color=a[1], 
>>> line_width=2pt, grid_color=colorant"white")
>>> 
>>> also tried grid_line_width=0pt
>>> 
>>> but they still show up ( I save it as SVG, but also output in jupiter shows 
>>> them)
>>> 
>> 
>> 
> 
> 



Re: [julia-users] Remove Gadfly gridlines?

2016-02-01 Thread Rob J. Goedman
Hi Tom,

Which version of Plots are you using?

Rob




julia> using Plots

julia> gadfly(size=(400,200))
ERROR: ArgumentError: function gadfly does not accept keyword arguments

julia> Pkg.installed("Plots")
v"0.5.1"

julia> versioninfo()
Julia Version 0.4.3
Commit a2f713d (2016-01-12 21:37 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


> On Feb 1, 2016, at 06:38, Tom Breloff <t...@breloff.com> wrote:
> 
> It's certainly possible, as I can do this:
> 
> 
> 
> Looking at my source 
> (https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492
>  
> <https://github.com/tbreloff/Plots.jl/blob/master/src/backends/gadfly.jl#L490-L492>)
>  it seems like I'm setting the "grid_color" keyword in the "Gadfly.Theme" 
> constructor to match the background color.  However that seems to be what you 
> already tried, so I'm not sure what's different.  I tried this is IJulia and 
> at the REPL... both results were the same for me.
> 
> On Mon, Feb 1, 2016 at 8:58 AM, Jon Norberg <jon.norb...@ecology.su.se 
> <mailto:jon.norb...@ecology.su.se>> wrote:
> I have searched and tried a few things but cannot remove the background grids 
> in Gadfly. Its probably simple and I am missing something obvious...Any 
> suggestions would be appreciated.
> 
> layer(x=E,y=wetness(E,10.0), Geom.line,Theme(default_color=a[1], 
> line_width=2pt, grid_color=colorant"white")
> 
> also tried grid_line_width=0pt
> 
> but they still show up ( I save it as SVG, but also output in jupiter shows 
> them)
> 



[julia-users] Does calling python packages through PyCall.jl require author permission

2016-01-28 Thread Rob
I would like to include a call to python MNE in my EEG.jl package. I would 
not use their code, just call the function and have the package as a 
requirement.

Does this break any licensing? Would I require the authors permission 
before I could commit this change to pkg.julialang? 


[julia-users] Re: Using MNE with Julia using PyCall

2016-01-22 Thread Rob
Thanks, this solved my problem.

On Tuesday, 19 January 2016 00:59:33 UTC+1, Steven G. Johnson wrote:
>
>
>
> On Monday, January 18, 2016 at 6:03:15 PM UTC-5, Rob wrote:
>>
>> I am trying to use the python MNE library in Julia.
>>
>> When I call the python function it returns a `Dict{Any,Any}` instead of a 
>> type `info`, when I pass this variable back to another python function I 
>> get the error 
>>
>
> You can use the lower-level "pycall" function to have more control over 
> the return type and any conversions.
>
> e.g. you can do
>
>  pycall(somepythonfunction, PyObject, args)
>
> to return a "raw" Python object with no conversions. 
>


[julia-users] Using MNE with Julia using PyCall

2016-01-18 Thread Rob
I am trying to use the python MNE library in Julia.

When I call the python function it returns a `Dict{Any,Any}` instead of a 
type `info`, when I pass this variable back to another python function I 
get the error 

ERROR: PyError (:PyObject_Call) 
> TypeError("info must be an instance of Info, not ",)


How can I keep the PyCall result as the `info` type and not have it 
converted to a Julia dict?


Re: [julia-users] Overriding the = operator

2016-01-06 Thread Rob J. Goedman
Hi Ismael,

Just trying to learn from this thread, on both Julia 0.4.2 and 0.5 I get an 
error in the 2nd version of the macro:

julia> ≔(var, block) = @eval $var = $block
≔ (generic function with 1 method)

julia> 

julia> @show :foo ≔ "some foo"; foo
:foo ≔ "some foo" = "some foo"
"some foo"

julia> @show :foo ≔ 42; foo
:foo ≔ 42 = 42
42

julia> 

julia> macro ≔(v, b)
 e = Expr(:global, v)
 :($e; $(esc(v)) = $(esc(b)))
   end
@≔ (macro with 1 method)

julia> 

julia> @≔ foo :FOOL
:FOOL

julia> 

julia> @≔ fooled :FOOLED; fooled
:FOOLED

julia> 

julia> macro ≔(v, b)
 e = Expr(:global, v)
 :(global $e; $(esc(v)) = $(esc(b)))
   end
@≔ (macro with 1 method)

julia> 

julia> @≔ bar "some bar"; bar
ERROR: syntax: invalid syntax in "global" declaration
 in eval at ./boot.jl:265

julia> 

julia> @≔ bar 19; bar
ERROR: syntax: invalid syntax in "global" declaration
 in eval at ./boot.jl:265

julia> 

julia> versioninfo()
Julia Version 0.5.0-dev+2021
Commit bc1c18e (2016-01-06 17:45 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.3.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

In addition to the ‘end’ line, is something else needed to make exporting to 
the global environment work? 

Regards,
Rob


> On Jan 5, 2016, at 03:53, Ismael Venegas Castelló <ismael.vc1...@gmail.com> 
> wrote:
> 
> You could use another similar operator like \coloneq:
> 
> julia> ≔(var, block) = @eval $var = $block
> ≔ (generic function with 1 method)
> 
> julia> @show :foo ≔ "some foo"; foo
> :foo ≔ "some foo" = "some foo"
> "some foo"
> 
> julia> @show :foo ≔ 42; foo
> :foo ≔ 42 = 42
> 42
> 
> julia> macro ≔(v, b)
>e = Expr(:global, v)
>:($e; $(esc(v)) = $(esc(b)))
>end
> 
> julia> @≔ foo :FOO
> :FOO
> 
> julia> @≔ foo :FOO; foo
> :FOO
> 
> julia> macro ≔(v, b)
>e = Expr(:global, v)
>:(global $e; $(esc(v)) = $(esc(b)))
> 
> julia> @≔ bar "some bar"; bar
> "some bar"
> 
> julia> @≔ bar 7; bar
> 7
> 
> 
> 
> El martes, 5 de enero de 2016, 3:18:07 (UTC-6), Julia Tylors escribió:
> Hi,
> 
> How can i override the = operator?
> 
> Thanks
> 
> function ={T}(x::T,y::T)
> ...
> end
> 
> didn't work
> 
> Thanks



Re: [julia-users] Overriding the = operator

2016-01-06 Thread Rob J. Goedman
Thanks Ismael,

That helps. I (erroneously) kind of expected that one version would not update 
the outer variable. But that can be achieved with ‘local’ as in \doteq.

Regards,
Rob

julia> :foo ≔ 42;
julia> :bar ≔ "some bar";

julia> # \coloneq
julia> macro ≔(v, b)
 e = Expr(:global, v)
 :($e; $(esc(v)) = $(esc(b)))
   end
@≔ (macro with 1 method)

julia> # \doteq
julia> macro ≐(v, b)
 :(local $(esc(v)) = $(esc(b)))
   end
@≐ (macro with 1 method)

julia> @show foo
foo = 42
42

julia> @≔ foo :FOO
:FOO

julia> @show foo
foo = :FOO
:FOO

julia> @show bar
bar = "some bar"
"some bar"

julia> @show v = @≐ bar "other bar"
v = @≐(bar,"other bar") = "other bar"
"other bar"

julia> @show bar
bar = "some bar"
"some bar"

> On Jan 6, 2016, at 15:27, Ismael VC <ismael.vc1...@gmail.com> wrote:
> 
> Please ignore this part:
> 
> julia> macro ≔(v, b)
>e = Expr(:global, v)
>:(global $e; $(esc(v)) = $(esc(b)))
> As you can see even the end keyword is missing, so it would have made an 
> incomplete input error.
> 
> It was a mistake on my part I pasted an incomplete part of a prior version of 
> the macro of when I was testing it sorry for the confusion.
> 
> Even when you added the end keyword yourself, you can see that the second 
> line says e = Expr(:global, v) and then the third says: :(global $e; 
> $(esc(v)) = $(esc(b))), so global is repeating two times, the message ERROR: 
> syntax: invalid syntax in "global" declaration is because this duplication, 
> is like trying to type:
> 
> julia> x = 5
> 5
> 
> julia> let
>global global x# ooops!
>end
> ERROR: syntax: invalid syntax in "global" declaration
>  in eval at boot.jl:263
> You can see that before redefining the macro it works
> 
> ​just ​as expected.
> 
> 
> Ismael Venegas Castelló
> Data Analyst
> Cel. 044 55 6434 0229
> ivene...@richit.com.mx <mailto:ivene...@richit.com.mx>
> Cerro San Francisco 357, C.P. 04200
> Campestre Churubusco, Coyoacán
> Ciudad de México
>  
> <http://t.sidekickopen35.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43Mx_82W1p1tN-8q-fZWW3LPXXH56dKBHf5NSPJF02?t=https%3A%2F%2Frichit.com.mx%2F=4656540167962624=7cc818fa-ede0-4557-ed9e-a0be10678db6>
>
>  <https://www.facebook.com/richitsolution>  
> <http://t.sidekickopen35.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XX43Mx_82W1p1tN-8q-fZWW3LPXXH56dKBHf5NSPJF02?t=https%3A%2F%2Ftwitter.com%2Frichitsolution=4656540167962624=7cc818fa-ede0-4557-ed9e-a0be10678db6>
>   <mailto:conta...@richit.com.mx>
> Tel. 6718 1818
> richit.com.mx <http://richit.com.mx/>
> 2016-01-06 16:55 GMT-06:00 Rob J. Goedman <goed...@icloud.com 
> <mailto:goed...@icloud.com>>:
> Hi Ismael,
> 
> Just trying to learn from this thread, on both Julia 0.4.2 and 0.5 I get an 
> error in the 2nd version of the macro:
> 
> julia> ≔(var, block) = @eval $var = $block
> ≔ (generic function with 1 method)
> 
> julia> 
> 
> julia> @show :foo ≔ "some foo"; foo
> :foo ≔ "some foo" = "some foo"
> "some foo"
> 
> julia> @show :foo ≔ 42; foo
> :foo ≔ 42 = 42
> 42
> 
> julia> 
> 
> julia> macro ≔(v, b)
>  e = Expr(:global, v)
>  :($e; $(esc(v)) = $(esc(b)))
>end
> @≔ (macro with 1 method)
> 
> julia> 
> 
> julia> @≔ foo :FOOL
> :FOOL
> 
> julia> 
> 
> julia> @≔ fooled :FOOLED; fooled
> :FOOLED
> 
> julia> 
> 
> julia> macro ≔(v, b)
>  e = Expr(:global, v)
>  :(global $e; $(esc(v)) = $(esc(b)))
>end
> @≔ (macro with 1 method)
> 
> julia> 
> 
> julia> @≔ bar "some bar"; bar
> ERROR: syntax: invalid syntax in "global" declaration
>  in eval at ./boot.jl:265
> 
> julia> 
> 
> julia> @≔ bar 19; bar
> ERROR: syntax: invalid syntax in "global" declaration
>  in eval at ./boot.jl:265
> 
> julia> 
> 
> julia> versioninfo()
> Julia Version 0.5.0-dev+2021
> Commit bc1c18e (2016-01-06 17:45 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.3.0)
>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
> 
> In addition to the ‘end’ line, is something else needed to make exporting to 
> the global environment work? 
> 
> Regards,
> Rob
> 
> 
>> On

Re: [julia-users] Do I have simd?

2015-11-09 Thread Rob J. Goedman
Great! 

I just removed all of /usr/local/Cellar, did a full 'brew install julia’, but 
it still fails.

Will file an issue.

Regards,
Rob

> On Nov 9, 2015, at 1:15 PM, DNF <oyv...@gmail.com> wrote:
> 
> On Monday, November 9, 2015 at 10:14:24 PM UTC+1, DNF wrote:
> Thanks a lot. That indeed works.
> 
> Oh, and by "that", I mean installing the Julia 0.4.1 app. 


On Nov 9, 2015, at 12:56 PM, Rob J. Goedman <goed...@icloud.com> wrote:

Hi DNF,

Those instructions (if they help in all cases) only work if you build Julia 
yourself by cloning the Julia git repository. You have installed julia via 
homebrew.
Unfortunately that route doesn’t work for me:

```
rob$ /usr/local/bin/julia
Illegal instruction: 4
```

I expect that maybe this problem is due to older stuff left behind somewhere 
(/usr/local/Cellar?).

Just now I installed Julia 0.4.1 from julialang.org/downloads 
<http://julialang.org/downloads> and then moved the Julia-0.4.1.app to 
/Applications (after double clicking the Julia disk). That gave me simd without 
any problems. Maybe you could try that route?

Regards,
Rob



Re: [julia-users] Do I have simd?

2015-11-09 Thread Rob J. Goedman
Hi DNF,

Those instructions (if they help in all cases) only work if you build Julia 
yourself by cloning the Julia git repository. You have installed julia via 
homebrew.
Unfortunately that route doesn’t work for me:

```
rob$ /usr/local/bin/julia
Illegal instruction: 4
```

I expect that maybe this problem is due to older stuff left behind somewhere 
(/usr/local/Cellar?).

Just now I installed Julia 0.4.1 from julialang.org/downloads and then moved 
the Julia-0.4.1.app to /Applications (after double clicking the Julia disk). 
That gave me simd without any problems. Maybe you could try that route?

Regards,
Rob

———

On Nov 9, 2015, at 11:47 AM, DNF <oyv...@gmail.com> wrote:

Thank you very much for taking the time to look into this, Rob.

My understanding now is that this is something that has to do with the build 
process of Julia, or perhaps with what version of openblas is being used. Am I 
getting that correctly? Do you think this something I could address to the 
maintainer of homebrew-julia?

I see that you are running some 'make' commands. Is 'make' something I run 
after git pulling directly from the main julia git repository, or does it 
somehow work with homebrew as well?


> On Nov 8, 2015, at 2:51 PM, Rob J. Goedman <goed...@icloud.com> wrote:
> 
> On another, slightly older system, I noticed similar (approximately 
> identical) timings for the simd.jl test script using Julia 0.5:
> 
> julia> include("/Users/rob/Projects/Julia/Rob/Julia/simd.jl")
> 
> Julia Version 0.5.0-dev+720
> Commit 5920633* (2015-10-11 15:15 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.0.0)
>   CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
> 
> First call to timeit(1000,1000):
> 
> GFlop= 0.6092165323090373
> GFlop (SIMD) = 0.4607065672339039
> 
> Second call to timeit(1000,1000):
> 
> GFlop= 0.5935117884795207
> GFlop (SIMD) = 0.42286883095163036
> 
> On that same system Julia 0.4 (installed from the Julia site) did show 
> improved Gflop numbers and about a 6x improvement with simd.
> 
> To see if that would help with Julia 0.5, I did (in the cloned julia 
> directory, in a terminal):
> 
> git pull https://github.com/JuliaLang/julia 
> <https://github.com/JuliaLang/julia> master
> make -j 4
> 
> Lots of compile messages/warnings, but in the end:
> 
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> make[3]: *** [libopenblas64_p-r0.2.15.dylib] Error 1
> make[2]: *** [shared] Error 2
> *** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 
> 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, 
> and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building 
> SandyBridge support. Both these options can also be used simultaneously. ***
> make[1]: *** [build/openblas/libopenblas64_.dylib] Error 1
> make: *** [julia-deps] Error 2
> 
> I tried:
> 
> brew update
> brew upgrade
> make -C deps clean-openblas
> make -j 4
> 
> and running the simd.jl script now shows:
> 
> julia> include("/Users/rob/Projects/Julia/Rob/Julia/simd.jl")
> 
> Julia Version 0.5.0-dev+1195
> Commit 68667a3* (2015-11-08 21:05 UTC)
> Platform Info:
>   System: Darwin (x86_64-apple-darwin15.0.0)
>   CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
>   WORD_SIZE: 64
>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
>   LAPACK: libopenblas64_
>   LIBM: libopenlibm
>   LLVM: libLLVM-3.3
> 
> First call to timeit(1000,1000):
> 
> GFlop= 1.4006308441321973
> GFlop (SIMD) = 13.561988458747821
> 
> Second call to timeit(1000,1000):
> 
> GFlop= 2.300048186009497
> GFlop (SIMD) = 12.8439991844
> 
> 
> Not sure if this helps or is even the right way to remedy this.
> 
> Regards,
> Rob
> 
> 
> 
> 
> 
> 
>> On Nov 6, 2015, at 5:35 PM, Rob J. Goedman <goed...@icloud.com 
>> <mailto:goed...@icloud.com>> wrote:
>> 
>> Thanks Seth,
>> 
>> That's the end of my first attempt to figure out what’s happening here. Back 
>> to the drawing board!
>> 
>> Regards,
>> Rob
>> 
>>> On Nov 6, 2015, at 4:53 PM, Seth <catch...@bromberger.com 
>>> <mailto:catch...@bromberger.com>> wrote:
>>> 
>>> Hi Rob,
>>> 
>>> I built it (and openblas) myself (via git clone) since I'm testing out 
>>> Cxx.jl. Xcode is Version 7.1 (7B91b).
>

Re: [julia-users] Do I have simd?

2015-11-08 Thread Rob J. Goedman
On another, slightly older system, I noticed similar (approximately identical) timings for the simd.jl test script using Julia 0.5:julia> include("/Users/rob/Projects/Julia/Rob/Julia/simd.jl")Julia Version 0.5.0-dev+720Commit 5920633* (2015-10-11 15:15 UTC)Platform Info:  System: Darwin (x86_64-apple-darwin15.0.0)  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz  WORD_SIZE: 64  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)  LAPACK: libopenblas64_  LIBM: libopenlibm  LLVM: libLLVM-3.3First call to timeit(1000,1000):GFlop        = 0.6092165323090373GFlop (SIMD) = 0.4607065672339039Second call to timeit(1000,1000):GFlop        = 0.5935117884795207GFlop (SIMD) = 0.42286883095163036On that same system Julia 0.4 (installed from the Julia site) did show improved Gflop numbers and about a 6x improvement with simd.To see if that would help with Julia 0.5, I did (in the cloned julia directory, in a terminal):git pull https://github.com/JuliaLang/julia mastermake -j 4Lots of compile messages/warnings, but in the end:clang: error: linker command failed with exit code 1 (use -v to see invocation)make[3]: *** [libopenblas64_p-r0.2.15.dylib] Error 1make[2]: *** [shared] Error 2*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***make[1]: *** [build/openblas/libopenblas64_.dylib] Error 1make: *** [julia-deps] Error 2I tried:brew updatebrew upgrademake -C deps clean-openblasmake -j 4and running the simd.jl script now shows:julia> include("/Users/rob/Projects/Julia/Rob/Julia/simd.jl")Julia Version 0.5.0-dev+1195Commit 68667a3* (2015-11-08 21:05 UTC)Platform Info:  System: Darwin (x86_64-apple-darwin15.0.0)  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz  WORD_SIZE: 64  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)  LAPACK: libopenblas64_  LIBM: libopenlibm  LLVM: libLLVM-3.3First call to timeit(1000,1000):GFlop        = 1.4006308441321973GFlop (SIMD) = 13.561988458747821Second call to timeit(1000,1000):GFlop        = 2.300048186009497GFlop (SIMD) = 12.8439991844Not sure if this helps or is even the right way to remedy this.Regards,Rob

simd.jl
Description: Binary data
On Nov 6, 2015, at 5:35 PM, Rob J. Goedman <goed...@icloud.com> wrote:Thanks Seth,That's the end of my first attempt to figure out what’s happening here. Back to the drawing board!Regards,RobOn Nov 6, 2015, at 4:53 PM, Seth <catch...@bromberger.com> wrote:Hi Rob,I built it (and openblas) myself (via git clone) since I'm testing out Cxx.jl. Xcode is Version 7.1 (7B91b).Seth.On Friday, November 6, 2015 at 3:54:04 PM UTC-8, Rob J Goedman wrote:Seth,You must have built  Julia 0.4.1-pre yourself. Did you use brew?It looks like you are on Yosemite and picked up a newer libLLVM. Which Xcode are you using?In the Julia.rb formula there is a test ENV.compiler, could it be clang is not being used? RobOn Nov 6, 2015, at 3:01 PM, Seth <catc...@bromberger.com> wrote:For what it's worth, I'm gettingjulia> timeit(1000,1000)GFlop        = 2.3913033081289967GFlop (SIMD) = 2.2694726426420293julia> versioninfo()Julia Version 0.4.1-pre+22Commit 669222e* (2015-11-01 00:06 UTC)Platform Info:  System: Darwin (x86_64-apple-darwin14.5.0)  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz  WORD_SIZE: 64  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)  LAPACK: libopenblas64_  LIBM: libopenlibm  LLVM: libLLVM-svnso it doesn't look like I'm taking advantage of simd either. :(On Friday, November 6, 2015 at 11:43:41 AM UTC-8, Rob J Goedman wrote:Hi DNF,In below versioninfo’s only libopenblas appears different. You installed using brew. The first thing I would try is to execute the steps under Common Issues listed on https://github.com/staticfloat/homebrew-julia. A bit further down on that site there is also some additional openblas related info.RobOn Nov 6, 2015, at 10:35 AM, DNF <oyv...@gmail.com> wrote:Thanks for the feedback. It seems like this is not a problem for most.If anyone has even the faintest clue where I could start looking for a solution to this, I would be grateful. Perhaps there is some software I could run that would detect hardware problems, or maybe I am missing software dependencies of some kind? What could I even google for? All my searches just seem to bring up general info about SIMD, nothing like what I'm describing.On Friday, November 6, 2015 at 12:15:47 AM UTC+1, DNF wrote:I install using homebrew from here: https://github.com/staticfloat/homebrew-juliaI have limited understanding of the process, but believe there is some compilation involved.Julia Version 0.4.0Commit 0ff703b* (2015-10-08 06:20 UTC)Platform Info:  System: Darwin (x86_64-apple-darwin13.4.0)  CPU: Intel(R) Core(TM) i7-4980HQ CPU 

Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Thanks Seth,

That's the end of my first attempt to figure out what’s happening here. Back to 
the drawing board!

Regards,
Rob

> On Nov 6, 2015, at 4:53 PM, Seth <catch...@bromberger.com> wrote:
> 
> Hi Rob,
> 
> I built it (and openblas) myself (via git clone) since I'm testing out 
> Cxx.jl. Xcode is Version 7.1 (7B91b).
> 
> Seth.
> 
> 
> On Friday, November 6, 2015 at 3:54:04 PM UTC-8, Rob J Goedman wrote:
> Seth,
> 
> You must have built  Julia 0.4.1-pre yourself. Did you use brew?
> 
> It looks like you are on Yosemite and picked up a newer libLLVM. Which Xcode 
> are you using?
> In the Julia.rb formula there is a test ENV.compiler, could it be clang is 
> not being used? 
> 
> Rob
> 
>> On Nov 6, 2015, at 3:01 PM, Seth <catc...@bromberger.com > 
>> wrote:
>> 
>> For what it's worth, I'm getting
>> 
>> julia> timeit(1000,1000)
>> GFlop= 2.3913033081289967
>> GFlop (SIMD) = 2.2694726426420293
>> 
>> 
>> julia> versioninfo()
>> Julia Version 0.4.1-pre+22
>> Commit 669222e* (2015-11-01 00:06 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin14.5.0)
>>   CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>   LAPACK: libopenblas64_
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-svn
>> 
>> so it doesn't look like I'm taking advantage of simd either. :(
>> 
>> On Friday, November 6, 2015 at 11:43:41 AM UTC-8, Rob J Goedman wrote:
>> Hi DNF,
>> 
>> In below versioninfo’s only libopenblas appears different. You installed 
>> using brew. The first thing I would try is to execute the steps under Common 
>> Issues listed on https://github.com/staticfloat/homebrew-julia 
>> <https://github.com/staticfloat/homebrew-julia>. A bit further down on that 
>> site there is also some additional openblas related info.
>> 
>> Rob
>> 
>>> On Nov 6, 2015, at 10:35 AM, DNF <oyv...@gmail.com <>> wrote:
>>> 
>>> Thanks for the feedback. It seems like this is not a problem for most.
>>> 
>>> If anyone has even the faintest clue where I could start looking for a 
>>> solution to this, I would be grateful. Perhaps there is some software I 
>>> could run that would detect hardware problems, or maybe I am missing 
>>> software dependencies of some kind? What could I even google for? All my 
>>> searches just seem to bring up general info about SIMD, nothing like what 
>>> I'm describing.
>> 
>> 
>> 
>> On Friday, November 6, 2015 at 12:15:47 AM UTC+1, DNF wrote:
>> I install using homebrew from here: 
>> https://github.com/staticfloat/homebrew-julia 
>> <https://github.com/staticfloat/homebrew-julia>
>> I have limited understanding of the process, but believe there is some 
>> compilation involved.
>> 
>> 
>> Julia Version 0.4.0
>> Commit 0ff703b* (2015-10-08 06:20 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin13.4.0)
>>   CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>   LAPACK: libopenblas64_
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>> 
>> Julia Version 0.4.0
>> Commit 0ff703b* (2015-10-08 06:20 UTC)
>> Platform Info:
>>   System: Darwin (x86_64-apple-darwin15.0.0)
>>   CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
>>   WORD_SIZE: 64
>>   BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
>>   LAPACK: libopenblas
>>   LIBM: libopenlibm
>>   LLVM: libLLVM-3.3
>> 
> 



Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Hi DNF,

I get below results onJulia 0.5 (home-build) and  Julia 0.4 (downloaded).

A clear difference is the presence of a vector block in the output of 
‘code_llvm(innersimd, Tuple{Vector{Float32},Vector{Float32}})'

Regards,
Rob


> On Nov 6, 2015, at 3:53 AM, DNF <oyv...@gmail.com> wrote:
> 
> On Friday, November 6, 2015 at 12:20:38 PM UTC+1, Giuseppe Ragusa wrote:
> I am pretty sure must something specific to your installation.
> 
> Do you mean my Julia installation? 


Julia Version 0.5.0-dev+1158
Commit 20786d2* (2015-11-05 14:13 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.0.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

First call to timeit(1000,1000):

GFlop= 2.4158674171961443
GFlop (SIMD) = 14.63560990245366

Second call to timeit(1000,1000):

GFlop= 2.3526062760477626
GFlop (SIMD) = 16.769379113738314


define float @julia_innersimd_23136(%jl_value_t*, %jl_value_t*) {
L:
  %2 = getelementptr inbounds %jl_value_t* %0, i64 1
  %3 = bitcast %jl_value_t* %2 to i64*
  %4 = load i64* %3, align 8
  %5 = icmp sgt i64 %4, 0
  %6 = select i1 %5, i64 %4, i64 0
  %7 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %6, i64 1)
  %8 = extractvalue { i64, i1 } %7, 1
  br i1 %8, label %fail, label %pass

fail: ; preds = %L
  %9 = load %jl_value_t** @jl_overflow_exception, align 8
  call void @jl_throw(%jl_value_t* %9)
  unreachable

pass: ; preds = %L
  %10 = extractvalue { i64, i1 } %7, 0
  %11 = call { i64, i1 } @llvm.sadd.with.overflow.i64(i64 %10, i64 1)
  %12 = extractvalue { i64, i1 } %11, 1
  br i1 %12, label %fail1, label %pass2

fail1:; preds = %pass
  %13 = load %jl_value_t** @jl_overflow_exception, align 8
  call void @jl_throw(%jl_value_t* %13)
  unreachable

pass2:; preds = %pass
  %14 = extractvalue { i64, i1 } %11, 0
  %15 = icmp slt i64 %14, 1
  br i1 %15, label %L11, label %if3

if3:  ; preds = %pass2
  %16 = bitcast %jl_value_t* %1 to i8**
  %17 = bitcast %jl_value_t* %0 to i8**
  %18 = load i8** %17, align 8
  %19 = load i8** %16, align 8
  %n.mod.vf = urem i64 %14, 24
  %cmp.zero = icmp eq i64 %14, %n.mod.vf
  br i1 %cmp.zero, label %middle.block, label %vector.ph

vector.ph:; preds = %if3
  %n.vec = sub i64 %14, %n.mod.vf
  %20 = sub i64 %n.mod.vf, %14
  br label %vector.body

vector.body:  ; preds = %vector.body, 
%vector.ph
  %lsr.iv41 = phi i64 [ %lsr.iv.next42, %vector.body ], [ 0, %vector.ph ]
  %vec.phi = phi <8 x float> [ zeroinitializer, %vector.ph ], [ %29, 
%vector.body ]
  %vec.phi12 = phi <8 x float> [ zeroinitializer, %vector.ph ], [ %30, 
%vector.body ]
  %vec.phi13 = phi <8 x float> [ zeroinitializer, %vector.ph ], [ %31, 
%vector.body ]
  %21 = mul i64 %lsr.iv41, -4
  %uglygep60 = getelementptr i8* %18, i64 %21
  %uglygep6061 = bitcast i8* %uglygep60 to <8 x float>*
  %wide.load = load <8 x float>* %uglygep6061, align 4
  %22 = mul i64 %lsr.iv41, -4
  %sunkaddr = ptrtoint i8* %18 to i64
  %sunkaddr62 = add i64 %sunkaddr, %22
  %sunkaddr63 = add i64 %sunkaddr62, 32
  %sunkaddr64 = inttoptr i64 %sunkaddr63 to <8 x float>*
  %wide.load16 = load <8 x float>* %sunkaddr64, align 4
  %23 = mul i64 %lsr.iv41, -4
  %sunkaddr65 = ptrtoint i8* %18 to i64
  %sunkaddr66 = add i64 %sunkaddr65, %23
  %sunkaddr67 = add i64 %sunkaddr66, 64
  %sunkaddr68 = inttoptr i64 %sunkaddr67 to <8 x float>*
  %wide.load17 = load <8 x float>* %sunkaddr68, align 4
  %24 = mul i64 %lsr.iv41, -4
  %uglygep = getelementptr i8* %19, i64 %24
  %uglygep43 = bitcast i8* %uglygep to <8 x float>*
  %wide.load18 = load <8 x float>* %uglygep43, align 4
  %sunkaddr69 = ptrtoint i8* %19 to i64
  %sunkaddr70 = add i64 %sunkaddr69, %24
  %sunkaddr71 = add i64 %sunkaddr70, 32
  %sunkaddr72 = inttoptr i64 %sunkaddr71 to <8 x float>*
  %wide.load19 = load <8 x float>* %sunkaddr72, align 4
  %25 = mul i64 %lsr.iv41, -4
  %sunkaddr73 = ptrtoint i8* %19 to i64
  %sunkaddr74 = add i64 %sunkaddr73, %25
  %sunkaddr75 = add i64 %sunkaddr74, 64
  %sunkaddr76 = inttoptr i64 %sunkaddr75 to <8 x float>*
  %wide.load20 = load <8 x float>* %sunkaddr76, align 4
  %26 = fmul <8 x float> %wide.load, %wide.load18
  %27 = fmul <8 x float> %wide.load16, %wide.load19
  %28 = fmul <8 x float> %wide.load17, %wide.load20
  %29 = fadd <8 x float> %vec.phi, %26
  %30 = fadd <8 x float> %vec.phi12, %27
  %31 = fadd <8 x float> %vec.phi13, %28
  %lsr.iv.next42 = add i64 %lsr.iv41, -24
  %32 = icmp eq i64 %20, %lsr.iv.nex

Re: [julia-users] Do I have simd?

2015-11-06 Thread Rob J. Goedman
Hi DNF,

In below versioninfo’s only libopenblas appears different. You installed using 
brew. The first thing I would try is to execute the steps under Common Issues 
listed on https://github.com/staticfloat/homebrew-julia 
<https://github.com/staticfloat/homebrew-julia>. A bit further down on that 
site there is also some additional openblas related info.

Rob

> On Nov 6, 2015, at 10:35 AM, DNF <oyv...@gmail.com> wrote:
> 
> Thanks for the feedback. It seems like this is not a problem for most.
> 
> If anyone has even the faintest clue where I could start looking for a 
> solution to this, I would be grateful. Perhaps there is some software I could 
> run that would detect hardware problems, or maybe I am missing software 
> dependencies of some kind? What could I even google for? All my searches just 
> seem to bring up general info about SIMD, nothing like what I'm describing.



On Friday, November 6, 2015 at 12:15:47 AM UTC+1, DNF wrote:
I install using homebrew from here: 
https://github.com/staticfloat/homebrew-julia 
<https://github.com/staticfloat/homebrew-julia>
I have limited understanding of the process, but believe there is some 
compilation involved.


Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin15.0.0)
  CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3



Re: [julia-users] Help wanted - does Cairo.jl work for everyone else except me?

2015-10-10 Thread Rob J. Goedman

Hi, this is what I get. Looks pretty much like your description.



Regards,
Rob

> On Oct 10, 2015, at 9:18 AM, cormull...@mac.com wrote:
> 
> I'm trying to find out why Cairo.jl/text_path() doesn't work for me, but 
> seems to work for others. If you have Cairo.jl installed, could you run the 
> sample_text.jl test file:
> 
> $ julia ~/.julia/v0.4/Cairo/samples/sample_text.jl
> 
> There are lots of deprecations, but — the output file is called 
> sample_text.png (probably created in your current directory) — if the test is 
> successful, you'll see the words "Hello" and "Void". But on my system (MacOS 
> X El Capitan, Julia v0.4.0 (2015-10-08 06:20 UTC) freshly installed) I only 
> see "Hello", plus a bunch of collapsed glyphs, because text_path() doesn't 
> work for me. I'd really like to know whether anyone else shares this problem 
> or whether it's just me. :)
> 



Re: [julia-users] Help wanted - does Cairo.jl work for everyone else except me?

2015-10-10 Thread Rob J. Goedman
El Capitan 10.11.1 beta, Julia 0.4:


Julia Version 0.4.0
Commit 0ff703b* (2015-10-08 06:20 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


> On Oct 10, 2015, at 9:55 AM, cormull...@mac.com wrote:
> 
> Yup, that's a fail. I'm glad I'm not the only one. What systems are you 
> running?
> 
> On Saturday, October 10, 2015 at 5:48:03 PM UTC+1, Rob J Goedman wrote:
> 
> Hi, this is what I get. Looks pretty much like your description.
> 
> 
> 
> Regards,
> Rob
> 
>> On Oct 10, 2015, at 9:18 AM, cormu...@mac.com  wrote:
>> 
>> I'm trying to find out why Cairo.jl/text_path() doesn't work for me, but 
>> seems to work for others. If you have Cairo.jl installed, could you run the 
>> sample_text.jl test file:
>> 
>> $ julia ~/.julia/v0.4/Cairo/samples/sample_text.jl
>> 
>> There are lots of deprecations, but — the output file is called 
>> sample_text.png (probably created in your current directory) — if the test 
>> is successful, you'll see the words "Hello" and "Void". But on my system 
>> (MacOS X El Capitan, Julia v0.4.0 (2015-10-08 06:20 UTC) freshly installed) 
>> I only see "Hello", plus a bunch of collapsed glyphs, because text_path() 
>> doesn't work for me. I'd really like to know whether anyone else shares this 
>> problem or whether it's just me. :)
>> 
> 



Re: [julia-users] Re: Hyper-Dual numbers

2015-09-28 Thread Rob Goedman
Hi Nitin,

Thanks for the note and references. The recent upgrade of ForwardDiff.jl 
certainly shows the value of these methods.

Did you (re-)implement MultiComplexNumbers from the 2nd reference, or used one 
of the two (Fortran and Matlab) prototype modules? Did you use it from within 
Julia? Do you know the license that comes with the implementation you used? 

Sorry for all the questions!

Regards,
Rob


> On Sep 28, 2015, at 18:11, Nitin Arora <nitin.l...@gmail.com> wrote:
> 
> There is another method to calculate any order derivatives, very similar to 
> this one, known as Multi-complex differentiation. This method can calculate 
> derivatives up-to any order.
> 
> http://www.autodiff.org/Docs/euroad/13rd%20EuroAd%20Workshop%20-%20Thierry%20Dargent%20-%20Using%20Multicomplex%20Variables%20for%20Automatic%20Computation%20of%20High-Order%20Derivatives.pdf
> 
> http://delivery.acm.org/10.1145/217/2168774/a16-lantoine.pdf?ip=207.151.221.1=2168774=ACTIVE%20SERVICE=6405B83BDA580DC2%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35%2E4D4702B0C3E38B35=717380051=25446753&__acm__=1443489222_ee3f3d4c7ee41030aaba536e14d6a6ab
> 
> I have used this in my field and it seems to work nicely.
> 
> thanks,
> Nitin
> 
>> On Saturday, March 29, 2014 at 5:43:05 PM UTC-7, Rob J Goedman wrote:
>> Hi,
>> 
>> As a first 'jump into the fray' exercise I've attempted to translate Jeffrey 
>> Fike's hyper-dual numbers code from c++ to Julia, more or less following the 
>> DualNumbers package.
>> 
>> The c++ code can be found at http://adl.stanford.edu/hyperdual/hyperdual.h . 
>> The paper itself at http://adl.stanford.edu/hyperdual/Fike_AIAA-2011-886.pdf 
>> .
>> 
>> The Julia package can be found at: 
>> https://github.com/goedman/HyperDualNumbers.jl.git .
>> 
>> Of course, I'm pretty new at this so I'm sure there will be errors and poor 
>> practices. So any feedback is appreciated.
>> 
>> Also, I'm wondering if the type should be called Hyper or a better name 
>> would be HyperDual.
>> 
>> This work was triggered by the interesting threads around openPP, 
>> TaylorSeries.jl, Calculus2, PowerSeries.jl (and at some time I hope MCMC.jl).
>> 
>> Rob J. Goedman
>> goe...@icloud.com
>> 
>> 
>> 
>> 


Re: [julia-users] How to use variables in subsets of DataFrames ?

2015-09-28 Thread Rob J. Goedman
Fred,

Would  below example work for you?

julia> dft = readtable("/Users/rob/Desktop/test.csv", separator = '\t')
8x5 DataFrames.DataFrame
| Row | title1 | title2 | title3 | title4 | title5 |
|-||||||
| 1   | 10 | 20 | 30 | 40 | 50 |
| 2   | 11 | 21 | 31 | 41 | 51 |
| 3   | 12 | 22 | 32 | 42 | 52 |
| 4   | 13 | 23 | 33 | 43 | 53 |
| 5   | 14 | 24 | 34 | 44 | 54 |
| 6   | 15 | 25 | 35 | 45 | 55 |
| 7   | 16 | 26 | 36 | 46 | 56 |
| 8   | 17 | 27 | 37 | 47 | 57 |

julia> titles = names(dft)
5-element Array{Symbol,1}:
 :title1
 :title2
 :title3
 :title4
 :title5

julia> dft[[2:6], titles[2:5]]
5x4 DataFrames.DataFrame
| Row | title2 | title3 | title4 | title5 |
|-|||||
| 1   | 21 | 31 | 41 | 51 |
| 2   | 22 | 32 | 42 | 52 |
| 3   | 23 | 33 | 43 | 53 |
| 4   | 24 | 34 | 44 | 54 |
| 5   | 25 | 35 | 45 | 55 |

julia> dft[[2:6], titles[3]]
5-element DataArrays.DataArray{Int64,1}:
 31
 32
 33
 34
 35


If you use list comprehension you will need the extra Symbol[] construct:

julia> dft[:, Symbol[titles[i] for i in 2:3]]
8x2 DataFrames.DataFrame
| Row | title2 | title3 |
|-|||
| 1   | 20 | 30 |
| 2   | 21 | 31 |
| 3   | 22 | 32 |
| 4   | 23 | 33 |
| 5   | 24 | 34 |
| 6   | 25 | 35 |
| 7   | 26 | 36 |
| 8   | 27     | 37 |


Regards,
Rob

> On Sep 28, 2015, at 2:18 AM, Fred <fred.softwa...@gmail.com> wrote:
> 
> Hi !
> I would like to know how is it possible to use variables in subsets of 
> DataFrames ? I would like to use a syntax like
>  df[:,:titles[1]] and df[:,:titles[1:3]]
> 
> Thanks for your help !
> 
> 
> julia> using DataFrames
> 
> 
> julia> df = readtable("test.csv", separator = '\t')
> 8x5 DataFrame
> | Row | title1 | title2 | title3 | title4 | title5 |
> |-||||||
> | 1   | 10 | 20 | 30 | 40 | 50 |
> | 2   | 11 | 21 | 31 | 41 | 51 |
> | 3   | 12 | 22 | 32 | 42 | 52 |
> | 4   | 13 | 23 | 33 | 43 | 53 |
> | 5   | 14 | 24 | 34 | 44 | 54 |
> | 6   | 15 | 25 | 35 | 45 | 55 |
> | 7   | 16 | 26 | 36 | 46 | 56 |
> | 8   | 17 | 27 | 37 | 47 | 57 |
> 
> 
> julia> titles = readdlm("titles.csv")
> 3x1 Array{Any,2}:
>  "title3"
>  "title1"
>  "title5"
> 
> 
> julia> df[:,:title2]
> 8-element DataArray{Int64,1}: 
> 
>  20   
> 
>  21   
> 
>  22   
> 
>  23   
> 
>  24   
> 
>  25   
> 
>  26   
> 
>  27   
> 
>   
> 
> julia> titles[1]
> "title3"  
> 
>   
> 
> julia> df[:,:titles[1]]
> ERROR: `getindex` has no method matching getindex(::Symbol, ::Int64)   
> 
> julia> df[:,:titles[1:3]]
> ERROR: `getindex` has no method matching getindex(::Symbol, 
> ::UnitRange{Int64})
> 
> 
> 
> 



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

2015-08-22 Thread Rob J. Goedman
Uwe,

The way I proceed is to:

1) Clone the forked version of METADATA.jl to your desktop.

2) Remove the entry for NaNMath.jl in this local, cloned version of METADATA.jl.

3) Replace it with the entry from your NanMath.jl in .julia/v0.x METADATA.jl.

4) Merge back to your forked verion on github.com.

5) Create a pull request to JuliaLang/METADATA.jl

Hope this helps,
Rob

 On Aug 22, 2015, at 9:38 AM, Uwe Fechner uwe.fechner@gmail.com wrote:
 
 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/ 
 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 https://github.com/mlubin/NaNMath.jl
 
 Does anyone know, how to do this?
 
 Best regards:
 
 Uwe Fechner
 



Re: [julia-users] Exporter for compressed binary unstructured grid VTK XML files.

2015-04-07 Thread Rob J. Goedman
Hi Kristoffer,

I’ll certainly will keep your 2 files around if you don’t mind, at least until 
I have some time to try the 2 existing packages. WriteVTK.jl seems closer to 
your bootstrap files.

Regards,
Rob J. Goedman
goed...@mac.com





 On Apr 6, 2015, at 1:24 PM, Kristoffer Carlsson kcarlsso...@gmail.com wrote:
 
 Hello Rob,
 
 Thank you for your comments and sorry for my late answer. I have been away 
 for a while.
 
 I should have stressed in my post that the files I attached was only a 
 minimum working example from which someone should easily be able to write 
 their own custom exporter. The data structures in those files (the Node and 
 Element types) are not something that I actually use but was just the 
 simplest possible I could figure out to not clutterer what was important, the 
 exporter.
 
 Thank you for linking those packages! I looked for a wrapper for the VTK 
 classes but I didn't find one. If VTK.jl works well then I don't see much 
 use in the files I posted since using the wrapper will be much easier and 
 less error prone. I will try it out.
 
 I don't think I will have time to create a full package but from the looks of 
 things, it seems that there already exists a few that has made good progress,
 
 On Thursday, April 2, 2015 at 6:25:58 PM UTC+2, Rob J Goedman wrote:
 Hi Kristoffer,
 
 Thanks for doing this! This is very useful.
 
 I had no problems in running the test_vtk.jl ‘as-is’ on Julia 0.4.
 
 On Julia 0.3.7 I had to include the Compat package.
 
 Another suggestion is to maybe (re-)name the Node and Element types to 
 something less general as Node and Element are likely already used in FE 
 packages. I used VTKNode and VTKElement and moved the definitions to 
 exportVTK_XML.jl.
 
 Is your intention to create a VTK_XML.jl package at some time or add it to 
 the 2 existing VTK related packages ( 
 https://github.com/jipolanco/WriteVTK.jl 
 https://github.com/jipolanco/WriteVTK.jl and 
 https://github.com/ihnorton/VTK.jl https://github.com/ihnorton/VTK.jl )? 
 
 Thanks again, and regards,
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 
 
 
 On Apr 2, 2015, at 7:04 AM, Kristoffer Carlsson kcarl...@gmail.com 
 javascript: wrote:
 
 Hello everyone,
 
 I am writing finite element software in Julia and in doing so I implemented 
 an exporter to the VTK XML unstructured grid format.
 The XML format has many advantages over the old legacy VTK format, you can 
 for example compress the data or decompose your domain into multiple files 
 that can be read in parallel etc.
 
 Since the file format has some oddities it can be it a bit tricky to write 
 an exporter for it so I thought it might be useful to post my version here 
 so anyone else thinking about doing something similar can look at it.
 
 The attached files are a working example of writing points and cells in 
 ascii, binary and binary compressed format.
 From this example adding things like cell data and point data should be 
 trivial.
 
 It uses the LightXML and Codec packages.
 
 I am not very used to working with IOBuffers so if anyone has comments or 
 tips about the code it is appreciated.
 
 Best regards
 
 // Kristoffer
 
 PS: MIT license
 
 PSS: I realize I forgot to free my XML-nodes.
 
 
 exportVTK_XML.jltest_vtk.jl
 



Re: [julia-users] Exporter for compressed binary unstructured grid VTK XML files.

2015-04-02 Thread Rob J. Goedman
Hi Kristoffer,

Thanks for doing this! This is very useful.

I had no problems in running the test_vtk.jl ‘as-is’ on Julia 0.4.

On Julia 0.3.7 I had to include the Compat package.

Another suggestion is to maybe (re-)name the Node and Element types to 
something less general as Node and Element are likely already used in FE 
packages. I used VTKNode and VTKElement and moved the definitions to 
exportVTK_XML.jl.

Is your intention to create a VTK_XML.jl package at some time or add it to the 
2 existing VTK related packages ( https://github.com/jipolanco/WriteVTK.jl 
https://github.com/jipolanco/WriteVTK.jl and 
https://github.com/ihnorton/VTK.jl https://github.com/ihnorton/VTK.jl )? 

Thanks again, and regards,
Rob J. Goedman
goed...@mac.com





 On Apr 2, 2015, at 7:04 AM, Kristoffer Carlsson kcarlsso...@gmail.com wrote:
 
 Hello everyone,
 
 I am writing finite element software in Julia and in doing so I implemented 
 an exporter to the VTK XML unstructured grid format.
 The XML format has many advantages over the old legacy VTK format, you can 
 for example compress the data or decompose your domain into multiple files 
 that can be read in parallel etc.
 
 Since the file format has some oddities it can be it a bit tricky to write an 
 exporter for it so I thought it might be useful to post my version here so 
 anyone else thinking about doing something similar can look at it.
 
 The attached files are a working example of writing points and cells in 
 ascii, binary and binary compressed format.
 From this example adding things like cell data and point data should be 
 trivial.
 
 It uses the LightXML and Codec packages.
 
 I am not very used to working with IOBuffers so if anyone has comments or 
 tips about the code it is appreciated.
 
 Best regards
 
 // Kristoffer
 
 PS: MIT license
 
 PSS: I realize I forgot to free my XML-nodes.
 
 
 exportVTK_XML.jltest_vtk.jl



Re: [julia-users] Package structure

2015-01-11 Thread Rob J. Goedman
Hi Petr,

I've done a 1st pass over JFinEALE.jl attempting to make minimal changes to the 
current structure.

For now the changes are avaliable in a (forked) github repository: 
https://github.com/goedman/JFinEALE.jl

A few questions for a next pass:

1. I'm not sure I like to the levels of modules.  This way a user has to know 
which 2nd level modules he/she should be using.

Is there a reason you choose this setup?

I typically prefer that the end user only needs a single 'using JFinEALE' 
statement. That requires some additional work, so wanted to have your views 
first before going there. Even then there are a few ways of how we can 
implement that, e.g. remove the 2nd layer of modules (make them all methods) or 
export more in JFinEALE.

2. For now I've added *.vtk to .gitignore. 

I prefer to have examples in their own directory and .vtk files can be stored 
there as well. Do you have a preference?

3. I have not Julia-normalized the Paraview paths lines in the examples. In 
most cases, for now, I've made them @windows_only ...

We could check if Paraview is available, e.g. by looking for an environment 
variable or a definition in .juliarc.jl.

4. I do export 'phun' right now in JFinEALE.

Let me know what your preference is.

You should be able to Pkg.clone(https://github.com/goedman/JFinEALE.jl;) after 
Pkg.rm(JFinEALE) first. 
Once this version is installed, you can run Pkg.test(JFinEALE), it should run 
all examples (twice in fact, to see if first time is slower than subsequent 
times).

Or we could make this version a branch or I could generate a PR first.

Regards,
Rob J. Goedman
goed...@mac.com





 On Jan 11, 2015, at 9:30 AM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Sounds like a good idea.
 P
 
 On Saturday, January 10, 2015 at 7:23:25 PM UTC-8, Rob J Goedman wrote:
 Petr, 
 
 Would you like me to prepare a simple pull request tomorrow? 
 
 Regards, 
 Rob 
 
 Sent from my iPhone 
 
  On Jan 10, 2015, at 6:22 PM, Petr Krysl krysl...@gmail.com javascript: 
  wrote: 
  
  Hello everybody, 
  
  I wonder if I could get some advice on how to structure a package?  I could 
  see  how the SRC and TEST folders  had a place in the package structure, 
  but so far I could not discern a systematic way for access to examples that 
  use the package. In particular, when I create a package  (clone()),, and 
  the package has an EXAMPLES folder, none of the stuff in that folder is  
  actually visible at the REPL... 
  
  How should this be handled? 
  
  Thanks, 
  
  P 



Re: [julia-users] Package structure

2015-01-11 Thread Rob J. Goedman
Hi Petr,

 Perhaps you could enable issues in your github repository so that we could  
 carry on this conversation there?

Or should we use your JFinEALE.jl isues list as I think my repo is only 
intended to be available for a limited time (so not to confuse users).
I'm now watching on your JFinEALE repo and enabled issues on mine.

A few more responses inserted below.

Regards,
Rob J. Goedman
goed...@mac.com


 On Jan 11, 2015, at 4:18 PM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Hi Rob,
 
 I can't  keep up with you. Your code is a moving target all the time. :)

I apologize for the moving target. Didn't realize you were looking at the 
PkgStruc branch. The 'master' branch has been stable since this morning and 
just 50 minutes or so ago I finished a single layer version, fixed most of the 
issues you refer to below and all examples run equally fast as this morning. I 
will, for now, not make any further changes.

To get it to build on Travis (I added a .travis.yml file) and disabled the 
Winston part on 3 examples. The plots work fine on my machine.

 On Sunday, January 11, 2015 at 11:14:04 AM UTC-8, Rob J Goedman wrote:
 Hi Petr,
 
 1. I'm not sure I like to the levels of modules.  This way a user has to know 
 which 2nd level modules he/she should be using.
 
 Is there a reason you choose this setup?
 
 I thought of that it was going to be easier  controlling  access to the 
 methods  defined within individual modules.  In fact now I can see that  you 
 have transitioned  your fork  to a single module. And  as expected  you ran 
 into some difficulties with exporting.
 In both the Acoustics Algorithm module and the Heat conduction Algorithm 
 module  defined the method  called  steadystate().  When the  method is used 
 by qualification from within the module things are fine, but if you're trying 
 to export it from the single-layer  module the naming convention breaks  and 
 you have to disambiguate the methods  by prefixes..

In the PkgStruc branch there are now 2 versions of steadystate(), called 
heat_conduction_steadystate() and acoustics_steadystate(). A better approach 
might be to use multiple dispatch for this.

  Also problematic is to  decide  at the top level  what is going to be 
 exported. When these decisions are made  where  the methods are defined it 
 seems a little bit more natural.  In this case the export happens at a place 
 that is different from words defined. But, could be that a central location 
 for all the exports might have an advantage.
 
 I typically prefer that the end user only needs a single 'using JFinEALE' 
 statement. That requires some additional work, so wanted to have your views 
 first before going there. Even then there are a few ways of how we can 
 implement that, e.g. remove the 2nd layer of modules (make them all methods) 
 or export more in JFinEALE.
 
 Two layers of modules  would actually not be too bad.

All exports in the PkgStruc branch are now in JFinEALE.jl and all intermediate 
module names have been removed. See if you like that or would prefer a more 
distributed approach.

 2. For now I've added *.vtk to .gitignore. 
 
 I prefer to have examples in their own directory and .vtk files can be stored 
 there as well. Do you have a preference?
 
 The vtk files are not part  of my repository  as they are generated 
 on-the-fly  when the examples run.

I think adding .vtk to .gitignore allows users to upgrade the package in the 
future after re-running the example scripts (given that the package will not be 
marked 'dirty').

 3. I have not Julia-normalized the Paraview paths lines in the examples. In 
 most cases, for now, I've made them @windows_only ...
 
 We could check if Paraview is available, e.g. by looking for an environment 
 variable or a definition in .juliarc.jl.
 
 Sure, what is in my repository is an ugly hack  which is not going to work on 
 other people's machines. 
 Your solution would be a good one.

Will look into that a bit more. Have not worked with Paraview before.

  4. I do export 'phun' right now in JFinEALE.
 
 Let me know what your preference is.
 
 By the way,  last time I checked  you had the bbasic datatypes defined twice, 
  once in the foundation module and once in the JFinEALE module.

Should be fixed now.

 You should be able to Pkg.clone(https://github.com/goedman/JFinEALE.jl 
 https://github.com/goedman/JFinEALE.jl) after Pkg.rm(JFinEALE) first. 
 Once this version is installed, you can run Pkg.test(JFinEALE), it should 
 run all examples (twice in fact, to see if first time is slower than 
 subsequent times).
 
 The  package test should actually not run all the examples..  It should run 
 only  examples instrumented  to perform  tests..   Such as the ones  I 
 instrumented  for the acoustics.

Agreed, I left your test_acoustics.jl intact. We can easily switch back to that 
test script. Just wanted to make sure coverage was as good as all examples.

  Or we could make this version a branch or I could generate

Re: [julia-users] Can I use macro to substitute the argument list of a function?

2015-01-08 Thread Rob J. Goedman
Desperately trying to understand this stuff :-)

Would something like @f2() below work here?

Also works in Julia-0.3.

Can’t figure it out using staged functions (yet?).

Rob J. Goedman
goed...@mac.com


julia A = (1, 2, 5)
(1,2,5)

julia macro f1(a,b,c)
 return :($a+$b+$c)
   end

julia @show @f1(2,4,6);
@f1 2 4 6 = 12

julia 

julia B = (3, 6)
(3,6)

julia macro f2(a, b)
 return :($a + sum($b))
   end

julia @show @f2(5, B);
@f2 5 B = 14

julia @show @f2(3, B);
@f2 3 B = 12

julia versioninfo()
Julia Version 0.4.0-dev+2686
Commit 1548d62* (2015-01-08 15:32 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin14.1.0)
  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3


 On Jan 7, 2015, at 8:25 PM, Chi-wei Wang cwwang...@gmail.com wrote:
 
 Any ways to achieve this?
 
 Jameson於 2015年1月7日星期三UTC-8下午7時32分59秒寫道:
 the declaration `const A = (2,3)` is not part of the macro environment. 
 values are only seen by functions. whereas macros only see the surface 
 syntax. so the arguments to `@f` are the literals `1` and `:(A...)`
 
 On Wed Jan 07 2015 at 10:04:26 PM Chi-wei Wang cwwa...@gmail.com 
 javascript: wrote:
 Can ... be applied on macro? I tried this but it didn't compile.
 macro f(a,b,c)
   return :($a+$b+$c)
 end
 const A = (2,3)
 @f(1, A...)
 
 
 
 Chi-wei Wang於 2015年1月7日星期三UTC-8下午6時45分14秒寫道:
 It works! I missed the varargs section in the doc. Thanks!
 
 Greg Plowman於 2015年1月7日星期三UTC-8下午5時26分02秒寫道:
 
 Would the following work?
 
 const A = (1,2,3)
 f(x::Int, y::Int, z::Int) = x+y+z
 f(A...)
 
 
 http://docs.julialang.org/en/release-0.3/manual/functions/#varargs-functions 
 http://docs.julialang.org/en/release-0.3/manual/functions/#varargs-functions
 
 
 On Thursday, January 8, 2015 11:14:23 AM UTC+11, Chi-wei Wang wrote:
 Hi, everyone. I am trying to achieve the effect like the following C code:
 
 #define A 1,2,3
 void f(int x, int y, int z) {
 }
 
 f(A);
 
 Yet the macro in Julia always returns a single expression. Is it possible to 
 do this?



Re: [julia-users] Tips and tricks for figuring out where allocation occurs

2015-01-07 Thread Rob J. Goedman
Hi Petr,

Will do. 

The book is very well written, I have seen a few minor typos/errors. e.g. in 
chapter 1:

Section 1.3, 4th sentence: needs = need

I believe the next 2 are not correct:

Section 1.4, 1st sentence: time = space, or parallel = orthogonal
Section 1.5, 1st sentence: space = time

Is that useful? 

Would you prefer that I open an errata issue on 
https://github.com/PetrKryslUCSD/FinEALE 
https://github.com/PetrKryslUCSD/FinEALE and add these there?

Is your intention over time to make jFineale equivalent in functionality to 
Fineale? Is it intended as a successor to Faesor?

I’ve looked a bit into doing it all (or most of it) in Julia, e.g. in chapter 2 
generating the basis functions in a function (or even with a macro?) and 
possibly differentiate them.
But that is more useful while learning Galerkin I guess.

Just saw your email about parametric methods. Better if a more knowledgeable 
Julia person answers, but that is what it means I think.

Rob J. Goedman
goed...@mac.com


 On Jan 6, 2015, at 6:39 PM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Oh, in that case I am tickled pink.
 
 Please do let me know if you find any typos or mistakes.
 
 Best regards,
 
 Petr
 
 On Tuesday, January 6, 2015 3:36:34 PM UTC-8, Rob J Goedman wrote:
 Hi Petr,
 
 It’s your book, I used this name for the time being while working my way 
 through the first 6 or 7 chapters using Julia (and Mathematica occasionally, 
 don’t have Matlab).
 
 If you would prefer that, I can easily change the name, I have no intention 
 to ever register the package.
 
 Just trying to figure out a good way to replace my current (Fortran) FEM/R 
 program with a Julia equivalent.
 
 Regards,
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 
 
 
 On Jan 6, 2015, at 3:01 PM, Petr Krysl krysl...@gmail.com javascript: 
 wrote:
 
 Rob,
 
 Thanks. I did find some .mem files (see above). Not for my own source files 
 though.
 
 Petr
 
 PS: You have a fineale book? Interesting... I thought no one else had 
 claimed that name for a software project before...
 
 On Tuesday, January 6, 2015 2:46:26 PM UTC-8, Rob J Goedman wrote:
 Petr,
 
 Not sure if this helps you, but below sequence creates the .mem file.
 
 ProjDir is set in Ex07.jl and is the directory that contains the .mem file
 
 Regards,
 Rob J. Goedman
 goe...@mac.com 
 
 
 Robs-MacBook-Pro:~ rob$ clear; julia  --track-allocation=user
 
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org 
 http://docs.julialang.org/
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.4 (2014-12-26 10:42 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ 
 http://julialang.org/ release
 |__/   |  x86_64-apple-darwin13.4.0
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)
 
 julia cd(ProjDir)
 
 julia clear_malloc_data()
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)
 
 shell ls
 Ex07.jl  Ex07.svgEx08.svgEx09.svg
 Section2.3.svg
 Ex07.jl.mem  Ex08.jl Ex09.jl Section2.3.jl   Section2.4.nb
 
 On Jan 6, 2015, at 2:15 PM, Petr Krysl krysl...@gmail.com  wrote:
 
 I did this as suggested. The code  executed as shown below, preceded by the 
 command line.
 The process completes,  but there are no .mem files anywhere. Should I ask 
 for them specifically?
 
 # C:\Users\pkrysl\AppData\Local\Julia-0.4.0-dev\bin\julia.exe 
 --track-allocation=all memory_debugging.jl
 cd( C:/Users/pkrysl/Documents/GitHub/jfineale); include(JFinEALE.jl);
 include(examples/acoustics/sphere_scatterer_example.jl)
 Profile.clear_malloc_data()
 include(examples/acoustics/sphere_scatterer_example.jl)
 quit()
 
 
 
 On Tuesday, January 6, 2015 1:50:11 AM UTC-8, Milan Bouchet-Valat wrote:
 Le lundi 05 janvier 2015 à 20:48 -0800, Petr Krysl a écrit : 
  Hi guys, 
  
  How does one figure out where allocation  of memory occurs?   When I 
  use the @time  macro it tells me there's a lot of memory allocation 
  and deallocation going on.  Just looking at the code I'm at a loss: I 
  can't see the reasons for it there. 
  
  So, what are the tips and tricks for the curious?  How do I debug the 
  memory allocation issue?  I looked at the lint, the type check, and 
  the code_typed().  Perhaps I don't know where to look, but  these 
  didn't seem to be of much help. 
 See this: 
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 
 (Would probably be good to backport to the 0.3 manual...) 
 
 
 Regards 
 
 
 



Re: [julia-users] How do you change the default location for package installation in Windows?

2015-01-07 Thread email . rob . grant
I've just been through this too. The trouble is probably common to anyone 
using Julia in a workplace with Windows and no administrator rights (so 
that network drive is always popping up). I wrote a julia.bat file:
set JULIA_PKGDIR=D:\Julia.0.3.2
set HOME=D:\Julia.0.3.2
D:\Julia-0.3.2\bin\julia.exe

which in my case points to D:\Julia0.3.2 where I have locally installed. 
Then use that julia.bat file to start it each time.

On Tuesday, September 9, 2014 4:25:44 PM UTC+1, Freddy Svensson wrote:

 Hi, can you show exactly how to change prepare-julia-env.bat to have 
 JULIA_PKGDIR and other ENV variables preset when Julia loads, adding an 
 empty line and then set JULIA_PKGDIR=C:\julia_pkg does not work for me.

 Thanks, FS



 On Friday, 8 November 2013 00:00:28 UTC+1, Dave Ramsey wrote:

 Hi,  thanks for the reply.   That appeared to work.   For others that 
 will read this post you need to modify the file prepare-julia-env.bat and 
 add the line (for example)
 set JULIA_PKGDIR=c:\users\xxx\juliapackages

 or something similar.  Out of the box Julia v0.2 rc2 was creating the 
 .julia folder on one of my network drives  H:\.julia and there were some 
 permission problems associated with package installation.   Setting the 
 package directory to a local drive solved the problem.   Why Julia was 
 going to a network drive in the first place a mystery.   As my previous 
 post mentioned the v0.2prerelease version did not do this.  

 Thanks again for your help
 cheers
 Dave


 On Thursday, November 7, 2013 6:33:23 PM UTC+11, Elliot Saba wrote:

 Hello there!  You can set the JULIA_PKGDIR environment variable to a 
 different directory, and that will change where the packages are stored. 
  (It will not create a .julia directory inside of whatever JULIA_PKGDIR 
 points to, so for instance you set JULIA_PKGDIR equal to 
 C:\Users\MyUsername\JuliaPackages and it would store the packages 
 directory inside that folder).

 Could you post the error that it is encountering?  Permissions likely 
 should not be an issue on your local disk, as we take pains to choose 
 default locations you should have write access to.
 -E


 On Wed, Nov 6, 2013 at 4:20 PM, Dave Ramsey rams...@gmail.com wrote:

 Hi,  Newbie question here.   I am using Julia v0.2-rc2 on a 32 bit 
 Windows 7 machine.   I wish to change the default location of my installed 
 packages (i.e. the location of my .julia folder).  There doesn't appear to 
 be anything relevant in the package documentation or the list that I can 
 find?   Since upgrading from 0.2prerelease I can no longer install 
 packages 
 and was wondering if the new default package location is the cause (I'm 
 behind a work network).   

 thanks for you help
 Dave






Re: [julia-users] Tips and tricks for figuring out where allocation occurs

2015-01-06 Thread Rob J. Goedman
Petr,

Not sure if this helps you, but below sequence creates the .mem file.

ProjDir is set in Ex07.jl and is the directory that contains the .mem file

Regards,
Rob J. Goedman
goed...@mac.com


Robs-MacBook-Pro:~ rob$ clear; julia  --track-allocation=user

   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type help() for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.4 (2014-12-26 10:42 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/   |  x86_64-apple-darwin13.4.0

julia 
include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)

julia cd(ProjDir)

julia clear_malloc_data()

julia 
include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)

shell ls
Ex07.jl Ex07.svgEx08.svgEx09.svgSection2.3.svg
Ex07.jl.mem Ex08.jl Ex09.jl Section2.3.jl   Section2.4.nb

 On Jan 6, 2015, at 2:15 PM, Petr Krysl krysl.p...@gmail.com wrote:
 
 I did this as suggested. The code  executed as shown below, preceded by the 
 command line.
 The process completes,  but there are no .mem files anywhere. Should I ask 
 for them specifically?
 
 # C:\Users\pkrysl\AppData\Local\Julia-0.4.0-dev\bin\julia.exe 
 --track-allocation=all memory_debugging.jl
 cd( C:/Users/pkrysl/Documents/GitHub/jfineale); include(JFinEALE.jl);
 include(examples/acoustics/sphere_scatterer_example.jl)
 Profile.clear_malloc_data()
 include(examples/acoustics/sphere_scatterer_example.jl)
 quit()
 
 
 
 On Tuesday, January 6, 2015 1:50:11 AM UTC-8, Milan Bouchet-Valat wrote:
 Le lundi 05 janvier 2015 à 20:48 -0800, Petr Krysl a écrit : 
  Hi guys, 
  
  How does one figure out where allocation  of memory occurs?   When I 
  use the @time  macro it tells me there's a lot of memory allocation 
  and deallocation going on.  Just looking at the code I'm at a loss: I 
  can't see the reasons for it there. 
  
  So, what are the tips and tricks for the curious?  How do I debug the 
  memory allocation issue?  I looked at the lint, the type check, and 
  the code_typed().  Perhaps I don't know where to look, but  these 
  didn't seem to be of much help. 
 See this: 
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 
 (Would probably be good to backport to the 0.3 manual...) 
 
 
 Regards 
 



Re: [julia-users] Tips and tricks for figuring out where allocation occurs

2015-01-06 Thread Rob J. Goedman
Hi Petr,

It’s your book, I used this name for the time being while working my way 
through the first 6 or 7 chapters using Julia (and Mathematica occasionally, 
don’t have Matlab).

If you would prefer that, I can easily change the name, I have no intention to 
ever register the package.

Just trying to figure out a good way to replace my current (Fortran) FEM/R 
program with a Julia equivalent.

Regards,
Rob J. Goedman
goed...@mac.com





 On Jan 6, 2015, at 3:01 PM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Rob,
 
 Thanks. I did find some .mem files (see above). Not for my own source files 
 though.
 
 Petr
 
 PS: You have a fineale book? Interesting... I thought no one else had 
 claimed that name for a software project before...
 
 On Tuesday, January 6, 2015 2:46:26 PM UTC-8, Rob J Goedman wrote:
 Petr,
 
 Not sure if this helps you, but below sequence creates the .mem file.
 
 ProjDir is set in Ex07.jl and is the directory that contains the .mem file
 
 Regards,
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 Robs-MacBook-Pro:~ rob$ clear; julia  --track-allocation=user
 
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org 
 http://docs.julialang.org/
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.4 (2014-12-26 10:42 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ 
 http://julialang.org/ release
 |__/   |  x86_64-apple-darwin13.4.0
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)
 
 julia cd(ProjDir)
 
 julia clear_malloc_data()
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)
 
 shell ls
 Ex07.jl   Ex07.svgEx08.svgEx09.svg
 Section2.3.svg
 Ex07.jl.mem   Ex08.jl Ex09.jl Section2.3.jl   Section2.4.nb
 
 On Jan 6, 2015, at 2:15 PM, Petr Krysl krysl...@gmail.com javascript: 
 wrote:
 
 I did this as suggested. The code  executed as shown below, preceded by the 
 command line.
 The process completes,  but there are no .mem files anywhere. Should I ask 
 for them specifically?
 
 # C:\Users\pkrysl\AppData\Local\Julia-0.4.0-dev\bin\julia.exe 
 --track-allocation=all memory_debugging.jl
 cd( C:/Users/pkrysl/Documents/GitHub/jfineale); include(JFinEALE.jl);
 include(examples/acoustics/sphere_scatterer_example.jl)
 Profile.clear_malloc_data()
 include(examples/acoustics/sphere_scatterer_example.jl)
 quit()
 
 
 
 On Tuesday, January 6, 2015 1:50:11 AM UTC-8, Milan Bouchet-Valat wrote:
 Le lundi 05 janvier 2015 à 20:48 -0800, Petr Krysl a écrit : 
  Hi guys, 
  
  How does one figure out where allocation  of memory occurs?   When I 
  use the @time  macro it tells me there's a lot of memory allocation 
  and deallocation going on.  Just looking at the code I'm at a loss: I 
  can't see the reasons for it there. 
  
  So, what are the tips and tricks for the curious?  How do I debug the 
  memory allocation issue?  I looked at the lint, the type check, and 
  the code_typed().  Perhaps I don't know where to look, but  these 
  didn't seem to be of much help. 
 See this: 
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 http://docs.julialang.org/en/latest/manual/profile/#memory-allocation-analysis
  
 
 (Would probably be good to backport to the 0.3 manual...) 
 
 
 Regards 
 
 



Re: [julia-users] Tips and tricks for figuring out where allocation occurs

2015-01-06 Thread Rob J. Goedman
Petr,

I ran the Poisson_FE_example_model in REPL as shown below and find the .mem 
files in the src directory and in the top-level directory.

You were running a different example though.

Rob J. Goedman
goed...@mac.com

julia cd(Pkg.dir(homedir(), Projects/Julia/Rob/jfineale_for_trying_out))

julia 
include(/Users/rob/Projects/Julia/Rob/jfineale_for_trying_out/Poisson_FE_example_model.jl)
Heat conduction example described by Amuthan A. Ramabathiran
http://www.codeproject.com/Articles/579983/Finite-Element-programming-in-Julia:
Unit square, with known temperature distribution along the boundary, 
and uniform heat generation rate inside.  Mesh of regular TRIANGLES,
in a grid of N x N edges. 
This version uses the JFinEALE algorithm module.

Total time elapsed = 2.8418619632720947s

julia clear_malloc_data()

shell ls src
AssemblyModule.jl   HeatDiffusionAlgorithmModule.jl 
MeshQuadrilateralModule.jl
FEMMBaseModule.jl   IntegRuleModule.jl  
MeshSelectionModule.jl
FEMMHeatDiffusionModule.jl  JFFoundationModule.jl   
MeshTriangleModule.jl
FENodeSetModule.jl  MaterialHeatDiffusionModule.jl  
NodalFieldModule.jl
FESetModule.jl  MeshExportModule.jl 
PropertyHeatDiffusionModule.jl
ForceIntensityModule.jl MeshModificationModule.jl

shell ls
JFinEALE.jl Poisson_FE_example_model.jl src
Poisson_FE_Q4_example.jlREADME.md   tests
Poisson_FE_example.jl   annulus_Q4_example.jl

julia 
include(/Users/rob/Projects/Julia/Rob/jfineale_for_trying_out/Poisson_FE_example_model.jl)
Heat conduction example described by Amuthan A. Ramabathiran
http://www.codeproject.com/Articles/579983/Finite-Element-programming-in-Julia:
Unit square, with known temperature distribution along the boundary, 
and uniform heat generation rate inside.  Mesh of regular TRIANGLES,
in a grid of N x N edges. 
This version uses the JFinEALE algorithm module.

Total time elapsed = 0.017609119415283203s

julia CTRL-D



Robs-MacBook-Pro:jfineale_for_trying_out rob$ 

Robs-MacBook-Pro:~ rob$ pwd
/Users/rob
Robs-MacBook-Pro:~ rob$ cd Projects/Julia/Rob/jfineale_for_trying_out/
Robs-MacBook-Pro:jfineale_for_trying_out rob$ ls src
AssemblyModule.jl   ForceIntensityModule.jl 
MeshModificationModule.jl
AssemblyModule.jl.mem   ForceIntensityModule.jl.mem 
MeshQuadrilateralModule.jl
FEMMBaseModule.jl   HeatDiffusionAlgorithmModule.jl 
MeshSelectionModule.jl
FEMMBaseModule.jl.mem   HeatDiffusionAlgorithmModule.jl.mem 
MeshSelectionModule.jl.mem
FEMMHeatDiffusionModule.jl  IntegRuleModule.jl  
MeshTriangleModule.jl
FEMMHeatDiffusionModule.jl.mem  IntegRuleModule.jl.mem  
MeshTriangleModule.jl.mem
FENodeSetModule.jl  JFFoundationModule.jl   
NodalFieldModule.jl
FENodeSetModule.jl.mem  MaterialHeatDiffusionModule.jl  
NodalFieldModule.jl.mem
FESetModule.jl  MaterialHeatDiffusionModule.jl.mem  
PropertyHeatDiffusionModule.jl
FESetModule.jl.mem  MeshExportModule.jl 
PropertyHeatDiffusionModule.jl.mem
Robs-MacBook-Pro:jfineale_for_trying_out rob$ ls
JFinEALE.jl Poisson_FE_example_model.jl 
annulus_Q4_example.jl
Poisson_FE_Q4_example.jlPoisson_FE_example_model.jl.mem src
Poisson_FE_example.jl   README.md   tests
Robs-MacBook-Pro:jfineale_for_trying_out rob$ 




 On Jan 6, 2015, at 3:01 PM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Rob,
 
 Thanks. I did find some .mem files (see above). Not for my own source files 
 though.
 
 Petr
 
 PS: You have a fineale book? Interesting... I thought no one else had 
 claimed that name for a software project before...
 
 On Tuesday, January 6, 2015 2:46:26 PM UTC-8, Rob J Goedman wrote:
 Petr,
 
 Not sure if this helps you, but below sequence creates the .mem file.
 
 ProjDir is set in Ex07.jl and is the directory that contains the .mem file
 
 Regards,
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 Robs-MacBook-Pro:~ rob$ clear; julia  --track-allocation=user
 
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org 
 http://docs.julialang.org/
_ _   _| |_  __ _   |  Type help() for help.
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.4 (2014-12-26 10:42 UTC)
  _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ 
 http://julialang.org/ release
 |__/   |  x86_64-apple-darwin13.4.0
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl)
 
 julia cd(ProjDir)
 
 julia clear_malloc_data()
 
 julia 
 include(/Users/rob/.julia/v0.3/FinealeBook/Examples/Fineale/Ch02/Ex07.jl

Re: [julia-users] [ANN] Blink.jl – Web-based GUIs for Julia

2015-01-05 Thread Rob J. Goedman
Hi Mike,

Tried it a couple of times, but run into below error, in REPL.

Regards,
Rob J. Goedman
goed...@mac.com


julia Pkg.add(Blink)
INFO: Upgrading Blink: v0.1.2 = v0.1.3
INFO: Building Blink
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  100k  100  100k0 0   280k  0 --:--:-- --:--:-- --:--:--  280k
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100 35.8M  100 35.8M0 0  3217k  0  0:00:11  0:00:11 --:--:-- 4128k
=[ ERROR: Blink 
]=

x not defined
while loading /Users/rob/.julia/v0.3/Blink/deps/build.jl, in expression 
starting on line 13

==

=[ BUILD ERRORS 
]=

WARNING: Blink had build errors.

 - packages with build errors remain installed in /Users/rob/.julia/v0.3
 - build the package(s) and all dependencies with `Pkg.build(Blink)`
 - build a single package by running its `deps/build.jl` script

==
INFO: Package database updated

julia versioninfo()
Julia Version 0.3.4
Commit 3392026* (2014-12-26 10:42 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia 



 On Jan 5, 2015, at 6:29 AM, Mike Innes mike.j.in...@gmail.com wrote:
 
 Hello Julians,
 
 I have a shiny late Christmas present for you, complete with Julia-themed 
 wrapping.
 
 Blink.jl https://github.com/one-more-minute/Blink.jl wraps Chrome to enable 
 web-based GUIs. It's very primitive at the moment, but as a proof of concept 
 it includes BlinkDisplay, which will display graphics like Gadfly plots in a 
 convenient popup window (matplotlib style).
 
 Shashi has some great ideas for ways to control HTML from Julia, and 
 hopefully in future we'll have more nice things like matrix/data frame 
 explorers and other graphical tools.
 
 (Incidentally, I'd also appreciate any feedback on the display system I've 
 made to enable this, since I'm hoping to propose it to replace Base's current 
 one in future)
 
 Anyway, let me know if this is useful to you and/or there are any problems.
 
 – Mike



Re: [julia-users] warnings including module multiple times

2014-12-29 Thread Rob Speer
I surmise that there's a lot of include-using Julia code out there
because it's the first way that the manual section on Modules tells you
about putting code in multiple files.

In fact, from the manual, it's really unclear to me how one should
distribute code among different files without using include. The manual
mentions very briefly that Julia searches for modules, but it doesn't say
how. Is it assuming some intuition that comes from Matlab? I know my Python
intuition doesn't work at all here.

In practice, almost all the Julia code I've written has been one-off single
files, with occasional cases where I made a module by trial and error.

The manual section on modules is too much about what you *can* do, and not
enough about what you *should* do. I'm looking for some good documentation
about best practices for organizing real Julia code.

On Mon Dec 29 2014 at 3:33:00 PM Jason Merrill jwmerr...@gmail.com wrote:

 On Monday, December 29, 2014 2:44:55 PM UTC-5, Tobias Knopp wrote:

 The lack of module merging (see exportall, reexport,...) makes include
 more necessary than it might be.


 `exportall` is a much better idea than `importunexported` from my post
 above. I.e. the child module would call `exportall` and the parent module
 would call either `importall` or `reexport` depending on whether it wanted
 the child's symbols to be exported or not.

 It looks like there has already been a bunch of activity around this
 question on the issue tracker.

 1. The Reexport package already exists:
 https://github.com/simonster/Reexport.jl
 2. There is an issue discussing adding `reexport/reexported` and
 `exportall` keywords: https://github.com/JuliaLang/julia/issues/1986
 3. There is an open pull request to merge some of this functionality into
 Base: https://github.com/JuliaLang/julia/pull/5626



Re: [julia-users] Need help to understand method dispatch with modules

2014-12-11 Thread Rob J. Goedman
Sam,

Maybe below slightly expanded version of your example will help.

I think key is to import m1.f in module m2

Regards
Rob J. Goedman
goed...@mac.com


module m1

  export f

  f(x::ASCIIString) = println(ASCIIString:  * x)
  f{T:String}(x::T) = println(  $(typeof(x)):  * x)
  f(x) = println(  $(typeof(x)):  * string(x))
end


module m2

  import m1.f
  export f

  f(x::Int)= println(Int:  * string(x))
end

using m1
using m2

f(7)
f(Foo)
f(\u2200 x \u2203 y)
f(12.0)
f(2.0+3.0im)




 On Dec 11, 2014, at 2:18 PM, samoconnor samocon...@mac.com wrote:
 
 The example below has two modules that define methods of function f for 
 different parameter types.
 Both modules are imported.
 It seems like that using the second module causes the first one to 
 disappear.
 Is that the intended behaviour?
 
 
 !/Applications/Julia-0.3.0-rc4.app/Contents/Resources/julia/bin/julia
 
 module m1
 
 export f
 
 f(x::String) = println(String:  * x)
 f(x) = println( ?:  * string(x))
 end
 
 
 module m2
 
 export f
 
 f(x::Int)= println(   Int:  * string(x))
 end
 
 using m1
 using m2
 
 f(7)
 f(Foo)
 
 output:
 
Int: 7
 ERROR: `f` has no method matching f(::ASCIIString)
 
 



Re: [julia-users] Need help to understand method dispatch with modules

2014-12-11 Thread Rob J. Goedman
Yes, I am struggling with this aspect as well and recently posed a related 
question (’Struggling with generic functions’) although slightly differently 
formulated.

John’s answer included below.

In your example that might look like below update of the example I think. Like 
you (I think) I was looking to hide this from end users.

Rob J. Goedman
goed...@mac.com

module m1

  export f

  f(x::ASCIIString) = println(ASCIIString:  * x)
  f{T:String}(x::T) = println(  $(typeof(x)):  * x)
  f(x) = println(  $(typeof(x)):  * string(x))
end


module m2
  export f

  f(x::Int)= println(Int:  * string(x))
end

import m1.f
import m2.f

f(7)
f(Foo)
f(\u2200 x \u2203 y)
f(12.0)
f(2.0+3.0im)



On Dec 2, 2014, at 4:37 PM, John Myles White johnmyleswh...@gmail.com wrote:

There's no clean solution to this. In general, I'd argue that we should stop 
exporting so many names and encourage people to use qualified names much more 
often than we do right now.

But for important abstractions, we can put them into StatsBase, which all stats 
packages should be derived from.

-- John

On Dec 2, 2014, at 4:34 PM, Rob J. Goedman goed...@icloud.com wrote:

 I’ll try to give an example of my problem based on how I’ve seen it occur in 
 Stan.jl and Jags.jl.
 
 Both DataFrames.jl and Mamba.jl export describe(). Stan.jl relies on Mamba, 
 but neither Stan or Mamba need DataFrames. So DataFrames is not imported by 
 default.
 
 Recently someone used Stan and wanted to read in a .csv file and added 
 DataFrames to the using clause in the script, i.e.
 
 ```
 using Gadfly, Stan, Mamba, DataFrames
 ```
 
 After running a simulation, Mamba’s describe(::Mamba.Chains) could no longer 
 be found.
 
 I wonder if someone can point me in the right direction how best to solve 
 these kind of problems (for end users):
 
 1. One way around it is to always qualify describe(), e.g. Mamba.describe().
 2. Use isdefined(Main, :DataFrames) to upfront test for such a collision.
 3. Suggest to end users to import DataFrames and qualify e.g. 
 DataFrames.readtable().
 4. ?
 
 Thanks and regards,
 Rob J. Goedman
 goed...@mac.com mailto:goed...@mac.com



 On Dec 11, 2014, at 2:52 PM, samoconnor samocon...@mac.com wrote:
 
 Hi Rob,
 
 Ok, I see why that works, but it's a different example.
 
 Assume that m1 and m2 are libraries from different vendors, they know nothing 
 about each other, but they both export methods for f().
 
 It is surprising to me that importing two modules would cause one to 
 overwrite methods from the other with no warning or error. 
 
 On Friday, December 12, 2014 9:45:37 AM UTC+11, Rob J Goedman wrote:
 Sam,
 
 Maybe below slightly expanded version of your example will help.
 
 I think key is to import m1.f in module m2
 
 Regards
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 module m1
 
   export f
 
   f(x::ASCIIString) = println(ASCIIString:  * x)
   f{T:String}(x::T) = println(  $(typeof(x)):  * x)
   f(x) = println(  $(typeof(x)):  * string(x))
 end
 
 
 module m2
 
   import m1.f
   export f
 
   f(x::Int)= println(Int:  * string(x))
 end
 
 using m1
 using m2
 
 f(7)
 f(Foo)
 f(\u2200 x \u2203 y)
 f(12.0)
 f(2.0+3.0im)
 
 
 
 
 On Dec 11, 2014, at 2:18 PM, samoconnor samoc...@mac.com javascript: 
 wrote:
 
 The example below has two modules that define methods of function f for 
 different parameter types.
 Both modules are imported.
 It seems like that using the second module causes the first one to 
 disappear.
 Is that the intended behaviour?
 
 
 !/Applications/Julia-0.3.0-rc4.app/Contents/Resources/julia/bin/julia
 
 module m1
 
 export f
 
 f(x::String) = println(String:  * x)
 f(x) = println( ?:  * string(x))
 end
 
 
 module m2
 
 export f
 
 f(x::Int)= println(   Int:  * string(x))
 end
 
 using m1
 using m2
 
 f(7)
 f(Foo)
 
 output:
 
Int: 7
 ERROR: `f` has no method matching f(::ASCIIString)
 
 
 



Re: [julia-users] Re: Need help to understand method dispatch with modules

2014-12-11 Thread Rob J. Goedman
Did you restart the REPL?

Rob J. Goedman
goed...@mac.com





 On Dec 11, 2014, at 3:19 PM, samoconnor samocon...@mac.com wrote:
 
 If I change the example to use import instead of using...
 
 import m1: f
 import m2: f
 
 ... then I get:
 
 Warning: ignoring conflicting import of m2.f into Main
  ?: 7
 String: Foo
 
 Now Julia spots the problem, but resolves it the opposite way (i.e. the first 
 definition wins).



Re: [julia-users] Re: Need help to understand method dispatch with modules

2014-12-11 Thread Rob J. Goedman
Hmmm, now I think early on I saw you’re on Julia 0.3.0-RC4?

I tried it on 0.3.3 and 0.4 both with the same output. Could that explain the 
difference?

Rob J. Goedman
goed...@mac.com


julia include(/Users/rob/Projects/Julia/Rob/MetaProgramming/meta13.jl)
Int: 7
ASCIIString: Foo
  UTF8String: ∀ x ∃ y
  Float64: 12.0
  Complex{Float64}: 2.0 + 3.0im



 On Dec 11, 2014, at 3:53 PM, samoconnor samocon...@mac.com wrote:
 
 Hi Rob,
 
 I don't use the REPL. I have #!/[...]bin/julia on the first line of the 
 script and run ./script.jl from the command line.
 
 On Friday, December 12, 2014 10:27:45 AM UTC+11, Rob J Goedman wrote:
 Did you restart the REPL?
 
 Rob J. Goedman
 goe...@mac.com javascript:
 
 
 
 
 
 On Dec 11, 2014, at 3:19 PM, samoconnor samoc...@mac.com javascript: 
 wrote:
 
 If I change the example to use import instead of using...
 
 import m1: f
 import m2: f
 
 ... then I get:
 
 Warning: ignoring conflicting import of m2.f into Main
  ?: 7
 String: Foo
 
 Now Julia spots the problem, but resolves it the opposite way (i.e. the 
 first definition wins).
 



Re: [julia-users] Struggling with generic functions.

2014-12-07 Thread Rob J. Goedman
Hi John,

Thanks, yes, I should have studied StatsBase.jl in more depth. I have been more 
focused on Distributions.jl.

It seems from my point of view, as a user, there are 3 or 4 levels:

1. BayesianModels, an abstract type that can contain specializations for a 
Bugs/Jags model, a Mamba model , Stan model, MCMC/Lora model, etc.
2. Types to hold a posterior set of samples, like Mamba’s Chains
3. Use of StatsBase’s StatisticalModel and RegressionModel to extract and 
compare summary stats
4. Additional (Bayesian specific?) posterior tools, like Mamba’s diagnostic and 
plotting capabilities.

If we continue this discussion, maybe we should switch to JuliaStats or even 
tmpMCMC.jl?

Regards,
Rob J. Goedman
goed...@mac.com





 On Dec 5, 2014, at 5:04 PM, John Myles White johnmyleswh...@gmail.com wrote:
 
 StatsBase is meant to occupy that sort of role, but there's enough 
 disagreement that we haven't moved as far foward as I'd like. Have you read 
 through the StatsBase codebase?
 
 -- John
 
 On Dec 2, 2014, at 8:19 PM, Rob J. Goedman goed...@icloud.com wrote:
 
 Thanks John, I’d come to a similar conclusion about there not being a 
 straightforward solution. Nice to get that confirmed from your side. Cutting 
 back on exporting names whenever possible also makes a lot of sense. 
 
 Is StatsBase intended to play a similar role for types? Or is that more the 
 domain of PGM.jl?
 
 As an example,  Model is used in several packages (MCMC, Mamba). This makes 
 using both packages simultaneously harder as the end user needs to figure 
 out which names to qualify. Other packages have taken a different approach. 
 MixedModels uses MixedModel and LinearMixedModel, GLM uses LmMod and GlmMod, 
 Stan and Jags use Stanmodel and Jagsmodel (I could rename them to StanModel 
 and JagsModel). Is it reasonable to make Model an abstract type?
 
 Rob
 
 
 On Dec 2, 2014, at 4:37 PM, John Myles White johnmyleswh...@gmail.com 
 wrote:
 
 There's no clean solution to this. In general, I'd argue that we should 
 stop exporting so many names and encourage people to use qualified names 
 much more often than we do right now.
 
 But for important abstractions, we can put them into StatsBase, which all 
 stats packages should be derived from.
 
 -- John
 
 On Dec 2, 2014, at 4:34 PM, Rob J. Goedman goed...@icloud.com wrote:
 
 I’ll try to give an example of my problem based on how I’ve seen it occur 
 in Stan.jl and Jags.jl.
 
 Both DataFrames.jl and Mamba.jl export describe(). Stan.jl relies on 
 Mamba, but neither Stan or Mamba need DataFrames. So DataFrames is not 
 imported by default.
 
 Recently someone used Stan and wanted to read in a .csv file and added 
 DataFrames to the using clause in the script, i.e.
 
 ```
 using Gadfly, Stan, Mamba, DataFrames
 ```
 
 After running a simulation, Mamba’s describe(::Mamba.Chains) could no 
 longer be found.
 
 I wonder if someone can point me in the right direction how best to solve 
 these kind of problems (for end users):
 
 1. One way around it is to always qualify describe(), e.g. 
 Mamba.describe().
 2. Use isdefined(Main, :DataFrames) to upfront test for such a collision.
 3. Suggest to end users to import DataFrames and qualify e.g. 
 DataFrames.readtable().
 4. ?
 
 Thanks and regards,
 Rob J. Goedman
 goed...@mac.com
 
 
 
 
 
 
 
 



Re: [julia-users] Re: Article on finite element programming in Julia

2014-12-07 Thread Rob J. Goedman
Petr,

Are you referring to 
http://www.codeproject.com/Articles/579983/Finite-Element-programming-in-Julia ?

Or is this from another blog?

Rob J. Goedman
goed...@mac.com





 On Dec 7, 2014, at 10:21 AM, Petr Krysl krysl.p...@gmail.com wrote:
 
 Hello everybody,
 
 
 
 I found Amuthan 's blog a while back, but only about two weeks ago I found 
 the time to look seriously at Julia. What I found was very encouraging.
 
 
 
 For a variety of teaching and research purposes I maintain a Matlab FEA 
 toolkit called FinEALE. It is about 80,000 lines of code with all the 
 examples and tutorials. In the past week I rewrote the bits and pieces that 
 allow me to run a comparison with Amuthan 's code. Here are the results:
 
 
 
 For 1000 x 1000 grid (2 million triangles):
 
 
 
 Amuthan's code: 29 seconds
 
 
 
 J FinEALE: 86 seconds
 
 
 
 FinEALE: 810 seconds
 
 
 
 Mind you, we are not doing the same thing in these codes. FinEALE and J 
 FinEALE implement code to solve the heat conduction problem with arbitrarily 
 anisotropic materials. The calculation of the FE space is also not vectorized 
 as in Amuthan's code. The code is written to be legible and general: the same 
 code that calculates the matrices and vectors for a triangle mesh would also 
 work for quadrilaterals, linear and quadratic, both in the pure 2-D and the 
 axially symmetric set up, and tetrahedral and hexahedral elements in 3-D. 
 There is obviously a price to pay for all this generality.
 
 
 
 Concerning Amuthan 's comparison with the two compiled FEA codes: it really 
 depends how the problem is set up for those codes. I believe that Fenics has 
 a form compiler which can spit out an optimized code that in this case would 
 be entirely equivalent to the simplified calculation (isotropic material with 
 conductivity equal to 1.0), and linear triangles. I'm not sure about 
 freefem++, but since it has a domain-specific language, it can also 
 presumably optimize its operations. So in my opinion it is rather impressive 
 that Amuthan 's code in Julia can do so well.
 
 
 
 Petr
 



[julia-users] Struggling with generic functions.

2014-12-02 Thread Rob J. Goedman
I’ll try to give an example of my problem based on how I’ve seen it occur in 
Stan.jl and Jags.jl.

Both DataFrames.jl and Mamba.jl export describe(). Stan.jl relies on Mamba, but 
neither Stan or Mamba need DataFrames. So DataFrames is not imported by default.

Recently someone used Stan and wanted to read in a .csv file and added 
DataFrames to the using clause in the script, i.e.

```
using Gadfly, Stan, Mamba, DataFrames
```

After running a simulation, Mamba’s describe(::Mamba.Chains) could no longer be 
found.

I wonder if someone can point me in the right direction how best to solve these 
kind of problems (for end users):

1. One way around it is to always qualify describe(), e.g. Mamba.describe().
2. Use isdefined(Main, :DataFrames) to upfront test for such a collision.
3. Suggest to end users to import DataFrames and qualify e.g. 
DataFrames.readtable().
4. ?

Thanks and regards,
Rob J. Goedman
goed...@mac.com







Re: [julia-users] Struggling with generic functions.

2014-12-02 Thread Rob J. Goedman
Thanks John, I’d come to a similar conclusion about there not being a 
straightforward solution. Nice to get that confirmed from your side. Cutting 
back on exporting names whenever possible also makes a lot of sense. 

Is StatsBase intended to play a similar role for types? Or is that more the 
domain of PGM.jl?

As an example,  Model is used in several packages (MCMC, Mamba). This makes 
using both packages simultaneously harder as the end user needs to figure out 
which names to qualify. Other packages have taken a different approach. 
MixedModels uses MixedModel and LinearMixedModel, GLM uses LmMod and GlmMod, 
Stan and Jags use Stanmodel and Jagsmodel (I could rename them to StanModel and 
JagsModel). Is it reasonable to make Model an abstract type?

Rob


 On Dec 2, 2014, at 4:37 PM, John Myles White johnmyleswh...@gmail.com wrote:
 
 There's no clean solution to this. In general, I'd argue that we should stop 
 exporting so many names and encourage people to use qualified names much more 
 often than we do right now.
 
 But for important abstractions, we can put them into StatsBase, which all 
 stats packages should be derived from.
 
 -- John
 
 On Dec 2, 2014, at 4:34 PM, Rob J. Goedman goed...@icloud.com wrote:
 
 I’ll try to give an example of my problem based on how I’ve seen it occur in 
 Stan.jl and Jags.jl.
 
 Both DataFrames.jl and Mamba.jl export describe(). Stan.jl relies on Mamba, 
 but neither Stan or Mamba need DataFrames. So DataFrames is not imported by 
 default.
 
 Recently someone used Stan and wanted to read in a .csv file and added 
 DataFrames to the using clause in the script, i.e.
 
 ```
 using Gadfly, Stan, Mamba, DataFrames
 ```
 
 After running a simulation, Mamba’s describe(::Mamba.Chains) could no longer 
 be found.
 
 I wonder if someone can point me in the right direction how best to solve 
 these kind of problems (for end users):
 
 1. One way around it is to always qualify describe(), e.g. Mamba.describe().
 2. Use isdefined(Main, :DataFrames) to upfront test for such a collision.
 3. Suggest to end users to import DataFrames and qualify e.g. 
 DataFrames.readtable().
 4. ?
 
 Thanks and regards,
 Rob J. Goedman
 goed...@mac.com
 
 
 
 
 
 



Re: [julia-users] PyPlot error when using Stan

2014-11-22 Thread Rob J. Goedman
Chris,

That plot statement is aimed at Gadfly, not at PyPlot. I expect somehow PyPlot 
got imported.

If you’re in REPL, a restart should remove PyPlot.jl. You will need Gadfly, 
Stan  Mamba.

I haven’t used PyPlot a lot, but if a restart doesn’t fix the problem, just 
send me the full code.

Regards,
Rob J. Goedman
goed...@mac.com





 On Nov 22, 2014, at 6:22 AM, Christopher Fisher fishe...@miamioh.edu wrote:
 
 
 
 Hi-
 
 I am experiencing difficulty generating plots of MCMC chains with PyPlot. It 
 was working fine and just stopped working. I even reverted to the latest 
 working version of the code in Dropbox, but to no avail.  Here is the code 
 and the error message:
 
 p = plot(sim, [:trace, :mean, :density, :autocor], legend=true);
 
 
 
 PyError (PyObject_Call) type 'exceptions.ValueError'
 ValueError('x and y must have same first dimension',)
   File 
 /Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py,
  line 2987, in plot
 ret = ax.plot(*args, **kwargs)
   File 
 /Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py, 
 line 4137, in plot
 for line in self._get_lines(*args, **kwargs):
   File 
 /Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py, 
 line 317, in _grab_next_args
 for seg in self._plot_args(remaining, kwargs):
   File 
 /Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py, 
 line 295, in _plot_args
 x, y = self._xy_from_xy(x, y)
   File 
 /Users/chrisfisher/anaconda/lib/python2.7/site-packages/matplotlib/axes.py, 
 line 237, in _xy_from_xy
 raise ValueError(x and y must have same first dimension)
 
 while loading In[1], in expression starting on line 117
 
  in getindex at /Users/chrisfisher/.julia/PyCall/src/PyCall.jl:642
  in pysequence_query at 
 /Users/chrisfisher/.julia/PyCall/src/conversions.jl:743
  in pytype_query at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:759
  in convert at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:808
  in pycall at /Users/chrisfisher/.julia/PyCall/src/PyCall.jl:812
  in fn at /Users/chrisfisher/.julia/PyCall/src/conversions.jl:181
  in close_queued_figs at /Users/chrisfisher/.julia/PyPlot/src/PyPlot.jl:295
 
 sims is a 3 dimensional array with the following properties:
 
 Object of type Chains
 
 Iterations = 1:2000
 Thinning interval = 1
 Chains = 1,2,3,4
 Samples per chain = 2000
 
 2000x5x4 Array{Float64,3}:
 
 
 Any advice would be greatly appreciated. I can also attach the full code I 
 was using if that is helpful. Thanks in advance. 



[julia-users] Environment variables on Windows

2014-11-22 Thread Rob J. Goedman
Hi,

In Stan.jl and Jags.jl I look for environment variables.

On unix

```
ccall( (:getenv, libc), Ptr{Uint8}, (Ptr{Uint8},), bytestring(var))
```
works fine.

But not on Windows. I've seen

ENV(STAN_HOME)

mentioned (on http://rosettacode.org/wiki/Environment_variables#Julia , can't 
try that myself). Is that indeed how to get hold of environment variables?

Thanks,
Rob J. Goedman
goed...@mac.com







Re: [julia-users] Re: strange speed reduction when using external function in inner loop

2014-11-10 Thread Rob J Goedman
David,

Not sure this is correct or helps, but on my Yosemite 10.10.1 MacBook Pro I 
get below results.

Regards,
Rob

*julia **@time prof(true)*

 Count FileFunction Line

47 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 15

   165 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 19

   502 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 20

98 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 23

64 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 27

 1 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 29

 5 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 31

20 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   6

45 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   7

 1 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   9

   883 /Users/rob/Projects/Julia/Rob/innnercall.jl prof   14

 1 /Users/rob/Projects/Julia/Rob/innnercall.jl prof   45

   884 REPL.jl eval_user_input54

   502 array.jl+ 719

   165 random.jl   rand! 130

   884 task.jl anonymous  96

elapsed time: 1.51332406 seconds (488212276 bytes allocated, 53.00% gc time)


*julia **@time prof(true)*

 Count FileFunction Line

   156 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 19

   577 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 20

 1 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 21

   116 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 23

 2 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 26

53 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 27

 2 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 31

10 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   6

43 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   7

 3 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   9

   910 /Users/rob/Projects/Julia/Rob/innnercall.jl prof   14

   910 REPL.jl eval_user_input54

   577 array.jl+ 719

   156 random.jl   rand! 130

   910 task.jl anonymous  96

elapsed time: 1.488157718 seconds (488208960 bytes allocated, 50.96% gc 
time)


*julia **@time prof(true)*

 Count FileFunction Line

   174 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 19

   545 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 20

   115 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 23

 2 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 26

46 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 27

 1 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 29

 8 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 31

18 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   6

28 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   7

 3 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   9

   894 /Users/rob/Projects/Julia/Rob/innnercall.jl prof   14

   894 REPL.jl eval_user_input54

   545 array.jl+ 719

   174 random.jl   rand! 130

   894 task.jl anonymous  96

elapsed time: 1.448621207 seconds (488206436 bytes allocated, 49.75% gc 
time)


*julia **@time prof(true)*

 Count FileFunction Line

   165 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 19

   584 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 20

   117 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 23

51 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 27

 5 /Users/rob/Projects/Julia/Rob/innnercall.jl f! 31

16 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   6

34 /Users/rob/Projects/Julia/Rob/innnercall.jl mydot   7

   922 /Users/rob/Projects/Julia/Rob/innnercall.jl prof   14

   922 REPL.jl eval_user_input54

   584 array.jl+ 719

   165 random.jl   rand! 130

   922

Re: [julia-users] Southern California Julia users?

2014-10-31 Thread Rob J. Goedman
Can I throw SD (San Diego) in the mix?

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




 On Oct 31, 2014, at 5:58 AM, Amuthan A. Ramabathiran apar...@gmail.com 
 wrote:
 
 Hello: I live in Pasadena and I would be very happy to meet any julia users 
 near LA or SB. 
 
 Cheers,
 Amuthan
 
 On Thursday, October 30, 2014 6:57:40 PM UTC-7, Stefan Karpinski wrote:
 Split the difference? Oxnard Julia Users Group?
 
 On Thu, Oct 30, 2014 at 8:57 PM, Kevin Squire kevin@gmail.com 
 javascript: wrote:
 Hi Jim, 
 
 I'm in LA, which isn't quite Santa Barbara (I like SB better), but is within 
 striking distance.  I know that there are some users at UCLA (I was there 
 until earlier this year), but I'm not sure how active they are.  
 
 I'd also be happy to know of other users in the area, and would be willing to 
 help with an LA meetup (or an SB one on a weekend, with some advanced notice).
 
 Cheers!
Kevin
 
 On Thu, Oct 30, 2014 at 12:00 PM, cdm cdmcle...@gmail.com javascript: 
 wrote:
 Gauchos.
 
 i am not one ... but, mentally,
 this happens
 
 julia UCSB == GAUCHOS
 true
 
 
 later,
 
 cdm
 
 



Re: [julia-users] new REPL

2014-10-30 Thread Rob J. Goedman
Wow, works! No more compiling of 0.3.2 for me!!!

Thank you!

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



 On Aug 21, 2014, at 11:57 AM, Rob J. Goedman goed...@icloud.com wrote:
 
 Just wondering, I used to change the color of the help prompt by editing 
 REPL.jl and re-making julia.
 
 With the release of 0.3 I'm trying to stick to the official version.
 
 Is there a way to change these colors (:yellow for help conflicts with my 
 background color), maybe when starting Julia REPL?
 
 Thanks,
 Rob J. Goedman
 goed...@icloud.com mailto:goed...@icloud.com


 On Oct 30, 2014, at 10:55 AM, Steven G. Johnson stevenj@gmail.com wrote:
 
 
 
 On Thursday, October 30, 2014 1:46:11 PM UTC-4, Steven G. Johnson wrote:
 
 
 On Thursday, October 30, 2014 12:46:55 PM UTC-4, cdm wrote:
 for example, suppose the user was
 interested in changing the color
 schemes in the REPL so that
 the julia prompt was say
 yellow instead of the green from
 the three dots logo, and user
 entry was in the same purple
 from the three dots logo, etc.
 
 I don't think this is easily customizable right now; it doesn't seem to be 
 documented at all.
 
 Actually, there is a much easier way to customize it.  In your juliarc file 
 (~/.juliarc.jl), you can do e.g.:
 
 Base.active_repl.prompt_color = Base.text_colors[:cyan]
 
 to change the prompt color.  Similarly for the other fields of active_repl 
 (e.g. input_color, answer_color, shell_color, and help_color).   You also 
 need to set Base.active_repl.envcolors = false in order to override the 
 input_color and the answer_color.



Re: [julia-users] SubEthaEdit Julia syntax colouring mode

2014-10-11 Thread Rob J. Goedman
Thanks a lot Sheehan,

works great.

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




 On Oct 11, 2014, at 6:31 PM, Sheehan Olver dlfivefi...@gmail.com wrote:
 
 
 I've made a Julia syntax colouring mode for SubEthaEdit v3.5.4 
 (http://www.codingmonkeys.de/subethaedit/), which can be found as Julia.mode 
 in
 
 https://github.com/dlfivefifty/SO.jl
 
 



Re: [julia-users] Re: starting up julia from mac terminal (the way you would for python by typing python)

2014-09-02 Thread Rob Goedman
In my ~/.bash_profile I've defined a couple of aliases, like

alias julia4=Users/rob/Projects/Julia/julia/julia

and then type 'julia4' in the terminal to start Julia in that same terminal.

The first part, Users/rob/Projects/Julia/julia/, is the path to the directory 
where I make Julia0.4.

Similarly, the 'julia' alias points to the official v0.3 binary in 
/Applications/julia.app/.../bin/julia.

From memory, haven't got my laptop with me while traveling,
Regards,
Rob

Sent from Rob Goedman's iPad Mini


 On Sep 2, 2014, at 08:28, Christoph Ortner christophortn...@gmail.com wrote:
 
 The file `~/.bash_profile'  should contain something like this:
 
 export 
 PATH=~/Dropbox/Admin/scripts:/Applications/Julia-0.3.0.app/Contents/MacOS:/Users/ortner/anaconda/bin:$PATH
 
 However, it will always open a new terminal, rather than opening julia in 
 your current terminal. If anybody knows how to fix this, i would love to hear.
 
 Christoph
 
 On Tuesday, 2 September 2014 06:16:02 UTC+1, Anonymous wrote:
 I'm trying to figure out how to create an alias/shortcut whatever in the mac 
 terminal so that I can just type julia and julia will start up, just the 
 way python works when I type python.  It's something about a bash or 
 something.


Re: [julia-users] Re: Colors in REPL (OSX)

2014-08-24 Thread Rob Goedman
Thanks Sean, yes, for now I just use the Terminal preferences to help out.

Regards,
Rob

Sent from Rob Goedman's iPad Mini


 On Aug 24, 2014, at 06:58, Sean Garborg sean.garb...@gmail.com wrote:
 
 Not quite what you're asking for, but my approach has been to tweak the 
 terminal's color scheme (or select/download a new one) so that none of the 
 ANSI colors that command line programs reach for is a bad fit for my 
 background color.
 
 On Thursday, August 21, 2014 2:57:57 PM UTC-4, Rob J Goedman wrote:
 Just wondering, I used to change the color of the help prompt by editing 
 REPL.jl and re-making julia.
 
 With the release of 0.3 I'm trying to stick to the official version.
 
 Is there a way to change these colors (:yellow for help conflicts with my 
 background color), maybe when starting Julia REPL?
 
 Thanks,
 Rob J. Goedman
 goe...@icloud.com
 
 
 
 


[julia-users] Colors in REPL (OSX)

2014-08-21 Thread Rob J. Goedman
Just wondering, I used to change the color of the help prompt by editing 
REPL.jl and re-making julia.

With the release of 0.3 I'm trying to stick to the official version.

Is there a way to change these colors (:yellow for help conflicts with my 
background color), maybe when starting Julia REPL?

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






Re: [julia-users] Interest in a Julia - Stan interface?

2014-07-09 Thread Rob J. Goedman
Viral,

Didn't know about the 'shared grant proposal', certainly a tasty bit of info 
that should not get lost! 

John,

Both Ben (Goodrich) and Bob (Carpenter) of the Stan team pointed me to another 
Julia package:

https://github.com/brian-j-smith/Mamba.jl

Brian has contributed and maintained the boa package for R. Mamba looks very, 
very promising. With little red ears I'm studying the package.

It was also pointed out to me I'd forgotten to mention that Stan.jl requires 
Julia's v0.3-prerelease (as it uses the new DataFrames).

Finally, a significant part of the value of CmdStan/Stan is the Stan team  
community. Even with a mature C++ FFI, I would like to remain as 
'interchangeable' with both Stan and CmdStan as possible.

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



On Jul 7, 2014, at 4:54 PM, John Myles White johnmyleswh...@gmail.com wrote:

 This is really nice to have. I'll definitely be using it for some of my work.
 
 Now that Keno's been working on a C++ FFI, we might even be able to avoid 
 using CmdStan.
 
  -- John
 
 On Jul 7, 2014, at 4:40 PM, Viral Shah vi...@mayin.org wrote:
 
 It is great to have a Stan interface. I personally do not do MCMC stuff, but 
 there are mailing list threads discussing it. Julia and Stan also shared a 
 grant proposal at one point - so now this makes everything come a full 
 circle!
 
 -viral
 
 On Monday, July 7, 2014 3:28:17 PM UTC-7, Rob J Goedman wrote:
 A while ago above question came up on the Julia MCMC issue list ( 
 https://github.com/JuliaStats/MCMC.jl/issues/45 ). 
 
 I have no idea how much interest there is in such an interface, but I wanted 
 it at least for my own use, in addition to a similar interface to Jags 
 (which I'm working on), and of course Julia's own MCMC.jl is readily 
 available from METADATA.
 
 Stan.jl is an initial version of such an interface. It is assumed users have 
 some experience with Julia (REPL, iJulia, LightTable, etc.) and some 
 familiarity with Stan script and data files.
 
 To test it, three steps are needed:
 
 1. Install CmdStan as described in the Getting Started sections 2.2, 2.3 
 (and 2.4 to test it) of the CmdStan Interface User's Guide (Version 2.3.0, 
 Jun 20th, 2014).
 
 2. Set the environment variable STAN_HOME to point to the directory where 
 CmdStan was downloaded, e.g. on OSX I added to my .bash_profile:
 
export STAN_HOME=/Users/rob/Projects/Stan/cmdstan/
launchctl setenv STAN_HOME /Users/rob/Projects/Stan/cmdstan/
 
The launchctl line (on OSX) will typically only be needed for e.g. 
 LightTable and similar apps that do not inherit the full shell environment.
 
 3. Install Stan.jl:
 
Julia   'Pkg.add(Stan)' .
 
 To test the setup:
 
Julia  Pkg.test(Stan)
 
 The README.md file in the Stan.jl package contains a walk-through example, 
 somewhat similar to section 2.4 of the CmdStan Interface User's Guide.
 
 This is a first version of Stan.jl and no doubt will need tweaking (and 
 more!). I can't test on non-OSX platforms either, so I will need help to 
 iron out issues on those platforms.
 
 Dependent on the level of interest and feedback ( please file 
 requests/issues at https://github.com/goedman/Stan.jl/issues ), additional 
 features will be added as time permits or through 'Pull Requests'. 
 
 R and Python are in a very different stage of their life cycle compared to 
 Julia and Stan, so I have opted to keep the package lightweight to track 
 changes in both Julia and Stan. 
 
 The two primary features currently implemented are generating a Model() to 
 be used to automatically generate the command to execute a Stan script and 
 the use of make to minimize the number of compilations required.
 
 This Stan.jl version cannot activate sub-parts of Stan, like R can through 
 Rcpp. By default Stan.jl runs 4 chains when sampling.
 
 Regards,
 Rob J. Goedman
 goed...@icloud.com
 
 



Re: [julia-users] How do you do interactive development in Julia?

2014-07-08 Thread Rob J. Goedman
Hi Andrei,

I'll have a look at your pointers before further extending the TextMate bundle, 
particularly [2] looks promising.

Thanks, and regards,
Rob J. Goedman
goed...@icloud.com




On Jul 8, 2014, at 2:19 PM, Andrei Zh faithlessfri...@gmail.com wrote:

 Hi Rob, 
 
 Thanks for your answer. I use very similar approach with Emacs and ESS 
 mode[1]: I've bound command ess-eval-line-and-step to C-d (CONTROL / 
 COMMAND + D) to be able to send single line and ess-load-file to C-c C-c 
 (double CONTROL / COMMAND + C) to reload the entire file. I don't like idea 
 of reloading REPL, though. Not because it takes 5 commands (I can actually 
 automate most of these keystrokes), but because this way you lose your 
 current state. This may be really painful, especially when your computations 
 took half an hour or so (which is often the case in image processing, 
 recommendation engines, etc.)
 
 I think, though, that your ideas combined with clear() function ([2]) from 
 Tim's comment should work pretty well.  
 
 [1]: https://github.com/emacs-ess/ESS/wiki/Julia
 [2]: https://github.com/JuliaLang/julia/pull/7487



[julia-users] Problem with Pkg.publish()

2014-07-07 Thread Rob J. Goedman
After (locally) registering a package Stan ( 
https://github,com/goedman/Stan.jl.git ) I'm trying to publish it (untagged) to 
METADATA.jl, but continue to get below error message.

Github does accept my password (otherwise it gives another error message). 
Tagging the package does not seem to help either.

In pkg.github.jl it seems to be checking a dictionary, but I'm not sure what 
this error is indicating.

According to the latest manual this is suppose to generate a PR, but I think 
that section is out of date (I did use Pkg.publish about a month ago).

Any suggestions?

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



robs-15inch-2:~ rob$ clear;julia

   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type help() to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+4079 (2014-07-06 10:37 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 1d94ff9 (1 day old master)
|__/   |  x86_64-apple-darwin13.3.0

julia Pkg.update()
INFO: Updating METADATA...
INFO: Cloning cache of HyperDualNumbers from 
git://github.com/JuliaDiff/HyperDualNumbers.jl.git
INFO: Updating Stan...
INFO: Updating HyperDualNumbers...
INFO: Updating Jags...
INFO: Updating MCMCExampleRepository...
INFO: Computing changes...
INFO: No packages to install, update or remove

julia Pkg.publish()
INFO: Validating METADATA
INFO: No new package versions to publish
INFO: Submitting METADATA changes
INFO: Forking JuliaLang/METADATA.jl to goedman
Enter host password for user 'goedman':
ERROR: key not found: token
 in getindex at dict.jl:615
 in token at pkg/github.jl:53
 in req at pkg/github.jl:61
 in POST at pkg/github.jl:74
 in fork at pkg/github.jl:87
 in pull_request at pkg/entry.jl:290
 in publish at pkg/entry.jl:357
 in anonymous at pkg/dir.jl:28
 in cd at file.jl:20
 in cd at pkg/dir.jl:28
 in publish at pkg.jl:57

julia 




Re: [julia-users] Problem with Pkg.publish()

2014-07-07 Thread Rob J. Goedman
Thanks Tim,

That fixed it and clearly the steps have changed a bit over the last few weeks!

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




On Jul 7, 2014, at 8:17 AM, Tim Holy tim.h...@gmail.com wrote:

 Instructions on fixing it in
 https://github.com/JuliaLang/julia/issues/5998
 
 --Tim
 
 On Monday, July 07, 2014 08:14:30 AM Rob J. Goedman wrote:
 After (locally) registering a package Stan (
 https://github,com/goedman/Stan.jl.git ) I'm trying to publish it
 (untagged) to METADATA.jl, but continue to get below error message.
 
 Github does accept my password (otherwise it gives another error message).
 Tagging the package does not seem to help either.
 
 In pkg.github.jl it seems to be checking a dictionary, but I'm not sure what
 this error is indicating.
 
 According to the latest manual this is suppose to generate a PR, but I think
 that section is out of date (I did use Pkg.publish about a month ago).
 
 Any suggestions?
 
 Thanks,
 Rob J. Goedman
 goed...@icloud.com
 
 
 
 robs-15inch-2:~ rob$ clear;julia
 
   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type help() to list help topics
 
  | | | | | | |/ _` |  |
  | | |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+4079 (2014-07-06 10:37
  | | |UTC)
 
 _/ |\__'_|_|_|\__'_|  |  Commit 1d94ff9 (1 day old master)
 
 |__/   |  x86_64-apple-darwin13.3.0
 
 julia Pkg.update()
 INFO: Updating METADATA...
 INFO: Cloning cache of HyperDualNumbers from
 git://github.com/JuliaDiff/HyperDualNumbers.jl.git INFO: Updating Stan...
 INFO: Updating HyperDualNumbers...
 INFO: Updating Jags...
 INFO: Updating MCMCExampleRepository...
 INFO: Computing changes...
 INFO: No packages to install, update or remove
 
 julia Pkg.publish()
 INFO: Validating METADATA
 INFO: No new package versions to publish
 INFO: Submitting METADATA changes
 INFO: Forking JuliaLang/METADATA.jl to goedman
 Enter host password for user 'goedman':
 ERROR: key not found: token
 in getindex at dict.jl:615
 in token at pkg/github.jl:53
 in req at pkg/github.jl:61
 in POST at pkg/github.jl:74
 in fork at pkg/github.jl:87
 in pull_request at pkg/entry.jl:290
 in publish at pkg/entry.jl:357
 in anonymous at pkg/dir.jl:28
 in cd at file.jl:20
 in cd at pkg/dir.jl:28
 in publish at pkg.jl:57
 
 julia
 



Re: [julia-users] Problem with Pkg.publish()

2014-07-07 Thread Rob J. Goedman
The short answer: I re-created .julia. I've never accessed METADATA from 
another computer.

The longer answer:

My problem was that the first call to Pkg.publish() failed on a a previous 
package of mine, HyperDualNumbers. Somehow when that package became part of 
JuliaDiff, I think version numbers, sha1 keys and possibly 
JuliaLang/METADATA.jl's url link got out of sync. Pkg.add(HyperDualNumbers) 
should install the latest tagged version from JulliaDiff, but it fetches the 
old version from github.com/goedman/HyperDualNumbers.jl.git. On my system I 
have to clone it from github.com/JuliaDiff/HyperDualNumbers.jl.git to get the 
right version.

I struggled with this for 2 days. Didn't get it resolved and in the end decided 
to delete .julia. That's when the token problem started to appear.

But thanks to Tim's link, Stan.jl is now registered. Later today I'll send out 
an email to see if there is interest in such a package - it's slightly 
different from most packages as it requires an 'external' install of Stan - and 
to obtain some feedback and maybe some help to test on non-OSX platforms.

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




On Jul 7, 2014, at 9:54 AM, Tim Holy tim.h...@gmail.com wrote:

 I haven't been forced to do that in some time. If you still remember what you 
 did (or can find it in your history), would you mind writing it up either as 
 a 
 post to this list or added to the FAQ?
 
 --Tim
 
 On Monday, July 07, 2014 08:38:10 AM Rob J. Goedman wrote:
 Thanks Tim,
 
 That fixed it and clearly the steps have changed a bit over the last few
 weeks!
 
 Rob J. Goedman
 goed...@icloud.com
 
 On Jul 7, 2014, at 8:17 AM, Tim Holy tim.h...@gmail.com wrote:
 Instructions on fixing it in
 https://github.com/JuliaLang/julia/issues/5998
 
 --Tim
 
 On Monday, July 07, 2014 08:14:30 AM Rob J. Goedman wrote:
 After (locally) registering a package Stan (
 https://github,com/goedman/Stan.jl.git ) I'm trying to publish it
 (untagged) to METADATA.jl, but continue to get below error message.
 
 Github does accept my password (otherwise it gives another error
 message).
 Tagging the package does not seem to help either.
 
 In pkg.github.jl it seems to be checking a dictionary, but I'm not sure
 what this error is indicating.
 
 According to the latest manual this is suppose to generate a PR, but I
 think that section is out of date (I did use Pkg.publish about a month
 ago).
 
 Any suggestions?
 
 Thanks,
 Rob J. Goedman
 goed...@icloud.com
 
 
 
 robs-15inch-2:~ rob$ clear;julia
 
  _
 
  _   _ _(_)_ |  A fresh approach to technical computing
 
 (_) | (_) (_)|  Documentation: http://docs.julialang.org
 
  _ _   _| |_  __ _   |  Type help() to list help topics
 
 | | | | | | |/ _` |  |
 | | |
 | | |_| | | | (_| |  |  Version 0.3.0-prerelease+4079 (2014-07-06 10:37
 | | |UTC)
 
 _/ |\__'_|_|_|\__'_|  |  Commit 1d94ff9 (1 day old master)
 
 |__/   |  x86_64-apple-darwin13.3.0
 
 julia Pkg.update()
 INFO: Updating METADATA...
 INFO: Cloning cache of HyperDualNumbers from
 git://github.com/JuliaDiff/HyperDualNumbers.jl.git INFO: Updating Stan...
 INFO: Updating HyperDualNumbers...
 INFO: Updating Jags...
 INFO: Updating MCMCExampleRepository...
 INFO: Computing changes...
 INFO: No packages to install, update or remove
 
 julia Pkg.publish()
 INFO: Validating METADATA
 INFO: No new package versions to publish
 INFO: Submitting METADATA changes
 INFO: Forking JuliaLang/METADATA.jl to goedman
 Enter host password for user 'goedman':
 ERROR: key not found: token
 in getindex at dict.jl:615
 in token at pkg/github.jl:53
 in req at pkg/github.jl:61
 in POST at pkg/github.jl:74
 in fork at pkg/github.jl:87
 in pull_request at pkg/entry.jl:290
 in publish at pkg/entry.jl:357
 in anonymous at pkg/dir.jl:28
 in cd at file.jl:20
 in cd at pkg/dir.jl:28
 in publish at pkg.jl:57
 
 julia
 



[julia-users] Interest in a Julia - Stan interface?

2014-07-07 Thread Rob J. Goedman
A while ago above question came up on the Julia MCMC issue list ( 
https://github.com/JuliaStats/MCMC.jl/issues/45 ). 

I have no idea how much interest there is in such an interface, but I wanted it 
at least for my own use, in addition to a similar interface to Jags (which I'm 
working on), and of course Julia's own MCMC.jl is readily available from 
METADATA.

Stan.jl is an initial version of such an interface. It is assumed users have 
some experience with Julia (REPL, iJulia, LightTable, etc.) and some 
familiarity with Stan script and data files.

To test it, three steps are needed:

1. Install CmdStan as described in the Getting Started sections 2.2, 2.3 (and 
2.4 to test it) of the CmdStan Interface User's Guide (Version 2.3.0, Jun 20th, 
2014).

2. Set the environment variable STAN_HOME to point to the directory where 
CmdStan was downloaded, e.g. on OSX I added to my .bash_profile:

   export STAN_HOME=/Users/rob/Projects/Stan/cmdstan/
   launchctl setenv STAN_HOME /Users/rob/Projects/Stan/cmdstan/

   The launchctl line (on OSX) will typically only be needed for e.g. 
LightTable and similar apps that do not inherit the full shell environment.

3. Install Stan.jl:

   Julia   'Pkg.add(Stan)' .

To test the setup:

   Julia  Pkg.test(Stan)

The README.md file in the Stan.jl package contains a walk-through example, 
somewhat similar to section 2.4 of the CmdStan Interface User's Guide.

This is a first version of Stan.jl and no doubt will need tweaking (and more!). 
I can't test on non-OSX platforms either, so I will need help to iron out 
issues on those platforms.

Dependent on the level of interest and feedback ( please file requests/issues 
at https://github.com/goedman/Stan.jl/issues ), additional features will be 
added as time permits or through 'Pull Requests'. 

R and Python are in a very different stage of their life cycle compared to 
Julia and Stan, so I have opted to keep the package lightweight to track 
changes in both Julia and Stan. 

The two primary features currently implemented are generating a Model() to be 
used to automatically generate the command to execute a Stan script and the use 
of make to minimize the number of compilations required.

This Stan.jl version cannot activate sub-parts of Stan, like R can through 
Rcpp. By default Stan.jl runs 4 chains when sampling.

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



Re: [julia-users] How do you do interactive development in Julia?

2014-07-07 Thread Rob J. Goedman
Andrei,

Not sure if my way is better, but it seems to work ok for me. It is also biased 
towards OSX, although I know a similar approach has been used on other 
platforms (for R).

I have Julia's REPL window side by side to TextMate (or similar editor). I 
extended Julia's plugin for Textmate with 1 menu item, Command-R, in addition 
to Command-E. Command-E sends the current selection to Julia's REPL. This 
command has always been there I believe.

Command-R sends the entire file to the REPL by inserting an include(...), 
mainly because Command-E creates too much clutter in the history.

Usually I'm editing a file and then re-submit it to the REPL by typing 
Command-R in the editor. Occasionally though this is not sufficient and one or 
more modules have to be reloaded as you point out.

I kill the REPL (Ctrl-D), now back in the shell, UP-ARROW will bring up 
something like 'clear; julia', RETURN starts a new version of the REPL, 
UP-ARROW again recalls the last command executed in the REPL, RETURN to execute.

Thus it takes a minimum of 5 key-strokes, sometimes a few more because I tried 
out some stuff in the REPL. In those cases CTRL-r is quite handy.

Works in my workflow, YMMV.  I think key is that restarting the REPL and 
loading the needed modules is fairly quick. While developing packages I have 
found that the restart time is usually easy to control. 

The other gotcha is that I usually have multiple terminals open, and need to 
ensure the REPL is the last used terminal. Again, in my case I've gotten used 
to it. Or on OSX I could probably find the REPL terminal in AppleScript and 
activate it. But I haven't been bitten enough to put in that effort.

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




On Jul 7, 2014, at 2:39 PM, Andrei Zh faithlessfri...@gmail.com wrote:

 Thanks Tim, this is another interesting capability, and I'm definitely 
 looking forward to try it out in Julia REPL. It's a bit unusual though, so 
 I'm still looking for smoother way to work interactively. 
 
 I checked one of popular packages (namely, Distributions.jl) and I like their 
 approach. They put all the code for related functionality into somefile.jl 
 without any bothering about modules, play around with it (redefine without 
 any problem) and then, when they are done, just include this file into 
 SomeModule. This is not what I've got used to in Python, but it still works 
 quite well. 
 
 Anyway, further ideas for better interactive development are still welcome. 
 
 
 On Monday, July 7, 2014 12:27:09 PM UTC+3, Tim Holy wrote:
 On Sunday, July 06, 2014 02:52:45 PM Andrei Zh wrote: 
  Is there any way to update definitions that where imported into Main with 
  using statement? 
 
 Not that I know of. https://github.com/JuliaLang/julia/pull/7487 may be of 
 interest to you. 
 
 --Tim 
 



[julia-users] instance, type enumeration section in style guide

2014-05-24 Thread Rob J. Goedman
I've been trying to understand this particular section towards the end of the 
style guide, but seem to be going round and round in circles. A stripped down 
version is shown below.

The definition of Unit_e and Diag_e goes directly against what is suggested in 
that section (I think). I've seen another reference/suggestion, based on a 
baremodule in GTK.jl. But that did not lead to easier to read code. I've also 
seen other recent threads, but to me none easy to grasp. Maybe another example 
candidate?

Initially I set out to be able to use the form used to assign to l in below 
code fragment.

Hmc() is part of several larger composite types, but that just seems a repeated 
use of this structure. Any suggestions how to do this properly in Julia?

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



abstract Metrics
type Unit_e : Metrics
end
type Diag_e : Metrics
end

abstract Algorithm
type Hmc : Algorithm
  # ...
  metric::Metrics
end
type Fixed_param : Algorithm
end

Hmc() = Hmc(Diag_e())
Hmc(m::DataType) = ( m : Metrics ? Hmc(m()) : Error: $(m) not a subtype of 
Metrics )
Hmc(m::Symbol) = ( eval(m) : Metrics ? Hmc(eval(m)()) : Error: $(m) not a 
subtype of Metrics )

h = Hmc()
l = Hmc(Diag_e)
k = Hmc(:Unit_e)

@assert isa(h.metric, Metrics)
@assert isa(l.metric, Metrics)
@assert isa(k.metric, Metrics)
@assert typeof(k.metric) : Metrics



Re: [julia-users] Dataframe readtable change?

2014-05-22 Thread Rob J. Goedman
Thanks John.

I should have filed it as an issue on DataFrames.jl but initially thought it 
could deeper than that.

For now in Stan.jl I've included a 'small' cleanup step. Small for say 1000 
samples, a bit bigger for 10 samples.

Like you mentioned earlier, for years I've been using 
file-out-file-in-communication for Jags and other programs (Finite Elements) 
and was quite ok with it because sampling and FE iterations dominated the time 
to complete.

FOFI really only became an issue when I had to adjust values in between each of 
hundreds of runs (e.g. a stiffness matrix in FEM when dealing with buckling).

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




On May 22, 2014, at 10:16 AM, John Myles White johnmyleswh...@gmail.com wrote:

 I need to find time to look into this, but could someone try a git bisect and 
 see if some of the metaprogramming changes we made to readtable caused this? 
 It might be that this file would have never worked, but if it once did, it 
 would be good to point out the problematic code.
 
  — John
 
 On May 20, 2014, at 7:53 PM, Rob J. Goedman goed...@icloud.com wrote:
 
 Actually, another way to make it work is removing the blank line. Below 
 little program shows that readtable() accepts test_df1 and test_df2, but 
 fails on test_df3.
 
 Also, the fact that it started to happen today had nothing todo with Julia 
 or DataFrame updates. The file is created by Stan and the latest version 
 inserts that blank line.
 
 Of course I could clean up the file, but maybe this is an issue in 
 DataFrame's readtable function?
 
 Apologies for the earlier incomplete report.
 
 Rob J. Goedman
 goed...@icloud.com
 
 
 test_df.jltest_df1.csv
 test_df2.csv
 test_df3.csv
 
 
 julia 
 include(/Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl)
 4x10 DataFrame
 |---|---|-|-|
 | Col # | Name  | Eltype  | Missing |
 | 1 | lp__  | Float64 | 0   |
 | 2 | accept_stat__ | Float64 | 0   |
 | 3 | stepsize__| Float64 | 0   |
 | 4 | treedepth__   | Int64   | 0   |
 | 5 | n_leapfrog__  | Int64   | 0   |
 | 6 | n_divergent__ | Int64   | 0   |
 | 7 | beta_1| Float64 | 0   |
 | 8 | beta_2| Float64 | 0   |
 | 9 | beta_3| Float64 | 0   |
 | 10| sigma | Float64 | 0   |
 
 4x10 DataFrame
 |---|---|-|-|
 | Col # | Name  | Eltype  | Missing |
 | 1 | lp__  | Float64 | 0   |
 | 2 | accept_stat__ | Float64 | 0   |
 | 3 | stepsize__| Float64 | 0   |
 | 4 | treedepth__   | Int64   | 0   |
 | 5 | n_leapfrog__  | Int64   | 0   |
 | 6 | n_divergent__ | Int64   | 0   |
 | 7 | beta_1| Float64 | 0   |
 | 8 | beta_2| Float64 | 0   |
 | 9 | beta_3| Float64 | 0   |
 | 10| sigma | Float64 | 0   |
 
 ERROR: BoundsError()
  in findcorruption at 
 /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:663
  in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879
  in include at boot.jl:244
 while loading /Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl, 
 in expression starting on line 11
 
 julia 
 
 
 On May 20, 2014, at 6:36 PM, Rob J. Goedman goed...@icloud.com wrote:
 
 Hi,
 
 Using a freshly updated Version 0.3.0-prerelease+3251 (2014-05-20 23:18 
 UTC) of Julia I think I noticed a different behavior of readtable(), which 
 I hope is not intended.
 
 I have a small test file with data as shown below (and attached as a file 
 at the end of the email):
 
 lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu
 # Adaptation terminated
 
 -19.8871,0.975123,0.303529,4,15,0,4.25051
 -22.1208,0.971631,0.303529,3,7,0,8.55276
 -23.8336,0.857954,0.303529,4,15,0,4.41087
 
 If I remove the commented line (# Adaptation terminated), readtable() has 
 no problem, but if it's there readtable() seems to ignore the 
 'allowcomments=true'.
 
 I didn't update DataFrames as far as I am aware, but once or twice today I 
 did pull Julia's master from github.
 
 I wonder if someone could try this example. Thanks a lot.
 
 Rob J. Goedman
 goed...@icloud.com
 
 
 julia df = readtable(schools8_samples.csv, allowcomments=true)
 ERROR: Saw 4 rows, 5 columns and 22 fields
  * Line 1 has 3 columns
 
  in error at error.jl:21
  in findcorruption at 
 /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:680
  in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879
 
 julia df = readtable(schools8_samples.csv, allowcomments=true)
 3x7 DataFrame

Re: [julia-users] Dataframe readtable change? Back to the original question ...

2014-05-22 Thread Rob J. Goedman
In a feeble attempt to help out here I inserted below statement as line 228 in 
io.jl (where blank lines are supposed to be removed)

println(chr: , chr,  next chr: , nextchr)

and a few lines down (in the beginning of the while loop):

println(Blank line found!)

Using an input file without a blank line following the # ... line

l1,l2
# ...
1,2
4,5

works fine:

julia include(/Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl)
chr: 108 next chr: 49
chr: 49 next chr: 44
chr: 44 next chr: 108
chr: 108 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 35
chr: 49 next chr: 44
chr: 44 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 52
chr: 52 next chr: 44
chr: 44 next chr: 53
chr: 53 next chr: 10
chr: 10 next chr: 255
2x2 DataFrame
|---|||
| Row # | l1 | l2 |
| 1 | 1  | 2  |
| 2 | 4  | 5  |


After inserting the blank line:

l1,l2
# ...

1,2
4,5

a Blank line found message never shows up. It almost seems the read_peek_eof 
macro does not work correctly in this case.

The call to readtable() shows a line with a chr of 10 and a next chr of 35 (the 
already removed '#'?):

julia include(/Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl)
chr: 108 next chr: 49
chr: 49 next chr: 44
chr: 44 next chr: 108
chr: 108 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 35
chr: 10 next chr: 49
chr: 49 next chr: 44
chr: 44 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 52
chr: 52 next chr: 44
chr: 44 next chr: 53
chr: 53 next chr: 10
chr: 10 next chr: 255
ERROR: BoundsError()
 in findcorruption at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:670
 in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:732
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:813
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:880
 in include at boot.jl:244
while loading /Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl, in 
expression starting on line 9

If I now remove the line with # ... a blank line is seen:

julia include(/Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl)
chr: 108 next chr: 49
chr: 49 next chr: 44
chr: 44 next chr: 108
chr: 108 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 10
Blank line found!
chr: 49 next chr: 44
chr: 44 next chr: 50
chr: 50 next chr: 10
chr: 10 next chr: 52
chr: 52 next chr: 44
chr: 44 next chr: 53
chr: 53 next chr: 10
chr: 10 next chr: 255
2x2 DataFrame
|---|||
| Row # | l1 | l2 |
| 1 | 1  | 2  |
| 2 | 4  | 5  |


Rob J Goedman
goed...@icloud.com







[julia-users] Dataframe readtable change?

2014-05-20 Thread Rob J. Goedman
Hi,

Using a freshly updated Version 0.3.0-prerelease+3251 (2014-05-20 23:18 UTC) of 
Julia I think I noticed a different behavior of readtable(), which I hope is 
not intended.

I have a small test file with data as shown below (and attached as a file at 
the end of the email):

lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu
# Adaptation terminated

-19.8871,0.975123,0.303529,4,15,0,4.25051
-22.1208,0.971631,0.303529,3,7,0,8.55276
-23.8336,0.857954,0.303529,4,15,0,4.41087

If I remove the commented line (# Adaptation terminated), readtable() has no 
problem, but if it's there readtable() seems to ignore the 'allowcomments=true'.

I didn't update DataFrames as far as I am aware, but once or twice today I did 
pull Julia's master from github.

I wonder if someone could try this example. Thanks a lot.

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


julia df = readtable(schools8_samples.csv, allowcomments=true)
ERROR: Saw 4 rows, 5 columns and 22 fields
 * Line 1 has 3 columns

 in error at error.jl:21
 in findcorruption at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:680
 in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879

julia df = readtable(schools8_samples.csv, allowcomments=true)
3x7 DataFrame
|---|---|-|-|
| Col # | Name  | Eltype  | Missing |
| 1 | lp__  | Float64 | 0   |
| 2 | accept_stat__ | Float64 | 0   |
| 3 | stepsize__| Float64 | 0   |
| 4 | treedepth__   | Int64   | 0   |
| 5 | n_leapfrog__  | Int64   | 0   |
| 6 | n_divergent__ | Int64   | 0   |
| 7 | mu| Float64 | 0   |





lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu

-19.8871,0.975123,0.303529,4,15,0,4.25051
-22.1208,0.971631,0.303529,3,7,0,8.55276
-23.8336,0.857954,0.303529,4,15,0,4.41087


[julia-users] Re: Dataframe readtable change?

2014-05-20 Thread Rob J. Goedman
Actually, another way to make it work is removing the blank line. Below little 
program shows that readtable() accepts test_df1 and test_df2, but fails on 
test_df3.

Also, the fact that it started to happen today had nothing todo with Julia or 
DataFrame updates. The file is created by Stan and the latest version inserts 
that blank line.

Of course I could clean up the file, but maybe this is an issue in DataFrame's 
readtable function?

Apologies for the earlier incomplete report.

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





julia include(/Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl)
4x10 DataFrame
|---|---|-|-|
| Col # | Name  | Eltype  | Missing |
| 1 | lp__  | Float64 | 0   |
| 2 | accept_stat__ | Float64 | 0   |
| 3 | stepsize__| Float64 | 0   |
| 4 | treedepth__   | Int64   | 0   |
| 5 | n_leapfrog__  | Int64   | 0   |
| 6 | n_divergent__ | Int64   | 0   |
| 7 | beta_1| Float64 | 0   |
| 8 | beta_2| Float64 | 0   |
| 9 | beta_3| Float64 | 0   |
| 10| sigma | Float64 | 0   |

4x10 DataFrame
|---|---|-|-|
| Col # | Name  | Eltype  | Missing |
| 1 | lp__  | Float64 | 0   |
| 2 | accept_stat__ | Float64 | 0   |
| 3 | stepsize__| Float64 | 0   |
| 4 | treedepth__   | Int64   | 0   |
| 5 | n_leapfrog__  | Int64   | 0   |
| 6 | n_divergent__ | Int64   | 0   |
| 7 | beta_1| Float64 | 0   |
| 8 | beta_2| Float64 | 0   |
| 9 | beta_3| Float64 | 0   |
| 10| sigma | Float64 | 0   |

ERROR: BoundsError()
 in findcorruption at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:663
 in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
 in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879
 in include at boot.jl:244
while loading /Users/rob/.julia/v0.3/MCMCExampleRepository/test/test_df.jl, in 
expression starting on line 11

julia 


On May 20, 2014, at 6:36 PM, Rob J. Goedman goed...@icloud.com wrote:

 Hi,
 
 Using a freshly updated Version 0.3.0-prerelease+3251 (2014-05-20 23:18 UTC) 
 of Julia I think I noticed a different behavior of readtable(), which I hope 
 is not intended.
 
 I have a small test file with data as shown below (and attached as a file at 
 the end of the email):
 
 lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,mu
 # Adaptation terminated
 
 -19.8871,0.975123,0.303529,4,15,0,4.25051
 -22.1208,0.971631,0.303529,3,7,0,8.55276
 -23.8336,0.857954,0.303529,4,15,0,4.41087
 
 If I remove the commented line (# Adaptation terminated), readtable() has 
 no problem, but if it's there readtable() seems to ignore the 
 'allowcomments=true'.
 
 I didn't update DataFrames as far as I am aware, but once or twice today I 
 did pull Julia's master from github.
 
 I wonder if someone could try this example. Thanks a lot.
 
 Rob J. Goedman
 goed...@icloud.com
 
 
 julia df = readtable(schools8_samples.csv, allowcomments=true)
 ERROR: Saw 4 rows, 5 columns and 22 fields
  * Line 1 has 3 columns
 
  in error at error.jl:21
  in findcorruption at 
 /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:680
  in readtable! at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:731
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:812
  in readtable at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/io.jl:879
 
 julia df = readtable(schools8_samples.csv, allowcomments=true)
 3x7 DataFrame
 |---|---|-|-|
 | Col # | Name  | Eltype  | Missing |
 | 1 | lp__  | Float64 | 0   |
 | 2 | accept_stat__ | Float64 | 0   |
 | 3 | stepsize__| Float64 | 0   |
 | 4 | treedepth__   | Int64   | 0   |
 | 5 | n_leapfrog__  | Int64   | 0   |
 | 6 | n_divergent__ | Int64   | 0   |
 | 7 | mu| Float64 | 0   |
 
 
 schools8_samples.csv
 




test_df.jl
Description: Binary data
#   diagnostic_file = kid_diagnostics.csv
#   refresh = 100 (Default)
lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,beta.1,beta.2,beta.3,sigma

-1470.54,0.997637,0.101195,5,23,0,27.7017,5.97474,0.549931,18.102
-1470.59,0.882989,0.101195,5,31,0,29.0516,5.48293,0.531079,18.2098
-1471.24,0.908469,0.101195,5,27,0,20.6426,3.84652,0.632324,18.3995
-1470.92,0.976811,0.101195,5,31,0,20.7159,7.44759,0.598549,18.1661

#   diagnostic_file = kid_diagnostics.csv
#   refresh = 100 (Default)
lp__,accept_stat__,stepsize__,treedepth__,n_leapfrog__,n_divergent__,beta.1,beta.2,beta.3,sigma
# Adaptation terminated
# Step size = 0.101195
# Diagonal elements of inverse mass matrix:
# 37.6103, 5.11012, 0.00394028, 0.00110933

[julia-users] DataFrame (2 questions)

2014-05-17 Thread Rob J. Goedman
The DataFrames package still gives me a hard time (coming from R). Two issues I 
run into most often:

1. Below error message, not sure what I'm doing wrong here. Do I need to use 
join()? Or am I missing a use of comprehension? In ModelFrames the '.' is not 
allowed, so I would like to be able to say something like lm(Y ~ X, df). But 
maybe this is to R-ish?

2. Printing of a DataFrame. A small DataFrame ( 7 columns?) is printed in the 
REPL (like df below), but a larger DataFrame seems to give me the structure of 
the DataFrame. Can I influence that number of 7?

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

julia versioninfo()
Julia Version 0.3.0-prerelease+3191
Commit 03d91ba* (2014-05-16 15:41 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.2.0)
  CPU: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libm

julia X1
3x2 Array{Int64,2}:
 1  4
 2  5
 3  6

julia Y1
3-element Array{Int64,1}:
 1
 3
 5

julia DataFrame(X=X1[:, 1], Y=Y1)
3x2 DataFrame
|---|---|---|
| Row # | X | Y |
| 1 | 1 | 1 |
| 2 | 2 | 3 |
| 3 | 3 | 5 |

julia df = DataFrame(X=X1[:, 2], Y=Y1)
3x2 DataFrame
|---|---|---|
| Row # | X | Y |
| 1 | 4 | 1 |
| 2 | 5 | 3 |
| 3 | 6 | 5 |

julia DataFrame(X=X1[:, 1:2], Y=Y1)
ERROR: New columns must have the same length as old columns
 in insert_single_column! at 
/Users/rob/.julia/v0.3/DataFrames/src/dataframe/dataframe.jl:383
 in setindex! at 
/Users/rob/.julia/v0.3/DataFrames/src/dataframe/dataframe.jl:444
 in DataFrame at /Users/rob/.julia/v0.3/DataFrames/src/dataframe/dataframe.jl:63

julia X1[:, 1:2]
3x2 Array{Int64,2}:
 1  4
 2  5
 3  6



julia df
3x2 DataFrame
|---|---|---|
| Row # | X | Y |
| 1 | 4 | 1 |
| 2 | 5 | 3 |
| 3 | 6 | 5 |

julia samples_df
1000x16 DataFrame
|---|---|-|-|
| Col # | Name  | Eltype  | Missing |
| 1 | lp__  | Float64 | 0   |
| 2 | accept_stat__ | Float64 | 0   |
| 3 | stepsize__| Float64 | 0   |
| 4 | treedepth__   | Int64   | 0   |
| 5 | n_leapfrog__  | Int64   | 0   |
| 6 | n_divergent__ | Int64   | 0   |
| 7 | mu| Float64 | 0   |
| 8 | theta_1   | Float64 | 0   |
| 9 | theta_2   | Float64 | 0   |
| 10| theta_3   | Float64 | 0   |
| 11| theta_4   | Float64 | 0   |
| 12| theta_5   | Float64 | 0   |
| 13| theta_6   | Float64 | 0   |
| 14| theta_7   | Float64 | 0   |
| 15| theta_8   | Float64 | 0   |
| 16| tau   | Float64 | 0   |

julia samples_df[:, 7:12]
1000x6 DataFrame
|---|--|--|-|--|--|-|
| Row # | mu   | theta_1  | theta_2 | theta_3  | theta_4  | theta_5 |
| 1 | 10.4332  | 5.37291  | 19.7482 | 3.56708  | 7.27914  | 5.88818 |
| 2 | 8.22581  | 14.2675  | 12.141  | 8.32665  | 2.95288  | 5.34375 |
| 3 | 10.9068  | 7.43814  | 10.1394 | 7.34402  | 6.14595  | 6.53342 |
| 4 | 10.9068  | 7.43814  | 10.1394 | 7.34402  | 6.14595  | 6.53342 |
| 5 | 9.61714  | 8.90304  | 10.2919 | 8.40993  | 7.06141  | 6.35706 |
| 6 | 7.46585  | 12.2761  | 7.64693 | 4.87427  | 8.23898  | 6.50898 |
| 7 | 12.3858  | 6.32497  | 8.23373 | 12.6327  | 11.2788  | 5.70445 |
| 8 | 8.66217  | 10.2486  | 7.02425 | 15.3532  | 15.0876  | 5.2819  |
| 9 | 13.2488  | 21.4967  | 9.04809 | 3.62114  | -5.58207 | 6.72995 |
⋮
| 991   | 6.44634  | -7.45131 | 13.8173 | 0.726336 | 5.32585  | 7.74152 |
| 992   | -1.84407 | 5.74692  | 3.77242 | 7.83245  | 11.0352  | 2.81801 |
| 993   | 3.54546  | 7.49026  | 11.8291 | 5.5823   | 11.2318  | 5.04784 |
| 994   | 21.6616  | 23.7753  | 1.0125  | 8.47316  | 0.786987 | 7.47116 |
| 995   | 10.0226  | 12.4223  | 11.7201 | 16.0979  | 33.8617  | 2.83627 |
| 996   | 15.299   | 17.4176  | 13.2271 | 11.5311  | -2.48596 | 8.27366 |
| 997   | 16.3412  | 20.98| 15.723  | 2.40238  | 29.9986  | 8.09409 |
| 998   | 8.42056  | 7.86757  | 11.8463 | 13.2561  | 10.2436  | 7.41587 |
| 999   | 8.52441  | 10.568   | 16.061  | 11.2477  | 12.1242  | 9.03829 |
| 1000  | 11.2382  | 9.76319  | 12.3402 | 3.54328  | 10.975   | 5.75154 |

julia samples_df[:, 7:13]
1000x7 DataFrame
|---|-|-|-|
| Col # | Name| Eltype  | Missing |
| 1 | mu  | Float64 | 0   |
| 2 | theta_1 | Float64 | 0   |
| 3 | theta_2 | Float64 | 0   |
| 4 | theta_3 | Float64 | 0   |
| 5 | theta_4 | Float64 | 0   |
| 6 | theta_5 | Float64 | 0   |
| 7 | theta_6 | Float64 | 0   |




Re: [julia-users] DataFrame (2 questions)

2014-05-17 Thread Rob J. Goedman
Thanks John,

On May 17, 2014, at 11:57 AM, John Myles White johnmyleswh...@gmail.com wrote:

 In (1), you’re trying to put to insert multiple columns into a single column, 
 which means that you’re effectively inserting a column with 6 entries instead 
 of 3. The error message should probably be changed to note that the size 
 (rather than the length) is wrong. We could change the formula interface at 
 some point to allow “.” as an operator.

Clearly what I was trying to do was wrong and for readability it is probably 
better to be explicit with respect to column names in generating the df and 
model formula.

 Point (2) is intentional. There are a lot of options that control printing of 
 DataFrames and they need to be exposed better in the documentation. They’re 
 documented here for now: 
 https://github.com/JuliaStats/DataFrames.jl/blob/master/spec/show.md
 
 The printing decision doesn’t depend on the structure of the DataFrame. It 
 only depends on whether or not the DataFrame could be printed to the screen 
 without spillover.

Will study the specs. On my retina display it often times uses less than half 
of terminal window width. But show(..., true) and showall(...) give me exactly 
what I was looking for!

Thanks again, regards,
Rob J. Goedman
goed...@icloud.com




[julia-users] Error in Distributions/src/constants.jl, popped up in prerelease+3077, didn't see it in prerelease+3072

2014-05-10 Thread Rob J. Goedman
Just a heads up, I see below error since prerelease+3077. Not hard to fix 
temporarily by commenting out the 2 lines with the square root symbol.

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



   _
   _   _ _(_)_ |  A fresh approach to technical computing
  (_) | (_) (_)|  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type help() to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3079 (2014-05-10 20:58 UTC)
 _/ |\__'_|_|_|\__'_|  |  master/6977ffd* (fork: 593 commits, 36 days)
|__/   |  x86_64-apple-darwin13.2.0

julia include(/Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl)
ERROR: syntax: expected identifier after const
 in include at boot.jl:244 (repeats 2 times)
 in reload_path at loading.jl:152
 in _require at loading.jl:67
 in require at loading.jl:51
 in include at boot.jl:244
while loading /Users/rob/.julia/v0.3/Distributions/src/constants.jl, in 
expression starting on line 6
while loading /Users/rob/.julia/v0.3/Distributions/src/Distributions.jl, in 
expression starting on line 223
while loading /Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl, in expression 
starting on line 1

julia 



# Useful math constants for distributions

import Base.@math_const

@math_const twoπ   6.2831853071795864769 big(2.) * π
@math_const √2 1.4142135623730950488 sqrt(big(2.))
@math_const log2π  1.8378770664093454836 log(big(2.)*π)
@math_const √2π2.5066282746310005024 sqrt(big(2.)*π)
@math_const logtwo 0.6931471805599453094 log(big(2.))
@math_const loghalf -0.6931471805599453094 log(big(0.5))



Re: [julia-users] Re: Error in Distributions/src/constants.jl, popped up in prerelease+3077, didn't see it in prerelease+3072

2014-05-10 Thread Rob J. Goedman
Done, but it seems Keno is even faster ...

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




On May 10, 2014, at 3:01 PM, Iain Dunning iaindunn...@gmail.com wrote:

 Good be good to open an issue:
 https://github.com/JuliaStats/Distributions.jl/issues?state=open
 if you have a GitHub account.
 
 Did this just break today? It seemed to load last night: 
 http://iainnz.github.io/packages.julialang.org/?pkg=Distributionsver=0.3
 
 
 On Saturday, May 10, 2014 5:41:48 PM UTC-4, Rob J Goedman wrote:
 Just a heads up, I see below error since prerelease+3077. Not hard to fix 
 temporarily by commenting out the 2 lines with the square root symbol.
 
 Regards,
 Rob J. Goedman
 goe...@icloud.com
 
 
 
_
_   _ _(_)_ |  A fresh approach to technical computing
   (_) | (_) (_)|  Documentation: http://docs.julialang.org
_ _   _| |_  __ _   |  Type help() to list help topics
   | | | | | | |/ _` |  |
   | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3079 (2014-05-10 20:58 UTC)
  _/ |\__'_|_|_|\__'_|  |  master/6977ffd* (fork: 593 commits, 36 days)
 |__/   |  x86_64-apple-darwin13.2.0
 
 julia include(/Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl)
 ERROR: syntax: expected identifier after const
  in include at boot.jl:244 (repeats 2 times)
  in reload_path at loading.jl:152
  in _require at loading.jl:67
  in require at loading.jl:51
  in include at boot.jl:244
 while loading /Users/rob/.julia/v0.3/Distributions/src/constants.jl, in 
 expression starting on line 6
 while loading /Users/rob/.julia/v0.3/Distributions/src/Distributions.jl, in 
 expression starting on line 223
 while loading /Users/rob/.julia/v0.3/MCMC/test/test_ARS.jl, in expression 
 starting on line 1
 
 julia 
 
 
 
 # Useful math constants for distributions
 
 import Base.@math_const
 
 @math_const twoπ   6.2831853071795864769 big(2.) * π
 @math_const √2 1.4142135623730950488 sqrt(big(2.))
 @math_const log2π  1.8378770664093454836 log(big(2.)*π)
 @math_const √2π2.5066282746310005024 sqrt(big(2.)*π)
 @math_const logtwo 0.6931471805599453094 log(big(2.))
 @math_const loghalf -0.6931471805599453094 log(big(0.5))
 



Re: [julia-users] Re: Unfortunately, comprehension is loosing type information

2014-05-07 Thread Rob J. Goedman
Hans,

Not adding anything to the discussion, but I just wanted to express that I find 
your questions and the answers we're getting extremely useful!
From every question + answers I learn something valuable.

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


On May 7, 2014, at 7:55 AM, Hans W Borchers hwborch...@gmail.com wrote:

 Okay. I think I did not correctly understand the const declaration used in 
 the manual.
 At the moment, and for my purposes, the map() function is the shorter 
 alternative.



[julia-users] Re: Conversion of output file diagnostic_file values (theta in below bernoulli example)

2014-05-05 Thread Rob J. Goedman
My apologies for this posting. Clearly the wrong alias! Now on its way to 
stan-users.

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



On May 4, 2014, at 1:05 PM, Robert J Goedman goed...@icloud.com wrote:

 Hi,
 
 I'm trying to figure out how to convert, in the basic_estimators bernoulli 
 example, theta (and the gradient) in the bernoulli_samples.csv and 
 bernoulli_diagnostics.csv files  as produced by:
 
 run(`./bernoulli sample random seed=1 data file=bernoulli.data.R output 
 file=bernoulli_samples.csv diagnostic_file=bernoulli_diagnostics.csv`).
 
 Thanks a lot,
 Rob J. Goedman
 goed...@icloud.com



Re: [julia-users] Bug or feature? How does = decide whether to do a copy or deepcopy?

2014-01-27 Thread Rob Speer
On Saturday, 25 January 2014 03:49:11 UTC-5, Ivar Nesje wrote:

 It is nice that you raise this issue. I think most of the others working 
 with Julia has experience from C or Python which also have the same 
 semantics. I'll make an attempt to sum up how things work in this case.


Julia doesn't have the same semantics as Python here, if that's what you're 
saying. In Python, += is an operation that types can implement separately 
from +, and is usually implemented in-place. 

Here's a NumPy example, because NumPy arrays are closest to Julia arrays, 
and += on plain old lists is Julia's append! instead:

 a = np.array([1, 2, 3])
 b = a

 a += 1

 b 

array([2, 3, 4])




Re: [julia-users] Re: julia unable to install on Ubuntu 13.10

2014-01-27 Thread Rob Speer
I use Julia on Ubuntu 13.10. Using ppa:staticfloat/juliareleases, as
described at http://julialang.org/downloads/, got me running just fine.


On Mon, Jan 27, 2014 at 10:41 PM, Rajn rjngrj2...@gmail.com wrote:

 Hi,
 I am having good time coding in Julia on my Windows at work. However, at
 home Linux is not still able to work with Julia.
 Hope it gets resolved at some point - otherwise I am thinking of a fresh
 install of Ubuntu 13.10 (not Xubuntu which is my current system). Are there
 folks who are running

 1. Julia on Ubuntu 13.10
 2. On Ubuntu with R installed?

 Please let me know if anyone has succeeded in installing Julia and also
 any advice on installation.
 Thank you.