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

2016-08-19 Thread Ralph Smith
The make.jl in Documenter/docs has the appropriate incantation.  Try this:

cd(joinpath(Pkg.dir(),"Documenter","docs"))
include("make.jl")

Then point your browser at XXX/Documenter/docs/build/html/index.html (where 
XXX designates your Pkg directory).

The developers seem to have dumped their mkdocs.yml so more work is needed 
to build a local copy of the polished docs.


On Friday, August 19, 2016 at 7:18:37 PM UTC-4, Christoph Ortner wrote:
>
> I want to give this a try but I can't find the example of HTML output, 
> which is supposed to be in test/html? 
>
> Thank you. 
>
>
>
> On Friday, 19 August 2016 22:07:55 UTC+1, Morten Piibeleht wrote:
>>
>> We are happy to announce version 0.3 of Documenter.jl 
>>  – a package for building 
>> the documentation of other Julia packages. Documentation is available at 
>> https://juliadocs.github.io/Documenter.jl/stable/.
>>
>>
>> Compared to the 0.2-branch there should be no visible changes to the user 
>> other than some resolved bugs. However, there have been some changes to the 
>> code base so please don’t hesitate to report any issues on the issue 
>> tracker .
>>
>>
>> The largest bit of news is that experimental *native HTML output* is now 
>> available as an option [*]. This means that instead of relying on MkDocs, 
>> Documenter.jl is able to produce its own complete static HTML site. The 
>> generated site’s style borrows heavily from the Julia manual and is already 
>> being used to build Documenter’s own documentation.
>>
>>
>> We would like to encourage everyone to give the HTML output a try 
>> (including just browsing) and send feedback so that we could iron out any 
>> remaining issues and improve user experience. See the documentation 
>> 
>>  for 
>> more information on how to enable HTML output on your own repository. There 
>> is the meta-issue #212 
>>  where we are 
>> tracking future improvements of this feature.
>>
>>
>> Finally, a big thanks to everyone who have been testing the package and 
>> submitting issues so far. Keep ‘em coming!
>>
>>
>> Cheers, 
>> Morten & Mike
>>
>>
>> [*] Developed as part of Morten’s Google Summer of Code project 
>> 
>> .
>>
>

[julia-users] Re: Linking Julia to different Anaconda virtual environments

2016-08-19 Thread Scott T
Hi John,

Because PyCall links directly to the Python libraries, you have to rebuild 
it every time you want to use a different version of Python. That includes 
switching virtual environments. You do this by setting the environment 
variable PYTHON (ENV["PYTHON"] from within Julia) to the location of the 
python executable and then running Pkg.build("PyCall"). The process is 
pretty quick so you could probably write a function in your .juliarc.jl 
file to let you switch between environments. I haven't done this yet 
because I just use the root conda environment, but it's what I would do if 
I needed to switch between several.

Cheers,
Scott

On Saturday, 20 August 2016 00:53:47 UTC+1, John Hammonds wrote:
>
> I have been using Anaconda Python with their virtual environments.  I am 
> starting to look into Julia and would like to be able to use PyCall to call 
> in python code.  I am using the virtual environments to manage different 
> projects/versions.  My Base Python is fairly minimal, I install most 
> packages in the virtenvs,  When I use PyCall and @pyimport, I seem to only 
> find packages in my base anaconda installation.  Is there a clean way to 
> switch between different virtual environments when I am using Julia?
>
>

[julia-users] Re: [ANN] LombScargle.jl: compute periodogram for unevenly sampled data

2016-08-19 Thread Mosè Giordano
Hi all,

an update about the situation of LombScargle.jl


2016-07-18 10:15 GMT+02:00 Mosè Giordano:

> In the future I may implement another much-faster Lomb-Scargle algorithm
> by Press & Rybicki (1989, ApJ, 338, 277), which however requires the data
> to be equally sampled (but in this case also the FFT can be used).
>

I managed to implement this method, so now users can choose between three
different implementations of the Lomb-Scargle periodogram:

   - the original algorithm, that doesn't deal with uncertainties in the
   data nor for a non-null mean of the signal (based on Townsend, 2010, ApJS,
   191, 247)
   - the so called generalised Lomb-Scargle algorithm, that takes into
   account uncertainties and a non-zero mean of the signal (based on
   Zechmeister, Kürster, 2009, A, 496, 577)
   - an approximation of the generalised Lomb-Scargle algorithm, made very
   fast (and with lower computational complexity than the true Lomb-Scargle
   algorithm) by some tricks suggested by Press & Rybicki, 1989, ApJ, 338,
   277.  The only downside is that this method requires the data to be equally
   sampled.  In the package, this is controlled by the type of the time
   vector: if it's a Range, this fast method is used (but can be opted-out
   with a keyword)

Other notable features introduced since the first release:

   - you can choose between 7 different normalizations
   - functions to compute the false-alarm probability
   - a function, findmaxpower, to quickly find the maximum power value of
   the periodogram
   - in findmaxfreq it is now possible to restrict the search for the
   frequency with the highest power to a specific range, instead of using the
   whole periodogram
   - a new function, LombScargle.model, to get the Lomb-Scargle model that
   best fits your data at a given frequency (without performing an actual
   periodogram, because this is done just for one frequency)

The complete manual, with some examples complemented with pictures, is
available at http://lombscarglejl.readthedocs.io/ (here
 the
PDF version).

The latest version of LombScargle.jl
 is v0.1.1, be sure to update
your package list with Pkg.update() before installing it, if you want to
try it out.

Cheers,
Mosè


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
I probably dont want to change the input file names more than once although 
I would be updating its data daily - and I think I know how to do that 
(change the name of the file itself as well as in the code).  The output 
file though - I might want to change more regularly,

Also - when I ran it - a few things were deprecated - does that just mean 
outdated?  Does updating with the new term change the file - or just the 
underlying solving?  Not sure if you can know that or not.

I was just looking for a way yo shortcut that long as heck include string I 
have now.  Cause I will run that daily and lord knows I mistyped it like 10 
times.

