<slfritchie>
chasegeaton: Looks like Sean has restarted it
<chasegeaton>
Thank you!
inoas has quit [Quit: inoas]
chasegeaton has quit [Ping timeout: 240 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
dipin has joined #ponylang
chasegeaton has joined #ponylang
chasegeaton has quit [Ping timeout: 264 seconds]
dougmacdoug has quit [Quit: dougmacdoug]
farismustafa has quit [Ping timeout: 260 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
goughy has quit [Ping timeout: 245 seconds]
goughy has joined #ponylang
dougmacdoug has joined #ponylang
farismustafa has joined #ponylang
dougmacdoug has quit [Quit: dougmacdoug]
farismustafa has quit [Ping timeout: 256 seconds]
SenasOzys has quit [Ping timeout: 256 seconds]
SenasOzys has joined #ponylang
dougmacdoug has joined #ponylang
SenasOzys has quit [Ping timeout: 240 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
farismustafa has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
chasegeaton has joined #ponylang
goughy has quit [Ping timeout: 240 seconds]
goughy has joined #ponylang
chasegeaton has quit [Ping timeout: 245 seconds]
dipin has quit [Quit: dipin]
endformationage has quit [Quit: WeeChat 1.9.1]
goughy has quit [Ping timeout: 240 seconds]
goughy has joined #ponylang
jemc has quit [Ping timeout: 245 seconds]
vaninwagen has joined #ponylang
chasegeaton has joined #ponylang
user10032 has joined #ponylang
user10032 has quit [Client Quit]
dougmacdoug has quit [Ping timeout: 260 seconds]
farismustafa has quit [Quit: Lost terminal]
khan has quit [Quit: khan]
patroclos has quit [Ping timeout: 256 seconds]
_whitelogger_ has joined #ponylang
sleeplessy has joined #ponylang
codec1 has joined #ponylang
goughy has quit [Read error: Connection reset by peer]
goughy has joined #ponylang
vaninwagen_ has joined #ponylang
vaninwagen has quit [Quit: Connection closed for inactivity]
chasegeaton has quit [Quit: Leaving]
SenasOzys has joined #ponylang
codec1 has quit [Quit: Leaving.]
codec1 has joined #ponylang
khan has joined #ponylang
_andre has joined #ponylang
codec2 has joined #ponylang
codec2 has quit [Client Quit]
codec2 has joined #ponylang
codec2 has quit [Ping timeout: 240 seconds]
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
vaninwagen_ has quit [Ping timeout: 269 seconds]
vaninwagen_ has joined #ponylang
alxs has joined #ponylang
codec2 has joined #ponylang
codec1 has quit [Read error: Connection reset by peer]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
PeskyTiger has joined #ponylang
<PeskyTiger>
Hello, is someone here?
<PeskyTiger>
Anyway, I was wondering - how do I make a program keep running? Is there a way to start an event look? I can see httpserver/timers/ansiterm doing it somehow. How do I make it myself?
vaninwagen_ has quit [Ping timeout: 264 seconds]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
PeskyTiger has quit [Quit: Page closed]
PeskyTiger has joined #ponylang
<SeanTAllen>
PeskyTiger: An application will continue running so long as it has a means of getting input, basically it is registered receive external IO events. So HTTPServer has a socket open. Pony will keep it running. What are you looking for your program to do PeskyTiger?
<PeskyTiger>
Nothing specific right now, just trying to figure out how to make it run "forever"
<SeanTAllen>
If you do something that will result in forever, like opening a socket, it will run as long as that socket is open
<SeanTAllen>
or if you are reading input from STDIN
<SeanTAllen>
it will remain running as long as you have STDIN open
<PeskyTiger>
So there's no way to just "start an event loop" or something like that?
<SeanTAllen>
I dont really know what you mean by just start an event loop
<SeanTAllen>
Thats very handwavey.
<SeanTAllen>
What sort of events?
dipin has joined #ponylang
<SeanTAllen>
Pony programs will exit automatically when there is no more work that can be done and no possibility of more arriving
<SeanTAllen>
"Quiescence" we call it
<SeanTAllen>
This means unlike some other actor systems, you dont have to kill your actors off yourself.
<PeskyTiger>
I see. Ok. I guess I was looking for something like python's tornado's ioloop
<SeanTAllen>
You can register for async io events and handle them
<SeanTAllen>
if you do that
<SeanTAllen>
you will remain running
<SeanTAllen>
TCPConnection for example opens a socket and gets IO events for that
<SeanTAllen>
ANSITerm does the same
<PeskyTiger>
I see.
<PeskyTiger>
Is there a file watcher?
<SeanTAllen>
No but you could write one
<SeanTAllen>
For linux, you could write a code to register for ionotifywait
<SeanTAllen>
and it you started up that code,
<SeanTAllen>
your app would remain running until you tell it to unsubscribe from ionotifywait evetns
<SeanTAllen>
Pony is driven by async IO, in that way it is similar to Tornado but there is no Pony abstraction exposed like Tornado's ioloop.
<SeanTAllen>
If you look in the ansiterm or tcpconnection code, you can see how you need to set it up.
<SeanTAllen>
Jemc and I have discussed what might be needed for a nice Pony wrapper around that but nothing has been done
<PeskyTiger>
Ok. Thank you!
<SeanTAllen>
You're welcome
SenasOzys has quit [Ping timeout: 264 seconds]
SenasOzys has joined #ponylang
alxs has joined #ponylang
PeskyTiger has quit [Quit: Page closed]
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
jemc has joined #ponylang
dougmacdoug has joined #ponylang
dougmacdoug has quit [Remote host closed the connection]
codec1 has joined #ponylang
dougmacdoug has joined #ponylang
<dougmacdoug>
if I want to update an object in one actor but have it be readable from many other actors is there a pattern for that without copy?
alxs has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Read error: Connection reset by peer]
alxs has joined #ponylang
codec2 has quit [Read error: Connection reset by peer]
khan has quit [Quit: khan]
endformationage has joined #ponylang
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
goughy has quit [Read error: Connection reset by peer]
goughy has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
patroclos has joined #ponylang
<endformationage>
Regarding Sylvan's peg package (https://github.com/sylvanc/peg), I see there's a `JsonParser` primitive in the library, as well as a grammar `json.peg` in the examples dir.
<endformationage>
I cannot tell, is the primitive the library's compiled grammar, or a separately written Pony based grammar?
<endformationage>
I get the feeling it's the latter..
<jemc>
endformationage: it's the latter - the `json.peg` demonstrates an example of writing a grammar in a `.peg` file, and `json.pony` is an example of writing the same kind of grammar in pony code
<jemc>
that peg library does not include any kind of pony code generation feature
<endformationage>
jemc: Thanks. I found your pegasus library's 'pony based grammar' easier to follow than Sylvan's. But I didn't understand the executor bits. I assume it's a bit different than walking an AST?
khan has quit [Quit: khan]
khan has joined #ponylang
<jemc>
tbh, when it comes to generating and interpreting the results, the pegasus library wasn't finished - I was still playing with various ideas
<jemc>
I intend to come back to it at some point in the future and steal some ideas from sylvan's implementation while also retaining some more flexibility
<dougmacdoug>
if I want to update an object in one actor but have it be readable from many other actors is there a pattern for that without copy?
khan has quit [Client Quit]
khan has joined #ponylang
<jemc>
having an object that is "[simultaneously] readable from many actors" implies that it must be `val`
<jemc>
since `val` is immutable, updating it implies replacing it
<jemc>
so yeah, there will have to be some copying involved to copy the old parts of the data structure into the new one
<jemc>
using a so-called "persistent" data structure is probably what you want - check out `collections/persistent` in the standard library
endformationage has quit [Quit: WeeChat 1.9.1]
<SeanTAllen>
dougmacdoug: no, that would be unsafe.
dipin has quit [Quit: dipin]
khan has quit [Quit: khan]
khan has joined #ponylang
goughy has quit [Read error: Connection reset by peer]
khan has quit [Client Quit]
khan has joined #ponylang
user10032 has joined #ponylang
patroclos has quit [Ping timeout: 252 seconds]
patroclos has joined #ponylang
alxs has joined #ponylang
SenasOzys has quit [Ping timeout: 264 seconds]
SenasOzys has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
xllndr has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
khan has quit [Quit: khan]
khan has joined #ponylang
alxs has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
<dougmacdoug>
@jemc @seantallen thanks..
<SeanTAllen>
dougmacdoug: are you familiar with CRDTs?
<dougmacdoug>
yes mostly in dealing with distributed apache apps
<SeanTAllen>
So, I think something where you are doing shipping state based changes could be good there. That's in line with the persistent data structure idea
<SeanTAllen>
Here's the actor that is accumulating state changes in some kind of data structure and it informs other actors of changes so they can update their own.
<SeanTAllen>
That's safe and allows each actor to proceed independently without needs locks. Allows you to scale across workers as well.
<dougmacdoug>
that seems like exactly what I am looking for..
<SeanTAllen>
the nice thing about designing for actors is that you are designing for being able to run on more than 1 process
<dougmacdoug>
i guess it feels weird because I will have a portion of my objects state managed externally
<SeanTAllen>
it forces you into that
<SeanTAllen>
managed externally? how so?
<dougmacdoug>
well, i think I want to have a central writer for a state object (representing state of 1 actor) that is readable by many actors including the one represented, ...
<dougmacdoug>
probably mapped by digest
<dougmacdoug>
not all of the state, just the state that needs to be frequently read by all the other actors
xllndr has quit [Quit: Leaving]
acarrico has quit [Ping timeout: 276 seconds]
<SeanTAllen>
if you do that, then you'll need locks
<SeanTAllen>
to make sure that your reads see consistent state
<SeanTAllen>
or memory barriers to assure that you dont get inconsistent state
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
chasegeaton has joined #ponylang
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
acarrico has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
alxs has joined #ponylang
alxs has quit [Client Quit]
khan has quit [Quit: khan]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
khan has quit [Client Quit]
khan has joined #ponylang
alxs has joined #ponylang
vaninwagen has joined #ponylang
user10032 has quit [Quit: Leaving]
khan has quit [Quit: khan]
khan has joined #ponylang
acarrico has quit [Ping timeout: 265 seconds]
dipin has joined #ponylang
alxs has quit [Quit: Computer's gone to sleep. ZZZzzz…]
khan has quit [Client Quit]
khan has joined #ponylang
acarrico has joined #ponylang
codec1 has quit [Read error: Connection reset by peer]
<jemc>
basically, the library implements the data structures, a way for capturing deltas, and it's expected that it could be used either among pony actors or among distributed pony processes via some unspecified network protocol
grom_pl has left #ponylang ["Konversation terminated!"]