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
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
jemc has quit [Ping timeout: 256 seconds]
staticassert has joined #ponylang
<staticassert> Getting an error that 'ref' is not a subcap of 'val'. I know I'm support to use 'recover' to convert the ref to val but not sure what the syntax for it is. https://gist.github.com/insanitybit/e92d4d93e4a751426e4e637a3a3d7ee5
<staticassert> I've tried wrapping the env.out.print line in a recover block but that doesn't work
<Praetonus> staticassert: To recover an object, you have to put the recover around the code initialising that object
<Praetonus> Here, you'll have to wrap the String constructor call and the match in the same recover block
<Praetonus> I'll comment on your gist to show you what it could look like
<staticassert> Thanks. I tried adjusting the code and I'm still missing it.
<Praetonus> I've commented
<staticassert> oh, recover is an expression, of course -_- thank you
<Praetonus> Yes
<Praetonus> Do you want me to walk you through the code or is it good?
<staticassert> I got it, thank you
<staticassert> The implicit return in the tutorial threw me off, I didn't realize it was returning the 'recovered' item
Praetonus has quit [Quit: Leaving]
staticassert has quit [Quit: Page closed]
Sargun has quit [Read error: Connection reset by peer]
chemist69 has quit [Ping timeout: 240 seconds]
chemist69 has joined #ponylang
jemc has joined #ponylang
<abbiya> someone should add a gitignore for pony projects to https://github.com/github/gitignore
<SeanTAllen> abbiya: have at it!
<SeanTAllen> be the someone you want to see making changes in this world
<abbiya> i dont know pony yet
<abbiya> i am interested and learning
<SeanTAllen> well, its open source, the best way to see something done is to help in some fashion.
<SeanTAllen> perhaps email pony+user and collect info from users on what they think should be in it and then PR that repo OR perhaps just inspire someone else to do it.
<abbiya> ok, soon
<SeanTAllen> here's more work to do then there are people to do it so, every little bit of help is greatly appreciated
<SeanTAllen> If you haven't seen it abbiya, we have a community survey underway... we welcome input from all community members no matter their experience level: https://t.co/cShEKygVKN
<SeanTAllen> Anyway, I'm off to bed. Good luck with the learning abbiya. If you get stuck, hit us up here or on the user mailing list for help.
gmcabrita has quit [Quit: Connection closed for inactivity]
amclain has quit [Quit: Leaving]
chemist69 has quit [Ping timeout: 240 seconds]
chemist69 has joined #ponylang
graaff has joined #ponylang
prettyvanilla has quit [Ping timeout: 268 seconds]
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
prettyvanilla has joined #ponylang
_whitelogger has joined #ponylang
_whitelogger has joined #ponylang
bougyman has quit [Ping timeout: 264 seconds]
bougyman has joined #ponylang
bougyman has joined #ponylang
bougyman has quit [Changing host]
jemc has quit [Ping timeout: 260 seconds]
virtual_lark has joined #ponylang
gmcabrita has joined #ponylang
_andre has joined #ponylang
abbiya has quit [Remote host closed the connection]
prettyvanilla has quit [Ping timeout: 260 seconds]
Praetonus has joined #ponylang
staticassert has joined #ponylang
prettyvanilla has joined #ponylang
plietar has joined #ponylang
prettyvanilla has quit [Ping timeout: 256 seconds]
prettyvanilla has joined #ponylang
<staticassert> I'm not sure I understand the difference between iso and ref. You can't share 'iso' across actor boundaries, you have to hand ownership over to another actor. 'ref' can't be shared safely either since it's a mutable pointer.
<staticassert> They both seem like mutable pointers that can only be used within an actor
hooo has joined #ponylang
<hooo> alright I'm just gonna say it: I believe that Ponylang should use zapcc to speed up compilation
<staticassert> Seems like breaking away from LLVM would hurt long term as it gets more and more development focus. I assume more people are working on it than zapcc
<staticassert> It would be cool to use zapcc for debug builds maybe?
<lisael> staticassert: a ref can't be shared among actors, an iso can
<SeanTAllen> staticassert: so, difference between iso and ref. ref is a mutable object that you own. and can't leave that actor. iso is a mutable object for which there can only be one alias. you use it to create a mutable object that can be used in another actor.
<lisael> because everytime you alias an iso, you have to consume it
<SeanTAllen> a good example of this staticassert can be seen in the relationship between TCPConnection and TCPConnectionNotify objects. Check out the echo server example. The Nofity is an iso because its created in one actor and needs to be given over to the TPConnection for use.
<staticassert> Hm. So the difference is that in order to share an 'iso' you have to 'move' it to another actor - and a ref can't be moved
<staticassert> Is that about it?
<staticassert> I'll check out the echo server example as well.
<SeanTAllen> correct
<SeanTAllen> you have to consume an iso in order to send it
<SeanTAllen> and that means you can no longer use it
<SeanTAllen> its a mutable reference where only a single reference is ever allowed
<staticassert> whereas 'ref' is a reference counted variable I assume
<staticassert> non-atomic
<SeanTAllen> there can be many references to the `ref`
<SeanTAllen> so inside of a class, i can pass the ref around if i want to other classes etc
<staticassert> right, it just isn't thread-safe
<SeanTAllen> its thread safe
<staticassert> you can share a ref across actors?
<SeanTAllen> no
<SeanTAllen> you can not
<SeanTAllen> that is why i said "class"
<staticassert> oh, within a class
<staticassert> I see
<staticassert> yeah that makes sense
<SeanTAllen> its safe to share within an actor across classes
<SeanTAllen> but iso disallows that
<SeanTAllen> because there would be multiple references
<staticassert> gotcha
<SeanTAllen> if you have a field in a class or actor, you almost always want ref instead of iso.
<SeanTAllen> iso is generally created in a method and immediately passed to another actor.
<SeanTAllen> the one instance where you might use a field that is an iso is when doing a destructive read.
<SeanTAllen> im digging up an example of that now for you
<staticassert> thanks
<staticassert> I'm going to try to write minimal examples for each reference capability and stick that somewhere in the book
<SeanTAllen> so if you look in TCPConnection, you will see that _read_buf is an iso: https://github.com/ponylang/ponyc/blob/master/packages/net/tcp_connection.pony#L172
<staticassert> huh, I haven't seen the @ sigil used in pony before
<SeanTAllen> and here you can see the destructive read where the old data is assigned to a local variable and a new array is assigned to the field
<SeanTAllen> and i am amused it happens on line 666
<SeanTAllen> the @ is a c ffi call
<staticassert> oh cool
<Praetonus> staticassert: Regarding reference counting, the only reference counted objects are those sent in messages. Objects don't have embedded reference counters and creating new references inside of a single actor doesn't change any counter
jemc has joined #ponylang
<staticassert> Praetonus: very cool
<staticassert> One thing from Joe Duffy's blog with the Keeper pattern is it seems like, if the Keeper holds state, you could really easily implement a circuit-breaker pattern using that
amclain has joined #ponylang
<SeanTAllen> link?
<staticassert> See the Keeper pattern - this was linked in the RFC on stateful exceptions
<staticassert> It's a great post, all of the Midori posts are excellent
<staticassert> He does bring up the union/ enum performance impact for error handling
<jemc> hooo: you can use whatever C/C++ compiler you want to compile `ponyc` - just set the `CC` and `CXX` environment variables when invoking `make`
virtual_lark has quit [Remote host closed the connection]
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ponylang
<SeanTAllen> morning jemc! welcome to Friday
<jemc> :)
<hooo> jemc: i mean the compilation of llvm to native that ponyc does
<hooo> zapcc is faster and uses llvm internally
<hooo> you might be able to call zapcc on llvm IR code
<SeanTAllen> jemc: i think main is doing something weird... https://raw.githubusercontent.com/ponylang/ponyc/master/CHANGELOG.md
<SeanTAllen> there's "{{hook}}" in the CHANGELOG now
<SeanTAllen> for recent entries
<jemc> hooo: most of the time in the pony compiler is doing pony-specific typechecking stuff - the LLVM IR to native machine code step is quite short by comparison
<jemc> so even if it would be possible to get some speedup from zapcc in that step, it doesn't seem worth it to add a zapcc dependency when the step is so insignificant in cost compared to the others
<jemc> SeanTAllen: yeah, looks like it might have broke something when I did the `[skip ci]` change
<jemc> I can take a look later today, probably
<hooo> thats a BIG problem imo
<hooo> it must be sped up
<SeanTAllen> i use pony all day long hooo and that is not one of my primary concerns at this point in time. if you would like to dive in and work on speeding up compilation time, we'd welcome the help.
hooo has left #ponylang ["Leaving"]
<jemc> hooo: not sure if you're joking around / trolling here
<jemc> or maybe there's something you didn't understand about my explanation?
<jemc> I like to give the benefit of the doubt, but if you're trolling, it's not particularly polite to waste others' time
graaff has quit [Quit: Leaving]
avsej has quit [Quit: Quit]
avsej has joined #ponylang
avsej has joined #ponylang
avsej has left #ponylang [#ponylang]
_andre has quit [Quit: leaving]
staticassert has quit [Quit: Page closed]
plietar has quit [Remote host closed the connection]
plietar has joined #ponylang
plietar has quit [Ping timeout: 264 seconds]
plietar has joined #ponylang