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 joining our Slack server => https://www.ponylang.io/get-slack-invite
_whitelogger has joined #ponylang
erip has joined #ponylang
acarrico has joined #ponylang
erip has quit [Remote host closed the connection]
erip has joined #ponylang
erip has quit [Remote host closed the connection]
erip has joined #ponylang
PrsPrsBK has joined #ponylang
erip has quit [Remote host closed the connection]
acarrico has quit [Ping timeout: 245 seconds]
<vaninwagen> harber, someone made it work on vscode with quite some success, lemme search the link
<vaninwagen> It was discussed on slack, i extracted the essential recipe: https://gist.github.com/mfelsche/ef4dd9e104a8127e820b6e4e20c88b2c
<vaninwagen> All credit goes to slack user somoni
endformationage has quit [Quit: WeeChat 2.3]
srenatus has joined #ponylang
a-pugachev has joined #ponylang
acarrico has joined #ponylang
EEVV has joined #ponylang
<EEVV> what if I store `TCPConnection ref` from received method to my `TCPConnectionNotify` class? Can I do this
<SeanTAllen> sorry, EEVV, what does that mean?
<SeanTAllen> store where?
<SeanTAllen> if you want to have all connections do something on a timer, you want an actor that all connections get registered with and a timer can send a message to that actor periodically and then, you can have the connections send the ping by call write on each of the tcp connections. each TCPConnectionNotify would have a tag for the actor that manages all the connections, and can add and remove the enclosing TCPConnection...
<SeanTAllen> on connect and also on closed
<EEVV> SeanTAllen, I understand that part, but is there a method for TCPConnectionNotify like `write`?
<EEVV> I need access to `TCPConnection ref` but this is only given to you in the `received` method in `TCPConnectionNotify`
<SeanTAllen> I dont understand
<SeanTAllen> Based on the solution I gave, I'm not sure what you mean by your question or why it would be needed.
<EEVV> SeanTAllen, question is how do you send data?
<EEVV> from external actors
<SeanTAllen> i dont understand
<SeanTAllen> "how do you send data from external actors"?
<SeanTAllen> are you asking how to send data over TCP using TCPConnection?
<EEVV> yeah
<EEVV> well
<EEVV> no
<SeanTAllen> then i dont understand
<EEVV> I can send data when I have access to a `TCPConnection` with `write` method
<EEVV> but I am only given `TCPConnection` in the `received` method
<SeanTAllen> you didnt understand my solution
<SeanTAllen> you an another actor that manages all connections
<EEVV> I did understand
<SeanTAllen> it can call write on each of those TCPConnections when data needs to be sent to all of them
<EEVV> but you didn't explain how I would send the data
<SeanTAllen> yes i did
<SeanTAllen> you have the TCPConnections
<EEVV> so can I pull TCPConnection from received?
<SeanTAllen> no
<SeanTAllen> the end of today i can post code for you
<SeanTAllen> its 10 minutes to write the code but i have a busy day
<SeanTAllen> you dont understand my solution, that's ok, its just words. i'll give you code eventually today
<EEVV> I will try to figure it out then
<SeanTAllen> create a new type of actor
<SeanTAllen> call it ConnectionRegistry
<SeanTAllen> have register and unregister methods on it
<SeanTAllen> those take a TCPConnection
<SeanTAllen> in your TCPConnectionNotify
<SeanTAllen> when connected you call register and send the connection to the ConnectionRegistry
<SeanTAllen> same approach on closed except call unregister
<EEVV> ok but where I get this connection from?
<EEVV> that's my problem
<SeanTAllen> what connection?
<EEVV> TCPConnection
<SeanTAllen> go look at TCPConnectionNotify interface
<SeanTAllen> every method gets the TCPConnection its being run by
<EEVV> so I can pull TCPConnection from `accepted` method? And add to the registry?
<SeanTAllen> you'd want to do it on connected not accepted, but yes
<EEVV> but connected is part of listener and it doesn't contain a trade of `TCPConnection`
<EEVV> trace*
<SeanTAllen> please go look at TCPConnectionNotify
<SeanTAllen> `connected` is a method on it
<SeanTAllen> i have to start work now
<SeanTAllen> good luck
jemc has joined #ponylang
<EEVV> thanks
a-pugachev has quit [Quit: a-pugachev]
a-pugachev has joined #ponylang
aturley has joined #ponylang
vijayee has quit [Ping timeout: 250 seconds]
jemc has quit [Ping timeout: 245 seconds]
jemc has joined #ponylang
endformationage has joined #ponylang
<Candle> SeanTAllen: WRT state machines in ponylang: one of my experiments in the area: https://github.com/CandleCandle/pony-perudo/
<SeanTAllen> what should i look at in particular Candle ?
<Candle> the states in the state machines are things like `type _GameState is ( _GameStart | _GameTurn | _GameEnd )` I'm not overly happy with how opaque their use is.
<Candle> The `_GameTurn` states allow some form of information storage within the state; which also feels sub-optimal.
<SeanTAllen> and then the matching, yes?
<Candle> Yes, and then using match on the state.
<Candle> The other main state machine is the netcat_player; again defined by `type _NcState is ( _NcStateWaiting | ....`
jemc has quit [Ping timeout: 240 seconds]
<aturley> i’m streaming some pony work on twitch again today at 3PM EST. https://www.twitch.tv/events/1aTDVDi6QRaa1lxr7IkGPQ
a-pugachev has quit [Quit: a-pugachev]
a-pugachev has joined #ponylang
a-pugachev has quit [Quit: a-pugachev]
inoas has joined #ponylang
inoas has quit [Client Quit]
erip has joined #ponylang
srenatus has quit [Quit: Connection closed for inactivity]
travis-ci has joined #ponylang
<travis-ci> ponylang/ponyc#5613 (release - 3c0c290 : Sean T Allen): The build was broken.
travis-ci has left #ponylang [#ponylang]
_whitelogger has joined #ponylang
EEVV has quit [Ping timeout: 256 seconds]
Foaly has joined #ponylang
erip has quit [Remote host closed the connection]
erip has joined #ponylang
a-pugachev has joined #ponylang
a-pugachev has quit [Read error: Connection reset by peer]
acarrico has quit [Ping timeout: 250 seconds]
Foaly has quit [Quit: Now 'mid shadows deep falls blessed sleep.]
erip has quit [Remote host closed the connection]
erip has joined #ponylang
erip has quit [Remote host closed the connection]