[julia-users] Re: multiple dispatch for operators

2016-10-07 Thread Gabriel Gellner
Any reason to not just use a function? (like np.dot etc) My understanding is that in python '*' means elementwise multiplication, so even if you could monkeypatch numpys __mul__ method to do the right thing wouldn't you be changing the semantics? Gabriel On Friday, October 7, 2016 at 3:51:11

[julia-users] Re: Julia and the Tower of Babel

2016-10-07 Thread Gabriel Gellner
t; organized than the Julia ecosystem. Insofar as it's getting better, it's > because the community has agreed to make Hadley Wickham their benevolent > dictator. > > --John > > On Friday, October 7, 2016 at 8:35:46 AM UTC-7, Gabriel Gellner wrote: >> >> Something th

[julia-users] Julia and the Tower of Babel

2016-10-07 Thread Gabriel Gellner
Something that I have been noticing, as I convert more of my research code over to Julia, is how the super easy to use package manager (which I love), coupled with the talent base of the Julia community seems to have a detrimental effect on the API consistency of the many “micro” packages

Re: [julia-users] Re: When can the broadcast dot (in 0.5) be used?

2016-08-18 Thread Gabriel Gellner
On Thursday, August 18, 2016 at 10:52:42 AM UTC-7, Michael Borregaard wrote: > > That sounds right. I wonder if this is not a bug? > >From my reading of the all the related issues, it is a known "issue" ;) It looks like a good solution is being ironed out. But I don't think this will be added

[julia-users] Re: When can the broadcast dot (in 0.5) be used?

2016-08-18 Thread Gabriel Gellner
My understanding (which can easily be wrong!) is that this stems from https://github.com/JuliaLang/julia/issues/16966. Namely that size("b") throws a method error, whereas your size(2) gives a null tuple (). So in general broadcast (which is what the .() is sugar for) requires that the element

[julia-users] Re: `abs` has no method matching abs(::Array{Any,1})

2016-07-21 Thread Gabriel Gellner
Can you just cast the array to Float64 or whatever numeric type you need to column to be? On Thursday, July 21, 2016 at 9:50:14 AM UTC-7, Ping Hou wrote: > > Hi, > > I encountered a problem when I running my code. > > LoadError: MethodError: `abs` has no method matching abs(::Array{Any,1}) >

Re: [julia-users] findpeaks

2016-07-20 Thread Gabriel Gellner
Yay! thanks so much. Under my nose the whole time. On Wednesday, July 20, 2016 at 4:30:44 PM UTC-7, Tim Holy wrote: > > On Wednesday, July 20, 2016 4:01:00 PM CDT Gabriel Gellner wrote: > > Is there a standard (Base or common package) that implements something > akin > > t

[julia-users] findpeaks

2016-07-20 Thread Gabriel Gellner
Is there a standard (Base or common package) that implements something akin to matlab's `findpeaks`. It is easy enough to make something like this, but I imagined that this would be something that already exists but that I have just missed?

Re: [julia-users] Re: Converting from ColorTypes to Tuple

2016-07-07 Thread Gabriel Gellner
I use the following as a utility to have PyPlot.jl/PyCall.jl automatically convert RGB types into tuples function PyObject(t::Color) trgb = convert(RGB, t) ctup = map(float, (red(trgb), green(trgb), blue(trgb))) o = PyObject(ctup) return o end I'm sure it can be tweaked to be

Re: [julia-users] Re: I have done few examples where can I put them at disposition ?

2016-07-01 Thread Gabriel Gellner
commit button now it's there > > Le 30/06/2016 20:52, Gabriel Gellner a écrit : > > You could also just make a repo on GitHub. > See for example: > https://github.com/dpsanders/intermediate_julia > > > On Thursday, June 30, 2016 at 8:28:25 AM UTC-7, Henri Girard wrote:

[julia-users] Re: I have done few examples where can I put them at disposition ?

