<Xyliton>
jemc: Thanks <3 I really have to learn how to use that irclog
strmpnk_ has joined #ponylang
<Xyliton>
I can give the notify class access to my actor as a tag and have a behaviour on the actor which "receives" the messages, right?
jeremyheiler has quit [Ping timeout: 276 seconds]
j14159 has quit [Ping timeout: 276 seconds]
strmpnk has quit [Ping timeout: 276 seconds]
dom96 has quit [Ping timeout: 276 seconds]
Arjan has quit [Ping timeout: 276 seconds]
jeremyheiler_ is now known as jeremyheiler
Arjan has joined #ponylang
j14159 has joined #ponylang
dom96 has joined #ponylang
strmpnk_ is now known as strmpnk
<jemc>
yep, exactly
<Xyliton>
is having a separate class in order to off-load the data extraction from the json data a bad design choice? Or is that okay?
<Xyliton>
(it also builds the payload I send by just adding the data that changes to the structure itself)
<jemc>
yes, if you can abstract logic like that into a helper class (or helper primitive, if stateless), it seems appropriate to do so
<Xyliton>
what exactly is a "helper primitive"?
<Xyliton>
can I make it even easier to build this stuff, or even have my own "types" for the different payloads I can receive?
<jemc>
Xyliton: I just meant making a `primitive` type with some functions in it that help you by abstracting a particular task into that function
<jemc>
it's recommended that you use a `primitive` instead of a `class` if you don't have any fields
<jemc>
and yeah, it could be a good idea if you wanted to have a class for each payload type, and then use incoming JSON to create the instance of the right class and fill it with data
<Xyliton>
Is it possible to check if an object of a "generic" class is a an instance of a subclass of said "super-class"?
<Xyliton>
wait, nevermind. I mean interfaces/traits
Matthias247 has joined #ponylang
<jemc>
Xyliton: you'll want to use either `match` or `as` for that
<jemc>
let me know if you need tutorial links
<jemc>
basically, something like `match x | let x': MyTrait => /*...*/ else /*...*/ end`
<Xyliton>
How do I write to a file?
<jemc>
Xyliton: check out `File` in the `files` package
malthe has quit [Ping timeout: 268 seconds]
malthe has joined #ponylang
Xyliton has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
Matthias247 has quit [Read error: Connection reset by peer]