<simonv3>
kentonv: yeah, I get where you’re coming from. Here’s the use case: I’m doing some touching up on Quick-Survey to get it ready for packaging, and one of the uses of it is that people shouldn’t be able to re-submit a survey if they have in the past. The way to do this (naively) is to store something in the session or local storage. At least this would
<simonv3>
prevent the “page refresh and it’s available again"
isd has joined #sandstorm
<kentonv>
mnutt: Sandstorm's makefile bootstraps a minimal Ekam build so that people don't have to separately install Ekam first. However the bootstrap script doesn't know how to build Ekam with networking -- that requires Cap'n Proto and at that point you need to use Ekam to build Ekam.
<mnutt>
ah, ok. that makes sense
wolftune has joined #sandstorm
<kentonv>
some day I'd like Ekam to be able to output makefiles.
<wolftune>
Snowdrift.coop is playing with sandstorm… complaint expressed at #snowdrift earlier:
<wolftune>
"Sandstorm does not have an intuitive way (or any way at all? I can't find it) to see previously-shared links"
<wolftune>
"There is a list of "sharing links" that only lists the label. You can change the label! But you can't see what the link text is"
<simonv3>
^ Oh yeah, I’ve wondered about that too
<dwrensha>
the links are not stored on the server! only a hash is.
<kentonv>
wolftune: In fact, Sandstorm is incapable of reproducing the link after the fact. We only store the hash in the database. That way, someone who manages to get passive read access to the database cannot forge tokens.
<kentonv>
however, we plan to add a trick to the UI where you can generate a new link that claims to be the same link, since a lot of people ask for that
<kentonv>
(so it won't create a new row in the table; it will behave as if it were the same link, but the key will actually be different)
<wolftune>
hmm okay
<simonv3>
will people with the old link still be able to use that link?
joshbuddy has quit [Quit: joshbuddy]
<kentonv>
simonv3: yes
<simonv3>
oh right, cause the hash is still stored and points to the right place
<wolftune>
kentonv: so, am I to understand there's no way to have the same sort of situation as with just etherpad running on its own? i.e. where a public link can be posted and anyone who sees it can read the pad…
<kentonv>
simonv3: regarding anonymous users, not sure what to say. We've thought about storing a tracking token in the Sandstorm shell's local storage mostly for the purpose of counting how many unique users have accessed a sharing link (helps detect if it was leaked widely). We could maybe generate a one-off user ID from that to report to the app but we'll have to think carefully about privacy implications.
<kentonv>
wolftune: you can do that with a sharing link
<wolftune>
kentonv: but if you send it to someone, and forget to copy it, there's no way to retrieve the same link again without asking that person if they still have it?
<simonv3>
kentonv: yeah, it’s not critical. I doubt most people would refresh the page anyway (that might be a web developer ingrained thing), and it would still work for people who use Sandstorm internally. Thanks for the thoughts!
<kentonv>
wolftune: you can always create another link. It may look ugly filling up the table but there's not much actual harm.
<kentonv>
simonv3: feel free to file a feature request for reference
<wolftune>
kentonv: would it be feasible to have a function for a visible link totally open to the public to read that would use maybe a shorter URL (maybe custom even) and then *do* store that in the DB?
<kentonv>
simonv3: yes
<kentonv>
wolftune: yeah, we'd like to add something like that
<kentonv>
wolftune: for the time being, one way to accomplish that is to feed the sharing link into your favorite URL shortener. Eventually I'd like Sandstorm to have a built-in feature for that, but I'm not sure when we'll get to it. Patches are welcome if you'd like to try implementing it. :)
joshbuddy has joined #sandstorm
<wolftune>
kentonv: okay thanks for the perspective
<kentonv>
wolftune: np, let me know if you have any other feedback
<wolftune>
sure, thanks
isd has quit [Ping timeout: 240 seconds]
<shachaf>
hi wolftune
<wolftune>
shachaf: howdy
<wolftune>
I'm off folks, thanks though, may be back here at times, I can commonly be found over at #snowdrift
<wolftune>
shachaf: ciao
wolftune has left #sandstorm ["Konversation terminated!"]
isd has joined #sandstorm
isd has quit [Quit: Leaving.]
home has joined #sandstorm
xet7 has quit [Ping timeout: 246 seconds]
simonv3 has quit [Quit: Connection closed for inactivity]
mnutt has quit [Quit: mnutt]
home has quit [Remote host closed the connection]
raoulzecat has quit [Ping timeout: 240 seconds]
raoulzecat has joined #sandstorm
jadewang has quit [Remote host closed the connection]
joshbuddy_ has joined #sandstorm
joshbuddy has quit [Ping timeout: 250 seconds]
joshbuddy_ is now known as joshbuddy
ecloud_wfh is now known as ecloud
ecloud has quit [Ping timeout: 240 seconds]
ecloud has joined #sandstorm
joshbuddy has quit [Quit: joshbuddy]
xet7 has joined #sandstorm
_whitelogger has joined #sandstorm
_whitelogger has quit [Ping timeout: 240 seconds]
_whitelogger_ has joined #sandstorm
asmyers has quit [Ping timeout: 264 seconds]
amyers has joined #sandstorm
amyers has quit [Remote host closed the connection]
amyers has joined #sandstorm
heliostatic_ has joined #sandstorm
mnutt has joined #sandstorm
amyers has quit [Ping timeout: 265 seconds]
amyers has joined #sandstorm
simonv3 has joined #sandstorm
notevil has joined #sandstorm
mnutt has quit [Ping timeout: 246 seconds]
<ocdtrekkie_>
XgF: I couldn't find a superb reason to not use VB. The sample code I built off of was VB, and I've probably skipped out on a lot of debugging because I understand it fairly well. It saved me time. And hey, alledgedly, it'll run on Linux now?
dwrensha has quit [Ping timeout: 255 seconds]
dwrensha has joined #sandstorm
heliostatic_ has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
heliostatic_ has joined #sandstorm
|jemc| has joined #sandstorm
jadewang has joined #sandstorm
joshbuddy has joined #sandstorm
jadewang has quit [Remote host closed the connection]
jadewang has joined #sandstorm
bb010g has joined #sandstorm
joshbuddy has quit [Quit: joshbuddy]
joshbuddy has joined #sandstorm
xet7 has quit [Quit: Leaving]
heliostatic_ has quit [Ping timeout: 260 seconds]
heliostatic_ has joined #sandstorm
amyers has quit [Ping timeout: 265 seconds]
gambatte has joined #sandstorm
<maurer>
dwrensha: btw, is there a way to listen on two different channels in gj?
<dwrensha>
define "channel"
<maurer>
I've got my tcp socket, where I want to service capnp requests
<maurer>
I also need a command channel (currently mpsc, but I could change it to be something else) so that I can instruct the thread to exit the event loop and kill itself
notevil has quit [Quit: ...]
<dwrensha>
yeah, there's currently no interop with std::mpsc
<maurer>
Previously, I was checking the command channel for commands, then blocking on an accept on the tcp socket, and just making sure to accompany all commands with a dummy connection
<maurer>
doesn't need to be mpsc, I can use any kind of channel
<maurer>
in an ideal world though, I'd basically get to do the equivalent of select/epoll over the tcp socket and some command channel I can send stuff to from my main thread
<maurer>
In any case, I'll probably just keep using a dummy connection to cycle the loop for now, but it'd be cool if gj allowed something like this, and I'm not really seeing it
<dwrensha>
I would construct the command channel as a cap'n proto connection over a unix socket
<dwrensha>
I think GJ should have such a thing
<dwrensha>
channels for cross-thread communication
<maurer>
dwrensha: That seems super overkill for what this is, the only commands are Shutdown and Pause
<maurer>
I'll just use dummy connections for now, and maybe I'll convert it to a capnproto object if I have copious free time some day
<maurer>
dwrensha: Actually, just to verify, even if I did make it a capnproto object on a unix domain socket, I think I'd still be stuck with the same problem
<dwrensha>
maurer: heh, or you could have a unix socket with a simple single-byte protocol. If you receive the byte 1, then shut down. if you receive the byte 2 then pause
<dwrensha>
what's the problem?
<maurer>
dwrensha: namely, I can't .accept() on the tcp stream and the unix socket simultaneously
<dwrensha>
accept() returns a promise
<dwrensha>
so make two such promises
<dwrensha>
and collect them with Promise::all()?
<maurer>
Hm, yeah, that could work
<maurer>
sorry
<maurer>
misread the api
<maurer>
dwrensha: Also, I suspect you don't mean all(), but rather exclusive_join(), since all() would cause it to wait until it received a command _and_ a new service connection
<dwrensha>
oh, maybe I didn't follow exactly what you're trying to accomplish
<maurer>
dwrensha: I want to spin up a thread which has an event loop exposing a capnproto object on a tcp socket.
<maurer>
dwrensha: then, I want to from elsewhere in the application be able to tell that thread that its job is done, and it should clean up and quit
<maurer>
(this interface got created for testing basically - the test thread spins up separate client and server threads which talk to each other)
<maurer>
(then if the client gets back the right answers, the testing thread tells them both to die, and exits success
<maurer>
So, I need some way to cause what is normally an infinite loop to exit. To this end I created a command channel to the thread
<maurer>
which it checks after every new connection
<dwrensha>
OK. Yeah, GJ really could benefit from some kind of cross-thread notifications
<maurer>
Yeah, I'm just going to hack it together with mpsc + a dummy connection for my use case, but I think that adding a thread-thread channel with promise based receipt would be a good addition. I guess I'll just throw up an issue and you can tag it feature request
<dwrensha>
maurer: a feature-request github issue would be nice
<maurer>
ttps://github.com/dwrensha/gj/issues/4
<dwrensha>
thanks
natea has quit [Quit: natea]
heliostatic_ has joined #sandstorm
natea has joined #sandstorm
jadewang has quit [Remote host closed the connection]