<kentonv>
kj::mv() will destroy the original; it should automatically have zero size after being moved away
<kentonv>
I do strongly suggest doing the move at construction time. Your code above said "new kj::Array<capnp::word>()" -- passing no arguments to the constructor -- then you say you initialized it after the fact. But I think that's actually incorrect syntax.
<unamed>
might be somewhere else in my code. When ZMQ invokes the callback to delete the array, valgrind complains about some invalid reads
<kentonv>
("new Foo()" is one of those weird C++-isms where it thinks you're trying to allocate a zero-arg function that returns Foo.)
<unamed>
ok, I will do so (same result though)
<kentonv>
well, if the new heap-allocated array does in fact contain the content you expect, then the content has successfully been moved.
<kentonv>
would have to see the code to debug
<unamed>
let me have some fresh look at it tomorrow morning before wasting anyone else's time on this... I think it is simply too late.
englishm has joined #sandstorm
<unamed>
Thank you kenton.
<kentonv>
ok
<kentonv>
good luck
<unamed>
good night!
unamed has quit [Quit: Page closed]
<geofft>
dwrensha: if I want gj!capnproto-rust to exist, what is the most helpful thing for me to do?
<zarvox>
if I were pulling the identicons stuff out into a package, should I call it "identicons", "sandstorm-identicons", or something else? cc jparyani kentonv
<kentonv>
I've generally prefixed things with "sandstorm-" to avoid any possible conflict with meteor base package names
englishm has quit [Remote host closed the connection]
GeorgeHahn has quit [Read error: Connection reset by peer]
<zarvox>
at my previous job I wrote a unicode lookup bot. Every time someone used an emoji (or any unicode character beyond the ASCII range), it would look up that codepoint's official name and reply to the channel with it
jadewang has quit [Remote host closed the connection]
warren has joined #sandstorm
soulshake has joined #sandstorm
keturn has joined #sandstorm
heliostatic has joined #sandstorm
heliostatic has quit [Ping timeout: 244 seconds]
xcombelle_ has joined #sandstorm
xcombelle has quit [Ping timeout: 252 seconds]
xcombelle_ is now known as xcombelle
nowhereman has quit [Remote host closed the connection]
mort___ has joined #sandstorm
xcombelle has quit [Ping timeout: 245 seconds]
jadewang has joined #sandstorm
patrickod has quit [K-Lined]
xcombelle has joined #sandstorm
jadewang has quit [Ping timeout: 252 seconds]
xcombelle has quit [Ping timeout: 264 seconds]
xcombelle has joined #sandstorm
xcombelle has quit [Ping timeout: 256 seconds]
xcombelle has joined #sandstorm
heliostatic has joined #sandstorm
heliostatic has quit [Ping timeout: 250 seconds]
eloib has quit [Ping timeout: 264 seconds]
niek has quit [Ping timeout: 264 seconds]
niek has joined #sandstorm
eloib has joined #sandstorm
jadewang has joined #sandstorm
unamed has joined #sandstorm
patrickod has joined #sandstorm
jadewang has quit [Ping timeout: 255 seconds]
xcombelle has quit [Quit: Leaving]
xcombelle has joined #sandstorm
heliostatic has joined #sandstorm
heliostatic has quit [Ping timeout: 252 seconds]
heliostatic has joined #sandstorm
unamed has quit [Ping timeout: 246 seconds]
heliostatic has quit [Ping timeout: 260 seconds]
mnutt_ has joined #sandstorm
unamed has joined #sandstorm
<unamed>
Hi guys. Quick question about capnproto. Is capnproto containing an id (type's unique id?) of the type of message (root) once serialized, so that you can potentially deserialize without knowing in advance the exact sequence of messages (main use for monitoring async events)?
<unamed>
or do you have to create yourself the type as part of the msg?
<unamed>
(btw kenton: I managed to solve the issue of yesterday... it was a stupid copy&paste error)
jadewang has joined #sandstorm
<dwrensha>
unamed: serialized messages don't contain type IDs
<dwrensha>
you need to know which type to interpret a message as
heliostatic has joined #sandstorm
<dwrensha>
if you want to accept multiple different types of messages on the same stream, the best way is to use a union
jadewang has quit [Ping timeout: 255 seconds]
erikoeurch has joined #sandstorm
heliostatic has quit [Ping timeout: 246 seconds]
heliostatic has joined #sandstorm
heliostatic has quit [Ping timeout: 255 seconds]
erikoeurch has quit [Ping timeout: 245 seconds]
xcombelle has quit [Ping timeout: 260 seconds]
heliostatic has joined #sandstorm
<unamed>
ok dwrensha, thanks!
heliostatic has quit [Ping timeout: 246 seconds]
heliostatic has joined #sandstorm
<ocdtrekkie>
kentonv: I didn't think anyone was reading that, lol, and there's not much on there.
<ocdtrekkie>
kentonv: Guess it's nice it's on Sandstorm, good luck finding exploits on it, etc.
<unamed>
dwrensha: would it be safe to place an enum field as strictly @0 and parse an object containing solely this field? Or is it just a botch and there can be alignment issues etc..
<dwrensha>
like `struct Foo { bar @0 : AnEnum; }` ?
<dwrensha>
there's no problem with that. Can you explain what your concern would be/
<dwrensha>
?
mnutt_ has quit [Quit: mnutt_]
<unamed>
I would add to all my messages a type @0: enum MessageType
<unamed>
and then have a generic struct Message {type @0: enum MessageType;} to know the exact type of message
<unamed>
then actually parse as the real message
<unamed>
just checking whether is it a viable option besides defining Message as a union of all mesages
<unamed>
and if it has any benefit / drawback
<dwrensha>
where would you put the actual data of the messages?
<dwrensha>
I image you would do `struct Message { type @0: MessageType; data: @1 Data; }` where the second field would have the encoded message
<unamed>
Say I have: MyMessageType1 {type @0: enum MessageType = type1; foo @1: AnotherType...}
<dwrensha>
that would work, but it would be a roundabout way of accomplishing exactly what unions accomplish
<unamed>
ok
<unamed>
I guess unions are optimized if I you send elements smaller than the biggest element of the union?
<unamed>
I have a combination of very big an small messages
<dwrensha>
A union of structs will occupy: two bytes for the tag, plus eight bytes for the pointer to the struct
<unamed>
ok awesome. Thanks
<dwrensha>
it will round up to 16 bytes
<unamed>
that's perfectly fine
NOTevil has joined #sandstorm
jadewang has joined #sandstorm
jadewang has quit [Ping timeout: 265 seconds]
xcombelle has joined #sandstorm
xcombelle has quit [Remote host closed the connection]
<zarvox>
Huh. The "Shared With Me" tab on Oasis appears to be missing content in the "Last Used" column.
<dwrensha>
zarvox: that has always been the case
<dwrensha>
definitely a bug, though
xcombelle has quit [Remote host closed the connection]
jeffmendoza has quit [Ping timeout: 265 seconds]
NOTevil has quit [Quit: kill -9 $self]
sapienTech has joined #sandstorm
<sapienTech>
hi there, i just learned about sandstorm through neynah's post on #mediagolin. I am curious how sandstorm differs from owncloud, or how they might be integrated. thanks!
<ocdtrekkie>
sapienTech: The big two (as far as I'm concerned) is that apps in Sandstorm can be written in any language or with any platform (that runs on Linux), and the security employed to separate out apps (and even individual documents) from getting access to others without permission.
<ocdtrekkie>
ownCloud does support a lot of features directly in their core install that Sandstorm cannot do yet though.
<sapienTech>
so you guys would consider owncloud as a "competitor"
dwrensha has quit [Remote host closed the connection]
dwrensha has joined #sandstorm
<sapienTech>
so sandstorm is for hosting apps on a server that you can access on your computer/phone without having to worry about managing each app individually?
<ocdtrekkie>
That is probably a pretty good definition.
<ocdtrekkie>
It is also more secure than installing those apps directly on your server.
<ocdtrekkie>
Quite a few Linux vulnerabilities and quite a few app vulnerabilities have been non-issues while running on Sandstorm.
<ocdtrekkie>
There are other benefits, like one authentication system for all the apps on your server, easy sharing, etc. The other big thing is that apps are only running when you have them open.
<ocdtrekkie>
So you don't have to have all of your apps running all of the time.
<sapienTech>
wow that is super awesome. now does sandstorm have some form of data storage like google-drive or one-drive? would this just be another app or a feature central to sandstorm?
<sapienTech>
sorry one more question :) could sandstorm act as an interface between a BaaS like deployd or helio?
<ocdtrekkie>
sapienTech: I know someone is working on a storage app, but there currently isn't one.
<ocdtrekkie>
(He's in this channel, somewhere.)
<ocdtrekkie>
Re: BaaS question, not a clue. Maybe a Sandstorm dev will know.
* ocdtrekkie
is not a Sandstorm dev.
<jparyani>
Sandstorm should work great for things like deployd, as long as it's easy to get them to support webkeys (ie. sending an "Authorization: Bearer" header). Take a look at https://docs.sandstorm.io/en/latest/developing/http-apis/ for clarification
<ocdtrekkie>
^- that's a Sandstorm dev :D
jeffmendoza has joined #sandstorm
<zarvox>
As for storage: in lowlevel terms, each app gets its own isolated /var to play with, which contains all of its state. In higher-level terms, a "file-sync-and-share" app akin to google drive or owncloud would be awesome as an app that runs on Sandstorm.
<sapienTech>
yeah i think those two features would be really clutch for mobile developers
natea has joined #sandstorm
jadewang has quit [Remote host closed the connection]
jadewang has joined #sandstorm
natea has quit [Quit: natea]
sasattack has joined #sandstorm
jeffmendoza has quit [Ping timeout: 265 seconds]
jeffmendoza has joined #sandstorm
<zarvox>
hmmm, are sharees are not allowed to modify their own petname for a grain?
<zarvox>
when I try to do so, Meteor says "update failed: Access denied"
<ocdtrekkie>
I assume they're supposed to be able to.
<zarvox>
Yeah, I wonder if we just forgot to allow that in the meteor method or something
<zarvox>
an overly-zealous access check
<ocdtrekkie>
It is better to have an overly-zealous access check than a lazy one. :P