<polypus74>
actor destructor for cleaning up C-land stuff on GC. i see DisposableActor in stdlib, but it's unclear if this is what i want?
<polypus74>
ok for the opaque struct, simply saying 'struct X' seems to work
<SeanTAllen>
disposable isnt called automatically
<SeanTAllen>
you need to call it yourself
<SeanTAllen>
you are interested in final
<SeanTAllen>
which gets run when an object is gc'd
<polypus74>
fun ref final, i suppose
<SeanTAllen>
you'd have to check, i can't remember offhand as i've never needed to use it
<SeanTAllen>
we do use Disposable everywhere in our code base
<polypus74>
is it in tut? cuz it isn't in standard lib docs
<SeanTAllen>
maybe?
<polypus74>
google's not giving me much
<polypus74>
thanks btw
<SeanTAllen>
this is from the CHANGELOG: Primitive `_init` and `_final` for C library initialisation and shutdown.
<polypus74>
i've got an actor though
<SeanTAllen>
check out finalisers.pony
<SeanTAllen>
you'll see an examples of Actor, Class and Primitive finalisers
<polypus74>
cool ty
omarkj has quit [Ping timeout: 265 seconds]
omarkj has joined #ponylang
k0nsl has quit [Ping timeout: 272 seconds]
pyon has joined #ponylang
montanonic has quit [Ping timeout: 272 seconds]
stephensong has joined #ponylang
stephensong has quit [Client Quit]
k0nsl has joined #ponylang
polypus74 has quit [Remote host closed the connection]
c355e3b has quit [Quit: Connection closed for inactivity]
mvzink has joined #ponylang
wgf_ has joined #ponylang
TonyLo_ has joined #ponylang
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
TonyLo_ has quit [Ping timeout: 265 seconds]
TonyLo_ has joined #ponylang
mvzink has joined #ponylang
TonyLo_ has quit [Ping timeout: 240 seconds]
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
TonyLo has joined #ponylang
dinfuehr has quit [Ping timeout: 250 seconds]
dinfuehr has joined #ponylang
_whitelogger has joined #ponylang
wgf_ has left #ponylang ["Leaving"]
doublec has joined #ponylang
c355e3b has joined #ponylang
bbhoss has quit [Read error: Connection reset by peer]
bbhoss has joined #ponylang
srenatus[m] has quit [Ping timeout: 276 seconds]
Praetonus has joined #ponylang
srenatus[m] has joined #ponylang
wgf_ has joined #ponylang
TonyLo has quit [Ping timeout: 272 seconds]
polypus74 has joined #ponylang
<polypus74>
in several fun signatures i have seen a default parameter value given as either 'call' or 'recover'. for example caps' in FilePath.create. what does this mean?
<malthe_>
SeanTAllen: if we can agree on the cpointer/cstring (vs 'bytes') naming, then I can go ahead and adapt the RFC proposal with signatures etc.
<malthe_>
I agree the "How we teach this" is fluffy. It's a difficult section to complete I think.
malthe_ is now known as malthe
prettyvanilla has quit [Remote host closed the connection]
prettyvanilla has joined #ponylang
wgf_ has quit [Remote host closed the connection]
mvzink has joined #ponylang
mvzink has quit [Quit: A merry Christmas to all, and to all a good night!]
<SeanTAllen>
polypus74: i'm not sure what you mean by `call`. are you asking what `recover` does or what `recover` does when used in a default parameter?
<polypus74>
i know what recover does, i also know how to use it to wrap a default parameter value. what i don't get is what it means in the doc string for (for example) FilePath.create, like so: caps': Flags[(..., U32 val] val = recover). i have also seen, although i don't remember where, the word call in the same position, right after equals in a pram list
<polypus74>
*param list
<polypus74>
ok just looking at the source. looks like it might be a problem with actual doc generation.
<SeanTAllen>
sorry, i dont understand.
<malthe>
polypus74: that's because default parameters are created at runtime and sometimes the ref capability isn't the right one.
<malthe>
so here to match the function signature it's necessary to recover the result of the default expression.
<malthe>
(which is evaluated at runtime, every time the function is called without the argument provided.)
<SeanTAllen>
O i see, you are looking at the standard library docs and yeah, it doesnt handle that case
<SeanTAllen>
the standard library documentation is off for that
<polypus74>
malthe: i get that. SeanTAllen, yes that is what i was tlkaing about
<malthe>
ah ok
<malthe>
sry for the noise :-)
<polypus74>
sorry shoudl have looked at the source sooner
<polypus74>
malthe: np, was confused by the doc is all
<SeanTAllen>
there's still definite edge cases in the documentation generation. i did a lot of work in that area when i first joined to core team and fixed a number of them. sadly, i didn't get them all.
<SeanTAllen>
polypus74: if you find any more in the future where the source makes sense but the generated documentation doesn't, please open an issue with what is in the source vs what gets generated for documentation. thanks. hopefully someone picks it up soon. its a good starter issue.
<polypus74>
SeanTAllen: ok, ty, will do
mvzink has joined #ponylang
mvzink has quit [Client Quit]
TonyLo has joined #ponylang
<polypus74>
ponyc --hs
<polypus74>
can't figure out what's wrong with this code.
<polypus74>
either i'm missing something obvious or there's a bug?
TonyLo has quit [Ping timeout: 240 seconds]
<doublec>
polypus74: what were you expecting vs what it does?
<doublec>
it's a bit too much code for me to look at and work out
<doublec>
plus it spawns processes so I don't want to run it
montanonic has joined #ponylang
<polypus74>
doublec: all i'm doing is spawning a process, 'cat'. and trying to have it echo back to me. the behaviour i'm getting is at the top of pastie. i'm getting write errors and i don't know why.
pyon has quit [Quit: dammit emacs]
<polypus74>
and i'm getting an exit code of 0, which means cat ran ok, so i don't get it
* doublec
tries
pyon has joined #ponylang
<doublec>
I get exit code 255
<polypus74>
did you change to /bin/cat?
<polypus74>
i'm on arch where it's /usr/bin/cat
<doublec>
ah right. yes with that I get exit code 0 and WriteError's
<polypus74>
ok well at least we know it's not just my system
<malthe>
polypus74: I fixed a bug yesterday in the process monitor.
<polypus74>
malthe: did it make it into 0.3.3? what was the bug?
<doublec>
It works if I s/printv/write/ with a string.
<malthe>
polypus74: incorrectly reading stderr outputs if they weren't being sent in a single packet so to speak.
<polypus74>
doublec: same. but it should work with printv in that case
<malthe>
that program just does nothing on my machine
<polypus74>
malthe: did you run with -d
<polypus74>
compile i mean
<malthe>
no. but I also have cat on /bin/cat
<polypus74>
it's just cuz i'm Debug.out'ing
<malthe>
WriteError
<malthe>
exit code: 255
<malthe>
(multiple write errors, and one "created")
<polypus74>
malthe: yeah that's right, dunno why you get the 255 though
<malthe>
ya thats weird
<malthe>
doesn't matter if I change to the right cat path
<malthe>
computing is hard :-)
<polypus74>
why do we do it?
<doublec>
It is weird how a p.write("foo" workd
<doublec>
but a pm.writev(select) doesn't
<polypus74>
yeah. seems bugish
<doublec>
when all that does is iterate over select calling write
<polypus74>
hey we calling printv before not write. and print with just string errors
<polypus74>
but print just calls write twice, so go figure
<polypus74>
and if you manually call write twice, no errors ?!
<doublec>
So the write error is bad file descriptor
<doublec>
"EBADF fd is not a valid file descriptor or is not open for writing."
<doublec>
stdin is -1 in the write call
<SeanTAllen>
that would probably be a timing issue polypus74
<doublec>
vs: stdin being 6 if it's just pm.write("foo")
<doublec>
SeanTAllen: I'm glad I'm not the only one who types casual messaging instead of causal (2nd last paragraph of your pull request) :)
<SeanTAllen>
ha
<SeanTAllen>
arg
<SeanTAllen>
did i do that again?
<doublec>
"in the tutorial about casual messaging and make sure"
<SeanTAllen>
"amend" to the rescue
<SeanTAllen>
aka "are you sure doublec?" ;)
<doublec>
hahaha
<SeanTAllen>
polypus74: if someone else with a commit bit accepts and merges this tonight before i get tired, i'll do a release. in the meantime, if you want, you can apply the PR to your ponyc.
<polypus74>
cool. thanks that should keep me going. whole opint of this was to make a little dmenu/dzen package. apropos, has anything gone down on the package manager front?
<polypus74>
s/opint/point
<SeanTAllen>
nothing
<SeanTAllen>
jemc is interested in the package manager but he has a lot of other things going on
<SeanTAllen>
as long as it isnt something awful like maven, i have limited opinions. pony-stable works fine for us as a "package manager".
<SeanTAllen>
in the end, its probably going to be dueling package managers that come from the community and one will win out enough to be annointed as "the way"
<SeanTAllen>
i get everything i need from stable
<SeanTAllen>
i point it at a github repo or local directory
<SeanTAllen>
i can tell it what commit/tag to use
<SeanTAllen>
that's all i ever want from a "package manager"
<polypus74>
saw it a while back and forgot about it. will have a go at it
montanonic has quit [Ping timeout: 265 seconds]
<polypus74>
one thing package manager or not, is package visibilty. for people who don't know pony to be able to see what is available all in one place. an 'awesome-pony' repo or something, linked to from a prominent place. starting with pony-stable
<SeanTAllen>
yeah i think that is a different issue entirely
<SeanTAllen>
well, its a couple mostly orthogonal issues
<SeanTAllen>
i think rust does a good job there
<SeanTAllen>
well
<SeanTAllen>
a decent job
<polypus74>
for the moment while their are so few packages a simple list is fine.
<SeanTAllen>
i cant think of anything that i think does a good job
<SeanTAllen>
of course im not sure what i would consider a good job
<SeanTAllen>
probably "read my mind and tell me the package i want"
<SeanTAllen>
i might have unreasonable expectations
<polypus74>
:)
<SeanTAllen>
im really hopeful that someone from the community will step forward and build that infrastructure
<polypus74>
i'm gonna start an awesome-pony repo in the meantime
montanonic has joined #ponylang
<SeanTAllen>
there have been a couple already
<SeanTAllen>
i think
<SeanTAllen>
when you start it polypus74, let me know and i can add it to the work for the new website
<SeanTAllen>
i'll put it in the "community" section