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
dipin has quit [Quit: dipin]
_whitelogger has joined #ponylang
_whitelogger has joined #ponylang
markh has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
user10032 has quit [Remote host closed the connection]
jemc has quit [Ping timeout: 240 seconds]
markh has left #ponylang ["Leaving"]
oraoto has joined #ponylang
oraoto has quit [Quit: Page closed]
_whitelogger has joined #ponylang
luizperes has joined #ponylang
luizperes has quit [Client Quit]
user10032 has joined #ponylang
_whitelogger has joined #ponylang
dipin has joined #ponylang
codec_ has joined #ponylang
<codec_> Hi
jmiven has quit [Quit: co'o]
jmiven has joined #ponylang
<SeanTAllen> hello codec_
<codec_> @Sean would you mind answering about actors?
<SeanTAllen> codec_: fire away!
<codec_> could you explain why I cannot recover a variable once I have introduced a local alias?
<SeanTAllen> o so that isnt really an actor question
<codec_> yes, but I have not run into the same kind of situation so far without actor
<SeanTAllen> not actor issue though
<SeanTAllen> so where specifically are you having an issue?
<codec_> if I comment the lines
<codec_> let value : ComputationResult ref = ComputationResult(_input_value, _input_value * 2)
<codec_> p(recover consume value end)
<codec_> and uncomment //p.apply(recover ComputationResult(_input_value, _input_value * 2) end)
<codec_> the program compile
<codec_> but I don't understand why because for me it is the same
<codec_> It seems that the compiler complains that I am giving him a tag instead of a val
<SeanTAllen> im confused codec_
<SeanTAllen> i uncommented the p.apply line
<SeanTAllen> commented out the p(recover )
<SeanTAllen> and it runs fine
<SeanTAllen> is the the currently doesnt compile one that you have a question about?
<codec_> yes that is why is confusing me :)
<SeanTAllen> ok
<SeanTAllen> well
<SeanTAllen> i can tell you the difference between them
<codec_> cool, what are they?
<SeanTAllen> you did `class val ComputationResult`
<SeanTAllen> that means the default reference capability for ComputationResult is val
<codec_> so far so good
<SeanTAllen> but see what you did here:
<SeanTAllen> `ComputationResult ref = ComputationResult`
<SeanTAllen> you are saying "this is a ref"
<codec_> and I can't?
<SeanTAllen> and then you try to send it to a promise
<SeanTAllen> thats a no no
<SeanTAllen> you cant send non-isolated mutable data from actor to actor
<codec_> but isn't the purpose of recover to convert it from ref to val?
<SeanTAllen> no
<codec_> :(
<SeanTAllen> you cant use a `ref` inside of a recover
<SeanTAllen> you can only access sendable items inside a recover
<SeanTAllen> `ref` is not sendable
<codec_> make sense so if I convert from let value : ComputationResult ref = ....
<codec_> to let value : ComputationResult val = ...
<codec_> it should work then?
<SeanTAllen> yes or
<SeanTAllen> here...
<SeanTAllen> let me do one other magic for you
<codec_> yes?
<SeanTAllen> ok
<SeanTAllen> this is totally useless in your case
<SeanTAllen> but i want to show you a little about `recover`
<SeanTAllen> Take a look at what I did
<SeanTAllen> inside of a `recover` i can have a ref that I create inside of it
<SeanTAllen> and then i can change it to a `val` when it leaves the recover
<SeanTAllen> thats what the lift is
<SeanTAllen> yours ran into problems because you tried to access a `ref` from outside
<codec_> you need to create a new gist for me to see the code
<codec_> you just resend my sample :)
<SeanTAllen> oopps sorry
<SeanTAllen> mine is totally useless in this case
<codec_> nifty
<codec_> I won't say no
<SeanTAllen> you just want to leave ComputationResult as a `val`
<codec_> it is more readable
<SeanTAllen> but i thought it was a chance to show how recover works
<codec_> yes it is definitevly a good sample
<SeanTAllen> this is better though...
<SeanTAllen> i made the constructor on ComputationResult
<SeanTAllen> new val create
<SeanTAllen> (i thought you had that before)
<SeanTAllen> that will make newly created ones a val not a ref
<SeanTAllen> sorry i had that wrong before
<SeanTAllen> i misread it the first time
<codec_> I think you forget to do a new gist again
<SeanTAllen> then i dont need the correct
<SeanTAllen> damn it
<SeanTAllen> then you dont need the recover
<codec_> ah I didn't know we could put a reference capabilites in the constructor
<codec_> this is neat
<SeanTAllen> ya
<SeanTAllen> very very handy
<SeanTAllen> hope that helps
<codec_> a lot
<SeanTAllen> i need to run and do some stuff
<SeanTAllen> ill be back on in a few hours
<codec_> no problem
<codec_> take your time
<codec_> thanks for the tips
<SeanTAllen> you're welcome
<SeanTAllen> happy ponying!
dipin has quit [Quit: dipin]
<SeanTAllen> o, before i go codec_. i'm interested in hearing what your Github/Pony stable worry was.
<codec_> what do you mean by that?
<codec_> ah yes I remember
<codec_> From what I understand (I may be wrong) but pony stable use git as a dependency tool
<codec_> But git repositories may be deleted and broke a lot of code reliying on it
<codec_> So having a tool delivered with the pony ecosystem that connect to a server where it can fetch the appropriate dependency should be more reliable
<codec_> Plus, it would get rid of Git as a dependency for pony stable (even if it is a dependency that can be satisfied easily)
<SeanTAllen> You dont have to use git. It's one option.
<SeanTAllen> You can download the code from whereever and keep it and point pony stable at the local directory.
<codec_> sure, but ain't the purpose of Pony Stable to fetch dependency?
<SeanTAllen> fetch is one thing it does
<SeanTAllen> in the end, it manages your PONYPATH so dependencies can be found.
<SeanTAllen> if dependencies disappearing from an external source is a concern, i would think one would to make their own copies.
<SeanTAllen> or you could fork your dependency on github and fetch it from there
<SeanTAllen> GitHub is going to be far more reliable than whatever someone throws up for hosting
<codec_> I disagree, for example NPM does not allow to remove published package after it has been uploaded (except for the 24 first hours)
<codec_> I thinks crates.io discourages it too
<SeanTAllen> Pony stable doesnt require you use Git.
<SeanTAllen> If you would like to start running something like NPM for Pony stable, feel free.
<SeanTAllen> I don't have the money to do that.
<codec_> don't take it personally
<SeanTAllen> I'm not
<SeanTAllen> I do think you are confusing a policy with a mechanism.
<SeanTAllen> NPM could disappear tomorrow and everything would be gone.
<SeanTAllen> GitHub could disappear tomorrow and everything could be gone.
<codec_> sure, but in practice it won't
<codec_> and generally the package on npm have their source on github
<codec_> which give 2 level of safety
<SeanTAllen> Well in practice if I want to use Git, I can make fork of the project and be sure it wont go away.
<SeanTAllen> That's policy, not mechanism.
<SeanTAllen> Git is purely a mechanism.
<codec_> sure but the burden of forking and updating every repository is quite high
<codec_> you are right in the sense that git is only a mechanism, but if you want to add an extra safety at the community level how you would do it?
<SeanTAllen> honestly i have other things that i think are more pressing to address for Pony.
<SeanTAllen> if someone wants to start an NPM/crates.io for Pony that would be awesome.
<codec_> the problem is that it shouldn't be a single person because then the problem is the same. It should be an organization manged by multiple persons. That way it gives stronger guarantees.
<codec_> But I agree with you it shouldn't be a priority for now,as there are probably a ton of things to do before needing that
Praetonus has joined #ponylang
vaninwagen_ has joined #ponylang
dipin has joined #ponylang
dipin has quit [Client Quit]
dipin has joined #ponylang
sima has joined #ponylang
sima has left #ponylang [#ponylang]
vaninwagen_ has quit [Ping timeout: 240 seconds]
vaninwagen_ has joined #ponylang
<vaninwagen_> codec_, i've just reviewed your tutorial contributions, great stuff! thank you very much!
Praetonus has quit [Quit: Leaving]
vaninwagen_ has quit [Ping timeout: 240 seconds]
<codec_> You're welcome
dipin has quit [Quit: dipin]
dipin has joined #ponylang
dipin_ has joined #ponylang
dipin has quit [Ping timeout: 246 seconds]
dipin_ is now known as dipin
dipin has quit [Quit: dipin]
codec_ has quit [Quit: Page closed]
_whitelogger has joined #ponylang
user10032 has quit [Ping timeout: 252 seconds]