kiwimec has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 268 seconds]
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
endforma1 has quit [Quit: WeeChat 1.9.1]
pong_ has joined #ponylang
<pong_>
Any enterprises already using or planning to use pony?
pong_ has quit [Client Quit]
Utkarsh_kul has joined #ponylang
<Utkarsh_kul>
/JOIN Utkarsh_kul
kiwimec has joined #ponylang
Utkarsh_kul has quit [Quit: Page closed]
kiwimec has quit [Client Quit]
n00b has joined #ponylang
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
n00b has quit [Ping timeout: 260 seconds]
kiwimec has joined #ponylang
kiwimec has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
vaninwagen has joined #ponylang
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
kiwimec has joined #ponylang
kiwimec has quit [Client Quit]
kiwimec has joined #ponylang
<dave24>
Is there some way to iterate over a collection containing isos with a for loop without getting an `iso!` of each item. I can do it with a while loop and indexing items manually but it's not as nice.
<kiwimec>
@vaninwagen just checked out make-compile-0.22.X and it compiles nicely for me, thank you, now to have a rummage around the code ...
<vaninwagen>
dave24: would it work for you to remove the items from the collection?
<vaninwagen>
dave24: because there is no other way, as it would require aliasing, which might lead to nasty unsafe situations that pony is here to prevent you from
<vaninwagen>
kiwimec: i also have to dive into it at some point
kiwimec has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dave24>
vaninwagen: right, thats fine then. I guess I could make a helper function that does the loop and applies a given function to each item, that would be a little more terse.
<ndrwsh>
but if I patch builtin/array.pony to have "l == r" then I will get "array.pony:508:44: couldn't find 'eq' in 'A' "
droman has joined #ponylang
<Chargedpeptide>
Thank you @ndrwsh, an "==" check passes in a loop as well. I'd like to understand why the difference though if you have some insight there.
<ndrwsh>
Pony features two forms of equality: by structure and by identity. Identity equality checks in Pony are done via the __is__ keyword. So "l is r" only is true if you pass reference to second element of array (which is ".png"). But "l == r" just verifies that two items have the same value.
<Chargedpeptide>
It sounds like the is checks full identity (i.e. same object) while == checks equivalency? Equivalent to the difference between a "==" and a ".equals" in Java for example? Also, your time is much appreciated.
<ndrwsh>
yes
<Chargedpeptide>
Thank you. Have a good night.
Chargedpeptide has quit [Quit: Page closed]
SenasOzys has quit [Ping timeout: 260 seconds]
<SeanTAllen>
Chargedpeptide, seems like you got your answer yes?
SenasOzys has joined #ponylang
<ndrwsh>
well I have a question why collections/map.pony can use H.eq(k, key) in "_search" in "contains", but builtin/array.pony uses "l is r" in "contains" and users have to pass lambda in order to use "contains" :(
zzzzzzeeetttt has quit [Ping timeout: 245 seconds]
<SeanTAllen>
The answer is in the types
<ndrwsh>
I think array.contains without lambda would be better :)
<SeanTAllen>
well
<SeanTAllen>
thats one theory
<SeanTAllen>
but then
<SeanTAllen>
you couldnt put anything into an array that wasn't Equatable
<SeanTAllen>
HashEq requires an equatable
khan_ has joined #ponylang
<ndrwsh>
so we need both "array" and "arrayEq"
khan_ has quit [Remote host closed the connection]
khan_ has joined #ponylang
<SeanTAllen>
or to provide a lambda to contains which sounds a lot better to me, as almost nothing in Array needs to do equality
<SeanTAllen>
unlike a Hash which requires equality all over the place
<ndrwsh>
ok
khan_ has quit [Read error: Connection reset by peer]
<SeanTAllen>
find, rfind, and contains are the only 3 things that need in Arraay
<SeanTAllen>
* Array
<ndrwsh>
by the way, I have read "Low Hanging Fruit" in https://www.ponylang.org/contribute/ and I want to ask can you please suggest "Lowest Hanging Fruit" bc I am too shy to just grab an issue at this moment... but I want to contribute