2016-06-30 Thread Gabriel Gellner
You could also just make a repo on GitHub. See for example: https://github.com/dpsanders/intermediate_julia On Thursday, June 30, 2016 at 8:28:25 AM UTC-7, Henri Girard wrote: > > I have done some examples in julia (in french) and I think it could be > interesting for beginners. Juliabox or

Re: [julia-users] A question of style: type constructors vs methods

2016-06-24 Thread Gabriel Gellner
Really good point about dispatch. Man need to think this through. Might just be my brain not fully getting multiple dispatch versus OO inheritance for this kind of design. On Friday, June 24, 2016 at 12:29:48 PM UTC-7, Toivo Henningsson wrote: > > If you call the function Bar, then users might

[julia-users] Re: VS code extension

2016-06-22 Thread Gabriel Gellner
Are there benefits to using this over atom? Why are people moving over? Pros, Cons? On Tuesday, June 21, 2016 at 3:26:52 PM UTC-7, David Anthoff wrote: > > Hi all, > > > > I’ve created a new github repo for a VS code extension > https://github.com/davidanthoff/julia-vscode and it is published

Re: [julia-users] Re: JuliaCon schedule announced

2016-06-22 Thread Gabriel Gellner
For future conferences I would be super stoked to pay some fee to have early access if that would help at all. Super stoked to see so many of these sweet talks! On Wednesday, June 22, 2016 at 6:49:43 AM UTC-7, Viral Shah wrote: > > Yes they will be and hopefully much sooner than last year. > >

Re: [julia-users] A question of style: type constructors vs methods

2016-06-21 Thread Gabriel Gellner
name as the type, but I guess I am thinking about this as a kind of specialized type of Foo, hence the uppercase, but should I instead do bar(...) when I am returning these kind of specialized versions of Foo? On Tuesday, June 21, 2016 at 11:44:07 AM UTC-7, Gabriel Gellner wrote: > > So

Re: [julia-users] A question of style: type constructors vs methods

2016-06-21 Thread Gabriel Gellner
So going deeper into using my own types, and coding style in julia. Lets say I have the container type type Foo On Monday, June 20, 2016 at 7:10:15 AM UTC-7, Gabriel Gellner wrote: > > That was what I was feeling. That this was a legacy issue for lowercase > type "constructo

[julia-users] Re: integrate.odeint(f,t)

2016-06-20 Thread Gabriel Gellner
Welcome by the way! I used to use Python a lot myself. Julia is great, but it does require a fair amount of extra learning due to its youth. I hope you get past the rocky start :) ``` using PyPlot using PyCall @pyimport scipy.integrate as integrate function f(y, t) if t < 25 return

[julia-users] Re: @pyimport error

2016-06-20 Thread Gabriel Gellner
This should also work with python2 if you have the packages installed (I don't have a python 3 install on my machine and the import works). On Monday, June 20, 2016 at 6:30:36 AM UTC-7, Henri Girard wrote: > > Answering : I try with python3 and everything works > > Le lundi 20 juin 2016 15:14:21

Re: [julia-users] A question of style: type constructors vs methods

2016-06-20 Thread Gabriel Gellner
cut: `linspace` has history, so does > `zeros`. So, for a new container type I'd use the constructor `FooBar`. > > On Sun, 2016-06-19 at 23:12, Gabriel Gellner <gabriel...@gmail.com > > wrote: > > I am currently making some container like types, so I am using the &g

[julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-19 Thread Gabriel Gellner
ll have this issue. > > That said, using the heuristic of "eltype(f(y0))" will do better than it > currently does (it would catch the case where all inputs are an Int but one > application makes things floats, which is probably the most common problem). > > On Monday, June 20,

[julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-19 Thread Gabriel Gellner
ntered here, so users will need to learn > about it pretty quick or else they will see lots of other > functions/packages break. > > On Monday, June 20, 2016 at 2:07:30 AM UTC+1, Gabriel Gellner wrote: >> >> Is this truly a type instability? >> >> The fun

[julia-users] A question of style: type constructors vs methods

2016-06-19 Thread Gabriel Gellner
I am currently making some container like types, so I am using the convention of studly caps for the types ie `FooBar`. For usage I am confused on what the julian convention is for having expressive type constructors like for `Dict` and `DataFrame`, versus using methods like `linspace`.

[julia-users] Re: Unexpected error on 1st order ODE using ODE package

2016-06-19 Thread Gabriel Gellner
You are passing in the initial condition `start` as an integer, but ode23 needs this to be a float. Change it to `const start = 3.0` and you are golden. This does feel like a bug you should file an issue at the github page. On Sunday, June 19, 2016 at 11:49:55 AM UTC-7, Joungmin Lee wrote: > >

[julia-users] Re: Tips for optimizing this short code snippet

2016-06-18 Thread Gabriel Gellner
What integration library are you using with Cython/Fortran? Is it using the same algorithm as quadgk? Your code seems so simple I imagine this is just comparing the quadrature implementations :) On Saturday, June 18, 2016 at 5:53:57 AM UTC-7, Marius Millea wrote: > > Hi all, I'm sort of just

Re: [julia-users] Re: "None" in Python and "nothing" in Julia for feature matching function

2016-06-17 Thread Gabriel Gellner
ke something that > PyCall should maybe do since they are pretty much equivalent. Maybe open an > issue here: https://github.com/stevengj/PyCall.jl? > > On Fri, Jun 17, 2016 at 3:58 PM, Gabriel Gellner <gabriel...@gmail.com > > wrote: > >> Have you tried passing `:none

