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
Xe has quit [Changing host]
Xe has joined #ponylang
DDR has joined #ponylang
m6w6 has joined #ponylang
masteinhauser is now known as Guest62436
bougyman is now known as Guest19682
yggdr has joined #ponylang
srenatus[m] has joined #ponylang
acarrico has quit [Ping timeout: 240 seconds]
acarrico has joined #ponylang
ada[m] has joined #ponylang
irx[m] has joined #ponylang
dtz has joined #ponylang
M-hrjet has joined #ponylang
mindB has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
theodus has quit [Quit: theodus]
Guest19682 has quit [Changing host]
Guest19682 has joined #ponylang
Guest19682 is now known as bougyman
aceluck has joined #ponylang
aceluck has quit [Client Quit]
obadz has quit [Ping timeout: 276 seconds]
obadz has joined #ponylang
<SeanTAllen> ...
acarrico has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ponylang
<endformationage> doublec: How does one co-opt a C thread to become a Pony actor? Any examples of this?
<doublec> endformationage: see ./src/libponyrt/pony.h
<doublec> endformationage: and the docs for pony_become
<doublec> endformationage: I don't have an example of pony_become specifically but some details of using the C API here https://bluishcoder.co.nz/2015/12/16/c-linkable-libraries-with-pony.html
<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
jimdopango has quit [Quit: Page closed]
<ada[m]> Okay. Will add ponyc to my watch list on github and see what I can do.
<SeanTAllen> awesome. mind you, you don't have to. i just like to point out ways to help that folks sometimes (often?) overlook.
acarrico has joined #ponylang
theo has quit [Ping timeout: 246 seconds]
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ponylang
endformationage has joined #ponylang
aturley2 has joined #ponylang
aturley2 has quit [Client Quit]
theodus_ has quit [Quit: theodus_]
aturley_ has joined #ponylang
aturley has joined #ponylang
aturley_ has quit [Client Quit]
_etc has joined #ponylang
<_etc> Hi! I'm looking into making a game in pony by calling opengl with the c ffi
<_etc> So far I have a triangle that spins, but I've made the terrible faux-pas of using a loop exactly how we're told not to here https://tutorial.ponylang.org/gotchas/garbage-collection.html#long-running-behaviors-and-memory
<_etc> I'm trying to move the code to use a behaviour that calls itself instead of a loop - am I right that that will free up the garbage collector?
<jemc> > So far I have a triangle that spins
<jemc> awesome! I'd be excited to see the code for what you've done so far, when you're ready to share it
<jemc> > am I right that that will free up the garbage collector?
<jemc> yep, it sounds like you've got exactly the right idea
<_etc> Nice! Here's what I have so far http://www.charlesetc.com/stars-game-1.html
<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"?
_andre has quit [Quit: leaving]
_etc has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
theodus_ has joined #ponylang
<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
<SeanTAllen> jemc: can you confirm that?
<SeanTAllen> its there but bureied
<_etc> jemc: awesome, best of luck! Let me know if you have any trouble and I'll try to keep making posts
<jemc> SeanTAllen: looks like it's briefly mentioned in the ORCA section
<SeanTAllen> ya
<jemc> should probably have its own section, or maybe a pony pattern
<jemc> to run through the kind of examples you just discussed here
aturley has joined #ponylang
<jemc> SeanTAllen, _etc: should we consider adding this blog post to the "last week in pony" aggregation? http://www.charlesetc.com/stars-game-1.html
<SeanTAllen> i just added it jemc
<SeanTAllen> * to the issue
<_etc> Ooh - sure!
<SeanTAllen> _etc: how long are you at Recurse for?
<_etc> 6 weeks! It's normally twice that though
<SeanTAllen> o right they have shorter sessions now as well right?
<_etc> I was there 2 years ago, so I think just for alumni
<_etc> do you know about it / have you been?
_etc has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
samuell has quit [Quit: Leaving]
<SeanTAllen> i know many people who have attended
<SeanTAllen> the end of our code of conduct might look familiar to you: https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md#social-rules
theodus_ has quit [Quit: theodus_]
samuell has joined #ponylang
samuell has quit [Quit: Leaving]
_etc has joined #ponylang
_etc has quit [Client Quit]