<autodidaddict>
I have a weird issue where when I invoke a behavior on an actor to fulfill a promise, it appears as though it's creating a new instance of the actor and _not_ fulfilling the promise
<autodidaddict>
` let p = Promise[ExaminationResult] p.next[None](recover this~ex() end) _currentloc.examine(p)` by sprinkling Debug.out in enough places, it looks like the actor that is _currentloc is calling create ... every time I invoke examine
<SeanTAllen>
do you have a minimal example autodidaddict? i can look in the morning. Watching TV w. Stephanie for the rest of tonight.
<autodidaddict>
not really. I can check the broken code into the repo
autodidaddict has quit [Ping timeout: 260 seconds]
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
<cquinn>
I updated my current code as I was fixing other things that were broken from a refactor. Not too bad overall.
<cquinn>
It did make me think a bit more where I wanted errors to be popping out from, and where they should be handled.
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
amclain has quit [Quit: Leaving]
jemc has quit [Ping timeout: 240 seconds]
jemc has joined #ponylang
deep-book-gk_ has joined #ponylang
deep-book-gk_ has left #ponylang [#ponylang]
_whitelogger has joined #ponylang
jemc has joined #ponylang
<jemc>
cquinn: remember that we have an automatic migration script you can use if you want to - see the release notes
<jemc>
of course going through by hand is probably also a good mindfulness exercise
<cquinn>
It wasn't very many places, and it gave me a chance to rethink where errors really should be handled.
<cquinn>
but thanks. I'll use it on other code that just needs updating
jemc has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ponylang
aceluck has joined #ponylang
bitcrusher has joined #ponylang
Matthias247 has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
obadz has quit [Ping timeout: 260 seconds]
autodidaddict has joined #ponylang
autodidaddict has quit [Quit: Page closed]
autodidaddict has joined #ponylang
<autodidaddict>
test
<SeanTAllen>
hi autodidaddict
<autodidaddict>
Yay it works. Maybe I'm not a robot
<SeanTAllen>
well....
<autodidaddict>
Still going around in circles on my actor problem. It looks like this actor is being instantiated every time I call a behavior which makes no sense
<autodidaddict>
.. unless the fact that it's constructor takes no parameters is confusing the usual sugar for construction
<autodidaddict>
.. but that shouldn't happen with a field. Ugh I'm going back to playing captcha
Praetonus has joined #ponylang
aoeu has joined #ponylang
aoeu has quit [Ping timeout: 260 seconds]
<SeanTAllen>
autodidaddict: where would i be looking in your code?
jmiven has quit [Quit: co'o]
jmiven has joined #ponylang
endformationage has joined #ponylang
<SeanTAllen>
autodidaddict: You dont have to do "Room tag", because Room is an actor, it defaults to tag. Or TCPConnection tag etc. Just an FYI.
<autodidaddict>
room isn't an actor, it's a type alias
<SeanTAllen>
ok
<SeanTAllen>
TCPConnection is an actor though
<autodidaddict>
type Room is (Container tag & Examinable tag)
<autodidaddict>
Container and Examinable are both traits
<autodidaddict>
I started out putting tag on everything, but now I've been able to find where I have to use it - when treating something being passed as a trait object as an actor
<SeanTAllen>
what is `this~ex() ` ?
<SeanTAllen>
ex() comes from which trait?
jemc has joined #ponylang
<SeanTAllen>
o dur
<SeanTAllen>
right below it
<SeanTAllen>
how can i recreate this so i could test autodidaddict ?
<autodidaddict>
check out the "noworky" branch, run it. telnet to the port, enter a username. after you've entered a few commands (good or bad), the server console should spew the debug output "the void created" more than once.
<autodidaddict>
obv build in debug mode
<autodidaddict>
the ex() method there was just a hack for me to test. I was starting to explore how to build game objects that are examinable via promise... this is when I noticed that my examine promise never comes back ... yet I create multiple instances of the void, which should only be created once when the player connects
<SeanTAllen>
"the port"?
<SeanTAllen>
ah i see it spits it out on startup
<autodidaddict>
the commands it knows right now are "who" and "cmds" (to list the commands it knows)
<SeanTAllen>
autodidaddict: according to Dipin Hora, who has been lurking on this, your problem is a bug that was introduced about a month ago
<autodidaddict>
so what's the workaround and is the fix written for 0.17.0 ?
<SeanTAllen>
work around would be use an earlier version of ponyc at the moment
<autodidaddict>
ouch
<SeanTAllen>
there's no fix at the moment
<SeanTAllen>
dipin figured it out about 10 minutes ago
<SeanTAllen>
the "what"
<SeanTAllen>
part anyway
<autodidaddict>
well, feel free to use any and all of my code for repro purposes
<autodidaddict>
though I suspect we could probably repro it in a single file
<SeanTAllen>
probably ya
<autodidaddict>
I feel a little less stupid knowing that it was a language bug and not my own newbsauce spilling all over everything
<autodidaddict>
but cranky because I can't work on my MUD ;)
<SeanTAllen>
sorry about that
<SeanTAllen>
could you open a bug and reference all this here?
<autodidaddict>
will do
<SeanTAllen>
if you wanted to work on it in the meantime autodidaddict, you can revert your 0.16.0 compat commit and rollback to an earlier ponyc and keep moving forward
<autodidaddict>
I should probably be finishing my copy edits for the .NET book ;)
<SeanTAllen>
seems reasonable
<autodidaddict>
heh, I've got a totally different behavior now
<SeanTAllen>
bug behavior or correct behavior?
<autodidaddict>
I tried creating a single-file repro and I can't create an instance of a parameterless-constructor-actor ... at all
<autodidaddict>
let me make sure it's not just me
<autodidaddict>
ok, can't repro in a single file .. promise to an actor works fine
<jemc>
autodidaddict: are you able to build ponyc from source?
<autodidaddict>
jemc: haven't tried yet
<jemc>
you could see if `git revert 9b9c084` for ponyc gives you a working compiler
<autodidaddict>
if I get a chance I'll try that
<SeanTAllen>
morning jemc!
<jemc>
good morning :P
<SeanTAllen>
dipin is lurking via the logs for this
<jemc>
but, I'm talking about doing `git revert` - I trust dipin's bisecting, so I assume that `git checkout` of the previous commit would work
<Praetonus>
I don't really understand what the bug is
<Praetonus>
I'll wait for the issue to have full context
<SeanTAllen>
apparently there is a "create" ending up in the IR for the promise code
<SeanTAllen>
and its creating a new instance of the actor
<SeanTAllen>
is that a reasonable summation @autodidaddict
<autodidaddict>
I don't want to speak to what's happening with the IR, but the perceived effect is that the constructor is being invoked every time I send it a promise... and it never fulfills the promise
<autodidaddict>
filing a github issue now
<SeanTAllen>
thanks autodidaddict
<Praetonus>
Not sure how that change could be causing that bug
<Praetonus>
But I'll take a look
<SeanTAllen>
Dipin knows more. I think he is going to comment on the issue
<SeanTAllen>
rather than my playing telephone and getting it not quite right in here
<SeanTAllen>
@Praetonus he commented on the issue
kulibali has joined #ponylang
kulibali has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<vaninwagen>
is it possible to call secret_stuff on Public from another package (when use-ing the package listed in the playpen gist)?
<vaninwagen>
secret_stuff is defined on a private trait ``_Private`` that Public implements. Is the method secret_stuff thus also also publicly available?
<vaninwagen>
i guess i have to try it out :)
<vaninwagen>
IT IS! :)
endformationage has quit [Read error: Connection reset by peer]
<SeanTAllen>
Yes vaninwagen. The method is public but the trait private
<SeanTAllen>
So
<SeanTAllen>
Only classes/actors in the package can implement the trait
<SeanTAllen>
but those methods are callable outside the package
<SeanTAllen>
We utilize that some in our codebase at Sendence
<vaninwagen>
SeanTAllen i am thinking about it from the api-doc point of view. Should this trait then be documented in the api-doc with only public types?
<vaninwagen>
i guess simply filtering only the public types is insufficient as it would leave the users with incomplete API docs
<SeanTAllen>
The trait can only be used inside the package
<vaninwagen>
reachability from other packages should be the criterion
<SeanTAllen>
the only time it matters is on public classes that implement it
<vaninwagen>
yep
<SeanTAllen>
so public class, its publuc methods should be fine
<SeanTAllen>
so filter out the private trait
<SeanTAllen>
and everything should be fine i think
<SeanTAllen>
good thing to test though
<SeanTAllen>
make sure we are doing the right thing
<vaninwagen>
even if it completely defines a "public" method?
<vaninwagen>
like the ``_Private`` trait in my example?
<vaninwagen>
the ``secret_stuff`` method is not defined on ``Public``
<vaninwagen>
but is accessible from outside - and thus should be documented?
<vaninwagen>
i know, pretty edgy edge-case
obadz has joined #ponylang
Praetonus has quit [Quit: Leaving]
jemc has quit [Quit: WeeChat 1.4]
<SeanTAllen>
it should be documented on any public class that implements the trait
<SeanTAllen>
that would be my thought
<SeanTAllen>
not the trait itself
<SeanTAllen>
which i believe is what currently happens
<vaninwagen>
makes sense
bitcrusher1 has joined #ponylang
bitcrusher has quit [Ping timeout: 260 seconds]
endformationage has joined #ponylang
atk is now known as k
k is now known as atk
<autodidaddict>
Just ran `make test` on the master branch of ponyc, 2 test failures