[julia-users] Re: "None" in Python and "nothing" in Julia for feature matching function

2016-06-17 Thread Gabriel Gellner
Have you tried passing `:none` in the argument list. I find that PyCall does the correct conversion on the symbol. On Friday, June 17, 2016 at 11:42:32 AM UTC-7, I Ce wrote: > > I am using PyCalland @pyimport cv2 to implement an OpenCV > feature-matching program in Julia. > > > I have an

[julia-users] Re: translation python/ijulia

2016-06-15 Thread Gabriel Gellner
I imagine you are using something like sympy that is doing a mathematica like plot over omega (the var statements) In which case you need to change the line x = linspace(0, 2pi) to omega = linspace(0, 2*w) # which seems to be the true range from the python code, not 2pi and then you need to

Re: [julia-users] Differential Equations Package

2016-06-08 Thread Gabriel Gellner
Thank you so much for the feedback. I just want to end with how much I love this community. I know this kind of "bike shedding" discussion can be annoying. Especially with all the work volunteers put in. Also I love your work especially mauro :) Anyway back to lurking. Gabriel

Re: [julia-users] Differential Equations Package

2016-06-08 Thread Gabriel Gellner
I absolutely agree in general. I am terrified when julia code gets to fancy :) I am largely a bear of little brain... (thos ODE.jl choice to send back array of arrays kind of breaks this feeling for simplicity ... having to learn to do hcat(sol...)' for the common case, versus letting this work

Re: [julia-users] Differential Equations Package

2016-06-08 Thread Gabriel Gellner
So much great news in this thread! I am crazy happy that ODE.jl is not dead. As an interested outsider it seemed like the community got gridlocked on the API discussion. It is nice that this is not the case. A quick question as to why the matlab interface is better for small problems, I don't

Re: [julia-users] Differential Equations Package

2016-06-07 Thread Gabriel Gellner
I think the name makes a tonne of sense given the scope, and fits in the line with many standard packages: Calculus, Optim, Distributions, etc. There is no reason that if a great Bifurcation suite grows it couldn't be part of DifferentialEquations (though that feels weird to me personally).

Re: [julia-users] Re: reductions in 0.5 and dropping dimensions

2016-05-25 Thread Gabriel Gellner
sual for a situation to appear > > where I would want one behavior for slicing and a different one for > array > > reduction. In situations where array dimensions correspond to, say, > > repeated observations, it is common to compare slices to means or maxima > > across dimensions

[julia-users] Re: reductions in 0.5 and dropping dimensions

2016-05-25 Thread Gabriel Gellner
Does it bother you to do the A[[1], :] to keep the old behavior? I haven't thought enough about the role of sum, mean etc. On Wednesday, May 25, 2016 at 5:11:20 PM UTC-7, a. kramer wrote: > > Apologies in advance if this is something that has been discussed at > length already, I wasn't able to

[julia-users] Re: ccall closures and the wizardry of S. G. Johnson

2016-05-25 Thread Gabriel Gellner
Perfect. I was hoping that this would be the solution. I am reading the sections on getting this behavior more carefully. Thanks for the clarification. On Tuesday, May 24, 2016 at 2:04:22 PM UTC-7, Steven G. Johnson wrote: > > > > On Tuesday, May 24, 2016 at 3:01:12 PM UTC-4, Gab

Re: [julia-users] I feel that on the syntax level, Julia sacrificed too much elegancy trying to be compatible with textbook math notations

2016-05-24 Thread Gabriel Gellner
I don't think those discussion points will make Siyi happy ;) We are getting even more required use of dotted "broadcasting" instead of less like he wants. I much much prefer being explicit with the dots, but like all syntax discussion it seems to get heated :) On Tuesday, May 24, 2016 at

[julia-users] Re: linreg strangely picky about inputs

2016-05-23 Thread Gabriel Gellner
robably be changed later anyway. > > On Monday, May 23, 2016 at 2:50:34 AM UTC-4, Gabriel Gellner wrote: >> >> So I am not able to get such a dramatic speed up. Do you mean something >> beyond: >> >> function linreg2{S <: Number, T <: Number}(x::AbstractArra

[julia-users] Re: linreg strangely picky about inputs

2016-05-23 Thread Gabriel Gellner
y. That will speed up the computation already now > and with an unallocating cov, I see 20x speed up over linreg for n=1 > and Float64 element on 0.4. > > On Saturday, May 21, 2016 at 2:33:20 PM UTC-4, Gabriel Gellner wrote: >> >> >> >> I think it's an error. The me

[julia-users] Re: linreg strangely picky about inputs

2016-05-22 Thread Gabriel Gellner
On Sunday, May 22, 2016 at 8:37:43 PM UTC-7, Andreas Noack wrote: > > I don't think that linreg has received much attention over the years. Most > often it is almost as simple to use \. It you take a look at linreg then > I'd suggest that you try to write in terms of cov and var and return a >

[julia-users] Re: linreg strangely picky about inputs

2016-05-22 Thread Gabriel Gellner
So I have a PR https://github.com/JuliaLang/julia/pull/16523 I get an error on AppVeyor build which I don't understand. Any tips, or missed documentation is greatly appreciated! My GitHub kung-fu is fledgling at best. On Saturday, May 21, 2016 at 11:33:20 AM UTC-7, Gabriel Gellner wrote

[julia-users] Re: linreg strangely picky about inputs

2016-05-21 Thread Gabriel Gellner
I think it's an error. The method definition should probably just be: > > linreg{T<:Number,S<:Number}(X::AbstractVector{T}, y::AbstractVector{S}) = > [ones(T, size(X,1)) X] \ y > > which will allow it to work for X and y of different types. > > Is using the more specific typing (<: Number) the

[julia-users] linreg strangely picky about inputs

2016-05-20 Thread Gabriel Gellner
Is it intentional that the builting linreg is so picky about its inputs? It seems to me that the code is a one liner: linreg{T<:Number}(X::AbstractVector{T}, y::AbstractVector{T}) = [ones(T, size(X,1)) X] \ y but forcing the types to be the same for both seems strange to me as it throws errors

[julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Gabriel Gellner
UTC-7, DNF wrote: > > > On Tuesday, April 5, 2016 at 3:36:09 PM UTC+2, Gabriel Gellner wrote: >> >> you can do the python example as: >> >> a[[1, 4] + range(7, 17, 2)] >> (ignoring the issues that this is not the same range as julia since >> python

Re: [julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Gabriel Gellner
Sweetness. Thanks for the clarification! On Tuesday, April 5, 2016 at 7:42:02 AM UTC-7, Cristóvão Duarte Sousa wrote: > > > For the julia example isn't matlab like concatenation using ';' being >> removed from julia? >> > > No. Just the concatenation using ',' > (AFAIK) > >

[julia-users] Re: Julia is a great idea, but it disqualifies itself for a big portion of its potential consumers

2016-04-05 Thread Gabriel Gellner
you can do the python example as: a[[1, 4] + range(7, 17, 2)] (ignoring the issues that this is not the same range as julia since python uses 0-based indices ...) you don't need to index with an ndarray, and that way you can get the nice use of the + operator for concatenate. Lacking the :

[julia-users] Re: Proposal: NoveltyColors.jl

2015-11-24 Thread Gabriel Gellner
As an end user that would love this, I would prefer a single package. Put all them tasty, wacky colors in one place! On Tuesday, 24 November 2015 14:08:35 UTC-8, Randy Zwitch wrote: > > Since the Julia ecosystem is getting bigger, I figured I'd propose this > here first and see what people

[julia-users] Julia REPL color background in command line windows

2015-11-14 Thread Gabriel Gellner
Julia messes up the background colors in the windows console -- that is -- it forces it to black. This boxed black background persists after julia is exited. Is there somewhere to look for why this is happening? Or a fix? Thanks so much.

[julia-users] Re: Anaconda Python

2015-11-02 Thread Gabriel Gellner
Oh man ... please keep supporting anaconda. As a windows user being stuck with easy_install haunts my dreams. Anaconda may be forkish, but at least windows is a first class citizen. So many open source projects make using Windows beyond painful. On Monday, 2 November 2015 13:00:51 UTC-8,

[julia-users] Re: Sundials question

2015-11-02 Thread Gabriel Gellner
If you use the C interface and not the simplified interface you can pass an array of parameters to your lhs function. I found the best way to figure out how is to look at the code for how they made the `cvode` function (in Sundials.jl) to see how the C functions are being called and then look

[julia-users] Help my Row Major brain!

2015-10-27 Thread Gabriel Gellner
I am trying my to figure out the Julian way to create a table of values (matrix) from a function that returns multiple values. As this is really thinking about the problem as a function that generates the rows of the table it feels super awkward to do this in Julia currently. For example, lets

[julia-users] Re: Help my Row Major brain!

2015-10-27 Thread Gabriel Gellner
in linspace(0, 10, 100)] hcat(esol...)' is this the idiomatic solution? Is there a better way to do this? How do people generally deal with Array or Arrays. Feels weird to me currently. Gabriel On Tuesday, 27 October 2015 09:31:22 UTC-7, Gabriel Gellner wrote: > > I am trying my to figu

[julia-users] Re: Help my Row Major brain!

2015-10-27 Thread Gabriel Gellner
t; mapreduce(exact,hcat,linspace(0,10,100)) > > On Wednesday, 28 October 2015 02:38:56 UTC+10, Gabriel Gellner wrote: >> >> Okay sorry tab seems to send ... >> >> I am trying my to figure out the Julian way to create a table of values >> (matrix) from a function

Re: [julia-users] A grateful scientist

2015-10-26 Thread Gabriel Gellner
Seriously +9000 to this sentiment. I am new to Julia but man what this community has made is incredible. The beauty of this project staggers me. Not having to mess around with C for a large chunk of my new codes inner loops feels like magic every time. Thank you all so much. Gabriel On

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Gabriel Gellner
On Monday, 26 October 2015 11:17:58 UTC-7, Christoph Ortner wrote: > > Fabian - Many thanks for your comments. This was very helpful. > > (c) if I want to write code now that shouldn't break with 0.5, what should >> I do? >> > > I think when you need a copy, just surround your getindex with a

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-25 Thread Gabriel Gellner
On Sunday, 25 October 2015 07:05:03 UTC-7, Christoph Ortner wrote: > > > very nice example - thank you - but I notice that you use linrange :). > > Thanks, Christoph > Man I wish they had called it linrange ;) with type LinRange. Still I am at peace with the new way it works. Hopefully it will

Re: [julia-users] A question of Style: Iterators into regular Arrays

2015-10-25 Thread Gabriel Gellner
On Sunday, 25 October 2015 11:06:14 UTC-7, Stefan Karpinski wrote: > > This is still an option but I'm yet to be convinced that we want to have > that many things exported: linrange, LinRange, and linspace which just does > collect on linrange? Seems like one too many. Personally I think

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-22 Thread Gabriel Gellner
> > A related discussion is about a special Ones type representing an array > of 1, which would allow efficient generic implementations of > (non-)weighted statistical functions: > https://github.com/JuliaStats/StatsBase.jl/issues/135 > > But regarding zeros(), there might not be any

[julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
temp[1,2:end] = pi/(N0+1)*(1:N0)' > temp[1,1] = phi_N > h = E0/sqrt(2*N0+1)*exp(im*temp ) * coswt > return h, tf; > end > > On Wednesday, October 21, 2015 at 3:11:44 AM UTC-4, Gabriel Gellner wrote: >> >> I find the way that you need to use `linspace` an

Re: [julia-users] Nicer syntax collect(linspace(0,1,n))?

2015-10-21 Thread Gabriel Gellner
I agree with this downvote so much it hurts. The logspace/linspace is painfully ugly. linrange is the right name in my find for the iterator version. On Wednesday, 30 September 2015 10:31:55 UTC-7, Alex Ames wrote: > > Another downvote on linspace returning a range object. It seems odd for >

[julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
Oh man thanks for this link. Makes me feel better that I am not alone in feeling this pain. This is really the first *wart* I have felt in the language decisions in Julia. Forcing iterators as the default such a common array generation object feels so needless. Calling any code that asks for a

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
at 11:38 AM, Gabriel Gellner wrote: > > No that is a good point. Often you can use an iterator where an explicit > array would also work. The issue I guess is that this puts the burden on > the developer to always write generic code that when you would want to > accept an Array yo

[julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
ke generic types? This would explain the linspace vs logspace and all other basic array creating functions (ones, zeros, rand etc) and the default names for many types vs the "Abstract" prefixed ones. Thanks for all the insight. On Wednesday, 21 October 2015 00:11:44 UTC-7, Gabriel Gelln

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
n the language (as in Matlab and Numpy). > > On Oct 21, 2015, at 2:38 PM, Gabriel Gellner <gabriel...@gmail.com > > wrote: > > Wow! Thanks everyone for all the advice!!! Super helpful. I now see that > it is super easy to deal with the LinSpace objects. > > That bei

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
and() is simply > Impossible. > > On Wednesday, October 21, 2015 at 9:38:07 PM UTC+2, Gabriel Gellner wrote: >> >> I have no issue with the LinSpace object, I simply do not see why it is >> the special case for this kind of object (I imagine the choice was made >>

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
} parameters? thanks On Wednesday, 21 October 2015 14:25:17 UTC-7, Stefan Karpinski wrote: > > On Wed, Oct 21, 2015 at 5:13 PM, Gabriel Gellner <gabriel...@gmail.com > > wrote: > >> Maybe all this is just transitional that soon LinSpace objects will >> always work l

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
Sweetness. Thank you. AbstractArray it is for me! On Wednesday, 21 October 2015 16:29:28 UTC-7, Tim Holy wrote: > > On Wednesday, October 21, 2015 03:32:04 PM Gabriel Gellner wrote: > > * I can't use LinSpace in matrix mult A * b::LinSpace, is this simply a > > Bug/Missing

Re: [julia-users] Re: A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
the space was generated by linspace or logspace. But is that >> really leading to 'madness'? >> >> There are other examples of these light-weight wrapper types being used, >> especially in the linear algebra routines. The matrix factorization >> functions, like qrf

[julia-users] A question of Style: Iterators into regular Arrays

2015-10-21 Thread Gabriel Gellner
I find the way that you need to use `linspace` and `range` objects a bit jarring for when you want to write vectorized code, or when I want to pass an array to a function that requires an Array. I get how nice the iterators are when writing loops and that you can use `collect(iter)` to get a