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
Candle has quit [Ping timeout: 256 seconds]
acarrico has quit [Ping timeout: 268 seconds]
acarrico has joined #ponylang
acarrico has quit [Ping timeout: 256 seconds]
Candle has joined #ponylang
xek__ has joined #ponylang
xek_ has quit [Ping timeout: 264 seconds]
jbk_ is now known as jbk
nisanharamati has quit [Quit: Connection closed for inactivity]
endformationage has quit [Quit: WeeChat 1.9.1]
khan has joined #ponylang
dch is now known as dch_
_whitelogger has joined #ponylang
metaden has joined #ponylang
profetes_ has quit [Quit: Leaving]
khan has quit [Remote host closed the connection]
endformationage has joined #ponylang
jbk has quit [Remote host closed the connection]
dipin has joined #ponylang
<dipin> Pony Stable 0.1.5 and 0.1.6 have been released: https://www.ponylang.org/blog/2018/07/pony-stable-0.1.5-and-0.1.6-released/
dnmllr has joined #ponylang
dipin has quit [Quit: dipin]
dnmllr has quit [Ping timeout: 252 seconds]
metaden has quit [Ping timeout: 252 seconds]
<endformationage> I'm failing to modify a closed over variable as shown in this example. What am I getting wrong? https://playground.ponylang.org/?gist=b843c4e7b6a478f93f68d9413a983128
<SeanTAllen> endformationage: i dont know the lambdas well, but im not sure why that compiles
<SeanTAllen> from the docs, i thought you had to explicitly capture values.
<SeanTAllen> im going to leave this to someone who knows it better. i think a tutorial/document update is certainly in order based on the outcome
<endformationage> slfritchie: Thanks, I was referencing an example found in the object literals section of the tutorial, which attempts to close over a local variable: https://playground.ponylang.org/?gist=d4b88c12fb00d4946bbe017f87a15f08
nisanharamati has joined #ponylang
<SeanTAllen> endformationage: i think that your original compiled suggests a bug
<SeanTAllen> or that i really dont understand something
<endformationage> SeanTAllen: FWIW, explicit capture of local vars in the lamda also do not result: https://playground.ponylang.org/?gist=33b259c123941238acbc6a312aebfdf4
<endformationage> I guess the question as well, is whether this should work with local vars?
CcxWrk has quit [Quit: ZNC 1.7.1 - https://znc.in]
CcxWrk has joined #ponylang
<endformationage> That is probably the primary question, as the example slfritchie gave still doesn't require explicit capture, but closes over a field instead.
CcxWrk has quit [Excess Flood]
<endformationage> I guess closing over a local in the first example doesn't make much sense if the literal is for instance return or passed elsewhere, and use solely for local stuff.
<endformationage> Here's an example to see what happens when closing over a local in a fun, and returning the closures: https://playground.ponylang.org/?gist=f5081821fd84785ed91d9887840172ab
<endformationage> Essentially `n` is duplicated between the two closures.
<endformationage> The counterpart to the above, closing over a field: https://playground.ponylang.org/?gist=514b0287d7216932896ae99e8e355246
<endformationage> Made an issue: https://github.com/ponylang/ponyc/issues/2841
<SeanTAllen> thanks
nisanharamati has quit [Quit: Connection closed for inactivity]
CcxWrk has joined #ponylang