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
acarrico has joined #ponylang
acarrico has quit [Ping timeout: 250 seconds]
Nawab has quit [Quit: Leaving]
endformationage has quit [Quit: WeeChat 2.3]
srenatus has joined #ponylang
svdvonde has joined #ponylang
<svdvonde> I have a question regarding the echoserver example here: https://github.com/ponylang/ponyc/blob/master/examples/echo/echo.pony
<svdvonde> I understand that the TCPConnection actor synchronously invokes callbacks on the server (defined in the TCPConnectionNotify interface), but I was wondering if there is a particular reason as to why the Server is implemented as a class and not an actor (which would make more sense to me conceptually)
<Candle> svdvonde: The TCPListener and the TCPConnection are both actors; the TCPListenNotify and the TCPConnectionNotify are the handlers; they are describing what to do on various events; and are called synchronously from the relevant actors.
<Candle> As to why, a class has the option of being used in both a synchronous and asynchronous way, where as an actor has to be asynchronous.
<Candle> (There are probably better answers from others in the channel though)
<svdvonde> I should probably give some more context to understand the angle I'm coming from. The reason why I ask that specific question is because I'm investigating code reuse mechanisms for actor languages, and I'm looking for a convincing real-world use case that is currently difficult to develop using existing actor languages.
<svdvonde> One avenue that I'm looking at is something that @SeanTAllen mentioned a while ago, related to code reuse mechanisms for actors: "There's no way to take something like TCPConnection and add additional functionality. More important, there's no way to take the notify class that specializes it and send it messages which is very limiting."
<svdvonde> So I've been pondering about what he said and I'm wondering what the issue here is. In the case of the TCPConnection actor I can imagine some applications might want to define a special MyTCPConnection actor that specialises TCPConnection in some ways but not others (which, IIRC, is currently not possible).
<svdvonde> The same would be true for TCPConnectionNotify, where, if it would be defined as an actor, then application-code couldn't define some "MyTCPConnectionNotify" actor that specialises it. But that leaves me wondering why precisely it is limiting that currently instances of TCPConnectionNotify must be classes.
<svdvonde> @SeanTAllen perhaps you can clarify a couple of things for me?
svdvonde_ has joined #ponylang
svdvonde has quit [Ping timeout: 256 seconds]
svdvonde has joined #ponylang
svdvonde_ has quit [Ping timeout: 256 seconds]
<emilbayes> What's the difference between `String.trim` and `String.trim_in_place`? `trim_in_place` seems to mention a `slice` method that doesn't exist anymore?
<emilbayes> Ah, so `trim_in_place` seems to suggest that the `String` is mutated, while `trim` returns a new `String` but with the same underlying memory?
<emilbayes> (this is my interpretation from reading the source: https://stdlib.ponylang.org/src/builtin/string/#L355 )
<_andre> srenatus: i have fixed the link, thanks
<srenatus> :)
acarrico has joined #ponylang
Nawab has joined #ponylang
<srenatus> _andre: thanks, I really didn't know that package :D
endformationage has joined #ponylang
<_andre> it seems stable doesn't work with alises in "use" statements?
<_andre> i have 'use uuid = "uuid"' and ponyc gives me "can't load package 'uuid'"; removing "uuid =" fixes it
<_andre> actually i started from scratch and now i can't get either to work
inoas has joined #ponylang
<vaninwagen> _andre the package u wanna compile is in dirA and depends upon the uuid package?
<vaninwagen> You added it using stable add?
<vaninwagen> And when you do stable env ... ponyc dirA it cannot find uuid?
<vaninwagen> What do you get when you run stable env | grep PONYPATH ?
<_andre> this is what i did: https://pastebin.com/9RcbgYB9
svdvonde has quit [Ping timeout: 256 seconds]
<_andre> hmm it seems to work with other packages... it went fine with SeanTAllen/pony-msgpack
<_andre> my uuid package has an uuid.pony file in the project root
<_andre> apparently it's expected to be in a directory
<_andre> yeah, it works when the project is organized like this https://github.com/andrenth/pony-uuid
nisanharamati has joined #ponylang
acarrico has quit [Ping timeout: 245 seconds]
acarrico has joined #ponylang
srenatus has quit [Quit: Connection closed for inactivity]
inoas has quit [Quit: inoas]
inoas has joined #ponylang
inoas has quit [Client Quit]
inoas has joined #ponylang
inoas has quit [Client Quit]
inoas has joined #ponylang
inoas has quit [Client Quit]
inoas has joined #ponylang
inoas has quit [Client Quit]
inoas has joined #ponylang
inoas has quit [Client Quit]
inoas has joined #ponylang
inoas has quit [Quit: inoas]