<maurer>
dwrensha: Have you ever gotten capnpc-rust to generate code which builds for a .capnp file which imports another?
<maurer>
dwrensha: I'm trying to have a holmes.capnp which depends on schema.capnp, and it always addresses the schema module as ::schema_capnp::...
<maurer>
This is failing because it then interprets ::schema_capnp as a package name, so even if I copy schema.capnp to my source base and tell capnpc-rust to generate for both, compilation still fails
<maurer>
just wanted to check I wasn't missing something obvious before I filed a bug
<maurer>
(in the meantime I think I'm going to work with an edited-by-hand holmes_capnp.rs which refrences capnpc::schema_capnp
mnutt has quit [Quit: mnutt]
<dwrensha>
why does compilation fail when you also generate code for schema.capnp?
<dwrensha>
you'll of course need to include the generated schema_capnp module
<dwrensha>
do you have a line like `pub mod schema_capnp { include!(concat!(env!("OUT_DIR"), "/schema_capnp.rs")); }`?
<dwrensha>
in your top level module?
<maurer>
oh, sorry, forgot to add that one
<maurer>
maybe I'm just a derp :(
<dwrensha>
I can understand why you'd forget it
<maurer>
Yeah, that was it.
<dwrensha>
it's some pretty ugly boilerplate
<maurer>
In an ideal world I'd be able to import "/capnp/schema.capnp"
<dwrensha>
I hope we can eventually figure out a nicer way to include things
<maurer>
and somewhere let capnpc know "the package for that is "capnpc"
<maurer>
and have it emit ::capnpc::schema_capnp for references, thus preventing me needing to include schema.capnp wholesale in my project, which seems kinda heinous
<maurer>
Yeah, my bad on thinking it was a bug though. I couldn't find any examples of it working, and only remembered the one replacement place. Thanks for the help.
<maurer>
dwrensha: Oh, btw, how would you feel about the notion of adding a constructor the Owned type which was a MallocMessageBuilder, a Reader, and a Builder of the appropriate type?
<maurer>
dwrensha: I can probably write this, but it'd be some effort so I figured I'd ask first
<maurer>
(the idea would be that this would allow e.g. .to_owned() on reader, and .reader() and .builder() on owned in-memory objects
<maurer>
(so I guess the constructor only needs to take a MallocMessageBuilder)
<maurer>
(or similar)
<gwillen>
so for reference while it's in front of me, the thing I keep seeing on my tinytinyrss instance is:
<maurer>
dwrensha: I don't think I'm trying to parameterize a message::Builder (though I could be wrong)
<maurer>
dwrensha: there are two use cases this would help me with:
<maurer>
1.) A function which is returning a message to be used elsewhere
<maurer>
(I can probably kind of do this one with get_root)
<maurer>
*set_root
<maurer>
2.) Persisting parameters to an object call beyond the length of the object call
<maurer>
For #2, I was previously converting the message in question to a native type manually, and then keeping the native type around
<maurer>
However, since I'm trying to switch to "any non-object type" as my data type for the system, that method doesn't work great anymore
ragesoss has joined #sandstorm
<maurer>
Actually, I think I had that flopped
<maurer>
set_root would let me persist something, but I'd have to throw away the type, which would be kind of bizzare
<maurer>
(and it's also a bit icky that I'd need to use separate messages for every element of a list during incremental list building due to lack of adopt, unless I'm somehow missing the way I'm supposed to do adopt)
<maurer>
(and since the only reference to the orphanage I see is a comment that a layout feature is good for it, I suspect there isn't an orphanage)
<maurer>
dwrensha: Yeah, I'm saying that Owned objects might be easier to implement than orphans (they'd basically just be a message builder with a verneer over the top that makes it look as though it's of a specific type) and would make it a little cleaner to work around not having orphans
<maurer>
dwrensha: Right now, if I want a function to return e.g. a list of variable assignments, the best way for me to do it is to return a Map<MessageBuilder, MessageBuilder>
<ocdtrekkie>
Now people will know asheesh is a Sandstorm employee, but will have a harder time associating him with his Github commits.
<maurer>
(actually a Map<String, MessageBuilder> atm, but if variable ever becomes nontrivial...
<asheesh>
ocdtrekkie: Hilarious.
<asheesh>
ocdtrekkie: Yeah, I'd like to be able to fix the GitHub username too.
<maurer>
dwrensha: In an ideal world, I'd return say, a Map<Var::Owned, Val::Owned>. It'd almost only be for documentation
<ocdtrekkie>
There's already an @asheesh too.
<ocdtrekkie>
On GitHub.
<asheesh>
I know. I am not quite sure what to do about that. I could rename to @asheeshl or ask friends at github nicely if I can have that (dormant?) account...
<maurer>
dwrensha: With orphan support, I'd instead be returning a Map<Orphan<Var>, Orphan<Val>>, built off the end messagebuilder
<asheesh>
Morning mnutt_
mnutt_ has quit [Quit: mnutt_]
mnutt_ has joined #sandstorm
mnutt_ has quit [Quit: mnutt_]
mnutt_ has joined #sandstorm
phildini_ is now known as phildini
mnutt_ is now known as mnutt
<mnutt>
asheesh: morning! what would you think about using offer templates for getting the publicId?
<mnutt>
or really, just receiving it via postMessage rather than having to iframe it, as it isn’t sensitive
<asheesh>
I think what I would want to see is a postMessage API for frontend-y apps, and some similarly easy backend thing for apps that don't have any client-side JS.
<asheesh>
Which is to say, I like your ideas!
<asheesh>
The existence of a backend API of some kind avoids a possible flash of unstyled content.
<asheesh>
I guess the backend API does already exist, and dwrensha provided some node-capnp code that can be used to calculate it.
<asheesh>
Would you prefer the postMessage one over something you can require() in a node app?
<mnutt>
asheesh: I can see the use cases for both, I think. my app is very frontend-centric but especially for porting classic apps I’ll bet require() is easier to explain
bb010g has quit [Quit: Connection closed for inactivity]
<asheesh>
ocdtrekkie: Huh -- what if I made my GitHub username 'asheeshproteus' ?
<asheesh>
Is that confusing and implies that Asheesh Proteus is a different person than Asheesh Laroia?
<ocdtrekkie>
Eh, I dunno. Does asheeshproteus lose tge paulproteus familiarity as well?
<ocdtrekkie>
Also, it's long.
<asheesh>
I think anything I do will lose 50%+ of the paulproteus familiarity, but I think having 'asheesh' in the GitHub username is a good idea somehow, so 'asheeshproteus' is maybe a way to remind people there's some lineage between paulproteus and asheeshsomething.
<ocdtrekkie>
And if you change it, will you confuse people I told to tag paulproteus?
<asheesh>
It is long, though maybe tab-completion helps with that.
<ocdtrekkie>
Tab-completion doesn't work on other repos.
<asheesh>
Luckily I'm already subscribed to those threads.
<asheesh>
Whoa, really? Huh.
<ocdtrekkie>
Like if you've never been in a thread on that repo...
<asheesh>
Right, yeah.
<ocdtrekkie>
It doesn't suggest you, even if I am following you.
<ocdtrekkie>
GitHub at least offers your RL name if people check your profile.
<asheesh>
Which is something IRC doesn't do as easily, which is why I switched the IRC nick.
<ocdtrekkie>
Well, people can /who but yeah
<asheesh>
I could also switch the IRC nick to asheeshproteus so it's a little less shocking, though yeah long.
<ocdtrekkie>
Identity is hard.
mnutt has quit [Quit: mnutt]
NOTevil has joined #sandstorm
mnutt has joined #sandstorm
mnutt has quit [Quit: mnutt]
mnutt has joined #sandstorm
rustyrazorblade has joined #sandstorm
itscassa is now known as itscassa|away
rustyrazorblade has quit [Quit: rustyrazorblade]
mnutt__ has joined #sandstorm
mnutt has quit [Ping timeout: 240 seconds]
mnutt__ is now known as mnutt
mnutt has quit [Client Quit]
mnutt has joined #sandstorm
bb010g has joined #sandstorm
rustyrazorblade has joined #sandstorm
NOTevil has quit [Quit: Leaving]
NOTevil has joined #sandstorm
mnutt has quit [Ping timeout: 244 seconds]
larjona has joined #sandstorm
mnutt has joined #sandstorm
mnutt has quit [Ping timeout: 252 seconds]
mnutt has joined #sandstorm
mnutt has quit [Remote host closed the connection]
NOTevil has quit [Quit: Leaving]
jeffmendoza has joined #sandstorm
itscassa|away is now known as itscassa
itscassa is now known as itscassa|away
rustyrazorblade has quit [Quit: rustyrazorblade]
isd has joined #sandstorm
simonv3 has joined #sandstorm
* asheesh
waves.
bb010g has quit [Quit: Connection closed for inactivity]
jeffmendoza has quit [Ping timeout: 265 seconds]
jeffmendoza has joined #sandstorm
isd has quit [Ping timeout: 265 seconds]
bb010g has joined #sandstorm
rustyrazorblade has joined #sandstorm
isd has joined #sandstorm
jeffmendoza has quit [Remote host closed the connection]
eternaleye has joined #sandstorm
funwhilelost has joined #sandstorm
mnutt has joined #sandstorm
rustyrazorblade has quit [Quit: rustyrazorblade]
funwhilelost has quit [Client Quit]
funwhilelost has joined #sandstorm
larjona has quit [Quit: Konversation terminated!]
ragesoss has quit [Read error: Connection reset by peer]