<doublec>
endformationage: probably need to call pony_register_thread, then pony_become, then you can call Pony functions to send messages.
<endformationage>
doublec: Thanks, I'll check it out!
jemc has joined #ponylang
plietar has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
endformationage has quit [Quit: WeeChat 1.9]
plietar_ has joined #ponylang
plietar has quit [Ping timeout: 240 seconds]
plietar_ has quit [Remote host closed the connection]
_whitelogger has joined #ponylang
samuell has joined #ponylang
obadz has quit [Ping timeout: 246 seconds]
obadz has joined #ponylang
inara has quit [Quit: Leaving]
inara has joined #ponylang
theodus has joined #ponylang
Praetonus has joined #ponylang
theodus_ has joined #ponylang
jemc has joined #ponylang
<Praetonus>
endformationage doublec: You do need to call `pony_register_thread` in order to send messages, but you don't need to call `pony_become`
<ada[m]>
Anyone built an xml library for pony yet? github search doesn't turn up anything.
<Praetonus>
`pony_become` is needed for `pony_poll` and operations that involve heap allocation and GC tracing, i.e. the various `pony_alloc_*`, `pony_gc_*` and `pony_trace*` functions
<SeanTAllen>
ada[m]: not that i am aware of
<ada[m]>
hm. I've never built a parser from scratch before of any type. Could be fun. Any interest in having an xml library in the stdlib if I come up with any sort of sane design? Seems like a borderline one to me.
<doublec>
Praetonus: thanks!
Praetonus has quit [Ping timeout: 255 seconds]
Praetonus has joined #ponylang
<SeanTAllen>
ada[m]: i'd say create the library and you can get feedback and open an RFC about adding to the stdlib
Praetonus has quit [Ping timeout: 255 seconds]
Praetonus has joined #ponylang
<ada[m]>
👍 would be nice if I could contribute something back to the pony community instead of just constantly asking questions
theo has joined #ponylang
jimdopango has joined #ponylang
theodus has quit [Ping timeout: 240 seconds]
<SeanTAllen>
if you are looking to contribute, one big help is triaging issues as they come up in ponyc etc
<SeanTAllen>
its a great way to learn and can be immensely helpful
<jemc>
also, if you haven't already seen it, you may find this interesting - we had/have a user that is working with directx from pony: https://github.com/npruehs/pony-game
<_etc>
I did see that! I'm developing on linux so I think (?) directx would be hard to use
<jemc>
yeah, I develop on linux too, so I'm excited to see some opengl work :)
<_etc>
:)
<endformationage>
_etc: Cool stuff!
<_etc>
Do you have any advice for synchronizing behaviours? Callbacks came to mind but I'm hoping there might be something simpler
<_etc>
Thanks!
<Praetonus>
_etc: What do you mean by "synchronizing behaviours"?
<SeanTAllen>
I think you mean using either callbacks or promises _etc but i'd like to hear more before saying anything specific.
_etc has joined #ponylang
<_etc>
@Praetonus: Well there are calls to opengl that have to be made in a certain order. I originally grouped these in classes with the data they each need, but when I switch to actors they are interweaved in a way that messes up opengl
aturley has quit [Ping timeout: 240 seconds]
<Praetonus>
_etc: Not everything needs to be an actor. If you need to do things in a particular order, then it's simplier to do them in the same behaviour (or in different behaviours with causal ordering), with the logic encapsulated into classes if need be
<Praetonus>
Do you have a particular reason to use actors instead of classes?
<_etc>
I don't think so - that makes sense, thanks! Also what causal ordering?
<Praetonus>
It's a constraint enforced on message ordering. Basically, every message sent or received by an actor is a cause of any future message sent or received by that actor, if the two messages have the same destination
<_etc>
Cool! Thanks :)
<Praetonus>
For example, suppose you have 3 actors, A, B, and C. A sends a message to B and then to C. Once receiving A's message, B sends a message to C. Then, C is guaranteed to receive A's message before B's
<_etc>
(thumbsup) that makes sense
<SeanTAllen>
ummm
<SeanTAllen>
Praetonus: i think that could be slightly confusing
<SeanTAllen>
also Praetonus i dont think taht is guaranteed by casual messaging
<SeanTAllen>
it depends
<Praetonus>
Hm yeah, I think I got that mixed up
<Praetonus>
I should go to sleep I think
<SeanTAllen>
ha
<SeanTAllen>
_etc: you still there?
<SeanTAllen>
causal messaging is the guarantee that messages send between any Point A and Point B will arrive in the order they were sent
<SeanTAllen>
so i actor A send messages 1,2,3 in that order to actor B then B will process them as 1,2,3
<SeanTAllen>
they will not be reordered
<SeanTAllen>
whereas
<SeanTAllen>
let's take Praetonus' example
<SeanTAllen>
A send to B and to C
<_etc>
I am still here
<SeanTAllen>
and B sends to C
<SeanTAllen>
theres no guarantee on the order that those messages arrive at C
<SeanTAllen>
so A send to B message 1
<SeanTAllen>
A sends to C message 2
<SeanTAllen>
while those two things are happening, B gets scheduled and it picked up message 1 that causes a message send to C
<SeanTAllen>
its possible but unlikely that will happen before A sends message 2 to C
<SeanTAllen>
so there is no guarantee on order
<SeanTAllen>
you can only guarantee between 2 points
<SeanTAllen>
now
<SeanTAllen>
if A send 5 messages to B and each of those 5 results in 5 message to C
<SeanTAllen>
all messages will arrive "in order" at C
<SeanTAllen>
because its A => B => C
<SeanTAllen>
does that make sense?
<_etc>
Yes that makes total sense
<_etc>
thanks!
<SeanTAllen>
causal messaging can be very powerful
<SeanTAllen>
we rely on it in Wallaroo as part of our message delivery guarantees
<_etc>
Cool
<_etc>
Is this in the tutorial?
<jemc>
_etc: thanks for sharing your codebase by the way - I plan to make some time tonight to try to fire it up and see if I can see the rainbow triangle on my own machine :)
<jemc>
definitely keep us in the loop about advancements you make!
<SeanTAllen>
_etc I *think* casual messaging is in the tutorial