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
amclain has quit [Quit: Leaving]
chemist69 has quit [Disconnected by services]
chemist69_ has joined #ponylang
jemc has quit [Ping timeout: 255 seconds]
jemc has joined #ponylang
gmcabrita has quit [Quit: Connection closed for inactivity]
graaff has quit [Ping timeout: 258 seconds]
graaff has joined #ponylang
jemc has quit [Ping timeout: 255 seconds]
jemc has joined #ponylang
graaff has quit [Quit: Leaving]
jemc has quit [Ping timeout: 268 seconds]
papey_lap has joined #ponylang
endformationage has quit [Quit: WeeChat 1.7]
chemist69_ has quit [Quit: WeeChat 1.7]
chemist69 has joined #ponylang
vaninwagen has joined #ponylang
<vaninwagen> SeanTAllen, read the logs. thank you :)
BlackYoup has quit [Quit: ZNC - http://znc.in]
atk has quit [Quit: Well this is unexpected.]
atk has joined #ponylang
chemist69 has quit [Ping timeout: 255 seconds]
chemist69 has joined #ponylang
CcxWrk has quit [Ping timeout: 260 seconds]
CcxWrk has joined #ponylang
gmcabrita has joined #ponylang
_andre has joined #ponylang
aedigix has quit [Remote host closed the connection]
aedigix has joined #ponylang
vaninwagen has quit [Ping timeout: 258 seconds]
jmiven has quit [Quit: WeeChat 1.7]
jmiven has joined #ponylang
jemc has joined #ponylang
chemist69 has quit [Ping timeout: 260 seconds]
chemist69 has joined #ponylang
aav has joined #ponylang
Fluttershy_ has joined #ponylang
<Fluttershy_> Hello, What is the state of distributed pony please ?
<Fluttershy_> release date ...
<SeanTAllen> Fluttershy_: there is no release date. it's not a priority compared to stability etc for 1.0
<Fluttershy_> ok
<SeanTAllen> we are doing work at Sendence that could inform what distributed pony looks like
<Fluttershy_> interesting
M-hrjet has quit [K-Lined]
irx[m] has quit [K-Lined]
buchanon[m] has quit [K-Lined]
srenatus[m] has quit [K-Lined]
Fluttershy_ has quit [Quit: Page closed]
buchanon[m] has joined #ponylang
srenatus[m] has joined #ponylang
M-hrjet has joined #ponylang
irx[m] has joined #ponylang
amclain has joined #ponylang
graaff has joined #ponylang
chemist69 has quit [Ping timeout: 240 seconds]
chemist69 has joined #ponylang
graaff has quit [Quit: Leaving]
endformationage has joined #ponylang
vaninwagen has joined #ponylang
<vaninwagen> hi, may i ask if recursive type definitions would be possible? say: type Recursive is (Bool|Seq[Recursive])
<vaninwagen> the compiler says: "type aliases can't be recursive" if i try
<vaninwagen> i want to catch arbitrarily deeply nested arrays with one type
<jemc> vaninwagen: that kind of construct is currently not possible (would take a significant refactor of the compiler), but it is pretty unicersally agreed that it is desirable, so it's sort of on the roadmap
<vaninwagen> jemc sounds quite good. i'm kinda blocked with what i am doing currently by this https://media.giphy.com/media/yIq7dEbdk2vtK/giphy.gif
<jemc> the common workaround is to have a container type in the middle
<vaninwagen> would this work for arbitrarily deeply nested arrays?
papey_lap has quit [Quit: WeeChat 1.7.1]
<vaninwagen> to give you a concrete example. i want to do exactly this: type MsgPackable is (None|Bool|Unsigned|Signed|Float|ByteSeq|Seq[MsgPackable]|Map[MsgPackable, MsgPackable])
<vaninwagen> i want to catch every type that msgpack could handle to serialize. i fear i can't use this common workaround :/
<jemc> you can use the workaround, the same as the json library uses it - it's just that it's not ideal in either case
<jemc> in Pony it'll likely be less cumbersome (for JSON and msgpack parsers) to use the kind of "collaborative" parsing styles used by some C parsers
<vaninwagen> what does "collaborative" mean here?
Matthias247 has joined #ponylang
_andre has quit [Quit: leaving]
BlackYoup has joined #ponylang
<endformationage> Hi. I'm attempting to call a function from a constructor to help setup a field, but I don't understand the required refcaps.
<endformationage> It is the common error: receiver type is not a subtype of target type
<endformationage> I understand why the target type is box, because it is the default for fun, but not why the receiver is tag?
BlackYoup has quit [Quit: ZNC - http://znc.in]
BlackYoup has joined #ponylang
<endformationage> so I can setup the target fun to be ref so that it can assign to a field, but I'm still left with a receiver that's tag from the constructor.
<jemc> vaninwagen: I'm talking about libraries where the caller invokes a specific function that describes what kind of entity they expect to see next from the parser, then either succeeds or fails based on that expectation - I think such an API has the capacity to be less cumbersome for use cases where the caller knows what to expect, since you don't have to "unwrap" a bunch of union types to concrete ones
<jemc> I don't remember the names of the libraries I'm thinking of though, unfortunately
<jemc> endformationage: can you paste your snippet and the complete error output you see, into a gist and give the link here?
<endformationage> jemc: sure
<vaninwagen> jemc you basically suggest to strip the automatic type traversal?
<jemc> vaninwagen: yeah, more or less - I think the API might be more useful that way in a strongly-typed language like Pony
<vaninwagen> i was thinking about using "Any box" as a parameter type to the outside world and just fail if i encounter something unsupported...
<jemc> endformationage: got it - this is something that Pony just doesn't allow - you've got to finish initializing all fields before passing the object around (including as the `this` of an internal method) - unless it happens in the actual constructor, the compiler can't track what fields are initialized yet - so the compiler treats an incomplete "this" (when not all fields are initialized yet) as a tag
<jemc> the odd thing is that this is supposed to print a helpful info message along with the error message
<jemc> something along the lines of "this would be possible if ..."
<jemc> can you please file a ticket for the fact that this helpful info message is missing? (if you don't have time, I can try to do it later today)
<endformationage> I see, I used a fun because I needed to do some stuff in a 'block' of code which I had previously used a try block for, but didn't want to catch any exception
<endformationage> Sure I'll file a ticket.
<jemc> you can do this in a helper if you return the field values that need to be set from the helper method, then set them in the constructor
<jemc> something like `(field_1, field_2, field_3) = _helper()`
<endformationage> Hmm, I thought I tried this originally, I'll try again.
<jemc> where `_helper` has a return type of `(Field1Type, Field2Type, Field3Type)`
<jemc> the trick is that you need `_helper` to be a `fun tag`
<endformationage> Ahh, I see it now
<endformationage> because one is still not reading or writing to the receiver, just accepting and returning value
<endformationage> Thank you for the help.
<jemc> no problem!
Matthias247 has quit [Read error: Connection reset by peer]
<SeanTAllen> jemc: i think we need to document this in a pony pattern. the `fun tag` constructor one OR put it in the FAQ on the website (or both). this comes up about every 3-4 weeks
vaninwagen has quit [Ping timeout: 268 seconds]