[julia-users] Re: rand(x::Int32) doesn't exist, omission or intentional?

2014-08-11 Thread Jeff Waller
On Monday, August 11, 2014 1:34:05 PM UTC-4, Steven G. Johnson wrote: On Monday, August 11, 2014 9:04:23 AM UTC-4, Clemens Heitzinger wrote: Works like this (on 0.3.0-rc3): Clemens, I think Jeff wanted to generate a random Float64 array from an int32 size, not an array of random Int32

[julia-users] rand(x::Int32) doesn't exist, omission or intentional?

2014-08-10 Thread Jeff Waller
Seems like the intention is to cover many possibilities. This would be the typical rand but with type Int32 not Int64 for example. *julia **rand(2)* *2-element Array{Float64,1}:* * 0.690068* * 0.137219* *julia **rand(int32(2))* *ERROR: `rand` has no method matching rand(::Int32)* Is

[julia-users] Re: needless loss of performance: immutable conflates two concepts

2014-08-05 Thread Jeff Waller
It seems to me that immutability can be used as a signal to the compiler to optimize (by applying const to it), so the goal of immutability is increasing speed not reducing it. I remember doing reading on array allocation for a semi-related subject on SO, and here it is: Julia initialized

[julia-users] Embedding Julia; Composite Types

2014-07-23 Thread Jeff Waller
I've read the Embedding Julia docs which seem straightforward, except they seem to lack how to construct and communicate composite types. The type *** jl_value_t*** seems generic. Is this answered by reading the source?

[julia-users] Distributions after compile from src....

2014-07-19 Thread Jeff Waller
Trying to install Gadfly which depends on Distributions, but julia Pkg.add(Distributions) ERROR: key not found: Sampling in wait at task.jl:51 in add at pkg/entry.jl:314 in add at pkg/entry.jl:71 in anonymous at pkg/dir.jl:28 in add at pkg.jl:20 The most up to

[julia-users] Re: Distributions after compile from src....

2014-07-19 Thread Jeff Waller
An update: Brute forcing out Sampling from 0.4.8 and 0.4.9 fixes the problem, but why would these even be consulted?

[julia-users] Re: deepcopy of vector doesn't know type

2014-07-15 Thread Jeff Waller
On Tuesday, July 15, 2014 3:10:50 AM UTC-4, Sheehan Olver wrote: I noticed that deepcopy of a vector doesn't know that the result is the same type. Regular copy does, see below. Is this intentional or a bug? It looks to me like this is the reason function _deepcopy_array_t(x, T,

[julia-users] Is there a Process Object related to the current process?

2014-07-13 Thread Jeff Waller
More fundamentally, what facility exists that allows one to determine attributes of the current julia process? There's a function getpid(), but there doesn't appear to be getuid() or getgid() -- if they exist. It would be useful to have access to this information. A single call

[julia-users] Re: How cartesianmap take into variable ?

2014-07-13 Thread Jeff Waller
On Sunday, July 13, 2014 10:24:03 AM UTC-4, paul analyst wrote: Julia Documentation: cartesianmap(f, dims) Given a dims tuple of integers (m, n, ...), call f on all combinations of integers in the ranges 1:m, 1:n, etc. Example: julia cartesianmap(println, (2,2)) 11 21 12 22

[julia-users] Re: Delaying argument eval/check in @printf

2014-06-08 Thread Jeff Waller
Ok! pull request created... (I think). https://github.com/JuliaLang/julia/pull/7175

[julia-users] Delaying argument eval/check in @printf

2014-06-07 Thread Jeff Waller
Hello all, Recall this thread? https://groups.google.com/forum/#!searchin/julia-users/printf/julia-users/7Sn5yys0UJE/c7eoI4AqBPIJ Well I had to drop that effort because of several projects for a while, but have been able to return to it recently and I believe I have a solution. To refresh

Re: [julia-users] Re: Create formatted string

2014-04-14 Thread Jeff Waller
On Apr 13, 2014, at 1:20 PM, Jeff Waller trut...@gmail.com javascript: wrote: Likewise I am having problems with @sprintf Is this because @sprinf is macro? The shorthand of expanding a printf with format the contents of an array is desirable. I would have expected

Re: [julia-users] Re: Create formatted string

2014-04-14 Thread Jeff Waller
On Monday, April 14, 2014 10:58:15 AM UTC-4, Stefan Karpinski wrote: Up for grabs issue: https://github.com/JuliaLang/julia/issues/6520. If anyone is interested in doing a bit of metaprogramming, this is a good opportunity. Oh! Me, I mean I'm saying all these things, I should also

Re: [julia-users] Re: Create formatted string

2014-04-14 Thread Jeff Waller
On Monday, April 14, 2014 11:36:40 AM UTC-4, Stefan Karpinski wrote: The macros are defined here: https://github.com/JuliaLang/julia/blob/master/base/printf.jl#L750-L784 Do I need to git the most up-to-date source for Julia as well and make a language development environment? What's

Re: [julia-users] Re: A project for compact expressiveness

2014-04-14 Thread Jeff Waller
The mahalanobis distance? http://stats.stackexchange.com/questions/62092/bottom-to-top-explanation-of-the-mahalanobis-distance (habanero cookies answer) So here's a conjecture. The mahalanobis distance of all golfed programs solving the same problem for all equivalently expressive

[julia-users] Re: Create formatted string

2014-04-13 Thread Jeff Waller
Likewise I am having problems with @sprintf Is this because @sprinf is macro? The shorthand of expanding a printf with format the contents of an array is desirable. I would have expected the ... operator to take an array of length 2 and turn it into 2 arguments. julia X=[1 2] 1x2

Re: [julia-users] A project for compact expressiveness

2014-04-13 Thread Jeff Waller
On Sunday, April 13, 2014 6:36:49 PM UTC-4, bvauti...@gmail.com wrote: ##readline vs. readln Seems like a lot asking for just 2 characters or even talking about it. It does make a difference though; It does distinguish Julia from other languages. Does it need those 2 letters? It does

Re: [julia-users] A project for compact expressiveness

2014-04-13 Thread Jeff Waller
On Monday, April 14, 2014 12:41:05 AM UTC-4, Jameson wrote: We know that the extremes of verbosity (e.g. C) and conciseness (e.g. perl) are 'bad'. But why? Because using C generally means writing more code, which takes more time. Whereas Perl is 'bad' because being the human interpreter

[julia-users] A project for compact expressiveness

2014-04-12 Thread Jeff Waller
TL;DR Let's start with some golfing http://codegolf.stackexchange.com/. Compact Expressiveness: A term I've coined; maybe it already exists, but don't bother looking it up, I didn't, In the case of programming languages, loosely, I'm talking about getting the most out of fewest number of

Re: [julia-users] A project for compact expressiveness

2014-04-12 Thread Jeff Waller
On Saturday, April 12, 2014 6:02:44 PM UTC-4, Stefan Karpinski wrote: Making STDIN consistently the default input stream and STDOUT consistently the default output stream is right – any inconsistency there is just an oversight. Could you open an issue? I don't care for the renaming to

Re: [julia-users] A project for compact expressiveness

2014-04-12 Thread Jeff Waller
On Saturday, April 12, 2014 7:50:16 PM UTC-4, Peter Simon wrote: How about leaving readline as it now is and defining readln() to be chomp(readline())? That works, and it's backwards compatible. It's a little confusing, though, because there's 2 read a line functions and which one to use

<    1   2