summaryrefslogtreecommitdiff
path: root/Readme.org
blob: 30005184e707a0afb01cdb2c163e2cab4d6e12bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#+TITLE: An attempt at slightly better surveys

* What?

Since online survey are apparently collectively broken, this is my rough
attempt at creating something that is at least /slightly/ better.

Idea: have some at least halfway sensible configuration language that's
expressive enough to be useful, but not /quite/ as expressive as allowing
turing machines in configs (for now, that role is filled by [[https://dhall-lang.org/][dhall]], which
admittedly has its idiosyncracies, but also a nice type system). A tool
to deal for dealing with these configs can be found in ~/utils~; it takes
configs, type-checks them, and compiles them to json.

Then have a web application somewhere (can be found in ~/site~), which can
be served as a static site and which fetches aforementioned json, renders
it in some nice way, lets some random passer-by fill it in, and sends the
result via http POST to some server which just eats POST requests and
saves them somewhere (surprisingly, such a server can be found in ~/server~).

Then take [[https://github.com/FiloSottile/age][age encryption]] and use its [[https://crates.io/crates/age][rust crate]] and web assembly to stuff
it everywhere until there's no plaintext left (this may be useless, but
should any marketing firm ever come across it they can claim that it's
technically all "end-to-end encrypted", which is good, right?).

* Why?

No idea. Doing crypto in a browser seemed a sufficiently terrible idea that
I couldn't /not/ try it?

* Any caveats?

Lots. I'll do a list:
1. you might not like dhall. It's somewhat opinionated, as is its formatter
2. aforementioned rust crate is currently on version 0.5.1 and its developers
   recommend not using it until version 1.0
3. someone's browser may not like web assembly
4. you might find your webserver fiddly when trying to properly set the mime
   types for wasm (the app will fail if you don't, though)
5. there's literally a binary blob in this repo (in my defense, nix tooling
   for rust and wasm really is terrible). The code is [[https://stuebinm.eu/git/playground/tree/age-wasm][here]], btw.
6. due to … [mumble mumble] … symmetric encryption with ~age~ takes ages on
   the wasm virtual machine, so this currently uses private keys as passwords
   instead
7. if you use it, the backend server will almost certainly crash on you. It's
   just 100 lines, and it only exists because I wanted to learn Scheme.

Also, you'll end up with lots of encrypted little files somewhere, and will
probably have pipe them around in shell scripts to actually get anything
useful out of them.

Surprisingly, stuffing ~260 rust crates into a web assembly blob turns out
to /not/ be a caveat – the result is still smaller than most logos on other
sites!