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
illotum has quit [Ping timeout: 252 seconds]
endformationage has joined #ponylang
<slfritchie> illotum: You can call the socket's getsockopt() & setsockopt() functions inside of your TCPConnectionNotify class's callback, e.g. in the fun ref connected(conn: TCPConnection ref) callback. The docs at https://stdlib.ponylang.org/net-TCPConnection/#getsockopt can help show the way, I hope. Holler if it still isn't clear.
<slfritchie> Most of the constants that might be useful for a UNIX'ish or Windows platform are defined in the OsSockOpt module: https://stdlib.ponylang.org/net-OSSockOpt/
<slfritchie> If the constant that you need isn't present in the OsSockOpt module, then you'll have to discover what it is (diving through /usr/include/* header files, for example) and then hard-code it into your Pony code.
nisanharamati has quit [Quit: Connection closed for inactivity]
endformationage has quit [Quit: WeeChat 1.9.1]
khan has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 265 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
brainproxy has joined #ponylang
nah has joined #ponylang
nah has quit [Ping timeout: 252 seconds]
brainproxy has quit [Ping timeout: 276 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 244 seconds]
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 260 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
brainproxy has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
brainproxy has quit [Ping timeout: 240 seconds]
brainproxy has joined #ponylang
<Candle> What pattern do people recommend to get a field out of lots of actors [of the same type] into a list?
brainproxy has quit [Ping timeout: 256 seconds]
brainproxy has joined #ponylang
<vaninwagen> Do you know how many actors there is and are you in control of their code? Or is it some 3rd party actor?
<vaninwagen> You could have another actor gather them in a list, create it with the expected number of values and then call a behaviour on the field actors that sends the field to the gathering actor
<vaninwagen> You could have a promise on the gathering actor that is set when all values arrived
<vaninwagen> Does that make sense?
<Candle> That makes sense, yes. There can be 1000s of actors, and it's code that I control.
<vaninwagen> Cool, one could even make this some generic thingy that will save people some boilerplate.
brainproxy has quit [Ping timeout: 260 seconds]
inoas has joined #ponylang
brainproxy has joined #ponylang
brainproxy has quit [Ping timeout: 264 seconds]
<Candle> Yes. A list of actors is the input, We know we have N actors in the input, so we know how many responses we should have, on the Nth response, call the callback with the resulting set.
<Candle> There are some error conditions there that make me want to add a timeout, but that's ugly.
brainproxy has joined #ponylang
khan has quit [Quit: khan]
acarrico has quit [Ping timeout: 240 seconds]
<vaninwagen> I also thought a timeout does make sense
brainproxy has quit [Ping timeout: 260 seconds]
brainproxy has joined #ponylang
acarrico has joined #ponylang
<Candle> I think that a timeout feature is after the "first make it work" phase!
acarrico has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ponylang
acarrico has joined #ponylang
acarrico has quit [Ping timeout: 268 seconds]
inoas has quit [Ping timeout: 248 seconds]
inoas has joined #ponylang
<slfritchie> Candle: The Promises package may take care of your "what to do after getting N responses from N actors" task. https://stdlib.ponylang.org/promises--index ... Promise.join() is given an iterator of Promises and creates a new Promise. Using next() on that that new promise will give you the ability to inspect the concrete return values of the promises from the iterator.
endformationage has quit [Quit: WeeChat 1.9.1]
endformationage has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
endformationage has joined #ponylang
inoas has quit [Ping timeout: 260 seconds]
CcxWrk has quit [Remote host closed the connection]
CcxWrk has joined #ponylang
inoas has joined #ponylang
endformationage has quit [Quit: WeeChat 1.9.1]
endformationage has joined #ponylang
inoas has quit [Quit: inoas]