I've long enjoyed ruby's `loop` keyword for exactly this type of use.
Cameron
On Tue, Apr 8, 2014 at 4:28 PM, Stefan Karpinski ste...@karpinski.orgwrote:
Eh, doesn't seem that hard to write `while true` and `while` by itself is
kind of confusing. I also don't necessarily think this is how
Greetings,
Does this exist somewhere in base and/or DataFrames: the ability to read
only selected columns from some text input? Ideally, you could have each
output vector of a different type (Float64, Int, etc.). (So it differs
from readdlm() in philosophy.)
A minimal implementation is below
Or you can use the non-vectorized version and save the overhead of the
temporary arrays being created by the addition and multiplication steps.
function trapz{T:Real}(x::Vector{T}, y::Vector{T})
local len = length(y)
if (len != length(x))
error(Vectors must be of same length)
On Thu, Apr 24, 2014 at 4:28 AM, Hans W Borchers hwborch...@gmail.comwrote:
function trapz2{T:Number}(x::Vector{T}, y::Vector{T})
local n = length(x)
if (length(y) != n)
error(Vectors 'x', 'y' must be of same length)
end
if n == 1; return 0.0;
On Tue, Apr 29, 2014 at 2:13 PM, Iain Dunning iaindunn...@gmail.com wrote:
Nothing has really been happening in Cambridge more often than those. What
exactly is a hack night?
All I had in mind was an informal meeting where there is work on something
julia for the evening (an hour or two or
believe Cameron
mentioned to me May 9 as a possibility.
Thanks,
Jiahao Chen
Staff Research Scientist
MIT Computer Science and Artificial Intelligence Laboratory
On Tue, Apr 29, 2014 at 3:31 PM, Cameron McBride
cameron.mcbr...@gmail.com wrote:
On Tue, Apr 29, 2014 at 2:13 PM, Iain Dunning
If there is some desire for big data tests, there is a fair number of
public astronomical datasets that wouldn't be too hard to package up.
The catalog level versions aren't too different than the type of dataset
metioned by Doug. There are a number of fairly simple analyses that could
be done on
Would linked lists be a more natural storage for these events?
On Thursday, May 1, 2014, Ethan Anderes ethanande...@gmail.com wrote:
Oop the second line of the code block should read
chain = Array{Float64,1}[theta_init]
Is there an idiomatic Julian way to deal with these cases without a large
pre-allocation or push? I understand why your suggestion here would be
faster than the original. This application aside, I see a lot of push!()
usage in some of the libs (eg saving state in Optim.jl, readdlm in base,
etc).
I'm still trying to settle into proper syntax and style, and all comments
are welcome!
For potentially longer if / elseif / else clauses, e.g.
# an overly simplistic example
if ndims(wt) == 2
println(Matrix stuff)
elseif ndims(wt) == 1
println(Vector stuff)
else
Excellent. Thanks to both of you!
Cameron
On Fri, May 2, 2014 at 11:11 AM, Kevin Squire kevin.squ...@gmail.comwrote:
On Friday, May 2, 2014, Cameron McBride cameron.mcbr...@gmail.com wrote:
I'm still trying to settle into proper syntax and style, and all comments
are welcome
your example.
https://github.com/one-more-minute/Lazy.jl#macros
On Friday, 2 May 2014 15:11:08 UTC+1, Cameron McBride wrote:
I'm still trying to settle into proper syntax and style, and all comments
are welcome!
For potentially longer if / elseif / else clauses, e.g.
# an overly simplistic
I missed enumerate() for a while, and was happy I found it. I find it
amusing how satisfying a few missing keystrokes can be.
On a related but different note, from a similar influence, I keep wanting
to pass blocks to iterators. Any chance that will ever happen?
I realize that do..end blocks
(args...))
You could always open a pull request if you wanted to see this in Base,
too.
On Thursday, 15 May 2014 21:18:31 UTC+1, Cameron McBride wrote:
I missed enumerate() for a while, and was happy I found it. I find it
amusing how satisfying a few missing keystrokes can
I am not sure if this appeals to you, but I'm happy to share my
configuration. I just use the REPL and a decent editor (vim), which I'm
happy with.
I've been using this setup for the past couple months (mid-March). I've
only had occasionally issues, but I follow HEAD so that is expected. I am
Stefan,
Thank you. Your description really helps clarify things. The issue about
different functionality for return in map vs for loops was obviously
something I overlooked here.
And yes, the influence is clearly ruby.
I see how a macro could can duplicate the for loop structure. I guess I'm a
Hi Jon,
No -- I pull julia via git on github, and compile by hand every few days.
I've symlinked ~/bin/julia to the directory that I compile julia into, so
julia is in my path.
On 10.9, the native option is Clang, which works fine.. I've been able
to dodge gcc (gnu) for all system dependencies
Do any of the more initiated have an idea why Numba performs better for
this application, as both it and Julia use LLVM? I'm just asking out of
pure curiosity.
Cameron
On Tue, Jun 17, 2014 at 10:11 AM, Tony Kelman t...@kelman.net wrote:
Your matrices are kinda small so it might not make much
julia find( a . 5 )
cheers,
Cameron
On Sat, Jul 12, 2014 at 11:40 AM, paul analyst paul.anal...@mail.com
wrote:
I need all indexes where a[:] 5
julia a=rand(10)*10
10-element Array{Float64,1}:
4.84005
8.29994
8.8531
3.42319
2.60318
7.25313
0.816263
4.44463
6.71836
in the REPL, would it be reasonable to have ?? be able to do an
apropos() search?
Cameron
On Fri, Jul 18, 2014 at 4:40 PM, Viral Shah vi...@mayin.org wrote:
I think that most new users are unlikely to know about apropos. Perhaps we
should put it in the julia banner.
We can say something
+1 for sticky shell mode.
I do like the ? - help and ?? - apropos mapping, as it's clear on the
mode what the simple mapping is. But it's a minor point.
Cameron
On Tue, Jul 22, 2014 at 12:06 AM, Viral Shah vi...@mayin.org wrote:
That’s not a crazy idea. ? could do help if there is an exact
On Thu, Sep 18, 2014 at 1:44 PM, Jake Bolewski jakebolew...@gmail.com
wrote:
Yo.jl
I thought this was a joke, but naturally, it does exist:
https://github.com/dichika/Yo.jl
Also, not really a julia question -- the stata trick should work just as
well on julia (or anything that goes before the
Hi All,
What's the best julian way to do the following:
function vecadd!(vec, i, v)
n = length(vec)
if n < i
resize!(vec, i)
vec[n+1:i] = 0.0
end
vec[i] += v
end
This seems somewhat typical for a growing array that's not just incremental
(i.e. not just a push!()
9147. I feel
> like this falls into that same category of questions.
>
> On Mon, Oct 26, 2015 at 3:59 PM, Josh Langsfeld <jdla...@gmail.com> wrote:
>
>> You could do 'append!(vec, zeros(i-n))'.
>>
>>
>> On Monday, October 26, 2015 at 3:32:56 PM UTC-4, Camero
Also, in the REPL you can use the help files. For example, try typing "?∈"
(which shows this is basically the in() function, hence the \inTAB
suggestion by Kristoffer).
Cameron
On Mon, Jan 4, 2016 at 12:59 PM, Kristoffer Carlsson
wrote:
> You can enter \in and then press
Sounds like a good plan -- seems an interesting topic given a number of
relevant talks today.
Cameron
On Wed, Jun 22, 2016 at 1:19 PM, Tom Breloff wrote:
> For those at JuliaCon today, I'm organizing a dinner to discuss "The
> future of Machine Learning and Data Science in
On Mon, Jun 27, 2016 at 1:02 PM, Yichao Yu wrote:
>
> On Jun 27, 2016 12:58 PM, "Tom Breloff" wrote:
> >
> > Yichao: is there an alternative "is_installed" definition that would
check the load path? Lets assume I don't actually want to import it, just
check.
Simple question (I think): Is there an easy or idiomatic way to
differentiate if a julia file is being run directly from when it's included?
I'm looking for the equivalent of this in ruby:
if $0 == __FILE__
puts "Running file"
else
puts "Included file"
end
Thanks.
Cameron
.5 -e 'include("example.jl")'
>
> Included file
>
>
> On Friday, April 1, 2016 at 7:40:36 AM UTC-5, James Fairbanks wrote:
>>
>> What kind of production system is it? Why is it inconvenient to have two
>> files, one that defines the library and one that pa
> and calls the "main" function?
>
> On Friday, April 1, 2016 at 8:21:03 AM UTC-4, Cameron McBride wrote:
>>
>> Thanks, I missed that thread.
>>
>> Although neither suggested solution works as I was hoping for.
>>
>> I am trying to shoehorn julia
is thread
> https://groups.google.com/d/msg/julia-users/ufpi8tV7sk8/-Uv0rtAWTWsJ
>
>
> On Wednesday, March 30, 2016 at 2:37:44 PM UTC-4, Cameron McBride wrote:
>>
>> Simple question (I think): Is there an easy or idiomatic way to
>> differentiate if a julia file is bei
On Fri, Jul 22, 2016 at 3:09 PM, Cameron McBride <cameron.mcbr...@gmail.com>
wrote:
> julia> function get_event(v::Vector{ExampleEvent}, i)
> n = length(v)
> if i > n
>for j in n:i
>push!(v, ExampleEvent("
> For industry, it probably means something similar.
>
>
> I really hope people in industry won't act on this date, as it is not
> nearly firm enough to bet a business on. We already have people writing
> blog posts about how using Julia for their startup turned out to be a
> mistake; we really
This thread is old, but I was poking through some unread bits and found it.
Beyond that, it’s likely a better question for julia-users list (which I’m
including here).
Anyhow, the answer is that sparsevec converts a dense matrix into a sparse
matrix format where zero values are not explicitly
There is some work on this. On your list is Plots.jl, which is a unifying
package that is backend agnostic. Specifically,
http://github.com/tbreloff/Plots.jl
Also, see:
https://github.com/JuliaPlots
Some seriously great stuff in there (and I say that as a user that has been
plotting in Julia for
You mean like the following?
julia> A=[1.0 2.0; 3.0 4.0]; B=[1.0 1.0; 1.0 1.0]; Y = similar(B); Y.= A * B
This doesn’t work as you might hope. I believe it just creates a temporary
result of A*B and then stuffs it into the preexisting Y.
On Tue, Oct 18, 2016 at 2:41 PM, Jérémy Béjanin
I agree on the consistency part with other in-place operations. I certainly
don’t feel it’s hard to just use A_mul_B!, but my familiarity with BLAS
shouldn’t be taken for granted. And if an in-place operator syntax exists
in the language already…
How about the flip side of the argument, it
I've been using PostgreSQL and DBI just fine for a few months now.
The implementation has a few edges that need polishing and work, but the
basics work just fine for the julia 0.4.x branch.
The problem you ran into with fetchdf() not being implemented is that you
tried to run it on the stmt
38 matches
Mail list logo