On Friday, August 19, 2016 at 7:28:40 PM UTC-4, Jeffrey Sarnoff wrote:
>
> You are most welcome.
>
> What do you want to change, if anything, from day to day, for example: 
>  one or both input file names, the output file name, reuse some/all file 
> names while changing the data inside?
>
>
> On Friday, August 19, 2016 at 7:01:54 PM UTC-4, Pigskin Ablanket wrote:
>>
>> IT Works   Thank you so much.  Found my error in the code.
>>
>> I am curious if there is a way to shortcut the command as I would want to 
>> run this daily to test and it seems like a lot to type correctly.
>>
>> Thanks for the time today
>>
>> On Friday, August 19, 2016 at 6:26:34 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> Look correct?
>>>
>>> I will answer that after you try running it.
>>>
>>>
>>> On Friday, August 19, 2016 at 6:19:33 PM UTC-4, Pigskin Ablanket wrote:

 Thanks for providing me so much help today - much appreciated.

 I copied the properties right here for folder Julia  which is where the 
 code file is located:
 C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL

 Interesting that it didnt bring it over as My_Documents.

 Based on this, I would believe the command needs to be:
 include("C:\\Users\\JHerron\\Documents\\Documents\\
 Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")

 Look correct?

 I made the changes to the paths in the file as well

 "C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"

 On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>
> two things,
> you wrote:
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
> and I wonder, do you mean   ! 
>!
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
> or
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> when you go to the directory where you see the file: 
> code_for_Github.jl and you put the mouse on that file and right-click to 
> see the popup menu and select the last thing "properties" there is 
> something that says Location,if does it not exactly match:
> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
> then you have miscopied it, if it looks like this 
> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
> then you should be using (and fix the paths in the code_for_Github.jl 
> file, too)
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> ---
>
>
> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sadly, I get the following response from 
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>
>> *ERROR: could not copen file 
>> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
>> *in include at boot.jl:261*
>> *in include_from_node1 at loading.jl:320*
>>
>> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> the "i" in include should be lower case
>>>
>>> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket <
>>> pigskin...@gmail.com> wrote:
>>>
 I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
 Personal\\DFS/NHL\\Julia/code_for_Github.jl")
 (I hope that was what you meant to do).

 I got: *ERROR: UndefVarError: Include not defined*

 On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson 
 wrote:

>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and 
>> got *ERROR: syntax: invalid escape sequence*
>>
>
> 

[julia-users] Linking Julia to different Anaconda virtual environments

2016-08-19 Thread John Hammonds
I have been using Anaconda Python with their virtual environments.  I am 
starting to look into Julia and would like to be able to use PyCall to call 
in python code.  I am using the virtual environments to manage different 
projects/versions.  My Base Python is fairly minimal, I install most 
packages in the virtenvs,  When I use PyCall and @pyimport, I seem to only 
find packages in my base anaconda installation.  Is there a clean way to 
switch between different virtual environments when I am using Julia?



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

2016-08-19 Thread Stefan Karpinski
On Fri, Aug 19, 2016 at 5:07 PM, Morten Piibeleht <
morten.piibel...@gmail.com> wrote:

> [*] Developed as part of Morten’s Google Summer of Code project
> 
> .
>
Since I think that page is private, here's the description of the project:


> *Documentation tools for Julia*



A big part of Julia is its package ecosystem and their documentation should
> be as thorough as possible and documenting packages should be made as easy
> as possible for package developers.
>


The primary goal of the project is to extend Documenter.jl so that it could
> also generate a detailed reference manual of functions, types, submodules
> etc. with full signatures and a search capability. The idea is to
> complement the docstring, since sometimes you need this detailed
> information and it should be easily accessible (reading the code or using
> introspection methods is cumbersome).
>


A secondary goal is to lay the groundwork for a comments/notes system,
> where the community could more easily contribute to the docs (of both Base
> and packages).


It's a great project and the progress you guys have made is lovely to see :)


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
You are most welcome.

What do you want to change, if anything, from day to day, for example:  one 
or both input file names, the output file name, reuse some/all file names 
while changing the data inside?


On Friday, August 19, 2016 at 7:01:54 PM UTC-4, Pigskin Ablanket wrote:
>
> IT Works   Thank you so much.  Found my error in the code.
>
> I am curious if there is a way to shortcut the command as I would want to 
> run this daily to test and it seems like a lot to type correctly.
>
> Thanks for the time today
>
> On Friday, August 19, 2016 at 6:26:34 PM UTC-4, Jeffrey Sarnoff wrote:
>>
>> Look correct?
>>
>> I will answer that after you try running it.
>>
>>
>> On Friday, August 19, 2016 at 6:19:33 PM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Thanks for providing me so much help today - much appreciated.
>>>
>>> I copied the properties right here for folder Julia  which is where the 
>>> code file is located:
>>> C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL
>>>
>>> Interesting that it didnt bring it over as My_Documents.
>>>
>>> Based on this, I would believe the command needs to be:
>>> include("C:\\Users\\JHerron\\Documents\\Documents\\
>>> Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>>>
>>> Look correct?
>>>
>>> I made the changes to the paths in the file as well
>>>
>>> "C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"
>>>
>>> On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:

 two things,
 you wrote:

  
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
 and I wonder, do you mean   !   
  !

  
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
 or

  
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")

 when you go to the directory where you see the file: code_for_Github.jl 
 and you put the mouse on that file and right-click to see the popup menu 
 and select the last thing "properties" there is something that says 
 Location,if does it not exactly match:
 C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
 then you have miscopied it, if it looks like this 
 C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
 then you should be using (and fix the paths in the code_for_Github.jl 
 file, too)

  
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")

 ---


 On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>
> Sadly, I get the following response from 
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>
> *ERROR: could not copen file 
> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
> *in include at boot.jl:261*
> *in include_from_node1 at loading.jl:320*
>
> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>>
>> the "i" in include should be lower case
>>
>> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket <
>> pigskin...@gmail.com> wrote:
>>
>>> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
>>> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>> (I hope that was what you meant to do).
>>>
>>> I got: *ERROR: UndefVarError: Include not defined*
>>>
>>> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson 
>>> wrote:
>>>


 On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket 
 wrote:
>
> Sorry if Im not following - I tried:
>
> Include("C:\Users\JHerron\My_Documents\My_Documents/
> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and 
> got *ERROR: syntax: invalid escape sequence*
>

 Backslashes have to be escsped in strings, like in many computer 
 languages: change \ to \\ in the string.

 However, usually it is better to just run Julia from within the 
 path that you want rather than having to type absolute paths all of 
 the 
 time in the REPL.

 (In the long run, you usually do large-scale code development in a 
 module in the standard module search path, so you can just type "using 
 Foo".)

 (If you call include("foo.jl") from another file bar.jl, the path 
 of foo.jl is automatically relative to the path of bar.jl, so again 
 you 
 neither need nor want absolute paths.)

 For interactive code development where I need more than a few lines 
 of code, I usually use a 

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

2016-08-19 Thread Christoph Ortner
I want to give this a try but I can't find the example of HTML output, 
which is supposed to be in test/html? 

Thank you. 



On Friday, 19 August 2016 22:07:55 UTC+1, Morten Piibeleht wrote:
>
> We are happy to announce version 0.3 of Documenter.jl 
>  – a package for building the 
> documentation of other Julia packages. Documentation is available at 
> https://juliadocs.github.io/Documenter.jl/stable/.
>
>
> Compared to the 0.2-branch there should be no visible changes to the user 
> other than some resolved bugs. However, there have been some changes to the 
> code base so please don’t hesitate to report any issues on the issue 
> tracker .
>
>
> The largest bit of news is that experimental *native HTML output* is now 
> available as an option [*]. This means that instead of relying on MkDocs, 
> Documenter.jl is able to produce its own complete static HTML site. The 
> generated site’s style borrows heavily from the Julia manual and is already 
> being used to build Documenter’s own documentation.
>
>
> We would like to encourage everyone to give the HTML output a try 
> (including just browsing) and send feedback so that we could iron out any 
> remaining issues and improve user experience. See the documentation 
> 
>  for 
> more information on how to enable HTML output on your own repository. There 
> is the meta-issue #212 
>  where we are 
> tracking future improvements of this feature.
>
>
> Finally, a big thanks to everyone who have been testing the package and 
> submitting issues so far. Keep ‘em coming!
>
>
> Cheers, 
> Morten & Mike
>
>
> [*] Developed as part of Morten’s Google Summer of Code project 
> 
> .
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
IT Works   Thank you so much.  Found my error in the code.

I am curious if there is a way to shortcut the command as I would want to 
run this daily to test and it seems like a lot to type correctly.

Thanks for the time today

On Friday, August 19, 2016 at 6:26:34 PM UTC-4, Jeffrey Sarnoff wrote:
>
> Look correct?
>
> I will answer that after you try running it.
>
>
> On Friday, August 19, 2016 at 6:19:33 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Thanks for providing me so much help today - much appreciated.
>>
>> I copied the properties right here for folder Julia  which is where the 
>> code file is located:
>> C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL
>>
>> Interesting that it didnt bring it over as My_Documents.
>>
>> Based on this, I would believe the command needs to be:
>> include("C:\\Users\\JHerron\\Documents\\Documents\\
>> Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>>
>> Look correct?
>>
>> I made the changes to the paths in the file as well
>>
>> "C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"
>>
>> On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> two things,
>>> you wrote:
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>> and I wonder, do you mean   !   
>>>  !
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>>> or
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>>
>>> when you go to the directory where you see the file: code_for_Github.jl 
>>> and you put the mouse on that file and right-click to see the popup menu 
>>> and select the last thing "properties" there is something that says 
>>> Location,if does it not exactly match:
>>> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
>>> then you have miscopied it, if it looks like this 
>>> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
>>> then you should be using (and fix the paths in the code_for_Github.jl 
>>> file, too)
>>>
>>>  
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>>
>>> ---
>>>
>>>
>>> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:

 Sadly, I get the following response from 
 include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")

 *ERROR: could not copen file 
 C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
 *in include at boot.jl:261*
 *in include_from_node1 at loading.jl:320*

 On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>
> the "i" in include should be lower case
>
> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
>> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>> (I hope that was what you meant to do).
>>
>> I got: *ERROR: UndefVarError: Include not defined*
>>
>> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson 
>> wrote:
>>
>>>
>>>
>>> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket 
>>> wrote:

 Sorry if Im not following - I tried:

 Include("C:\Users\JHerron\My_Documents\My_Documents/
 Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and 
 got *ERROR: syntax: invalid escape sequence*

>>>
>>> Backslashes have to be escsped in strings, like in many computer 
>>> languages: change \ to \\ in the string.
>>>
>>> However, usually it is better to just run Julia from within the path 
>>> that you want rather than having to type absolute paths all of the time 
>>> in 
>>> the REPL.
>>>
>>> (In the long run, you usually do large-scale code development in a 
>>> module in the standard module search path, so you can just type "using 
>>> Foo".)
>>>
>>> (If you call include("foo.jl") from another file bar.jl, the path of 
>>> foo.jl is automatically relative to the path of bar.jl, so again you 
>>> neither need nor want absolute paths.)
>>>
>>> For interactive code development where I need more than a few lines 
>>> of code, I usually use a Jupyter notebook (google "IJulia").
>>>
>>
>

[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-19 Thread John Myles White
Unfortunately the R package is GPL, so we can't use it as a template for a 
Julia implementation. But RCall will let you call that package from Julia 
to get draws from those distributions, so you should be able to do what you 
suggested pretty easily.

--John

On Friday, August 19, 2016 at 1:44:06 PM UTC-7, Rock Pereira wrote:
>
> It's available in R. Look up the package '*stabledist*'. It has function
>  rstable(n, alpha, beta, gamma, delta, pm)
>
> Stable distributions are difficult to generate because the pdf does not 
> have a closed form.
> For the Levy distribution, alpha=0.5, beta=1.
> I was trying to answer a question on StackOverflow 
> http://stackoverflow.com/questions/38774913/fbasicsfitstable-working-suspiciously
> I wanted to do the generation in R, and the MLE optimization in Julia, but 
> didn't get round to it.
>
>
>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
WellSignificant progress 3 Blue lines of Pre-compiling things 
before an Error:

Error: LoadError: syntax: "\" is not a unary operator
in include at boot.jl:261
in include_from_node1 at loading.jl:320
while loading 
C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL\Julia\code_for_github.jl. 
in expression starting on line 38.

Picture of error posted

On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>
> two things,
> you wrote:
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
> and I wonder, do you mean   ! 
>!
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
> or
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> when you go to the directory where you see the file: code_for_Github.jl 
> and you put the mouse on that file and right-click to see the popup menu 
> and select the last thing "properties" there is something that says 
> Location,if does it not exactly match:
> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
> then you have miscopied it, if it looks like this 
> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
> then you should be using (and fix the paths in the code_for_Github.jl 
> file, too)
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> ---
>
>
> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sadly, I get the following response from 
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>
>> *ERROR: could not copen file 
>> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
>> *in include at boot.jl:261*
>> *in include_from_node1 at loading.jl:320*
>>
>> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> the "i" in include should be lower case
>>>
>>> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  
>>> wrote:
>>>
 I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
 Personal\\DFS/NHL\\Julia/code_for_Github.jl")
 (I hope that was what you meant to do).

 I got: *ERROR: UndefVarError: Include not defined*

 On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:

>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got 
>> *ERROR: 
>> syntax: invalid escape sequence*
>>
>
> Backslashes have to be escsped in strings, like in many computer 
> languages: change \ to \\ in the string.
>
> However, usually it is better to just run Julia from within the path 
> that you want rather than having to type absolute paths all of the time 
> in 
> the REPL.
>
> (In the long run, you usually do large-scale code development in a 
> module in the standard module search path, so you can just type "using 
> Foo".)
>
> (If you call include("foo.jl") from another file bar.jl, the path of 
> foo.jl is automatically relative to the path of bar.jl, so again you 
> neither need nor want absolute paths.)
>
> For interactive code development where I need more than a few lines of 
> code, I usually use a Jupyter notebook (google "IJulia").
>

>>>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff

>
> Look correct?

I will answer that after you try running it.


On Friday, August 19, 2016 at 6:19:33 PM UTC-4, Pigskin Ablanket wrote:
>
> Thanks for providing me so much help today - much appreciated.
>
> I copied the properties right here for folder Julia  which is where the 
> code file is located:
> C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL
>
> Interesting that it didnt bring it over as My_Documents.
>
> Based on this, I would believe the command needs to be:
> include("C:\\Users\\JHerron\\Documents\\Documents\\
> Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>
> Look correct?
>
> I made the changes to the paths in the file as well
>
> "C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"
>
> On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>>
>> two things,
>> you wrote:
>>
>>  
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>> and I wonder, do you mean   ! 
>>!
>>
>>  
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
>> or
>>
>>  
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>
>> when you go to the directory where you see the file: code_for_Github.jl 
>> and you put the mouse on that file and right-click to see the popup menu 
>> and select the last thing "properties" there is something that says 
>> Location,if does it not exactly match:
>> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
>> then you have miscopied it, if it looks like this 
>> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
>> then you should be using (and fix the paths in the code_for_Github.jl 
>> file, too)
>>
>>  
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>>
>> ---
>>
>>
>> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Sadly, I get the following response from 
>>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>>
>>> *ERROR: could not copen file 
>>> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
>>> *in include at boot.jl:261*
>>> *in include_from_node1 at loading.jl:320*
>>>
>>> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:

 the "i" in include should be lower case

 On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  wrote:

> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
> (I hope that was what you meant to do).
>
> I got: *ERROR: UndefVarError: Include not defined*
>
> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson 
> wrote:
>
>>
>>
>> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Sorry if Im not following - I tried:
>>>
>>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got 
>>> *ERROR: 
>>> syntax: invalid escape sequence*
>>>
>>
>> Backslashes have to be escsped in strings, like in many computer 
>> languages: change \ to \\ in the string.
>>
>> However, usually it is better to just run Julia from within the path 
>> that you want rather than having to type absolute paths all of the time 
>> in 
>> the REPL.
>>
>> (In the long run, you usually do large-scale code development in a 
>> module in the standard module search path, so you can just type "using 
>> Foo".)
>>
>> (If you call include("foo.jl") from another file bar.jl, the path of 
>> foo.jl is automatically relative to the path of bar.jl, so again you 
>> neither need nor want absolute paths.)
>>
>> For interactive code development where I need more than a few lines 
>> of code, I usually use a Jupyter notebook (google "IJulia").
>>
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Thanks for providing me so much help today - much appreciated.

I copied the properties right here for folder Julia  which is where the 
code file is located:
C:\Users\JHerron\Documents\Documents\Personal\DFS\NHL

Interesting that it didnt bring it over as My_Documents.

Based on this, I would believe the command needs to be:
include("C:\\Users\\JHerron\\Documents\\Documents\\
Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")

Look correct?

I made the changes to the paths in the file as well
"C:\\Users\\JHerron\\Documents\\Documents\\Personal\\DFS\\NHL\\Julia\\example_skaters.csv"

On Friday, August 19, 2016 at 6:01:50 PM UTC-4, Jeffrey Sarnoff wrote:
>
> two things,
> you wrote:
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
> and I wonder, do you mean   ! 
>!
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
> or
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> when you go to the directory where you see the file: code_for_Github.jl 
> and you put the mouse on that file and right-click to see the popup menu 
> and select the last thing "properties" there is something that says 
> Location,if does it not exactly match:
> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
> then you have miscopied it, if it looks like this 
> C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
> then you should be using (and fix the paths in the code_for_Github.jl 
> file, too)
>
>  
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")
>
> ---
>
>
> On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sadly, I get the following response from 
>> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>
>> *ERROR: could not copen file 
>> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
>> *in include at boot.jl:261*
>> *in include_from_node1 at loading.jl:320*
>>
>> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> the "i" in include should be lower case
>>>
>>> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  
>>> wrote:
>>>
 I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
 Personal\\DFS/NHL\\Julia/code_for_Github.jl")
 (I hope that was what you meant to do).

 I got: *ERROR: UndefVarError: Include not defined*

 On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:

>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got 
>> *ERROR: 
>> syntax: invalid escape sequence*
>>
>
> Backslashes have to be escsped in strings, like in many computer 
> languages: change \ to \\ in the string.
>
> However, usually it is better to just run Julia from within the path 
> that you want rather than having to type absolute paths all of the time 
> in 
> the REPL.
>
> (In the long run, you usually do large-scale code development in a 
> module in the standard module search path, so you can just type "using 
> Foo".)
>
> (If you call include("foo.jl") from another file bar.jl, the path of 
> foo.jl is automatically relative to the path of bar.jl, so again you 
> neither need nor want absolute paths.)
>
> For interactive code development where I need more than a few lines of 
> code, I usually use a Jupyter notebook (google "IJulia").
>

>>>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
two things,
you wrote:
 
include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
and I wonder, do you mean   !   
 !
 
include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS\\NHL\\Julia\\code_for_Github.jl")
or
 
include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")

when you go to the directory where you see the file: code_for_Github.jl and 
you put the mouse on that file and right-click to see the popup menu and 
select the last thing "properties" there is something that says Location,if 
does it not exactly match:
C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia
then you have miscopied it, if it looks like this 
C:/Users/JHerron/My_Documents/My_Documents_Personal/DFS_NHL/Julia
then you should be using (and fix the paths in the code_for_Github.jl file, 
too)
 
include("C:\\Users\\JHerron\\My_Documents\\My_Documents_Personal\\DFS_NHL\\Julia\\code_for_Github.jl")

---


On Friday, August 19, 2016 at 5:12:41 PM UTC-4, Pigskin Ablanket wrote:
>
> Sadly, I get the following response from 
> include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>
> *ERROR: could not copen file 
> C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
> *in include at boot.jl:261*
> *in include_from_node1 at loading.jl:320*
>
> On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>>
>> the "i" in include should be lower case
>>
>> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  
>> wrote:
>>
>>> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
>>> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>>> (I hope that was what you meant to do).
>>>
>>> I got: *ERROR: UndefVarError: Include not defined*
>>>
>>> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>>>


 On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>
> Sorry if Im not following - I tried:
>
> Include("C:\Users\JHerron\My_Documents\My_Documents/
> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got 
> *ERROR: 
> syntax: invalid escape sequence*
>

 Backslashes have to be escsped in strings, like in many computer 
 languages: change \ to \\ in the string.

 However, usually it is better to just run Julia from within the path 
 that you want rather than having to type absolute paths all of the time in 
 the REPL.

 (In the long run, you usually do large-scale code development in a 
 module in the standard module search path, so you can just type "using 
 Foo".)

 (If you call include("foo.jl") from another file bar.jl, the path of 
 foo.jl is automatically relative to the path of bar.jl, so again you 
 neither need nor want absolute paths.)

 For interactive code development where I need more than a few lines of 
 code, I usually use a Jupyter notebook (google "IJulia").

>>>
>>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Sadly, I get the following response from 
include("C:\\Users\\JHerron\\My_Documents\\My_Documents/Personal\\DFS/NHL\\Julia/code_for_Github.jl")

*ERROR: could not copen file 
C:\Users\JHerron\My_Documents\My_Documents\Personal\DFS\NHL\Julia\code_for_github.jl*
*in include at boot.jl:261*
*in include_from_node1 at loading.jl:320*

On Friday, August 19, 2016 at 4:49:16 PM UTC-4, Jeffrey Sarnoff wrote:
>
> the "i" in include should be lower case
>
> On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  > wrote:
>
>> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
>> Personal\\DFS/NHL\\Julia/code_for_Github.jl")
>> (I hope that was what you meant to do).
>>
>> I got: *ERROR: UndefVarError: Include not defined*
>>
>> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>>
>>>
>>>
>>> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:

 Sorry if Im not following - I tried:

 Include("C:\Users\JHerron\My_Documents\My_Documents/
 Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got 
 *ERROR: 
 syntax: invalid escape sequence*

>>>
>>> Backslashes have to be escsped in strings, like in many computer 
>>> languages: change \ to \\ in the string.
>>>
>>> However, usually it is better to just run Julia from within the path 
>>> that you want rather than having to type absolute paths all of the time in 
>>> the REPL.
>>>
>>> (In the long run, you usually do large-scale code development in a 
>>> module in the standard module search path, so you can just type "using 
>>> Foo".)
>>>
>>> (If you call include("foo.jl") from another file bar.jl, the path of 
>>> foo.jl is automatically relative to the path of bar.jl, so again you 
>>> neither need nor want absolute paths.)
>>>
>>> For interactive code development where I need more than a few lines of 
>>> code, I usually use a Jupyter notebook (google "IJulia").
>>>
>>
>

[julia-users] ANN: Documenter.jl 0.3

2016-08-19 Thread Morten Piibeleht


We are happy to announce version 0.3 of Documenter.jl 
 – a package for building the 
documentation of other Julia packages. Documentation is available at 
https://juliadocs.github.io/Documenter.jl/stable/.


Compared to the 0.2-branch there should be no visible changes to the user 
other than some resolved bugs. However, there have been some changes to the 
code base so please don’t hesitate to report any issues on the issue tracker 
.


The largest bit of news is that experimental *native HTML output* is now 
available as an option [*]. This means that instead of relying on MkDocs, 
Documenter.jl is able to produce its own complete static HTML site. The 
generated site’s style borrows heavily from the Julia manual and is already 
being used to build Documenter’s own documentation.


We would like to encourage everyone to give the HTML output a try 
(including just browsing) and send feedback so that we could iron out any 
remaining issues and improve user experience. See the documentation 

 for 
more information on how to enable HTML output on your own repository. There 
is the meta-issue #212 
 where we are 
tracking future improvements of this feature.


Finally, a big thanks to everyone who have been testing the package and 
submitting issues so far. Keep ‘em coming!


Cheers, 
Morten & Mike


[*] Developed as part of Morten’s Google Summer of Code project 

.


[julia-users] Fastest way to update a sparse matrix?

2016-08-19 Thread Gabriel Goh
Hey,

I have a sparse matrix 

A = [ C  D
  E  F ]

now if I want to update F with another matrix with the exact same sparsity 
structure, what would be the easiest way to do it efficiently? Ideally, I'd 
just update the relevant values in rowval directly, but it seems messy to 
extract which indicies correspond to what.

Thanks!
Gabe


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
the "i" in include should be lower case

On Fri, Aug 19, 2016 at 3:17 PM, Pigskin Ablanket  wrote:

> I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/Person
> al\\DFS/NHL\\Julia/code_for_Github.jl")
> (I hope that was what you meant to do).
>
> I got: *ERROR: UndefVarError: Include not defined*
>
> On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>
>>
>>
>> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Sorry if Im not following - I tried:
>>>
>>> Include("C:\Users\JHerron\My_Documents\My_Documents/Personal
>>> \DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR:
>>> syntax: invalid escape sequence*
>>>
>>
>> Backslashes have to be escsped in strings, like in many computer
>> languages: change \ to \\ in the string.
>>
>> However, usually it is better to just run Julia from within the path that
>> you want rather than having to type absolute paths all of the time in the
>> REPL.
>>
>> (In the long run, you usually do large-scale code development in a module
>> in the standard module search path, so you can just type "using Foo".)
>>
>> (If you call include("foo.jl") from another file bar.jl, the path of
>> foo.jl is automatically relative to the path of bar.jl, so again you
>> neither need nor want absolute paths.)
>>
>> For interactive code development where I need more than a few lines of
>> code, I usually use a Jupyter notebook (google "IJulia").
>>
>


[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-19 Thread Rock Pereira
It's available in R. Look up the package '*stabledist*'. It has function
 rstable(n, alpha, beta, gamma, delta, pm)

Stable distributions are difficult to generate because the pdf does not 
have a closed form.
For the Levy distribution, alpha=0.5, beta=1.
I was trying to answer a question on StackOverflow 
http://stackoverflow.com/questions/38774913/fbasicsfitstable-working-suspiciously
I wanted to do the generation in R, and the MLE optimization in Julia, but 
didn't get round to it.




[julia-users] Retrieving mutated fields from workers

2016-08-19 Thread Alan Crawford
Hi,

I would like to retrieve an arbitrary object from an arbitrary process in a 
worker pool. After some digging I found the function

getfrom(p::Int, nm::Symbol; mod=Main) = fetch(@spawnat(p, getfield(mod, nm)))

in ParallelDataTransfer.jl 
 inspired by 
this post 

. 

However, when I tested it out I found some unexpected behaviour. The issue 
is that when I update a field remotely using `remotecall
` and then use getfrom(), it doesn't give me the correct object. However, 
when i hardcode the field in `remotecall()`  I get the expected result. 

Perhaps the issue is best illustrated with a toy example using a type 
called `foo`.

addprocs(1)
import ParallelDataTransfer
@everywhere using ParallelDataTransfer
@everywhere type foo
a
b
c
end

Then i define an instance of the type and send it to all of the workers.

*julia> **srand(30);*


*julia> **foo1 = foo(rand(3),rand(3),rand(3));  # Define an instance of 
foo1*


*julia> **ParallelDataTransfer.sendto(workers(),foo1=foo1);  # Put foo1 on 
all workers*


*julia> **foo1.c# Print output of field c*

*3-element Array{Float64,1}:*

* 0.369435*

* 0.671903*

* 0.321753*

Now I would like to mutate `foo1.c` on worker 2 and use `remotecall_fetch` 
to check that the field is changed.

*julia> **remotecall(()->Main.foo1.c=ones(3),2)  # Mutate Main.foo1.c on 
worker 2.  *

*Future(2,1,17,Nullable{Any}())*


*julia> **remotecall_fetch(()->Main.foo1.c,2)   # Confirms the change and 
works as expected*

*3-element Array{Float64,1}:*

* 1.0*

* 1.0*

* 1.0*

Now I would like, in principle, to use the `getfrom()` function in 
ParallelDataTransfer.jl to retrieve the mutated field on my current 
process. However, when I run it I get the field prior to mutation.

*julia> **ParallelDataTransfer.getfrom(2, :c, mod=Main.foo1) *

*3-element Array{Float64,1}:*

* 0.369435*

* 0.671903*

* 0.321753*

Does anyone know why `getfrom` is not retrieving the mutated field? Is 
there a fix?

Thanks
Alan



Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
I tried Include("C:Users\\JHerron\\My_Documents\\My_Documents/
Personal\\DFS/NHL\\Julia/code_for_Github.jl")
(I hope that was what you meant to do).

I got: *ERROR: UndefVarError: Include not defined*

On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>
>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR: 
>> syntax: invalid escape sequence*
>>
>
> Backslashes have to be escsped in strings, like in many computer 
> languages: change \ to \\ in the string.
>
> However, usually it is better to just run Julia from within the path that 
> you want rather than having to type absolute paths all of the time in the 
> REPL.
>
> (In the long run, you usually do large-scale code development in a module 
> in the standard module search path, so you can just type "using Foo".)
>
> (If you call include("foo.jl") from another file bar.jl, the path of 
> foo.jl is automatically relative to the path of bar.jl, so again you 
> neither need nor want absolute paths.)
>
> For interactive code development where I need more than a few lines of 
> code, I usually use a Jupyter notebook (google "IJulia").
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Sorry - Im not a programmer, just want to use the tool to do some 
comparative work and potential modification for other uses.  Your comments 
are probably helpful...I just dont understand them.  I agree that I want 
something shorter so I dont have to type as much - but I still cant quite 
get it to execute yet.

On Friday, August 19, 2016 at 1:58:30 PM UTC-4, Steven G. Johnson wrote:
>
>
>
> On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>>
>> Sorry if Im not following - I tried:
>>
>> Include("C:\Users\JHerron\My_Documents\My_Documents/
>> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR: 
>> syntax: invalid escape sequence*
>>
>
> Backslashes have to be escsped in strings, like in many computer 
> languages: change \ to \\ in the string.
>
> However, usually it is better to just run Julia from within the path that 
> you want rather than having to type absolute paths all of the time in the 
> REPL.
>
> (In the long run, you usually do large-scale code development in a module 
> in the standard module search path, so you can just type "using Foo".)
>
> (If you call include("foo.jl") from another file bar.jl, the path of 
> foo.jl is automatically relative to the path of bar.jl, so again you 
> neither need nor want absolute paths.)
>
> For interactive code development where I need more than a few lines of 
> code, I usually use a Jupyter notebook (google "IJulia").
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Steven G. Johnson


On Friday, August 19, 2016 at 1:47:59 PM UTC-4, Pigskin Ablanket wrote:
>
> Sorry if Im not following - I tried:
>
> Include("C:\Users\JHerron\My_Documents\My_Documents/
> Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR: 
> syntax: invalid escape sequence*
>

Backslashes have to be escsped in strings, like in many computer languages: 
change \ to \\ in the string.

However, usually it is better to just run Julia from within the path that 
you want rather than having to type absolute paths all of the time in the 
REPL.

(In the long run, you usually do large-scale code development in a module 
in the standard module search path, so you can just type "using Foo".)

(If you call include("foo.jl") from another file bar.jl, the path of foo.jl 
is automatically relative to the path of bar.jl, so again you neither need 
nor want absolute paths.)

For interactive code development where I need more than a few lines of 
code, I usually use a Jupyter notebook (google "IJulia").


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Sorry if Im not following - I tried:

Include("C:\Users\JHerron\My_Documents\My_Documents/
Personal\DFS/NHL\Julia/code_for_Github.jl") aas shown below and got *ERROR: 
syntax: invalid escape sequence*

include("C://Users//JHerron//My_Documents//My_Documents//Personal//DFS//NHL//Julia//Code_for_Github.jl")
 
and got *ERROR: could not open file 
C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl
 
in include at boot.jl:261 in include_from_node1 at loading.jl:320*

On Friday, August 19, 2016 at 12:53:46 PM UTC-4, Jeffrey Sarnoff wrote:
>
> change all the forward slashes to back slashes (or double all the forward 
> slashes) in the filepaths in code_for_Github.jl
> and when use include e.g.
> C:\Users\JHerron\My_Documents\My_Documents/Personal\DFS/NHL\Julia/code_
> for_Github.jl
>
> On Fri, Aug 19, 2016 at 12:47 PM, Pigskin Ablanket  > wrote:
>
>> Thank you so much -- Ok - getting close.  I made the changes as discussed:
>>
>> "C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/example_goalies.csv"
>>  
>> etc (goalies, skaters and output).
>>
>> I ran as follows:
>> Julia> 
>> include("C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl")
>>
>> and got back  ERROR: could not open file 
>> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl
>>  
>> in include at boot.jl:261 in include_from_node1 at loading.jl:320
>>
>>
>> On Friday, August 19, 2016 at 11:56:14 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> ok -- I got it started.
>>>
>>> Because that github is not set up as a Julia package, you can put the 
>>> files (the .jl and the .csv files) anyplace that is handy, and you need to 
>>> edit the .jl file so that path_skaters, path_goalies, and path_to_output 
>>> all include the full directory path [e.g. (replace the dots) path_skaters = 
>>> "C:/Users/../example_skaters.csv"].  
>>> then to run it, 
>>> julia> include("C:/Users/../codefile.jl") # replace the dots and 
>>> 'codefile'
>>>
>>>
>>> On Friday, August 19, 2016 at 11:36:31 AM UTC-4, Jeffrey Sarnoff wrote:

 hold on -- its not open()

 On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket <
 pigskin...@gmail.com> wrote:

> I get a different error now.  Open("code_for_github.jl") returns *ERROR: 
> UndefVarError: Open not defined*
>
>
> On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> you probably should run it -- and not expect that to make any 
>> difference with your difficulty (which is either a matter of 
>> installation 
>> or, more likely, the permissions associated with your windows account 
>> [and 
>> you may need to work that out with work])
>>
>> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Ok, so it showed me the following:
>>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>>
>>> Should I still run the update?
>>>
>>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff 
>>> wrote:

 on a Win7 system running Julia (v0.5rc2, but that should not 
 matter).


 julia> run(`cmd`)
 Microsoft Windows ... 

 # this is the directory from which Julia is being run (if you see 
 it_
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
 LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib 
  libexec  share

 # type exit() to get back to julia
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()


 julia>



 if you cannot do 
 run(`cmd`) 
 on a windows machine then the System Administrator needs to 
 reinstall or otherwise fix it
 also, just for fun.. run Pkg.update()


 On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket 
 wrote:
>
> Julia Version 0.4.6
> Commit 2e358ce (2016-06-19 17:16 UTC)
> Platform Info:
> -- System: windows (x86_64-w64-mingw32)
> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
> -- Word_Size: 64
> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
> -- LAPACK: libopenblas64_
> -- LIBM: libopenlibm
> -- LLUM: libLLUM-3.3
>
> Its work computer
>
> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff 
> wrote:
>>
>> Please show me
>> julia> versioninfo()
>>
>>
>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> I get the same error:  
>>> Julia>run(`pwd`)   what I tried to execute
>>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) 
>>> in 

[julia-users] Re: Distributions.jl : generating samples from stable distributions

2016-08-19 Thread John Myles White
This is extremely difficult to do right, which is why we don't support it 
yet.

--John

On Friday, August 19, 2016 at 9:26:19 AM UTC-7, Mirmu wrote:
>
> I am looking for generating samples from the stable Levy family with 
> Distributions.jl, but I cannot find it.
> https://en.wikipedia.org/wiki/Stable_distribution
>
> Did I miss it, or there is a reason why it is not yet implemented ?
>
> Best
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
change all the forward slashes to back slashes (or double all the forward
slashes) in the filepaths in code_for_Github.jl
and when use include e.g.
C:\Users\JHerron\My_Documents\My_Documents/Personal\DFS/NHL\Julia/code_
for_Github.jl

On Fri, Aug 19, 2016 at 12:47 PM, Pigskin Ablanket <
pigskinablan...@gmail.com> wrote:

> Thank you so much -- Ok - getting close.  I made the changes as discussed:
>
> "C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/example_goalies.csv"
> etc (goalies, skaters and output).
>
> I ran as follows:
> Julia> include("C:/Users/JHerron/My_Documents/My_Documents/
> Personal/DFS/NHL/Julia/code_for_Github.jl")
>
> and got back  ERROR: could not open file
> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl
> in include at boot.jl:261 in include_from_node1 at loading.jl:320
>
>
> On Friday, August 19, 2016 at 11:56:14 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> ok -- I got it started.
>>
>> Because that github is not set up as a Julia package, you can put the
>> files (the .jl and the .csv files) anyplace that is handy, and you need to
>> edit the .jl file so that path_skaters, path_goalies, and path_to_output
>> all include the full directory path [e.g. (replace the dots) path_skaters =
>> "C:/Users/../example_skaters.csv"].
>> then to run it,
>> julia> include("C:/Users/../codefile.jl") # replace the dots and
>> 'codefile'
>>
>>
>> On Friday, August 19, 2016 at 11:36:31 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> hold on -- its not open()
>>>
>>> On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket >> > wrote:
>>>
 I get a different error now.  Open("code_for_github.jl") returns *ERROR:
 UndefVarError: Open not defined*


 On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>
> you probably should run it -- and not expect that to make any
> difference with your difficulty (which is either a matter of installation
> or, more likely, the permissions associated with your windows account [and
> you may need to work that out with work])
>
> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket
> wrote:
>>
>> Ok, so it showed me the following:
>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>
>> Should I still run the update?
>>
>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff
>> wrote:
>>>
>>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>>
>>>
>>> julia> run(`cmd`)
>>> Microsoft Windows ...
>>>
>>> # this is the directory from which Julia is being run (if you see it_
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib
>>>  libexec  share
>>>
>>> # type exit() to get back to julia
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>>
>>>
>>> julia>
>>>
>>>
>>>
>>> if you cannot do
>>> run(`cmd`)
>>> on a windows machine then the System Administrator needs to
>>> reinstall or otherwise fix it
>>> also, just for fun.. run Pkg.update()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket
>>> wrote:

 Julia Version 0.4.6
 Commit 2e358ce (2016-06-19 17:16 UTC)
 Platform Info:
 -- System: windows (x86_64-w64-mingw32)
 -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
 -- Word_Size: 64
 -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
 -- LAPACK: libopenblas64_
 -- LIBM: libopenlibm
 -- LLUM: libLLUM-3.3

 Its work computer

 On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff
 wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket
> wrote:
>>
>> I get the same error:
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT)
>> in _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff
>> wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not
>>> single quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket
>>> wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got:
 Error: could not spawn `pwd`: no such file or directory (ENOENT) in
 _jl_spawn at process.jl:262

 No idea what that means :(


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Sorry - slow learner group here.  Change ALL (in the skaters path, output, 
and include code?)

On Friday, August 19, 2016 at 12:53:46 PM UTC-4, Jeffrey Sarnoff wrote:
>
> change all the forward slashes to back slashes (or double all the forward 
> slashes) in the filepaths in code_for_Github.jl
> and when use include e.g.
> C:\Users\JHerron\My_Documents\My_Documents/Personal\DFS/NHL\Julia/code_
> for_Github.jl
>
> On Fri, Aug 19, 2016 at 12:47 PM, Pigskin Ablanket  > wrote:
>
>> Thank you so much -- Ok - getting close.  I made the changes as discussed:
>>
>> "C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/example_goalies.csv"
>>  
>> etc (goalies, skaters and output).
>>
>> I ran as follows:
>> Julia> 
>> include("C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl")
>>
>> and got back  ERROR: could not open file 
>> C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl
>>  
>> in include at boot.jl:261 in include_from_node1 at loading.jl:320
>>
>>
>> On Friday, August 19, 2016 at 11:56:14 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> ok -- I got it started.
>>>
>>> Because that github is not set up as a Julia package, you can put the 
>>> files (the .jl and the .csv files) anyplace that is handy, and you need to 
>>> edit the .jl file so that path_skaters, path_goalies, and path_to_output 
>>> all include the full directory path [e.g. (replace the dots) path_skaters = 
>>> "C:/Users/../example_skaters.csv"].  
>>> then to run it, 
>>> julia> include("C:/Users/../codefile.jl") # replace the dots and 
>>> 'codefile'
>>>
>>>
>>> On Friday, August 19, 2016 at 11:36:31 AM UTC-4, Jeffrey Sarnoff wrote:

 hold on -- its not open()

 On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket <
 pigskin...@gmail.com> wrote:

> I get a different error now.  Open("code_for_github.jl") returns *ERROR: 
> UndefVarError: Open not defined*
>
>
> On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> you probably should run it -- and not expect that to make any 
>> difference with your difficulty (which is either a matter of 
>> installation 
>> or, more likely, the permissions associated with your windows account 
>> [and 
>> you may need to work that out with work])
>>
>> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Ok, so it showed me the following:
>>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>>
>>> Should I still run the update?
>>>
>>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff 
>>> wrote:

 on a Win7 system running Julia (v0.5rc2, but that should not 
 matter).


 julia> run(`cmd`)
 Microsoft Windows ... 

 # this is the directory from which Julia is being run (if you see 
 it_
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
 LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib 
  libexec  share

 # type exit() to get back to julia
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()


 julia>



 if you cannot do 
 run(`cmd`) 
 on a windows machine then the System Administrator needs to 
 reinstall or otherwise fix it
 also, just for fun.. run Pkg.update()


 On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket 
 wrote:
>
> Julia Version 0.4.6
> Commit 2e358ce (2016-06-19 17:16 UTC)
> Platform Info:
> -- System: windows (x86_64-w64-mingw32)
> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
> -- Word_Size: 64
> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
> -- LAPACK: libopenblas64_
> -- LIBM: libopenlibm
> -- LLUM: libLLUM-3.3
>
> Its work computer
>
> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff 
> wrote:
>>
>> Please show me
>> julia> versioninfo()
>>
>>
>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> I get the same error:  
>>> Julia>run(`pwd`)   what I tried to execute
>>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) 
>>> in _jl_spawn at process.jl:262
>>>
>>> I am attaching a screen shot
>>>
>>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff 
>>> wrote:

 what do you see with this (in Julia, note the backtics are not 
 single quotes)
 julia> run(`pwd`)

 On Friday, August 19, 2016 at 8:41:51 AM UTC-4, 

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Thank you so much -- Ok - getting close.  I made the changes as discussed:

"C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/example_goalies.csv"
 
etc (goalies, skaters and output).

I ran as follows:
Julia> 
include("C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl")

and got back  ERROR: could not open file 
C:/Users/JHerron/My_Documents/My_Documents/Personal/DFS/NHL/Julia/code_for_Github.jl
 
in include at boot.jl:261 in include_from_node1 at loading.jl:320


On Friday, August 19, 2016 at 11:56:14 AM UTC-4, Jeffrey Sarnoff wrote:
>
> ok -- I got it started.
>
> Because that github is not set up as a Julia package, you can put the 
> files (the .jl and the .csv files) anyplace that is handy, and you need to 
> edit the .jl file so that path_skaters, path_goalies, and path_to_output 
> all include the full directory path [e.g. (replace the dots) path_skaters = 
> "C:/Users/../example_skaters.csv"].  
> then to run it, 
> julia> include("C:/Users/../codefile.jl") # replace the dots and 'codefile'
>
>
> On Friday, August 19, 2016 at 11:36:31 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> hold on -- its not open()
>>
>> On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket > > wrote:
>>
>>> I get a different error now.  Open("code_for_github.jl") returns *ERROR: 
>>> UndefVarError: Open not defined*
>>>
>>>
>>> On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:

 you probably should run it -- and not expect that to make any 
 difference with your difficulty (which is either a matter of installation 
 or, more likely, the permissions associated with your windows account [and 
 you may need to work that out with work])

 On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok, so it showed me the following:
> C:\Users\Name\AppData\Local\Julia-0.4.6
>
> Should I still run the update?
>
> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>
>>
>> julia> run(`cmd`)
>> Microsoft Windows ... 
>>
>> # this is the directory from which Julia is being run (if you see it_
>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib 
>>  libexec  share
>>
>> # type exit() to get back to julia
>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>
>>
>> julia>
>>
>>
>>
>> if you cannot do 
>> run(`cmd`) 
>> on a windows machine then the System Administrator needs to reinstall 
>> or otherwise fix it
>> also, just for fun.. run Pkg.update()
>>
>>
>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Julia Version 0.4.6
>>> Commit 2e358ce (2016-06-19 17:16 UTC)
>>> Platform Info:
>>> -- System: windows (x86_64-w64-mingw32)
>>> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
>>> -- Word_Size: 64
>>> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>> -- LAPACK: libopenblas64_
>>> -- LIBM: libopenlibm
>>> -- LLUM: libLLUM-3.3
>>>
>>> Its work computer
>>>
>>> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff 
>>> wrote:

 Please show me
 julia> versioninfo()


 On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
 wrote:
>
> I get the same error:  
> Julia>run(`pwd`)   what I tried to execute
> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) 
> in _jl_spawn at process.jl:262
>
> I am attaching a screen shot
>
> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff 
> wrote:
>>
>> what do you see with this (in Julia, note the backtics are not 
>> single quotes)
>> julia> run(`pwd`)
>>
>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Ok - This makes sense to me...but:
>>>
>>> When I proceeded with julia>;pwd this is the response I got: 
>>> Error: could not spawn `pwd`: no such file or directory (ENOENT) in 
>>> _jl_spawn at process.jl:262
>>>
>>> No idea what that means :(
>>>
>>> Once again - feel like my questions are probably introductory, 
>>> and I appreciate your time.
>>>
>>> The actual name of the code I am trying to open is titled 
>>> "Code_for_Github.jl"
>>>
>>>
>>>
>>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey 
>>> wrote:

 Hello there,
 I think you need to change to the 

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Yichao Yu
On Fri, Aug 19, 2016 at 11:51 PM, Erik Schnetter 
wrote:

> On Fri, Aug 19, 2016 at 10:07 AM, Yichao Yu  wrote:
>
>>
>>
>> On Fri, Aug 19, 2016 at 10:01 PM, Erik Schnetter 
>> wrote:
>>
>>> On Fri, Aug 19, 2016 at 9:53 AM, Yichao Yu  wrote:
>>>

 On Fri, Aug 19, 2016 at 9:01 PM, Oliver Schulz <
 oliver.sch...@tu-dortmund.de> wrote:

> Hi Eric,
>
> nice - this is exactly what I meant. I wonder if Julia Symbols
> themselves could become like this in the future.
>

 As jameson said already, isbits or not is irrelevant here and we are
 working towards making non isbits type inlinable.

 The ValueSymbol type is also not a true isbits type, you can't save it
 to sysimg or use it with mmap array for example (well, you can, but you
 won't get the answer you want)

>>>
>>> Okay, call it `pointerfree` then.
>>>
>>
>> Well, the point is that it doesn't have all the necessary probably
>> assumed by other part of the system. `isbits` is an acronym of
>> `pointerfree`.
>>
>
> Can I mmap regular symbols? What ensures that the symbols' values are
> contained in the mmapped region? What ensures that mmapped symbols are
> unique with respect to local symbols?
>

No you can't and that's the point. You'll appears to be able to do that
with a isbits symbol and get segfault.


>
> Saving in a system image is an operation for experts; there are
>

This includes package compilation


> good solutions for ensuring symbols are stored and loaded properly, such
> as e.g. serializing them.
>

Just to make it more clear, making symbols a bitstype will break many
assumptions made everywhere in the system and only solve a problem that can
be solved much better in other ways and also cause worse performance in
many other cases.

Important properties of isbits types
* They can be transferred/saved as their bits content and still represent
the same value.

In another word, they are not pointers and doesn't hold references to
other object. We do have C pointers, which violate this rule but we don't
need to add another special case for pointers we can control.

Performance advantage of bitstype
* They don't need to be rooted

This is actually one of the easiest optimization to implement in
codegen.

* They are stored inline and won't make the containing immutable a
non-value type.

This is the advantage everyone on this thread was talking about and the
right way to solve this is to make !ptrfree immutable a value type (stack
allocated, stored inline).

Disadvantage of bitstype
* They needs to be boxed in generic context, including jlcall and store to
non-leaftype slot

As listed above, making symbols bitstype is basically a temporary
workaround before we flip the immutable layout. Other than that, it'll
break many assumptions in the code (well, one assumption, used in many
places) and cause performance regression in other cases.


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
ok -- I got it started.

Because that github is not set up as a Julia package, you can put the files 
(the .jl and the .csv files) anyplace that is handy, and you need to edit 
the .jl file so that path_skaters, path_goalies, and path_to_output all 
include the full directory path [e.g. (replace the dots) path_skaters = 
"C:/Users/../example_skaters.csv"].  
then to run it, 
julia> include("C:/Users/../codefile.jl") # replace the dots and 'codefile'


On Friday, August 19, 2016 at 11:36:31 AM UTC-4, Jeffrey Sarnoff wrote:
>
> hold on -- its not open()
>
> On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket <
> pigskinablan...@gmail.com> wrote:
>
>> I get a different error now.  Open("code_for_github.jl") returns *ERROR: 
>> UndefVarError: Open not defined*
>>
>>
>> On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> you probably should run it -- and not expect that to make any difference 
>>> with your difficulty (which is either a matter of installation or, more 
>>> likely, the permissions associated with your windows account [and you may 
>>> need to work that out with work])
>>>
>>> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:

 Ok, so it showed me the following:
 C:\Users\Name\AppData\Local\Julia-0.4.6

 Should I still run the update?

 On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>
> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>
>
> julia> run(`cmd`)
> Microsoft Windows ... 
>
> # this is the directory from which Julia is being run (if you see it_
> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>  share
>
> # type exit() to get back to julia
> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>
>
> julia>
>
>
>
> if you cannot do 
> run(`cmd`) 
> on a windows machine then the System Administrator needs to reinstall 
> or otherwise fix it
> also, just for fun.. run Pkg.update()
>
>
> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> Julia Version 0.4.6
>> Commit 2e358ce (2016-06-19 17:16 UTC)
>> Platform Info:
>> -- System: windows (x86_64-w64-mingw32)
>> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
>> -- Word_Size: 64
>> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>> -- LAPACK: libopenblas64_
>> -- LIBM: libopenlibm
>> -- LLUM: libLLUM-3.3
>>
>> Its work computer
>>
>> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff 
>> wrote:
>>>
>>> Please show me
>>> julia> versioninfo()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
>>> wrote:

 I get the same error:  
 Julia>run(`pwd`)   what I tried to execute
 ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
 _jl_spawn at process.jl:262

 I am attaching a screen shot

 On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff 
 wrote:
>
> what do you see with this (in Julia, note the backtics are not 
> single quotes)
> julia> run(`pwd`)
>
> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> Ok - This makes sense to me...but:
>>
>> When I proceeded with julia>;pwd this is the response I got: 
>> Error: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> No idea what that means :(
>>
>> Once again - feel like my questions are probably introductory, 
>> and I appreciate your time.
>>
>> The actual name of the code I am trying to open is titled 
>> "Code_for_Github.jl"
>>
>>
>>
>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey 
>> wrote:
>>>
>>> Hello there,
>>> I think you need to change to the directory where your file is 
>>> present.
>>>
>>> You can try to use command line within julia like:
>>> julia > ;pwd #Check your present working 
>>> directory
>>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>>
>>> OR 
>>> try to give the absolute path of the directory (Assume your file 
>>> is present in home directory on linux)
>>>
>>> julia>open("/home/Filename.jl")
>>>
>>> I hope it helps :)
>>>
>>>
>>> *Yours Sincerely,*
>>> *Ayush Pandey* * *
>>> ayush-iitkgp.github.io/
>>>
>>> On 

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Erik Schnetter
On Fri, Aug 19, 2016 at 10:07 AM, Yichao Yu  wrote:

>
>
> On Fri, Aug 19, 2016 at 10:01 PM, Erik Schnetter 
> wrote:
>
>> On Fri, Aug 19, 2016 at 9:53 AM, Yichao Yu  wrote:
>>
>>>
>>> On Fri, Aug 19, 2016 at 9:01 PM, Oliver Schulz <
>>> oliver.sch...@tu-dortmund.de> wrote:
>>>
 Hi Eric,

 nice - this is exactly what I meant. I wonder if Julia Symbols
 themselves could become like this in the future.

>>>
>>> As jameson said already, isbits or not is irrelevant here and we are
>>> working towards making non isbits type inlinable.
>>>
>>> The ValueSymbol type is also not a true isbits type, you can't save it
>>> to sysimg or use it with mmap array for example (well, you can, but you
>>> won't get the answer you want)
>>>
>>
>> Okay, call it `pointerfree` then.
>>
>
> Well, the point is that it doesn't have all the necessary probably assumed
> by other part of the system. `isbits` is an acronym of `pointerfree`.
>

Can I mmap regular symbols? What ensures that the symbols' values are
contained in the mmapped region? What ensures that mmapped symbols are
unique with respect to local symbols?

Saving in a system image is an operation for experts; there are good
solutions for ensuring symbols are stored and loaded properly, such as e.g.
serializing them.

-erik

On 17.08.2016 18:44, Erik Schnetter wrote:

> See  for what I had in
> mind.
>
> -erik
>
> On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu  > wrote:
>
>
>
> On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>  >>
>
> wrote:
>
> Hi Yichao
>
> I get that - I was just curious why (and I guess there's likely
> a very good reason for it). My intuition would be that a
> non-GCed interned string type could be represented by a
> bitstype
> (i.e. a pointer or index to the string table). So I was
> surprised that Symbol is an object reference and wanted to
> understand this a bit better.
>
>
> It's a pointer to managed memory with tag that's all what's needed
> for it to be a !pointerfree type. There are way more things that we
> don't GC and it has nothing to do with whether it's a isbits type
> or
> not.
>
>
>
>
> Cheers,
>
> Oliver
>
>
> On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
> wrote:
>
>
> > PS: Yes, symbols in Julia should be bitstypes.
>
> No, it's a object reference and isn't a `isbits()` type.
>
>
>
> On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
>  wrote:
>
> Good points.
>
> Given that symbols have a name which is a string, I
> don't see how they could be a bits-type unless they
> just became numbers to index into a global array
> somewhere.. i.e. a pointer. Stack-allocating
> non-bits-type immutables is on the roadmap to 1.0,
> so that should solve your problems.
>
> Maybe you can solve the CategorizedPoint problem by
> using an @enum.
>
> On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
>  wrote:
>
> Hello Andreas,
>
> consider iterating over a Dict{Symbol,Int64}:
>
> |
> d =Dict(:foo =>42,:bar =>77)
>
> forx ind println("$(typeof(x)),
> $(isbits(x))")end
> |
>
>
> During iteration, a lot of stack allocated
> "Pair{Symbol,Int64}" objects are created. That
> is very bad for performance.
>
> |
> immutable CategorizedPoint
> x::Float64
> y::Float64
> category::Symbol
> end
> |
>
>
> Also, consider a (hypothetical) data type for
> categorized points (with a finite number of
> categories - but extensible, so that Symbol is
> a
> better fit than using an enum):
>
> immutable 

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
hold on -- its not open()

On Fri, Aug 19, 2016 at 11:35 AM, Pigskin Ablanket <
pigskinablan...@gmail.com> wrote:

> I get a different error now.  Open("code_for_github.jl") returns *ERROR:
> UndefVarError: Open not defined*
>
>
> On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> you probably should run it -- and not expect that to make any difference
>> with your difficulty (which is either a matter of installation or, more
>> likely, the permissions associated with your windows account [and you may
>> need to work that out with work])
>>
>> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Ok, so it showed me the following:
>>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>>
>>> Should I still run the update?
>>>
>>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:

 on a Win7 system running Julia (v0.5rc2, but that should not matter).


 julia> run(`cmd`)
 Microsoft Windows ...

 # this is the directory from which Julia is being run (if you see it_
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
 LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec
  share

 # type exit() to get back to julia
 C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()


 julia>



 if you cannot do
 run(`cmd`)
 on a windows machine then the System Administrator needs to reinstall
 or otherwise fix it
 also, just for fun.. run Pkg.update()


 On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:
>
> Julia Version 0.4.6
> Commit 2e358ce (2016-06-19 17:16 UTC)
> Platform Info:
> -- System: windows (x86_64-w64-mingw32)
> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
> -- Word_Size: 64
> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
> -- LAPACK: libopenblas64_
> -- LIBM: libopenlibm
> -- LLUM: libLLUM-3.3
>
> Its work computer
>
> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> Please show me
>> julia> versioninfo()
>>
>>
>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket
>> wrote:
>>>
>>> I get the same error:
>>> Julia>run(`pwd`)   what I tried to execute
>>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in
>>> _jl_spawn at process.jl:262
>>>
>>> I am attaching a screen shot
>>>
>>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff
>>> wrote:

 what do you see with this (in Julia, note the backtics are not
 single quotes)
 julia> run(`pwd`)

 On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket
 wrote:
>
> Ok - This makes sense to me...but:
>
> When I proceeded with julia>;pwd this is the response I got:
> Error: could not spawn `pwd`: no such file or directory (ENOENT) in
> _jl_spawn at process.jl:262
>
> No idea what that means :(
>
> Once again - feel like my questions are probably introductory, and
> I appreciate your time.
>
> The actual name of the code I am trying to open is titled
> "Code_for_Github.jl"
>
>
>
> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>>
>> Hello there,
>> I think you need to change to the directory where your file is
>> present.
>>
>> You can try to use command line within julia like:
>> julia > ;pwd #Check your present working directory
>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>
>> OR
>> try to give the absolute path of the directory (Assume your file
>> is present in home directory on linux)
>>
>> julia>open("/home/Filename.jl")
>>
>> I hope it helps :)
>>
>>
>> *Yours Sincerely,*
>> *Ayush Pandey* * *
>> ayush-iitkgp.github.io/
>>
>> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
>> pigskin...@gmail.com> wrote:
>>
>>> Ok, I am trying to familiarize myself with a study published
>>> using Julia.  I have Julia up and running, but cant seep to get the 
>>> actual
>>> code open.
>>>
>>> Here is what I done so far:
>>>
>>> julia> Pkg.add("JuMP")
>>> julia> Pkg.add("DataFrames")
>>> julia> Pkg.add("GLPKMathProgInterface")
>>>
>>> I believe I successfully added the requisite programs.  all good.  
>>> Now I downloaded the code via CSV.
>>>
>>> It contains the Code in a .jl file, license file, readme file and a 

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
I get a different error now.  Open("code_for_github.jl") returns *ERROR: 
UndefVarError: Open not defined*

On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>
> you probably should run it -- and not expect that to make any difference 
> with your difficulty (which is either a matter of installation or, more 
> likely, the permissions associated with your windows account [and you may 
> need to work that out with work])
>
> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Ok, so it showed me the following:
>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>
>> Should I still run the update?
>>
>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>>
>>>
>>> julia> run(`cmd`)
>>> Microsoft Windows ... 
>>>
>>> # this is the directory from which Julia is being run (if you see it_
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>>>  share
>>>
>>> # type exit() to get back to julia
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>>
>>>
>>> julia>
>>>
>>>
>>>
>>> if you cannot do 
>>> run(`cmd`) 
>>> on a windows machine then the System Administrator needs to reinstall or 
>>> otherwise fix it
>>> also, just for fun.. run Pkg.update()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:

 Julia Version 0.4.6
 Commit 2e358ce (2016-06-19 17:16 UTC)
 Platform Info:
 -- System: windows (x86_64-w64-mingw32)
 -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
 -- Word_Size: 64
 -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
 -- LAPACK: libopenblas64_
 -- LIBM: libopenlibm
 -- LLUM: libLLUM-3.3

 Its work computer

 On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> I get the same error:  
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not 
>>> single quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
>>> wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got: Error: 
 could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn 
 at 
 process.jl:262

 No idea what that means :(

 Once again - feel like my questions are probably introductory, and 
 I appreciate your time.

 The actual name of the code I am trying to open is titled 
 "Code_for_Github.jl"



 On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is 
> present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file 
> is present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> Ok, I am trying to familiarize myself with a study published 
>> using Julia.  I have Julia up and running, but cant seep to get the 
>> actual 
>> code open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  
>> Now I downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a 
>> couple excel CSV files needed.
>>
>> I tried top open the file using Julia> Open("Filename.jl") and got 
>> the following error:
>>
>> *No such file or directory in open at iostream.jl:90  

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Given the above directory - where do I need to put the code file 
(code_for_Github.jl) so that Julia will see it to open it?  Is the command 
simply Open("code_for_Github.jl")

On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>
> you probably should run it -- and not expect that to make any difference 
> with your difficulty (which is either a matter of installation or, more 
> likely, the permissions associated with your windows account [and you may 
> need to work that out with work])
>
> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Ok, so it showed me the following:
>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>
>> Should I still run the update?
>>
>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>>
>>>
>>> julia> run(`cmd`)
>>> Microsoft Windows ... 
>>>
>>> # this is the directory from which Julia is being run (if you see it_
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>>>  share
>>>
>>> # type exit() to get back to julia
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>>
>>>
>>> julia>
>>>
>>>
>>>
>>> if you cannot do 
>>> run(`cmd`) 
>>> on a windows machine then the System Administrator needs to reinstall or 
>>> otherwise fix it
>>> also, just for fun.. run Pkg.update()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:

 Julia Version 0.4.6
 Commit 2e358ce (2016-06-19 17:16 UTC)
 Platform Info:
 -- System: windows (x86_64-w64-mingw32)
 -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
 -- Word_Size: 64
 -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
 -- LAPACK: libopenblas64_
 -- LIBM: libopenlibm
 -- LLUM: libLLUM-3.3

 Its work computer

 On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> I get the same error:  
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not 
>>> single quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
>>> wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got: Error: 
 could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn 
 at 
 process.jl:262

 No idea what that means :(

 Once again - feel like my questions are probably introductory, and 
 I appreciate your time.

 The actual name of the code I am trying to open is titled 
 "Code_for_Github.jl"



 On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is 
> present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file 
> is present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> Ok, I am trying to familiarize myself with a study published 
>> using Julia.  I have Julia up and running, but cant seep to get the 
>> actual 
>> code open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  
>> Now I downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a 
>> couple excel CSV files needed.
>>
>> I tried top open the file using Julia> Open("Filename.jl") and got 
>> the following error:

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Steven G. Johnson


On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok - This makes sense to me...but:
>
> When I proceeded with julia>;pwd this is the response I got: Error: could 
> not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
> process.jl:262
>

Typing

; command


in the julia REPL (the julia> prompt) executes a command in the operating 
system's shell.   pwd is a command in the unix shell, so it won't work in 
Windows where the shell is the DOS shell (cmd.exe), which is the reason for 
your error.   Similarly for run(`pwd`).

If you want to write portable code, you should generally avoid the OS shell 
entirely (and in any case the semicolon trick only works in the REPL).  For 
example, you can get the current directory via the pwd() function in Julia.


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Running update.  Work wont be an issue- he will help, but he is also new to 
Julia so a little bit of trial by fire :)   I appreciate the help very 
much.  If this doesnt work - I will uninstall and then re-install and 
hopefully get this file to run at least once :)

On Friday, August 19, 2016 at 11:15:05 AM UTC-4, Jeffrey Sarnoff wrote:
>
> you probably should run it -- and not expect that to make any difference 
> with your difficulty (which is either a matter of installation or, more 
> likely, the permissions associated with your windows account [and you may 
> need to work that out with work])
>
> On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Ok, so it showed me the following:
>> C:\Users\Name\AppData\Local\Julia-0.4.6
>>
>> Should I still run the update?
>>
>> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>>
>>>
>>> julia> run(`cmd`)
>>> Microsoft Windows ... 
>>>
>>> # this is the directory from which Julia is being run (if you see it_
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>>>  share
>>>
>>> # type exit() to get back to julia
>>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>>
>>>
>>> julia>
>>>
>>>
>>>
>>> if you cannot do 
>>> run(`cmd`) 
>>> on a windows machine then the System Administrator needs to reinstall or 
>>> otherwise fix it
>>> also, just for fun.. run Pkg.update()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:

 Julia Version 0.4.6
 Commit 2e358ce (2016-06-19 17:16 UTC)
 Platform Info:
 -- System: windows (x86_64-w64-mingw32)
 -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
 -- Word_Size: 64
 -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
 -- LAPACK: libopenblas64_
 -- LIBM: libopenlibm
 -- LLUM: libLLUM-3.3

 Its work computer

 On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket 
> wrote:
>>
>> I get the same error:  
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not 
>>> single quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
>>> wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got: Error: 
 could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn 
 at 
 process.jl:262

 No idea what that means :(

 Once again - feel like my questions are probably introductory, and 
 I appreciate your time.

 The actual name of the code I am trying to open is titled 
 "Code_for_Github.jl"



 On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is 
> present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file 
> is present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> Ok, I am trying to familiarize myself with a study published 
>> using Julia.  I have Julia up and running, but cant seep to get the 
>> actual 
>> code open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  
>> Now I downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a 
>> couple excel CSV files needed.
>>
>> I tried top open 

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
you probably should run it -- and not expect that to make any difference 
with your difficulty (which is either a matter of installation or, more 
likely, the permissions associated with your windows account [and you may 
need to work that out with work])

On Friday, August 19, 2016 at 10:56:39 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok, so it showed me the following:
> C:\Users\Name\AppData\Local\Julia-0.4.6
>
> Should I still run the update?
>
> On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>>
>>
>> julia> run(`cmd`)
>> Microsoft Windows ... 
>>
>> # this is the directory from which Julia is being run (if you see it_
>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
>> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>>  share
>>
>> # type exit() to get back to julia
>> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>>
>>
>> julia>
>>
>>
>>
>> if you cannot do 
>> run(`cmd`) 
>> on a windows machine then the System Administrator needs to reinstall or 
>> otherwise fix it
>> also, just for fun.. run Pkg.update()
>>
>>
>> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Julia Version 0.4.6
>>> Commit 2e358ce (2016-06-19 17:16 UTC)
>>> Platform Info:
>>> -- System: windows (x86_64-w64-mingw32)
>>> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
>>> -- Word_Size: 64
>>> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>>> -- LAPACK: libopenblas64_
>>> -- LIBM: libopenlibm
>>> -- LLUM: libLLUM-3.3
>>>
>>> Its work computer
>>>
>>> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:

 Please show me
 julia> versioninfo()


 On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:
>
> I get the same error:  
> Julia>run(`pwd`)   what I tried to execute
> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
> _jl_spawn at process.jl:262
>
> I am attaching a screen shot
>
> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> what do you see with this (in Julia, note the backtics are not single 
>> quotes)
>> julia> run(`pwd`)
>>
>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket 
>> wrote:
>>>
>>> Ok - This makes sense to me...but:
>>>
>>> When I proceeded with julia>;pwd this is the response I got: Error: 
>>> could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn 
>>> at 
>>> process.jl:262
>>>
>>> No idea what that means :(
>>>
>>> Once again - feel like my questions are probably introductory, and I 
>>> appreciate your time.
>>>
>>> The actual name of the code I am trying to open is titled 
>>> "Code_for_Github.jl"
>>>
>>>
>>>
>>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:

 Hello there,
 I think you need to change to the directory where your file is 
 present.

 You can try to use command line within julia like:
 julia > ;pwd #Check your present working directory
 julia> ;cd /path_to_the_directory_where_your_file_is_present

 OR 
 try to give the absolute path of the directory (Assume your file is 
 present in home directory on linux)

 julia>open("/home/Filename.jl")

 I hope it helps :)


 *Yours Sincerely,*
 *Ayush Pandey* * *
 ayush-iitkgp.github.io/

 On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
 pigskin...@gmail.com> wrote:

> Ok, I am trying to familiarize myself with a study published using 
> Julia.  I have Julia up and running, but cant seep to get the actual 
> code 
> open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  
> Now I downloaded the code via CSV.  
>
> It contains the Code in a .jl file, license file, readme file and a 
> couple excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got 
> the following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but 
> this is where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such 
> basic questions 
>
>


Re: [julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Stefan Karpinski
x-ref:
http://stackoverflow.com/questions/39039553/lower-triangular-matrix-in-julia-julia

On Fri, Aug 19, 2016 at 10:29 AM, Michael Krabbe Borregaard <
mkborrega...@gmail.com> wrote:

> A symmetric matrix and a lower triangular matrix are different things.
> Look for what you want here: http://julia.readthedocs.io/
> en/latest/manual/linear-algebra/ and here: http://julia.readthedocs.io/
> en/latest/stdlib/linalg/
>
> On Fri, Aug 19, 2016 at 4:07 PM, Ahmed Mazari 
> wrote:
>
>> 4×4 Array{Int64,2}:
>>  0  1  2  3
>>  1  0  4  5
>>  2  4  0  6
>>  3  5  6  0
>>
>> a symetric matrix m[i,j] =m[j,i]  and m[i,i]= 0
>>
>> On Fri, Aug 19, 2016 at 3:59 PM, Jeffrey Sarnoff <
>> jeffrey.sarn...@gmail.com> wrote:
>>
>>> Is this what you want, or are you looking for a more general way to
>>> construct nxn matrices like this 4x4 matrix, or something else?
>>>
>>> julia> m = [ [0,1,2,3] [1,0,4,5] [2,3,0,6] [4,5,6,0] ]
>>> 4×4 Array{Int64,2}:
>>>  0  1  2  4
>>>  1  0  3  5
>>>  2  4  0  6
>>>  3  5  6  0
>>>
>>>
>>> On Friday, August 19, 2016 at 9:01:06 AM UTC-4, Ahmed Mazari wrote:

 Yes but it doesn't allow me to set the diagonal to 0 ??

 On Fri, Aug 19, 2016 at 2:55 PM, Michael Borregaard <
 mkborr...@gmail.com> wrote:

> You can build the matrix as normal, then specify that the upper
> triangle is undefined by
> mat = LowerTriangular(mat) # where mat is a Matrix of any eltype.
>


>>
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Ok, so it showed me the following:
C:\Users\Name\AppData\Local\Julia-0.4.6

Should I still run the update?

On Friday, August 19, 2016 at 10:48:41 AM UTC-4, Jeffrey Sarnoff wrote:
>
> on a Win7 system running Julia (v0.5rc2, but that should not matter).
>
>
> julia> run(`cmd`)
> Microsoft Windows ... 
>
> # this is the directory from which Julia is being run (if you see it_
> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
> LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec 
>  share
>
> # type exit() to get back to julia
> C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()
>
>
> julia>
>
>
>
> if you cannot do 
> run(`cmd`) 
> on a windows machine then the System Administrator needs to reinstall or 
> otherwise fix it
> also, just for fun.. run Pkg.update()
>
>
> On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Julia Version 0.4.6
>> Commit 2e358ce (2016-06-19 17:16 UTC)
>> Platform Info:
>> -- System: windows (x86_64-w64-mingw32)
>> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
>> -- Word_Size: 64
>> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
>> -- LAPACK: libopenblas64_
>> -- LIBM: libopenlibm
>> -- LLUM: libLLUM-3.3
>>
>> Its work computer
>>
>> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> Please show me
>>> julia> versioninfo()
>>>
>>>
>>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:

 I get the same error:  
 Julia>run(`pwd`)   what I tried to execute
 ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
 _jl_spawn at process.jl:262

 I am attaching a screen shot

 On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>
> what do you see with this (in Julia, note the backtics are not single 
> quotes)
> julia> run(`pwd`)
>
> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Ok - This makes sense to me...but:
>>
>> When I proceeded with julia>;pwd this is the response I got: Error: 
>> could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn 
>> at 
>> process.jl:262
>>
>> No idea what that means :(
>>
>> Once again - feel like my questions are probably introductory, and I 
>> appreciate your time.
>>
>> The actual name of the code I am trying to open is titled 
>> "Code_for_Github.jl"
>>
>>
>>
>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>>>
>>> Hello there,
>>> I think you need to change to the directory where your file is 
>>> present.
>>>
>>> You can try to use command line within julia like:
>>> julia > ;pwd #Check your present working directory
>>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>>
>>> OR 
>>> try to give the absolute path of the directory (Assume your file is 
>>> present in home directory on linux)
>>>
>>> julia>open("/home/Filename.jl")
>>>
>>> I hope it helps :)
>>>
>>>
>>> *Yours Sincerely,*
>>> *Ayush Pandey* * *
>>> ayush-iitkgp.github.io/
>>>
>>> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
>>> pigskin...@gmail.com> wrote:
>>>
 Ok, I am trying to familiarize myself with a study published using 
 Julia.  I have Julia up and running, but cant seep to get the actual 
 code 
 open.

 Here is what I done so far:

 julia> Pkg.add("JuMP")
 julia> Pkg.add("DataFrames")
 julia> Pkg.add("GLPKMathProgInterface")

 I believe I successfully added the requisite programs.  all good.  Now 
 I downloaded the code via CSV.  

 It contains the Code in a .jl file, license file, readme file and a 
 couple excel CSV files needed.

 I tried top open the file using Julia> Open("Filename.jl") and got the 
 following error:

 *No such file or directory in open at iostream.jl:90  **in open at 
 **iostream.jl:99*

 My sense is that I dont have the file in the right directory, but this 
 is where I get over my skis.

 Is that the issue?  How do I make Julia find the file?  Sorry or such 
 basic questions 


>>>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
on a Win7 system running Julia (v0.5rc2, but that should not matter).


julia> run(`cmd`)
Microsoft Windows ... 

# this is the directory from which Julia is being run (if you see it_
C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>ls
LICENSE.md  Uninstall.exe  bin  etc  include  julia.lnk  lib  libexec  share

# type exit() to get back to julia
C:\Users\Jeff\AppData\Local\Julia-0.5.0-rc2>exit()


julia>



if you cannot do 
run(`cmd`) 
on a windows machine then the System Administrator needs to reinstall or 
otherwise fix it
also, just for fun.. run Pkg.update()


On Friday, August 19, 2016 at 10:16:22 AM UTC-4, Pigskin Ablanket wrote:
>
> Julia Version 0.4.6
> Commit 2e358ce (2016-06-19 17:16 UTC)
> Platform Info:
> -- System: windows (x86_64-w64-mingw32)
> -- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
> -- Word_Size: 64
> -- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
> -- LAPACK: libopenblas64_
> -- LIBM: libopenlibm
> -- LLUM: libLLUM-3.3
>
> Its work computer
>
> On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> Please show me
>> julia> versioninfo()
>>
>>
>> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:
>>>
>>> I get the same error:  
>>> Julia>run(`pwd`)   what I tried to execute
>>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>>> _jl_spawn at process.jl:262
>>>
>>> I am attaching a screen shot
>>>
>>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:

 what do you see with this (in Julia, note the backtics are not single 
 quotes)
 julia> run(`pwd`)

 On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok - This makes sense to me...but:
>
> When I proceeded with julia>;pwd this is the response I got: Error: 
> could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
> process.jl:262
>
> No idea what that means :(
>
> Once again - feel like my questions are probably introductory, and I 
> appreciate your time.
>
> The actual name of the code I am trying to open is titled 
> "Code_for_Github.jl"
>
>
>
> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>>
>> Hello there,
>> I think you need to change to the directory where your file is 
>> present.
>>
>> You can try to use command line within julia like:
>> julia > ;pwd #Check your present working directory
>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>
>> OR 
>> try to give the absolute path of the directory (Assume your file is 
>> present in home directory on linux)
>>
>> julia>open("/home/Filename.jl")
>>
>> I hope it helps :)
>>
>>
>> *Yours Sincerely,*
>> *Ayush Pandey* * *
>> ayush-iitkgp.github.io/
>>
>> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
>> pigskin...@gmail.com> wrote:
>>
>>> Ok, I am trying to familiarize myself with a study published using 
>>> Julia.  I have Julia up and running, but cant seep to get the actual 
>>> code 
>>> open.
>>>
>>> Here is what I done so far:
>>>
>>> julia> Pkg.add("JuMP")
>>> julia> Pkg.add("DataFrames")
>>> julia> Pkg.add("GLPKMathProgInterface")
>>>
>>> I believe I successfully added the requisite programs.  all good.  Now 
>>> I downloaded the code via CSV.  
>>>
>>> It contains the Code in a .jl file, license file, readme file and a 
>>> couple excel CSV files needed.
>>>
>>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>>> following error:
>>>
>>> *No such file or directory in open at iostream.jl:90  **in open at 
>>> **iostream.jl:99*
>>>
>>> My sense is that I dont have the file in the right directory, but this 
>>> is where I get over my skis.
>>>
>>> Is that the issue?  How do I make Julia find the file?  Sorry or such 
>>> basic questions 
>>>
>>>
>>

Re: [julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Michael Krabbe Borregaard
A symmetric matrix and a lower triangular matrix are different things. Look
for what you want here:
http://julia.readthedocs.io/en/latest/manual/linear-algebra/ and here:
http://julia.readthedocs.io/en/latest/stdlib/linalg/

On Fri, Aug 19, 2016 at 4:07 PM, Ahmed Mazari 
wrote:

> 4×4 Array{Int64,2}:
>  0  1  2  3
>  1  0  4  5
>  2  4  0  6
>  3  5  6  0
>
> a symetric matrix m[i,j] =m[j,i]  and m[i,i]= 0
>
> On Fri, Aug 19, 2016 at 3:59 PM, Jeffrey Sarnoff <
> jeffrey.sarn...@gmail.com> wrote:
>
>> Is this what you want, or are you looking for a more general way to
>> construct nxn matrices like this 4x4 matrix, or something else?
>>
>> julia> m = [ [0,1,2,3] [1,0,4,5] [2,3,0,6] [4,5,6,0] ]
>> 4×4 Array{Int64,2}:
>>  0  1  2  4
>>  1  0  3  5
>>  2  4  0  6
>>  3  5  6  0
>>
>>
>> On Friday, August 19, 2016 at 9:01:06 AM UTC-4, Ahmed Mazari wrote:
>>>
>>> Yes but it doesn't allow me to set the diagonal to 0 ??
>>>
>>> On Fri, Aug 19, 2016 at 2:55 PM, Michael Borregaard >> > wrote:
>>>
 You can build the matrix as normal, then specify that the upper
 triangle is undefined by
 mat = LowerTriangular(mat) # where mat is a Matrix of any eltype.

>>>
>>>
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Julia Version 0.4.6
Commit 2e358ce (2016-06-19 17:16 UTC)
Platform Info:
-- System: windows (x86_64-w64-mingw32)
-- CPU: Intel(R) Core (TM) i5-4310U CPU @ 2.00GHz
-- Word_Size: 64
-- BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
-- LAPACK: libopenblas64_
-- LIBM: libopenlibm
-- LLUM: libLLUM-3.3

Its work computer

On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:
>>
>> I get the same error:  
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not single 
>>> quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got: Error: 
 could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
 process.jl:262

 No idea what that means :(

 Once again - feel like my questions are probably introductory, and I 
 appreciate your time.

 The actual name of the code I am trying to open is titled 
 "Code_for_Github.jl"



 On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file is 
> present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> Ok, I am trying to familiarize myself with a study published using 
>> Julia.  I have Julia up and running, but cant seep to get the actual 
>> code 
>> open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  Now I 
>> downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a 
>> couple excel CSV files needed.
>>
>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>> following error:
>>
>> *No such file or directory in open at iostream.jl:90  **in open at 
>> **iostream.jl:99*
>>
>> My sense is that I dont have the file in the right directory, but this 
>> is where I get over my skis.
>>
>> Is that the issue?  How do I make Julia find the file?  Sorry or such 
>> basic questions 
>>
>>
>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
Please show me
julia> versioninfo()


On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:
>
> I get the same error:  
> Julia>run(`pwd`)   what I tried to execute
> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
> _jl_spawn at process.jl:262
>
> I am attaching a screen shot
>
> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> what do you see with this (in Julia, note the backtics are not single 
>> quotes)
>> julia> run(`pwd`)
>>
>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Ok - This makes sense to me...but:
>>>
>>> When I proceeded with julia>;pwd this is the response I got: Error: 
>>> could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
>>> process.jl:262
>>>
>>> No idea what that means :(
>>>
>>> Once again - feel like my questions are probably introductory, and I 
>>> appreciate your time.
>>>
>>> The actual name of the code I am trying to open is titled 
>>> "Code_for_Github.jl"
>>>
>>>
>>>
>>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:

 Hello there,
 I think you need to change to the directory where your file is present.

 You can try to use command line within julia like:
 julia > ;pwd #Check your present working directory
 julia> ;cd /path_to_the_directory_where_your_file_is_present

 OR 
 try to give the absolute path of the directory (Assume your file is 
 present in home directory on linux)

 julia>open("/home/Filename.jl")

 I hope it helps :)


 *Yours Sincerely,*
 *Ayush Pandey* * *
 ayush-iitkgp.github.io/

 On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket  wrote:

> Ok, I am trying to familiarize myself with a study published using 
> Julia.  I have Julia up and running, but cant seep to get the actual code 
> open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  Now I 
> downloaded the code via CSV.  
>
> It contains the Code in a .jl file, license file, readme file and a 
> couple excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got the 
> following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but this is 
> where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such 
> basic questions 
>
>


Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Yichao Yu
On Fri, Aug 19, 2016 at 10:01 PM, Erik Schnetter 
wrote:

> On Fri, Aug 19, 2016 at 9:53 AM, Yichao Yu  wrote:
>
>>
>> On Fri, Aug 19, 2016 at 9:01 PM, Oliver Schulz <
>> oliver.sch...@tu-dortmund.de> wrote:
>>
>>> Hi Eric,
>>>
>>> nice - this is exactly what I meant. I wonder if Julia Symbols
>>> themselves could become like this in the future.
>>>
>>
>> As jameson said already, isbits or not is irrelevant here and we are
>> working towards making non isbits type inlinable.
>>
>> The ValueSymbol type is also not a true isbits type, you can't save it to
>> sysimg or use it with mmap array for example (well, you can, but you won't
>> get the answer you want)
>>
>
> Okay, call it `pointerfree` then.
>

Well, the point is that it doesn't have all the necessary probably assumed
by other part of the system. `isbits` is an acronym of `pointerfree`.


>
> -erik
>
>
> Cheers,
>>>
>>> Oliver
>>>
>>>
>>> On 17.08.2016 18:44, Erik Schnetter wrote:
>>>
 See  for what I had in
 mind.

 -erik

 On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu > wrote:



 On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
 >

 wrote:

 Hi Yichao

 I get that - I was just curious why (and I guess there's likely
 a very good reason for it). My intuition would be that a
 non-GCed interned string type could be represented by a bitstype
 (i.e. a pointer or index to the string table). So I was
 surprised that Symbol is an object reference and wanted to
 understand this a bit better.


 It's a pointer to managed memory with tag that's all what's needed
 for it to be a !pointerfree type. There are way more things that we
 don't GC and it has nothing to do with whether it's a isbits type or
 not.




 Cheers,

 Oliver


 On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
 wrote:


 > PS: Yes, symbols in Julia should be bitstypes.

 No, it's a object reference and isn't a `isbits()` type.



 On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
  wrote:

 Good points.

 Given that symbols have a name which is a string, I
 don't see how they could be a bits-type unless they
 just became numbers to index into a global array
 somewhere.. i.e. a pointer. Stack-allocating
 non-bits-type immutables is on the roadmap to 1.0,
 so that should solve your problems.

 Maybe you can solve the CategorizedPoint problem by
 using an @enum.

 On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
  wrote:

 Hello Andreas,

 consider iterating over a Dict{Symbol,Int64}:

 |
 d =Dict(:foo =>42,:bar =>77)

 forx ind println("$(typeof(x)),
 $(isbits(x))")end
 |


 During iteration, a lot of stack allocated
 "Pair{Symbol,Int64}" objects are created. That
 is very bad for performance.

 |
 immutable CategorizedPoint
 x::Float64
 y::Float64
 category::Symbol
 end
 |


 Also, consider a (hypothetical) data type for
 categorized points (with a finite number of
 categories - but extensible, so that Symbol is a
 better fit than using an enum):

 immutable CategorizedPoint
 x::Float64
 y::Float64
 category::Symbol
 end

 I would definitely want this to be a bits-type,
 and not have every instance heap-allocated.


 Cheers,

 Oliver


 On Wednesday, August 17, 2016 at 11:44:13 AM
   

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
What is the machine/OS you are using? Is it yours, a school's? 


On Friday, August 19, 2016 at 10:04:20 AM UTC-4, Jeffrey Sarnoff wrote:
>
> Please show me
> julia> versioninfo()
>
>
> On Friday, August 19, 2016 at 10:02:36 AM UTC-4, Pigskin Ablanket wrote:
>>
>> I get the same error:  
>> Julia>run(`pwd`)   what I tried to execute
>> ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
>> _jl_spawn at process.jl:262
>>
>> I am attaching a screen shot
>>
>> On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>>>
>>> what do you see with this (in Julia, note the backtics are not single 
>>> quotes)
>>> julia> run(`pwd`)
>>>
>>> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:

 Ok - This makes sense to me...but:

 When I proceeded with julia>;pwd this is the response I got: Error: 
 could not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
 process.jl:262

 No idea what that means :(

 Once again - feel like my questions are probably introductory, and I 
 appreciate your time.

 The actual name of the code I am trying to open is titled 
 "Code_for_Github.jl"



 On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file is 
> present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket <
> pigskin...@gmail.com> wrote:
>
>> Ok, I am trying to familiarize myself with a study published using 
>> Julia.  I have Julia up and running, but cant seep to get the actual 
>> code 
>> open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  Now I 
>> downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a 
>> couple excel CSV files needed.
>>
>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>> following error:
>>
>> *No such file or directory in open at iostream.jl:90  **in open at 
>> **iostream.jl:99*
>>
>> My sense is that I dont have the file in the right directory, but this 
>> is where I get over my skis.
>>
>> Is that the issue?  How do I make Julia find the file?  Sorry or such 
>> basic questions 
>>
>>
>

Re: [julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Ahmed Mazari
4×4 Array{Int64,2}:
 0  1  2  3
 1  0  4  5
 2  4  0  6
 3  5  6  0

a symetric matrix m[i,j] =m[j,i]  and m[i,i]= 0

On Fri, Aug 19, 2016 at 3:59 PM, Jeffrey Sarnoff 
wrote:

> Is this what you want, or are you looking for a more general way to
> construct nxn matrices like this 4x4 matrix, or something else?
>
> julia> m = [ [0,1,2,3] [1,0,4,5] [2,3,0,6] [4,5,6,0] ]
> 4×4 Array{Int64,2}:
>  0  1  2  4
>  1  0  3  5
>  2  4  0  6
>  3  5  6  0
>
>
> On Friday, August 19, 2016 at 9:01:06 AM UTC-4, Ahmed Mazari wrote:
>>
>> Yes but it doesn't allow me to set the diagonal to 0 ??
>>
>> On Fri, Aug 19, 2016 at 2:55 PM, Michael Borregaard 
>> wrote:
>>
>>> You can build the matrix as normal, then specify that the upper triangle
>>> is undefined by
>>> mat = LowerTriangular(mat) # where mat is a Matrix of any eltype.
>>>
>>
>>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
I get the same error:  
Julia>run(`pwd`)   what I tried to execute
ERROR: could not spawn `pwd`: no such file or directory (ENOENT) in 
_jl_spawn at process.jl:262

I am attaching a screen shot

On Friday, August 19, 2016 at 9:35:12 AM UTC-4, Jeffrey Sarnoff wrote:
>
> what do you see with this (in Julia, note the backtics are not single 
> quotes)
> julia> run(`pwd`)
>
> On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>>
>> Ok - This makes sense to me...but:
>>
>> When I proceeded with julia>;pwd this is the response I got: Error: could 
>> not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
>> process.jl:262
>>
>> No idea what that means :(
>>
>> Once again - feel like my questions are probably introductory, and I 
>> appreciate your time.
>>
>> The actual name of the code I am trying to open is titled 
>> "Code_for_Github.jl"
>>
>>
>>
>> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>>>
>>> Hello there,
>>> I think you need to change to the directory where your file is present.
>>>
>>> You can try to use command line within julia like:
>>> julia > ;pwd #Check your present working directory
>>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>>
>>> OR 
>>> try to give the absolute path of the directory (Assume your file is 
>>> present in home directory on linux)
>>>
>>> julia>open("/home/Filename.jl")
>>>
>>> I hope it helps :)
>>>
>>>
>>> *Yours Sincerely,*
>>> *Ayush Pandey* * *
>>> ayush-iitkgp.github.io/
>>>
>>> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket  
>>> wrote:
>>>
 Ok, I am trying to familiarize myself with a study published using 
 Julia.  I have Julia up and running, but cant seep to get the actual code 
 open.

 Here is what I done so far:

 julia> Pkg.add("JuMP")
 julia> Pkg.add("DataFrames")
 julia> Pkg.add("GLPKMathProgInterface")

 I believe I successfully added the requisite programs.  all good.  Now I 
 downloaded the code via CSV.  

 It contains the Code in a .jl file, license file, readme file and a couple 
 excel CSV files needed.

 I tried top open the file using Julia> Open("Filename.jl") and got the 
 following error:

 *No such file or directory in open at iostream.jl:90  **in open at 
 **iostream.jl:99*

 My sense is that I dont have the file in the right directory, but this is 
 where I get over my skis.

 Is that the issue?  How do I make Julia find the file?  Sorry or such 
 basic questions 


>>>

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Erik Schnetter
On Fri, Aug 19, 2016 at 9:53 AM, Yichao Yu  wrote:

>
> On Fri, Aug 19, 2016 at 9:01 PM, Oliver Schulz <
> oliver.sch...@tu-dortmund.de> wrote:
>
>> Hi Eric,
>>
>> nice - this is exactly what I meant. I wonder if Julia Symbols themselves
>> could become like this in the future.
>>
>
> As jameson said already, isbits or not is irrelevant here and we are
> working towards making non isbits type inlinable.
>
> The ValueSymbol type is also not a true isbits type, you can't save it to
> sysimg or use it with mmap array for example (well, you can, but you won't
> get the answer you want)
>

Okay, call it `pointerfree` then.

-erik


Cheers,
>>
>> Oliver
>>
>>
>> On 17.08.2016 18:44, Erik Schnetter wrote:
>>
>>> See  for what I had in
>>> mind.
>>>
>>> -erik
>>>
>>> On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu >> > wrote:
>>>
>>>
>>>
>>> On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>>> >
>>>
>>> wrote:
>>>
>>> Hi Yichao
>>>
>>> I get that - I was just curious why (and I guess there's likely
>>> a very good reason for it). My intuition would be that a
>>> non-GCed interned string type could be represented by a bitstype
>>> (i.e. a pointer or index to the string table). So I was
>>> surprised that Symbol is an object reference and wanted to
>>> understand this a bit better.
>>>
>>>
>>> It's a pointer to managed memory with tag that's all what's needed
>>> for it to be a !pointerfree type. There are way more things that we
>>> don't GC and it has nothing to do with whether it's a isbits type or
>>> not.
>>>
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Oliver
>>>
>>>
>>> On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
>>> wrote:
>>>
>>>
>>> > PS: Yes, symbols in Julia should be bitstypes.
>>>
>>> No, it's a object reference and isn't a `isbits()` type.
>>>
>>>
>>>
>>> On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
>>>  wrote:
>>>
>>> Good points.
>>>
>>> Given that symbols have a name which is a string, I
>>> don't see how they could be a bits-type unless they
>>> just became numbers to index into a global array
>>> somewhere.. i.e. a pointer. Stack-allocating
>>> non-bits-type immutables is on the roadmap to 1.0,
>>> so that should solve your problems.
>>>
>>> Maybe you can solve the CategorizedPoint problem by
>>> using an @enum.
>>>
>>> On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
>>>  wrote:
>>>
>>> Hello Andreas,
>>>
>>> consider iterating over a Dict{Symbol,Int64}:
>>>
>>> |
>>> d =Dict(:foo =>42,:bar =>77)
>>>
>>> forx ind println("$(typeof(x)), $(isbits(x))")end
>>> |
>>>
>>>
>>> During iteration, a lot of stack allocated
>>> "Pair{Symbol,Int64}" objects are created. That
>>> is very bad for performance.
>>>
>>> |
>>> immutable CategorizedPoint
>>> x::Float64
>>> y::Float64
>>> category::Symbol
>>> end
>>> |
>>>
>>>
>>> Also, consider a (hypothetical) data type for
>>> categorized points (with a finite number of
>>> categories - but extensible, so that Symbol is a
>>> better fit than using an enum):
>>>
>>> immutable CategorizedPoint
>>> x::Float64
>>> y::Float64
>>> category::Symbol
>>> end
>>>
>>> I would definitely want this to be a bits-type,
>>> and not have every instance heap-allocated.
>>>
>>>
>>> Cheers,
>>>
>>> Oliver
>>>
>>>
>>> On Wednesday, August 17, 2016 at 11:44:13 AM
>>> UTC+2, Andreas Lobinger wrote:
>>>
>>> Hello colleague,
>>>
>>> On Wednesday, August 17, 2016 at 11:12:51 AM
>>> UTC+2, Oliver Schulz wrote:
>>>
>>> Sure -  I was assuming that as Symbol
>>> (as an interned string) is 

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Yichao Yu
On Fri, Aug 19, 2016 at 9:01 PM, Oliver Schulz  wrote:

> Hi Eric,
>
> nice - this is exactly what I meant. I wonder if Julia Symbols themselves
> could become like this in the future.
>

As jameson said already, isbits or not is irrelevant here and we are
working towards making non isbits type inlinable.

The ValueSymbol type is also not a true isbits type, you can't save it to
sysimg or use it with mmap array for example (well, you can, but you won't
get the answer you want)


>
>
> Cheers,
>
> Oliver
>
>
> On 17.08.2016 18:44, Erik Schnetter wrote:
>
>> See  for what I had in mind.
>>
>> -erik
>>
>> On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu > > wrote:
>>
>>
>>
>> On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>> >
>>
>> wrote:
>>
>> Hi Yichao
>>
>> I get that - I was just curious why (and I guess there's likely
>> a very good reason for it). My intuition would be that a
>> non-GCed interned string type could be represented by a bitstype
>> (i.e. a pointer or index to the string table). So I was
>> surprised that Symbol is an object reference and wanted to
>> understand this a bit better.
>>
>>
>> It's a pointer to managed memory with tag that's all what's needed
>> for it to be a !pointerfree type. There are way more things that we
>> don't GC and it has nothing to do with whether it's a isbits type or
>> not.
>>
>>
>>
>>
>> Cheers,
>>
>> Oliver
>>
>>
>> On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
>> wrote:
>>
>>
>> > PS: Yes, symbols in Julia should be bitstypes.
>>
>> No, it's a object reference and isn't a `isbits()` type.
>>
>>
>>
>> On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
>>  wrote:
>>
>> Good points.
>>
>> Given that symbols have a name which is a string, I
>> don't see how they could be a bits-type unless they
>> just became numbers to index into a global array
>> somewhere.. i.e. a pointer. Stack-allocating
>> non-bits-type immutables is on the roadmap to 1.0,
>> so that should solve your problems.
>>
>> Maybe you can solve the CategorizedPoint problem by
>> using an @enum.
>>
>> On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
>>  wrote:
>>
>> Hello Andreas,
>>
>> consider iterating over a Dict{Symbol,Int64}:
>>
>> |
>> d =Dict(:foo =>42,:bar =>77)
>>
>> forx ind println("$(typeof(x)), $(isbits(x))")end
>> |
>>
>>
>> During iteration, a lot of stack allocated
>> "Pair{Symbol,Int64}" objects are created. That
>> is very bad for performance.
>>
>> |
>> immutable CategorizedPoint
>> x::Float64
>> y::Float64
>> category::Symbol
>> end
>> |
>>
>>
>> Also, consider a (hypothetical) data type for
>> categorized points (with a finite number of
>> categories - but extensible, so that Symbol is a
>> better fit than using an enum):
>>
>> immutable CategorizedPoint
>> x::Float64
>> y::Float64
>> category::Symbol
>> end
>>
>> I would definitely want this to be a bits-type,
>> and not have every instance heap-allocated.
>>
>>
>> Cheers,
>>
>> Oliver
>>
>>
>> On Wednesday, August 17, 2016 at 11:44:13 AM
>> UTC+2, Andreas Lobinger wrote:
>>
>> Hello colleague,
>>
>> On Wednesday, August 17, 2016 at 11:12:51 AM
>> UTC+2, Oliver Schulz wrote:
>>
>> Sure -  I was assuming that as Symbol
>> (as an interned string) is basically
>> just a pointer. So comparisons are O(1),
>> etc. What I'd like to understand is, why
>> can't it be a bitstype? Currently, it's
>>   

Re: [julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Jeffrey Sarnoff
Is this what you want, or are you looking for a more general way to 
construct nxn matrices like this 4x4 matrix, or something else?

julia> m = [ [0,1,2,3] [1,0,4,5] [2,3,0,6] [4,5,6,0] ]
4×4 Array{Int64,2}:
 0  1  2  4
 1  0  3  5
 2  4  0  6
 3  5  6  0


On Friday, August 19, 2016 at 9:01:06 AM UTC-4, Ahmed Mazari wrote:
>
> Yes but it doesn't allow me to set the diagonal to 0 ??
>
> On Fri, Aug 19, 2016 at 2:55 PM, Michael Borregaard  > wrote:
>
>> You can build the matrix as normal, then specify that the upper triangle 
>> is undefined by
>> mat = LowerTriangular(mat) # where mat is a Matrix of any eltype.
>>
>
>

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Yichao Yu
On Fri, Aug 19, 2016 at 9:53 PM, Erik Schnetter  wrote:

> If Julia symbols are never garbage collected, then they could be directly
> implemented as a (bitstype) C pointer to a malloc'd region. There's no need
> to involve Julia's memory allocator or garbage collector, or tell the
> garbage collector about variables holding symbols.
>

Loading symbols never involve the GC/allocator. OTOH, it might when the
symbol becomes a isbits.


>
> -erik
>
> On Fri, Aug 19, 2016 at 9:01 AM, Oliver Schulz <
> oliver.sch...@tu-dortmund.de> wrote:
>
>> Hi Eric,
>>
>> nice - this is exactly what I meant. I wonder if Julia Symbols themselves
>> could become like this in the future.
>>
>>
>> Cheers,
>>
>> Oliver
>>
>>
>> On 17.08.2016 18:44, Erik Schnetter wrote:
>>
>>> See  for what I had in
>>> mind.
>>>
>>> -erik
>>>
>>> On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu >> > wrote:
>>>
>>>
>>>
>>> On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>>> >
>>> wrote:
>>>
>>> Hi Yichao
>>>
>>> I get that - I was just curious why (and I guess there's likely
>>> a very good reason for it). My intuition would be that a
>>> non-GCed interned string type could be represented by a bitstype
>>> (i.e. a pointer or index to the string table). So I was
>>> surprised that Symbol is an object reference and wanted to
>>> understand this a bit better.
>>>
>>>
>>> It's a pointer to managed memory with tag that's all what's needed
>>> for it to be a !pointerfree type. There are way more things that we
>>> don't GC and it has nothing to do with whether it's a isbits type or
>>> not.
>>>
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Oliver
>>>
>>>
>>> On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
>>> wrote:
>>>
>>>
>>> > PS: Yes, symbols in Julia should be bitstypes.
>>>
>>> No, it's a object reference and isn't a `isbits()` type.
>>>
>>>
>>>
>>> On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
>>>  wrote:
>>>
>>> Good points.
>>>
>>> Given that symbols have a name which is a string, I
>>> don't see how they could be a bits-type unless they
>>> just became numbers to index into a global array
>>> somewhere.. i.e. a pointer. Stack-allocating
>>> non-bits-type immutables is on the roadmap to 1.0,
>>> so that should solve your problems.
>>>
>>> Maybe you can solve the CategorizedPoint problem by
>>> using an @enum.
>>>
>>> On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
>>>  wrote:
>>>
>>> Hello Andreas,
>>>
>>> consider iterating over a Dict{Symbol,Int64}:
>>>
>>> |
>>> d =Dict(:foo =>42,:bar =>77)
>>> forx ind println("$(typeof(x)), $(isbits(x))")end
>>> |
>>>
>>>
>>> During iteration, a lot of stack allocated
>>> "Pair{Symbol,Int64}" objects are created. That
>>> is very bad for performance.
>>>
>>> |
>>> immutable CategorizedPoint
>>> x::Float64
>>> y::Float64
>>> category::Symbol
>>> end
>>> |
>>>
>>>
>>> Also, consider a (hypothetical) data type for
>>> categorized points (with a finite number of
>>> categories - but extensible, so that Symbol is a
>>> better fit than using an enum):
>>>
>>> immutable CategorizedPoint
>>> x::Float64
>>> y::Float64
>>> category::Symbol
>>> end
>>>
>>> I would definitely want this to be a bits-type,
>>> and not have every instance heap-allocated.
>>>
>>>
>>> Cheers,
>>>
>>> Oliver
>>>
>>>
>>> On Wednesday, August 17, 2016 at 11:44:13 AM
>>> UTC+2, Andreas Lobinger wrote:
>>>
>>> Hello colleague,
>>>
>>> On Wednesday, August 17, 2016 at 11:12:51 AM
>>> UTC+2, Oliver Schulz wrote:
>>>
>>> Sure -  I was assuming that as Symbol
>>> 

Re: [julia-users] memory allocations when accessing tuple fields of a type

2016-08-19 Thread Erik Schnetter
How is `ElementSize` defined? Creating objects (or making copies) of such
objects might require memory allocation.d

-erik

On Fri, Aug 19, 2016 at 8:06 AM, Uri Patish  wrote:

> Hi, I have to following types,
>
> typealias ElementSize
>
> typealias Element Array{Float64, 3}
>
> type ElementBuffer
> size::ElementSize
> alloc::ElementSize
> data::Element
> end
>
> The following function is called many times,
>
> function set_size!(bf::ElementBuffer, sz::ElementSize, load_old_data::Bool
> = true)
>   if (bf.alloc[1] < sz[1]) || (bf.alloc[2] < sz[2]) || (bf.alloc[3] <
> sz[3])
> old_data = bf.data
> bf.alloc = map(max, bf.alloc, sz)
> bf.data = Element(bf.alloc)
> if load_old_data
>   load_body!(bf, old_data)
> end
> end
> bf.size = sz
>   nothing
> end
>
> I've seen there is a lot of memory allocation going on, so I've
> benchmarked the former code using Julia's track-allocation=user option. The
> result was suprising,
>
> - function set_size!(bf::ElementBuffer, sz::ElementSize,
> load_old_data::Bool = true)
> 1710097664   if (bf.alloc[1] < sz[1]) || (bf.alloc[2] < sz[2]) ||
> (bf.alloc[3] < sz[3])
> 0 old_data = bf.data
>   2894592 bf.alloc = map(max, bf.alloc, sz)
>  59783056 bf.data = Element(bf.alloc)
> 0 if load_old_data
> 0   load_body!(bf, old_data)
> - end
> - end
> 0 bf.size = sz
> 0   nothing
> - end
>
> After running the code in debug, I've seen that there is an allocation
> happening every time the alloc field is accessed. If I change the field
> type from a tuple to an array this phenomenon disappears. I can't figure
> out why this allocation is happening, any ideas?
>
> Uri
>
>


-- 
Erik Schnetter 
http://www.perimeterinstitute.ca/personal/eschnetter/


Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Erik Schnetter
If Julia symbols are never garbage collected, then they could be directly
implemented as a (bitstype) C pointer to a malloc'd region. There's no need
to involve Julia's memory allocator or garbage collector, or tell the
garbage collector about variables holding symbols.

-erik

On Fri, Aug 19, 2016 at 9:01 AM, Oliver Schulz  wrote:

> Hi Eric,
>
> nice - this is exactly what I meant. I wonder if Julia Symbols themselves
> could become like this in the future.
>
>
> Cheers,
>
> Oliver
>
>
> On 17.08.2016 18:44, Erik Schnetter wrote:
>
>> See  for what I had in mind.
>>
>> -erik
>>
>> On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu > > wrote:
>>
>>
>>
>> On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>> >
>> wrote:
>>
>> Hi Yichao
>>
>> I get that - I was just curious why (and I guess there's likely
>> a very good reason for it). My intuition would be that a
>> non-GCed interned string type could be represented by a bitstype
>> (i.e. a pointer or index to the string table). So I was
>> surprised that Symbol is an object reference and wanted to
>> understand this a bit better.
>>
>>
>> It's a pointer to managed memory with tag that's all what's needed
>> for it to be a !pointerfree type. There are way more things that we
>> don't GC and it has nothing to do with whether it's a isbits type or
>> not.
>>
>>
>>
>>
>> Cheers,
>>
>> Oliver
>>
>>
>> On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu
>> wrote:
>>
>>
>> > PS: Yes, symbols in Julia should be bitstypes.
>>
>> No, it's a object reference and isn't a `isbits()` type.
>>
>>
>>
>> On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
>>  wrote:
>>
>> Good points.
>>
>> Given that symbols have a name which is a string, I
>> don't see how they could be a bits-type unless they
>> just became numbers to index into a global array
>> somewhere.. i.e. a pointer. Stack-allocating
>> non-bits-type immutables is on the roadmap to 1.0,
>> so that should solve your problems.
>>
>> Maybe you can solve the CategorizedPoint problem by
>> using an @enum.
>>
>> On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
>>  wrote:
>>
>> Hello Andreas,
>>
>> consider iterating over a Dict{Symbol,Int64}:
>>
>> |
>> d =Dict(:foo =>42,:bar =>77)
>> forx ind println("$(typeof(x)), $(isbits(x))")end
>> |
>>
>>
>> During iteration, a lot of stack allocated
>> "Pair{Symbol,Int64}" objects are created. That
>> is very bad for performance.
>>
>> |
>> immutable CategorizedPoint
>> x::Float64
>> y::Float64
>> category::Symbol
>> end
>> |
>>
>>
>> Also, consider a (hypothetical) data type for
>> categorized points (with a finite number of
>> categories - but extensible, so that Symbol is a
>> better fit than using an enum):
>>
>> immutable CategorizedPoint
>> x::Float64
>> y::Float64
>> category::Symbol
>> end
>>
>> I would definitely want this to be a bits-type,
>> and not have every instance heap-allocated.
>>
>>
>> Cheers,
>>
>> Oliver
>>
>>
>> On Wednesday, August 17, 2016 at 11:44:13 AM
>> UTC+2, Andreas Lobinger wrote:
>>
>> Hello colleague,
>>
>> On Wednesday, August 17, 2016 at 11:12:51 AM
>> UTC+2, Oliver Schulz wrote:
>>
>> Sure -  I was assuming that as Symbol
>> (as an interned string) is basically
>> just a pointer. So comparisons are O(1),
>> etc. What I'd like to understand is, why
>> can't it be a bitstype? Currently, it's
>> not, so Symbol 

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
what do you see with this (in Julia, note the backtics are not single 
quotes)
julia> run(`pwd`)

On Friday, August 19, 2016 at 8:41:51 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok - This makes sense to me...but:
>
> When I proceeded with julia>;pwd this is the response I got: Error: could 
> not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
> process.jl:262
>
> No idea what that means :(
>
> Once again - feel like my questions are probably introductory, and I 
> appreciate your time.
>
> The actual name of the code I am trying to open is titled 
> "Code_for_Github.jl"
>
>
>
> On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>>
>> Hello there,
>> I think you need to change to the directory where your file is present.
>>
>> You can try to use command line within julia like:
>> julia > ;pwd #Check your present working directory
>> julia> ;cd /path_to_the_directory_where_your_file_is_present
>>
>> OR 
>> try to give the absolute path of the directory (Assume your file is 
>> present in home directory on linux)
>>
>> julia>open("/home/Filename.jl")
>>
>> I hope it helps :)
>>
>>
>> *Yours Sincerely,*
>> *Ayush Pandey* * *
>> ayush-iitkgp.github.io/
>>
>> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket  
>> wrote:
>>
>>> Ok, I am trying to familiarize myself with a study published using 
>>> Julia.  I have Julia up and running, but cant seep to get the actual code 
>>> open.
>>>
>>> Here is what I done so far:
>>>
>>> julia> Pkg.add("JuMP")
>>> julia> Pkg.add("DataFrames")
>>> julia> Pkg.add("GLPKMathProgInterface")
>>>
>>> I believe I successfully added the requisite programs.  all good.  Now I 
>>> downloaded the code via CSV.  
>>>
>>> It contains the Code in a .jl file, license file, readme file and a couple 
>>> excel CSV files needed.
>>>
>>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>>> following error:
>>>
>>> *No such file or directory in open at iostream.jl:90  **in open at 
>>> **iostream.jl:99*
>>>
>>> My sense is that I dont have the file in the right directory, but this is 
>>> where I get over my skis.
>>>
>>> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
>>> questions 
>>>
>>>
>>

[julia-users] Re: New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
what do you see when at the julia> prompt you type (notice the backtics are 
not single quotes)
run(`pwd`)

On Friday, August 19, 2016 at 8:47:07 AM UTC-4, Pigskin Ablanket wrote:
>
> The link to the folder is: 
> https://github.com/dscotthunter/Fantasy-Hockey-IP-Code  which has a zip 
> file of the code and sample information
>
> I was unable to det the file via: $ git clone 
> https://github.com/dscotthunter/Fantasy-Hockey-IP-Code  so I downloaded 
> the CSV file and extracted it.   I feel like I need to extract those files 
> to a specific location, but cnat figure out where.as I dont know what 
> directory I have Julia working in (if that makes sense).
>
>
>
> On Friday, August 19, 2016 at 8:40:31 AM UTC-4, Jeffrey Sarnoff wrote:
>>
>> Where is the code that you downloaded, what is the http:// of that? 
>>
>>
>> On Friday, August 19, 2016 at 6:09:05 AM UTC-4, Pigskin Ablanket wrote:
>>>
>>> Ok, I am trying to familiarize myself with a study published using 
>>> Julia.  I have Julia up and running, but cant seep to get the actual code 
>>> open.
>>>
>>> Here is what I done so far:
>>>
>>> julia> Pkg.add("JuMP")
>>> julia> Pkg.add("DataFrames")
>>> julia> Pkg.add("GLPKMathProgInterface")
>>>
>>> I believe I successfully added the requisite programs.  all good.  Now I 
>>> downloaded the code via CSV.  
>>>
>>> It contains the Code in a .jl file, license file, readme file and a couple 
>>> excel CSV files needed.
>>>
>>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>>> following error:
>>>
>>> *No such file or directory in open at iostream.jl:90  **in open at 
>>> **iostream.jl:99*
>>>
>>> My sense is that I dont have the file in the right directory, but this is 
>>> where I get over my skis.
>>>
>>> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
>>> questions 
>>>
>>>

Re: [julia-users] Re: Symbols as Dict keys - efficiency / memory allocation?

2016-08-19 Thread Oliver Schulz

Hi Eric,

nice - this is exactly what I meant. I wonder if Julia Symbols 
themselves could become like this in the future.



Cheers,

Oliver


On 17.08.2016 18:44, Erik Schnetter wrote:

See  for what I had in mind.

-erik

On Wed, Aug 17, 2016 at 10:32 AM, Yichao Yu > wrote:



On Wed, Aug 17, 2016 at 10:19 PM, Oliver Schulz
>
wrote:

Hi Yichao

I get that - I was just curious why (and I guess there's likely
a very good reason for it). My intuition would be that a
non-GCed interned string type could be represented by a bitstype
(i.e. a pointer or index to the string table). So I was
surprised that Symbol is an object reference and wanted to
understand this a bit better.


It's a pointer to managed memory with tag that's all what's needed
for it to be a !pointerfree type. There are way more things that we
don't GC and it has nothing to do with whether it's a isbits type or
not.




Cheers,

Oliver


On Wednesday, August 17, 2016 at 3:35:41 PM UTC+2, Yichao Yu wrote:


> PS: Yes, symbols in Julia should be bitstypes.

No, it's a object reference and isn't a `isbits()` type.



On Wed, Aug 17, 2016 at 8:26 AM, Cedric St-Jean
 wrote:

Good points.

Given that symbols have a name which is a string, I
don't see how they could be a bits-type unless they
just became numbers to index into a global array
somewhere.. i.e. a pointer. Stack-allocating
non-bits-type immutables is on the roadmap to 1.0,
so that should solve your problems.

Maybe you can solve the CategorizedPoint problem by
using an @enum.

On Wed, Aug 17, 2016 at 6:48 AM, Oliver Schulz
 wrote:

Hello Andreas,

consider iterating over a Dict{Symbol,Int64}:

|
d =Dict(:foo =>42,:bar =>77)
forx ind println("$(typeof(x)), $(isbits(x))")end
|


During iteration, a lot of stack allocated
"Pair{Symbol,Int64}" objects are created. That
is very bad for performance.

|
immutable CategorizedPoint
x::Float64
y::Float64
category::Symbol
end
|


Also, consider a (hypothetical) data type for
categorized points (with a finite number of
categories - but extensible, so that Symbol is a
better fit than using an enum):

immutable CategorizedPoint
x::Float64
y::Float64
category::Symbol
end

I would definitely want this to be a bits-type,
and not have every instance heap-allocated.


Cheers,

Oliver


On Wednesday, August 17, 2016 at 11:44:13 AM
UTC+2, Andreas Lobinger wrote:

Hello colleague,

On Wednesday, August 17, 2016 at 11:12:51 AM
UTC+2, Oliver Schulz wrote:

Sure -  I was assuming that as Symbol
(as an interned string) is basically
just a pointer. So comparisons are O(1),
etc. What I'd like to understand is, why
can't it be a bitstype? Currently, it's
not, so Symbol cannot be used in a
lightweight (i.e. stack-allocated)
immutable type. I assume there's a good
reason for it, I just want to understand
why.


Could you make an example how you would like
to use Symbol in lightweight types?





--
Erik Schnetter 
http://www.perimeterinstitute.ca/personal/eschnetter/







--
Erik Schnetter >

Re: [julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Ahmed Mazari
Yes but it doesn't allow me to set the diagonal to 0 ??

On Fri, Aug 19, 2016 at 2:55 PM, Michael Borregaard 
wrote:

> You can build the matrix as normal, then specify that the upper triangle
> is undefined by
> mat = LowerTriangular(mat) # where mat is a Matrix of any eltype.
>


[julia-users] Re: lower triangular matrix in julia

2016-08-19 Thread Jeffrey Sarnoff
I'm guessing you have worked with R, because the example you give uses NA 
as if it were an integer.  Julia does not have NA that way (there is 
special class of Nullable types that either are valued with e.g. an Int or 
else isnull .. probably you do not need that right now).
Would using floating point values and using the floating point NaN 
(not-a-number, a special floating point value) where you have NA work, or 
is this NA more like 'dont care', where replacing them with 0s would work?



On Friday, August 19, 2016 at 8:31:21 AM UTC-4, Ahmed Mazari wrote:
>
> Hello,
>
> l have the number of columns equals the number of rows . and the the 
> diagonal is esqual to zero .  How can l build this matrix  ?
> #mat
> # [,1] [,2] [,3] [,4]
> #[1,]   0   NA   NA   NA
> #[2,]1   0   NA   NA
> #[3,]24   0   NA
> #[4,]356   0
>
>
> thank you
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Ok - This makes sense to me...but:

When I proceeded with julia>;pwd this is the response I got: Error: could 
not spawn `pwd`: no such file or directory (ENOENT) in _jl_spawn at 
process.jl:262

No idea what that means :(

Once again - feel like my questions are probably introductory, and I 
appreciate your time.

The actual name of the code I am trying to open is titled 
"Code_for_Github.jl"



On Friday, August 19, 2016 at 6:26:20 AM UTC-4, Ayush Pandey wrote:
>
> Hello there,
> I think you need to change to the directory where your file is present.
>
> You can try to use command line within julia like:
> julia > ;pwd #Check your present working directory
> julia> ;cd /path_to_the_directory_where_your_file_is_present
>
> OR 
> try to give the absolute path of the directory (Assume your file is 
> present in home directory on linux)
>
> julia>open("/home/Filename.jl")
>
> I hope it helps :)
>
>
> *Yours Sincerely,*
> *Ayush Pandey* * *
> ayush-iitkgp.github.io/
>
> On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket  > wrote:
>
>> Ok, I am trying to familiarize myself with a study published using 
>> Julia.  I have Julia up and running, but cant seep to get the actual code 
>> open.
>>
>> Here is what I done so far:
>>
>> julia> Pkg.add("JuMP")
>> julia> Pkg.add("DataFrames")
>> julia> Pkg.add("GLPKMathProgInterface")
>>
>> I believe I successfully added the requisite programs.  all good.  Now I 
>> downloaded the code via CSV.  
>>
>> It contains the Code in a .jl file, license file, readme file and a couple 
>> excel CSV files needed.
>>
>> I tried top open the file using Julia> Open("Filename.jl") and got the 
>> following error:
>>
>> *No such file or directory in open at iostream.jl:90  **in open at 
>> **iostream.jl:99*
>>
>> My sense is that I dont have the file in the right directory, but this is 
>> where I get over my skis.
>>
>> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
>> questions 
>>
>>
>

[julia-users] Re: New to Julia - Need some basic help

2016-08-19 Thread Jeffrey Sarnoff
Where is the code that you downloaded, what is the http:// of that? 


On Friday, August 19, 2016 at 6:09:05 AM UTC-4, Pigskin Ablanket wrote:
>
> Ok, I am trying to familiarize myself with a study published using Julia. 
>  I have Julia up and running, but cant seep to get the actual code open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  Now I 
> downloaded the code via CSV.  
>
> It contains the Code in a .jl file, license file, readme file and a couple 
> excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got the 
> following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but this is 
> where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
> questions 
>
>

[julia-users] lower triangular matrix in julia

2016-08-19 Thread Ahmed Mazari
Hello,

l have the number of columns equals the number of rows . and the the 
diagonal is esqual to zero .  How can l build this matrix  ?
#mat
# [,1] [,2] [,3] [,4]
#[1,]   0   NA   NA   NA
#[2,]1   0   NA   NA
#[3,]24   0   NA
#[4,]356   0


thank you


[julia-users] memory allocations when accessing tuple fields of a type

2016-08-19 Thread Uri Patish
Hi, I have to following types, 

typealias ElementSize 

typealias Element Array{Float64, 3}

type ElementBuffer
size::ElementSize
alloc::ElementSize
data::Element
end

The following function is called many times,

function set_size!(bf::ElementBuffer, sz::ElementSize, load_old_data::Bool 
= true)
  if (bf.alloc[1] < sz[1]) || (bf.alloc[2] < sz[2]) || (bf.alloc[3] < sz[3])
old_data = bf.data
bf.alloc = map(max, bf.alloc, sz)
bf.data = Element(bf.alloc)
if load_old_data
  load_body!(bf, old_data)
end
end
bf.size = sz
  nothing
end

I've seen there is a lot of memory allocation going on, so I've benchmarked 
the former code using Julia's track-allocation=user option. The result was 
suprising, 

- function set_size!(bf::ElementBuffer, sz::ElementSize, 
load_old_data::Bool = true)
1710097664   if (bf.alloc[1] < sz[1]) || (bf.alloc[2] < sz[2]) || 
(bf.alloc[3] < sz[3])
0 old_data = bf.data
  2894592 bf.alloc = map(max, bf.alloc, sz)
 59783056 bf.data = Element(bf.alloc)
0 if load_old_data
0   load_body!(bf, old_data)
- end
- end
0 bf.size = sz
0   nothing
- end

After running the code in debug, I've seen that there is an allocation 
happening every time the alloc field is accessed. If I change the field 
type from a tuple to an array this phenomenon disappears. I can't figure 
out why this allocation is happening, any ideas?

Uri



[julia-users] Re: New to Julia - Need some basic help

2016-08-19 Thread Simon Danisch
Also, are you looking for *include("Filename.jl")* ?

Am Freitag, 19. August 2016 12:09:05 UTC+2 schrieb Pigskin Ablanket:
>
> Ok, I am trying to familiarize myself with a study published using Julia. 
>  I have Julia up and running, but cant seep to get the actual code open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  Now I 
> downloaded the code via CSV.  
>
> It contains the Code in a .jl file, license file, readme file and a couple 
> excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got the 
> following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but this is 
> where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
> questions 
>
>

Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Ayush Pandey
Hello there,
I think you need to change to the directory where your file is present.

You can try to use command line within julia like:
julia > ;pwd #Check your present working directory
julia> ;cd /path_to_the_directory_where_your_file_is_present

OR
try to give the absolute path of the directory (Assume your file is present
in home directory on linux)

julia>open("/home/Filename.jl")

I hope it helps :)


*Yours Sincerely,*
*Ayush Pandey* * *
ayush-iitkgp.github.io/

On Fri, Aug 19, 2016 at 1:54 PM, Pigskin Ablanket  wrote:

> Ok, I am trying to familiarize myself with a study published using Julia.
> I have Julia up and running, but cant seep to get the actual code open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  Now I 
> downloaded the code via CSV.
>
> It contains the Code in a .jl file, license file, readme file and a couple 
> excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got the 
> following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but this is 
> where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
> questions 
>
>


Re: [julia-users] New to Julia - Need some basic help

2016-08-19 Thread Michele Zaffalon
What code did you download?

On Fri, Aug 19, 2016 at 10:24 AM, Pigskin Ablanket <
pigskinablan...@gmail.com> wrote:

> Ok, I am trying to familiarize myself with a study published using Julia.
> I have Julia up and running, but cant seep to get the actual code open.
>
> Here is what I done so far:
>
> julia> Pkg.add("JuMP")
> julia> Pkg.add("DataFrames")
> julia> Pkg.add("GLPKMathProgInterface")
>
> I believe I successfully added the requisite programs.  all good.  Now I 
> downloaded the code via CSV.
>
> It contains the Code in a .jl file, license file, readme file and a couple 
> excel CSV files needed.
>
> I tried top open the file using Julia> Open("Filename.jl") and got the 
> following error:
>
> *No such file or directory in open at iostream.jl:90  **in open at 
> **iostream.jl:99*
>
> My sense is that I dont have the file in the right directory, but this is 
> where I get over my skis.
>
> Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
> questions 
>
>


[julia-users] New to Julia - Need some basic help

2016-08-19 Thread Pigskin Ablanket
Ok, I am trying to familiarize myself with a study published using Julia. 
 I have Julia up and running, but cant seep to get the actual code open.

Here is what I done so far:

julia> Pkg.add("JuMP")
julia> Pkg.add("DataFrames")
julia> Pkg.add("GLPKMathProgInterface")

I believe I successfully added the requisite programs.  all good.  Now I 
downloaded the code via CSV.  

It contains the Code in a .jl file, license file, readme file and a couple 
excel CSV files needed.

I tried top open the file using Julia> Open("Filename.jl") and got the 
following error:

*No such file or directory in open at iostream.jl:90  **in open at 
**iostream.jl:99*

My sense is that I dont have the file in the right directory, but this is where 
I get over my skis.

Is that the issue?  How do I make Julia find the file?  Sorry or such basic 
questions 



Re: [julia-users] IBM Power port

2016-08-19 Thread Patrick Kofod Mogensen
Since this isn't Github I cannot :+1:, but great stuff!

On Friday, August 19, 2016 at 6:56:38 AM UTC+2, Viral Shah wrote:
>
> I have uploaded Julia-0.5 on Power8 binaries here. These are built with 
> the latest openblas (that passes all julia tests) and hence there is no 
> need to use ATLAS. 
>
> https://drive.google.com/open?id=0B0rXlkvSbIfhVWpZb2hqclBIVms 
>
> Would be great if people can try this out. 
>
> -viral 
>
>
>
> > On Aug 19, 2016, at 9:06 AM, Viral Shah  
> wrote: 
> > 
> > I am getting successful builds on the OSU Power8 machine. Once openblas 
> has a new release, I suspect we can provide pre-packaged power8 binaries. 
> > 
> > I am building on CentOS 7 and this is what lscpu says: 
> > 
> > Architecture:  ppc64le 
> > Byte Order:Little Endian 
> > CPU(s):160 
> > On-line CPU(s) list:   0-159 
> > Thread(s) per core:8 
> > Core(s) per socket:10 
> > Socket(s): 2 
> > NUMA node(s):  2 
> > Model: 8335-GCA 
> > L1d cache: 64K 
> > L1i cache: 32K 
> > L2 cache:  512K 
> > L3 cache:  8192K 
> > NUMA node0 CPU(s): 0-79 
> > NUMA node8 CPU(s): 80-159 
> > 
> > I suspect you are running into a codegen issue. Let’s give it a few days 
> and once llvm 3.9 releases, we can try that. If not, we may need Jameson’s 
> help. 
> > 
> > -viral 
> > 
> > 
> > 
> >> On Aug 19, 2016, at 8:54 AM, Viral Shah  
> wrote: 
> >> 
> >> It is hard to say what is happening there. Trying it out. 
> >> 
> >> OpenBLAS develop branch is now passing on Power and hence Atlas should 
> no longer be required. Note that you need the latest (3.10.4?) ATLAS, but 
> in any case, this should not affect the build. 
> >> 
> >> -viral 
> >> 
> >> 
> >> 
> >>> On Aug 18, 2016, at 7:03 PM, Geert Janssen  > wrote: 
> >>> 
> >>> Dear Viral, 
> >>> 
> >>> I am building Julie release-0.5 on a Power8E Ubuntu 14.10 machine. 
> >>> I use the following Make.user after having had trouble compiling 
> OpenBLAS that was pulled in: 
> >>> 
> >>> created Make.user: 
> >>> override USE_SYSTEM_BLAS = 1 
> >>> override USE_BLAS64 = 0 
> >>> override LIBBLAS = -L/opt/atlas/lib -ltatlas 
> >>> override LIBBLASNAME = libtatlas 
> >>> 
> >>> I get a clean build all the way till the end and then this happens: 
> >>> 
> >>>    
> >>>   JULIA usr/lib/julia/inference.ji 
> >>> /bin/sh: line 1:  6967 Segmentation fault 
>  /localhome/geert/src/julia/usr/bin/julia -C native --output-ji 
> /localhome/geert/src/julia/usr/lib/julia/inference.ji --startup-file=no 
> coreimg.jl 
> >>> Makefile:215: recipe for target 
> '/localhome/geert/src/julia/usr/lib/julia/inference.ji' failed 
> >>> make[1]: *** [/localhome/geert/src/julia/usr/lib/julia/inference.ji] 
> Error 139 
> >>> Makefile:96: recipe for target 'julia-inference' failed 
> >>> make: *** [julia-inference] Error 2 
> >>> 
> >>> The machine and OS details are: 
> >>> 
> >>> geert@tulgpu505:~/src/julia$ lscpu 
> >>> Architecture:  ppc64le 
> >>> Byte Order:Little Endian 
> >>> CPU(s):184 
> >>> On-line CPU(s) list:   0-151,160-191 
> >>> Thread(s) per core:8 
> >>> Core(s) per socket:5 
> >>> Socket(s): 4 
> >>> NUMA node(s):  4 
> >>> Model: 8247-42L 
> >>> CPU max MHz:   3923. 
> >>> CPU min MHz:   2061. 
> >>> L1d cache: 64K 
> >>> L1i cache: 32K 
> >>> L2 cache:  512K 
> >>> L3 cache:  8192K 
> >>> NUMA node0 CPU(s): 0-47 
> >>> NUMA node1 CPU(s): 48-95 
> >>> NUMA node16 CPU(s):96-143 
> >>> NUMA node17 CPU(s):144-151,160-191 
> >>> geert@tulgpu505:~/src/julia$ cat /etc/os-release 
> >>> NAME="Ubuntu" 
> >>> VERSION="14.10 (Utopic Unicorn)" 
> >>> ID=ubuntu 
> >>> ID_LIKE=debian 
> >>> PRETTY_NAME="Ubuntu 14.10" 
> >>> VERSION_ID="14.10" 
> >>> HOME_URL="http://www.ubuntu.com/; 
> >>> SUPPORT_URL="http://help.ubuntu.com/; 
> >>> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/; 
> >>> geert@tulgpu505:~/src/julia$ uname -a 
> >>> Linux tulgpu505 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:11 
> UTC 2015 ppc64le ppc64le ppc64le GNU/Linux 
> >>> geert@tulgpu505:~/src/julia$   
> >>> 
> >>> Any suggestions? 
> >>> 
> >>> Thanks, 
> >>> 
> >>> Geert 
> >> 
> > 
>
>