Re: [julia-users] Re: Counterintuitive slices of 2d array

2014-04-16 Thread Bob Nnamtrop
I completely agree with you and would love to see julia drop singleton dimensions indexed with scalar. There is an issue on this with lots of discussion, which was left at the point of waiting til someone implements some code to give it a try (see https://github.com/JuliaLang/julia/issues/5949).

Re: [julia-users] Dataframe readtable change?

2014-05-22 Thread Bob Nnamtrop
An issue I noticed with Dataframes recently is that head(df) and tail(df) both list the show(df) summary (like those above) instead of listing the top and bottom of the dataframe. I just started using dataframes so I have no idea what they did in the past but it seems they should list the df and

[julia-users] pager in the repl

2014-05-22 Thread Bob Nnamtrop
I often find myself wishing for a pager in the repl when outputing large amount of output. I see that there is a Base.less but it is only used on files and not for outputting other stuff in the repl. In fact, it would be great to have support for less, head, and tail like functionality for looking

Re: [julia-users] pager in the repl

2014-05-22 Thread Bob Nnamtrop
OK done. See https://github.com/JuliaLang/julia/issues/6921 On Thu, May 22, 2014 at 12:20 PM, Kevin Squire kevin.squ...@gmail.comwrote: I agree that that would be nice. Would you be willing to open up an issue for this? On Thu, May 22, 2014 at 11:04 AM, Bob Nnamtrop bob.nnamt

Re: [julia-users] Dataframe readtable change?

2014-05-22 Thread Bob Nnamtrop
of a DataFrame. So you're seeing the usual show method's output, which can be overriden by explicitly requesting that you see the whole DataFrame. See https://github.com/JuliaStats/DataFrames.jl/blob/master/spec/show.md -- John On May 22, 2014, at 10:44 AM, Bob Nnamtrop bob.nnamt...@gmail.com wrote

Re: [julia-users] pager in the repl

2014-05-22 Thread Bob Nnamtrop
But julia often does show large screen dumps. Try: julia h={1=1}; for i=2:10 h[i]=i end; h :-) On Thu, May 22, 2014 at 12:52 PM, Mauro mauro...@runbox.com wrote: Octave has an automatic pager, which I don't like, but which I like better than matlab's endless screen dumps. I think the

Re: [julia-users] pager in the repl

2014-05-22 Thread Bob Nnamtrop
, at 12:01 PM, Bob Nnamtrop bob.nnamt...@gmail.com wrote: But julia often does show large screen dumps. Try: julia h={1=1}; for i=2:10 h[i]=i end; h :-) On Thu, May 22, 2014 at 12:52 PM, Mauro mauro...@runbox.com wrote: Octave has an automatic pager, which I don't like, but which I

Re: [julia-users] Empty STDOUT after redirect

2014-06-03 Thread Bob Nnamtrop
) or there is more data (!eof) On Tuesday, June 3, 2014, Bob Nnamtrop bob.nnamt...@gmail.com wrote: I am having an issue detecting if STDOUT is empty after I redirect it. I'm using an external C program may or may not write to STDOUT. Thus, I need to know if there is anything there before I

Re: [julia-users] Empty STDOUT after redirect

2014-06-03 Thread Bob Nnamtrop
or readbytes The number of bytes that can be read without a syscall (nb_available) is not a good test of how much can be gotten from a syscall. However, after eof returns true, then nb_available is the upper bound on the data that can be read. On Tuesday, June 3, 2014, Bob Nnamtrop bob.nnamt

Re: [julia-users] Empty STDOUT after redirect

2014-06-03 Thread Bob Nnamtrop
, 2014 at 1:07 PM, Jameson Nash vtjn...@gmail.com wrote: You shouldnt need to explicitly call eof or close On Tuesday, June 3, 2014, Bob Nnamtrop bob.nnamt...@gmail.com wrote: OK. I've got something that works, but it seems necessary to add a dummy write and then strip it out at the end

Re: [julia-users] OptionTypes.jl

