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
Praetonus has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ponylang
jemc has quit [Ping timeout: 276 seconds]
Praetonus has quit [Quit: Leaving]
amclain has quit [Quit: Leaving]
endformationage has joined #ponylang
<endformationage> SeanTAllen: Will, do.
jemc has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
<SeanTAllen> thanks endformationage
m6w6 has quit [Ping timeout: 255 seconds]
m6w6 has joined #ponylang
endformationage has quit [Quit: WeeChat 1.7]
papey_lap has quit [Quit: WeeChat 1.9]
papey_lap has joined #ponylang
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
vaninwagen has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
_andre has joined #ponylang
<SeanTAllen> thanks
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
joncfoo has joined #ponylang
Fuuzetsu has quit [Ping timeout: 240 seconds]
Fuuzetsu has joined #ponylang
Matthias247 has joined #ponylang
endformationage has joined #ponylang
amclain has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
jordan has joined #ponylang
jordan is now known as Guest61568
Guest61568 is now known as JordanUK
<JordanUK> hi guys does anyone know how to return a 'this' in a function but of a ref capability? i know 'this' always returns a tag capability
<JordanUK> for example i have a tree of nodes with - fun ref parent(): Node ref , that returns its parent node. But for the root node of the tree, I want the function to return 'itself' as a ref
<jemc> JordanUK: I think I'm missing context in your question - the statement that `this` aways returns a `tag` capability isn't strictly true
<jemc> could you give a full example of the code you're compiling, and the error you see?
<JordanUK> so in my Node object i have a field _parent: Node ref; and i have a specific constructor for a Node object that is the root, in that constructor I tried to do _parent = this; but the compiler complains Node tag is not a subtype of Node Ref
jemc has quit [Ping timeout: 260 seconds]
<SeanTAllen> ah so JordanUK
<SeanTAllen> the problem is that until an object is fully initialized, "this" is a tag.
<SeanTAllen> you have to initialize all the fields first in your constructor
<SeanTAllen> So JordanUK, when you call parent() on the root node, do you really want it returning itself?
<SeanTAllen> It seems like you want `let _parent: (Node ref | None) = None` or something like that for the typ
papey_lap has quit [Quit: WeeChat 1.9]
jemc has joined #ponylang
<jemc> JordanUK: in this case, the issue is that you're in a constructor, where not all fields have been assigned yet - in such cases, `this` will be `tag` - the error message is supposed to tell you that it would be possible if all fields were assigned by that point
<SeanTAllen> i think we have a ticket open for that change in error message, yes jemc?
<jemc> it's actually a regression, I think - that clarification used to exist
<jemc> not sure how/why it disappeared
<SeanTAllen> hmmm... i wonder how we would prevent regressions like that
bbhoss has quit [Ping timeout: 255 seconds]
bbhoss has joined #ponylang
bbhoss has joined #ponylang
bbhoss has quit [Changing host]
<jemc> we currently test error messages (for new tests - many od tests do not test error messages), but we don't currently have a way to test the "error continuations" that provide extra info for an error
<jemc> in ponycc I'm testing the entire error output, but in ponyc we currently do not
catern has quit [Ping timeout: 260 seconds]
JordanUK has quit [Ping timeout: 260 seconds]
catern has joined #ponylang
JordanUK has joined #ponylang
acarrico has quit [Remote host closed the connection]
<JordanUK> ic thanks for all the help and yes i worked around this with a None type and i also understand why it has to be of a tag cap until the object is fully constructed
<jemc> I'll try to make time this weekend to fix that error message, since it seems like a common pain point
JordanUK has quit [Quit: Page closed]
Matthias247 has joined #ponylang
_andre has quit [Quit: leaving]
Matthias247 has quit [Read error: Connection reset by peer]
joncfoo has quit [Ping timeout: 260 seconds]
jemc has quit [Ping timeout: 240 seconds]
<cquinn> question about the files package: If I have a FilePath representing a file, what is the best way to get a FilePath to its containing directory? It seems that a FilePath.dir() or FilePath.parent() would be useful.
<cquinn> Or is their an auth/caps problem walking up the hierarchy that way?
<SeanTAllen> FilePath is designed to keep you constrained to that Path and below.
<SeanTAllen> so yes to the auth/caps issue cquinn
<cquinn> ok, cool. It just came to me as I was assembling the question :)
<cquinn> I will keep the dir as a FilePath and the file as a String below it. Or similar.
<cquinn> oh, hey, while I'm thinking about it. Is there a way to run ponyc without the optimizations and without debug generation? Just for quick iteration.
<SeanTAllen> you mean, just to see if it compiles?
<cquinn> yes, compile & run for testing out things
<cquinn> the optimizer takes a long time, and I'm not usually debugging
<SeanTAllen> i use pony --debug for that. not sure if what the step would be
<cquinn> I do the same, ponyc -d, but I was just wondering if there was a way to get the fast compile without the symbols out. might be slightly faster too.