jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
samuell has quit [Quit: Leaving]
homelessrobot is now known as hobomatic
acarrico has joined #ponylang
endformationage has joined #ponylang
<endformationage> jemc: Here is a repro of my iso! problem as discussed earlier:
<doublec> endformationage: oddly this works https://gist.github.com/384c709daa6c03db55865dbc14b2b2d1
<doublec> endformationage: seems to be something to do with the anonymous function
<endformationage> Hmm, interesting.
<endformationage> Mmm, maybe not, if you uncomment the match, destructive_read_foo matches the iso!
<endformationage> Which is wierd.
<doublec> endformationage: this works https://gist.github.com/cd30130bdc9e9e83fb429ebcc47994c7
<doublec> endformationage: using a local object rather than a closure
<doublec> endformationage: I assume it has something to do with the partial application closing over an iso which could result in that iso being aliased multiple times?
<doublec> endformationage: because bar_make~apply returns a ref, but encloses an iso
<doublec> endformationage: that ref could be copied, therefore making multiple aliases of the iso
<doublec> Hmm, maybe not
<doublec> I don't know really :)
<endformationage> Ah. Heh. Me neither! :P
<endformationage> Thanks for finding some solutions though!
<doublec> Since I can go: let bar_marker2 = bar_maker which seems to me to result in multiple aliases of the iso too
<endformationage> I can see that.
<endformationage> But setting aside the construction of the bar, why does this match an iso!, and not iso ?
<doublec> Ah, Although you can have multiple references to the bar_marker, there's still only one reference to the iso because it's a reference to bar_marker not a copy
<doublec> makes sense now
* doublec looks at your gist
<doublec> endformationage: because "Foo iso!" means "whatever can be alias a Foo iso"
<doublec> endformationage: which is probably equivalent to "Foo tag"
<endformationage> OK
<doublec> Anything will match that first statement in the match really
<endformationage> I switched the match cases and it does match as foo iso first
<doublec> since "consume destructive_read_foo" is an iso^ which converts to anything
<endformationage> I had an incorrect understanding of iso!
<doublec> It's why you see "let x: Foo iso!" and things mainly in generic code
<doublec> eg. "let x: A iso!"
<doublec> Since the A type can be any reference capability if the generic code is written that way and you want 'x' to be assignable for anything that can alias it as an iso, etc
<endformationage> This is very helpful, thanks again. iso is quite tricky.
<doublec> endformationage: glad I could help. iso is indeed tricky. Especially if you want generic code to work with it.
<doublec> When iso is involved I tend to use object literals instead of lambda syntax as it helps me reason out what's happening under the covers
<endformationage> On that note, could you 'expand' the partial application into the object literal so I can see the difference between it and the solution you presented?
* doublec looks
<doublec> endformationage: I'm not sure what you mean, the example I had did have the partial application manually done
* endformationage takes another look
<doublec> I tried this, which doesn't work for the same reason as the lambda version didn't, http://playground.ponylang.org/?gist=41cae82b8e8c0b806bf807f6e165aa24
<doublec> I don't know why that doesn't work
<endformationage> I'm still unsure why the lambda version doesn't work.
<doublec> endformationage: I don't know why either - the object literal version that uses partial application I pasted just before is equivalent and it doesn't work - but I thought it should
<jemc> I think the partial application is what's causing your issue
<jemc> (sorry, haven't read the full backlog, so I apologize if that's already established)
<endformationage> Though I can see why the object literal version does.
<doublec> jemc: yes, if we manually do the partial application via an object literal it works
<endformationage> Does partial application change the refcap on the apply back to box, causing the iso to alias?
<jemc> which paste is the object literal version that works?
<jemc> from what I see, what you're doing is unsafe
<jemc> you'd be creating a partially-applied-`bar_maker` that could keep making more copies of the same `Foo iso`
<jemc> that is, the `bar_maker` could be called multiple times, making multiple `Bar`s which all hold the same `Foo iso` (breaking isolation)
<jemc> yeah, so the object literal version works because it does a destructive read on the `f` so it can't be used more than once - the partial application doesn't do that, so it's not really equivalent
<doublec> Right, we discussed that earlier
<jemc> do you see why the partially-applied-`bar_maker` is unsafe?
<endformationage> yes
<endformationage> Thanks again to the both of you. It's difficult to get correct & see the issues involved, but it's great that Pony doesn't let me do the unsafe things I ask it to do.
<endformationage> Me: Go jump over this cliff. Pony: Nope.
ShalokShalom has quit [Remote host closed the connection]
<endformationage> doublec: jemc: WHoo! Got it working!
<doublec> endformationage: great!
ShalokShalom has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9]
jemc has quit [Ping timeout: 240 seconds]
bimawa has quit [Read error: Connection reset by peer]
bimawa has joined #ponylang
bitcrusher has joined #ponylang
samuell has joined #ponylang
hobomatic has quit [Read error: Connection reset by peer]
samuell has quit [Quit: Leaving]
samuell has joined #ponylang
ShalokShalom_ has joined #ponylang
ShalokShalom has quit [Ping timeout: 252 seconds]
<SeanTAllen> Pony 0.19.1 has been released. Includes Lambda and Array inference improvements that have us really excited! https://www.ponylang.org/blog/2017/09/0.19.1-released/
ShalokShalom_ has quit [Ping timeout: 252 seconds]
ShalokShalom has joined #ponylang
ShalokShalom has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ShalokShalom has joined #ponylang
ShalokShalom has quit [Remote host closed the connection]
ShalokShalom has joined #ponylang
jemc has joined #ponylang
endformationage has joined #ponylang
ShalokShalom has quit [Remote host closed the connection]
_andre has joined #ponylang
samuell has quit [Remote host closed the connection]
tscho has quit [Read error: Connection reset by peer]
tscho has joined #ponylang
samuell has joined #ponylang
user10032 has joined #ponylang
ShalokShalom has joined #ponylang
bitcrusher1 has joined #ponylang
bitcrusher has quit [Ping timeout: 248 seconds]
Matthias247 has quit [Read error: Connection reset by peer]
Matthias247 has joined #ponylang
_andre has quit [Quit: leaving]
samuell has quit [Remote host closed the connection]
user10032 has quit [Quit: Leaving]
mikeyhew has joined #ponylang
mikeyhew has left #ponylang [#ponylang]
Acorn2 has joined #ponylang
<Acorn2> Hello again. I recently wrote a paper entitled "A framework for Gradual Memory Management". It proposes a mechanism for supporting multiple memory management strategies within a single program to optimize for performance, with compile-time safety guarantees.
<Acorn2> The paper heavily borrows from Pony's (and Midori's) reference capabilities as well as Rust's static mechanism for automatic memory management
<Acorn2> Given that some of its heritage comes from Pony, I thought it might have some passing interesting to some members of the Pony community.
<Acorn2> If there is any interest, please let me know and I will provide a link in whatever public Pony forum I am told would be the best place for me to use.
<SeanTAllen> Acorn2: i'd suggest the email list. you can also add it as an item (with description please) to items to be included in our "Last Week in Pony" mailer... https://github.com/ponylang/ponylang.github.io/issues/154
jemc has quit [Read error: Connection reset by peer]
jemc has joined #ponylang
<Acorn2> SeanTAllen: Thank you. I added it to the github issues. With regard to the e-mail list, which would you recommend I use: user@pony.groups.io?
<SeanTAllen> I'm not sure what you mean by added it to the github issues Acorn2. I dont see it.
<SeanTAllen> Did you add it specifically to this issue? https://github.com/ponylang/ponylang.github.io/issues/154
<SeanTAllen> its not there
<SeanTAllen> anyplace you added it would be an incorrect place to put it
<SeanTAllen> please add to issue #154, there's a new issue each week for "Last Week in Pony", that's the issue for items for this week.
<Acorn2> Ah - my mistake - I am new to Github, I must have create a new issue. My bad. I will try to find it to delete it if I can
<SeanTAllen> Yes user@pony.groups.io is the mailing list Acorn2. You need to be a member to send to it.
<Acorn2> Excellent, I will join then
<SeanTAllen> I close the issue
<SeanTAllen> go ahead and add to #154
<Acorn2> done
<SeanTAllen> aweosme
<SeanTAllen> thanks