2014-07-31 Thread Bob Nnamtrop
What about naming it the Data{T} type instead of Option{T} (or Optional{T}). Seems to fit in the DataArray{T} theme better and gives me a better idea what it is from the name (at least once one knows about DataArrays). Bob On Thu, Jul 31, 2014 at 10:56 AM, John Myles White

Re: [julia-users] Re: Strange LLVM error

2014-08-01 Thread Bob Nnamtrop
Yes, that command rand(3*ones(Int,12)...) throws julia into an infinite loop. No good. And very strange. Bob On Fri, Aug 1, 2014 at 4:02 PM, Jason ja...@jasonknight.us wrote: Is that from a different version of Julia? *julia **rand(3*ones(12)...)* *ERROR: `rand` has no method matching

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Bob Nnamtrop
I think using curly braces to denote indexing with dropped singleton dimensions would be nice: eg a[1,:,:] works as now, returns an Array with 3 dimensions a{1,:,:} returns an Array with 2 dimensions I realize this has syntax conflicts at this point but it seems it could be made to work. Bob

Re: [julia-users] Re: Strange Slicing Behaviour

2014-09-03 Thread Bob Nnamtrop
. Unfortunately, there are not very many ASCII paired brackets. On Wed, Sep 3, 2014 at 1:11 PM, Bob Nnamtrop bob.nnamt...@gmail.com wrote: I think using curly braces to denote indexing with dropped singleton dimensions would be nice: eg a[1,:,:] works as now, returns an Array with 3

Re: [julia-users] `include()` vs `require()`

2015-05-08 Thread Bob Nnamtrop
include is just about splitting a single file into multiple pieces Ok. But then why does include work at the REPL prompt? What is the difference between include and reload? I really think there are too many ways to do the same thing. Bob On Fri, May 8, 2015 at 11:58 AM, Stefan Karpinski

Re: [julia-users] `include()` vs `require()`

2015-05-08 Thread Bob Nnamtrop
loaded before. Typically used when interactively developing libraries. On Fri, May 8, 2015 at 4:13 PM, Bob Nnamtrop bob.nnamt...@gmail.com wrote: OK. But then what is the difference between include and reload? On Fri, May 8, 2015 at 1:54 PM, Stefan Karpinski ste...@karpinski.org wrote

Re: [julia-users] `include()` vs `require()`

2015-05-08 Thread Bob Nnamtrop
OK. But then what is the difference between include and reload? On Fri, May 8, 2015 at 1:54 PM, Stefan Karpinski ste...@karpinski.org wrote: Why wouldn't it work in the REPL? It means paste the contents of this file here. On Fri, May 8, 2015 at 3:46 PM, Bob Nnamtrop bob.nnamt...@gmail.com

Re: [julia-users] Re: @sprintf with a format string

2015-09-22 Thread Bob Nnamtrop
But Michael Hatherly's showed code above that uses a generated function to solve this. It seems to work pretty well in the short while I tried it in the REPL. Granted I didn't time it or do anything complicated. It works on Stefan's example above with no problem. The only difference is that one

Re: [julia-users] Help creating an IDL wrapper using Clang.jl

2016-08-05 Thread Bob Nnamtrop
I have written a (pretty) complete wrapper for IDL (years ago actually), but have not uploaded to github. I'll try to do that this weekend (and put an update here). I wrote it for my own use and have been waiting for Julia to mature to promote it to the IDL community. I originally wrote it for

Re: [julia-users] Re: equivalent of numpy newaxis?

2016-09-12 Thread Bob Nnamtrop
I use a simple function for this: function newdim(A::AbstractArray, d::Integer) @assert 0 < d <= ndims(A)+1 dim = size(A) reshape(A, dim[1:d-1]..., 1, dim[d:end]...) end But having syntax for a newaxis would be great. See also: https://github.com/JuliaLang/julia/issues/5405

Re: [julia-users] Help creating an IDL wrapper using Clang.jl

2016-09-21 Thread Bob Nnamtrop
ry > much like to use it. > > -Luke > > On Friday, August 5, 2016 at 10:19:16 AM UTC-7, Bob Nnamtrop wrote: >> >> I have written a (pretty) complete wrapper for IDL (years ago actually), >> but have not uploaded to github. I'll try to do that this weekend (and put >