)]}'
{"id":"depot~2746","triplet_id":"depot~canon~I3a22a749612211627e5f8301c31ec2e7a872812c","project":"depot","branch":"canon","attention_set":{},"removed_from_attention_set":{"1000034":{"account":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"last_update":"2021-04-01 18:50:36.000000000","reason":"Change was submitted"}},"hashtags":["cursed"],"change_id":"I3a22a749612211627e5f8301c31ec2e7a872812c","subject":"feat(web/bubblegum): nix CGI programming framework","status":"MERGED","created":"2021-04-01 13:05:20.000000000","updated":"2021-08-26 17:57:47.000000000","submitted":"2021-04-01 18:50:36.000000000","submitter":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"2746","meta_rev_id":"3b86d8a0fa8679c332c69a267a2530bd2aedf945","_number":2746,"virtual_id_number":2746,"owner":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"actions":{},"labels":{"Code-Review":{"approved":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"tag":"autogenerated:gerrit:merged","value":2,"date":"2021-04-01 18:50:36.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-2":"This shall not be merged","-1":"I would prefer this is not merged as is"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me, approved"},"description":"","default_value":0},"Verified":{"approved":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"tag":"autogenerated:gerrit:merged","value":1,"date":"2021-04-01 18:50:36.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{"-1":"Fails"," 0":"No score","+1":"Verified"},"description":"","default_value":0},"Autosubmit":{"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}],"values":{" 0":"Submit manually","+1":"Submit automatically"},"description":"","default_value":0,"optional":true},"All-Comments-Resolved":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]},"Conformant-Commit-Message":{"approved":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"all":[{"value":0,"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},{"value":0,"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"value":0,"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}]}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2021-04-01 13:06:45.000000000","updated_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"reviewer":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"state":"REVIEWER"},{"updated":"2021-04-01 14:38:47.000000000","updated_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"reviewer":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"state":"REVIEWER"}],"messages":[{"id":"c5fbd79f5ad49343f58a67b1a5a3f64a49d3b503","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 13:05:20.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"3c42a5a7604de4d97b233e9e6b7c7d6df474400b","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 13:06:45.000000000","message":"Patch Set 1: Verified+1\n\nBuild of patchset 1 passed: https://buildkite.com/tvl/depot/builds/5874","accounts_in_message":[],"_revision_number":1},{"id":"47b03abd400cb033126776ed8414dcf88e19d2bf","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2021-04-01 14:38:47.000000000","message":"Patch Set 1: Code-Review+2\n\nThis is very cool - I don\u0027t really have other major comments.\n\nI wouldn\u0027t mind this living in //web","accounts_in_message":[],"_revision_number":1},{"id":"4706b9a879fd86bb0b7a5e61672803d4b966fd04","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 17:41:08.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"a21ebc600f65090436dc75bad3788ad999445e9f","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 17:43:15.000000000","message":"Patch Set 2: Verified+1\n\nBuild of patchset 2 passed: https://buildkite.com/tvl/depot/builds/5891","accounts_in_message":[],"_revision_number":2},{"id":"be2a540f187ac57a4ce37c2518f63084e8ee5605","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 17:54:56.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"f07b5d144d3b089a165ea26a8f98dae38ed33655","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 17:56:24.000000000","message":"Patch Set 3: Verified+1\n\nBuild of patchset 3 passed: https://buildkite.com/tvl/depot/builds/5893","accounts_in_message":[],"_revision_number":3},{"id":"9dd2b600c813694626c177e38e266a2b09855122","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 18:29:29.000000000","message":"Uploaded patch set 4.","accounts_in_message":[],"_revision_number":4},{"id":"f6c55bdcfe738e1ae8bbcd8b7db681be9cda6558","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 18:31:03.000000000","message":"Patch Set 4: Verified+1\n\nBuild of patchset 4 passed: https://buildkite.com/tvl/depot/builds/5899","accounts_in_message":[],"_revision_number":4},{"id":"c4c79be7cabb01aaf811682336a8325890c222ea","tag":"autogenerated:gerrit:newPatchSet","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 18:48:15.000000000","message":"Uploaded patch set 5.","accounts_in_message":[],"_revision_number":5},{"id":"9b99f44741e22178fbdb3e9c5b6660c5d2d0be98","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 18:49:47.000000000","message":"Patch Set 5: Verified+1\n\nBuild of patchset 5 passed: https://buildkite.com/tvl/depot/builds/5901","accounts_in_message":[],"_revision_number":5},{"id":"1aedcea00fdccb0a2676d26d330f46c47bbcae7d","tag":"autogenerated:gerrit:merged","author":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"date":"2021-04-01 18:50:36.000000000","message":"Change has been successfully rebased and submitted as 93a746aaaa092ffc3e7eb37e1df30bfd3a28435f","accounts_in_message":[],"_revision_number":6},{"id":"8be7e10802152a5f2852cf92ddbe75c079969ef8","author":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]},"date":"2021-04-01 18:52:28.000000000","message":"Patch Set 6:\n\nBuild of patchset 6 passed: https://buildkite.com/tvl/depot/builds/5904","accounts_in_message":[],"_revision_number":6},{"id":"3b86d8a0fa8679c332c69a267a2530bd2aedf945","tag":"autogenerated:gerrit:setHashtag","author":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"},"date":"2021-08-26 17:57:47.000000000","message":"Hashtag added: cursed","accounts_in_message":[],"_revision_number":6}],"current_revision_number":6,"current_revision":"93a746aaaa092ffc3e7eb37e1df30bfd3a28435f","revisions":{"ff4f73d146c0ccc7b13c5016d03c424226b0f393":{"kind":"REWORK","_number":1,"created":"2021-04-01 13:05:20.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/1","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/1","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/1"}}},"commit":{"parents":[{"commit":"e596b7bc44145ede2950a2676fb3bc270bdd1407","subject":"feat(sterni/ncla-run): shebang interpreter for NCLA™ programs","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de596b7bc44145ede2950a2676fb3bc270bdd1407"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 13:03:41.000000000","tz":120},"subject":"feat(sterni/nix/cgi): nix CGI programming framework","message":"feat(sterni/nix/cgi): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A users.sterni.nix.cgi.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using ncla-run\nwhich automatically passed `depot`, so they can import the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dff4f73d146c0ccc7b13c5016d03c424226b0f393"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dff4f73d146c0ccc7b13c5016d03c424226b0f393"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"e596b7bc44145ede2950a2676fb3bc270bdd1407","is_merged_in_target_branch":false,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":1,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"5a12649efb326cd1063d9413d85a2efc745a7953":{"kind":"REWORK","_number":2,"created":"2021-04-01 17:41:08.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/2","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/2","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/2"}}},"commit":{"parents":[{"commit":"e596b7bc44145ede2950a2676fb3bc270bdd1407","subject":"feat(sterni/ncla-run): shebang interpreter for NCLA™ programs","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de596b7bc44145ede2950a2676fb3bc270bdd1407"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 17:41:02.000000000","tz":120},"subject":"feat(sterni/nix/cgi): nix CGI programming framework","message":"feat(sterni/nix/cgi): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A users.sterni.nix.cgi.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using ncla-run\nwhich automatically passed `depot`, so they can import the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d5a12649efb326cd1063d9413d85a2efc745a7953"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d5a12649efb326cd1063d9413d85a2efc745a7953"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"e596b7bc44145ede2950a2676fb3bc270bdd1407","is_merged_in_target_branch":false,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":1,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"e094858ceb51a0f876184d8be6487bbac4dd8f8e":{"kind":"REWORK","_number":3,"created":"2021-04-01 17:54:56.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/3","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/3","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/3"}}},"commit":{"parents":[{"commit":"f3986d970281cfd3117b2196cd783c275b4dd390","subject":"feat(sterni/nint): shebang interpreter for nix scripts","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003df3986d970281cfd3117b2196cd783c275b4dd390"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 17:54:42.000000000","tz":120},"subject":"feat(sterni/nix/cgi): nix CGI programming framework","message":"feat(sterni/nix/cgi): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A users.sterni.nix.cgi.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using ncla-run\nwhich automatically passed `depot`, so they can import the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de094858ceb51a0f876184d8be6487bbac4dd8f8e"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de094858ceb51a0f876184d8be6487bbac4dd8f8e"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"f3986d970281cfd3117b2196cd783c275b4dd390","is_merged_in_target_branch":false,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":2,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"e40a29d51d00760a50c974af27eca5eab6b4a2bd":{"kind":"REWORK","_number":4,"created":"2021-04-01 18:29:29.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/4","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/4","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/4"}}},"commit":{"parents":[{"commit":"dc2123b4ef9c43db39116beb1f6b682a0ce3ae11","subject":"feat(sterni/nint): shebang interpreter for nix scripts","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003ddc2123b4ef9c43db39116beb1f6b682a0ce3ae11"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 18:29:16.000000000","tz":120},"subject":"feat(web/bubblegum): nix CGI programming framework","message":"feat(web/bubblegum): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A web.bubblegum.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using\nusers.sterni.nint which automatically passed `depot`, so they can\nimport the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de40a29d51d00760a50c974af27eca5eab6b4a2bd"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003de40a29d51d00760a50c974af27eca5eab6b4a2bd"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"dc2123b4ef9c43db39116beb1f6b682a0ce3ae11","is_merged_in_target_branch":false,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":3,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"935bb8c672ca41781044550f8f9061ae368f5528":{"kind":"REWORK","_number":5,"created":"2021-04-01 18:48:15.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/5","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/5","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/5 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/5 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/5 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/5"}}},"commit":{"parents":[{"commit":"d23e6c1e8578302b041866a9878c5cabeb76d8cd","subject":"feat(sterni/nint): shebang interpreter for nix scripts","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003dd23e6c1e8578302b041866a9878c5cabeb76d8cd"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 18:48:08.000000000","tz":120},"subject":"feat(web/bubblegum): nix CGI programming framework","message":"feat(web/bubblegum): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A web.bubblegum.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using\nusers.sterni.nint which automatically passed `depot`, so they can\nimport the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d935bb8c672ca41781044550f8f9061ae368f5528"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d935bb8c672ca41781044550f8f9061ae368f5528"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"d23e6c1e8578302b041866a9878c5cabeb76d8cd","is_merged_in_target_branch":false,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":4,"change_status":"MERGED"}],"branch":"refs/heads/canon"},"93a746aaaa092ffc3e7eb37e1df30bfd3a28435f":{"kind":"NO_CODE_CHANGE","_number":6,"created":"2021-04-01 18:50:36.000000000","uploader":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"},"ref":"refs/changes/46/2746/6","fetch":{"anonymous http":{"url":"https://cl.tvl.fyi/depot","ref":"refs/changes/46/2746/6","commands":{"Checkout":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/6 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/6 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://cl.tvl.fyi/depot refs/changes/46/2746/6 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://cl.tvl.fyi/depot refs/changes/46/2746/6"}}},"commit":{"parents":[{"commit":"68f3ac64c4a2ae50dcb125f067692536f647e370","subject":"feat(sterni/nint): shebang interpreter for nix scripts","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d68f3ac64c4a2ae50dcb125f067692536f647e370"}]}],"author":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-02-21 11:57:40.000000000","tz":60},"committer":{"name":"sterni","email":"sternenseemann@systemli.org","date":"2021-04-01 18:50:36.000000000","tz":0},"subject":"feat(web/bubblegum): nix CGI programming framework","message":"feat(web/bubblegum): nix CGI programming framework\n\nSo here is what has been keeping me up at night: At some point I\nrealized that nix actually made a somewhat passable language for CGI\nprogramming:\n\n* That `builtins.getEnv` exists as one of the impurities of Nix is\n  perfect as environment variables are the main way of communication\n  from the web server to the CGI application.\n\n* We can actually read from the filesystem via builtins.readDir and\n  builtins.readFile with bearable overhead if we avoid importing the\n  used paths into the nix store.\n\n* Templating and routing are convenient to implement via indented strings\n  and attribute sets respectively.\n\nOf course there are obvious limitation:\n\n* The overhead of derivations is probably much to great for them to be\n  useful via IfD.\n\n* Even without derivations, nix evaluation is very slow to the point\n  were a trivial application takes between 100ms and 400ms to produce a\n  response.\n\n* We can\u0027t really cause effects other than producing a response which\n  makes it not viable for a lot of applications. There are some ways\n  around this:\n\n  * With a custom interpreter we could have streaming and multiplexed\n    I/O (using lazy lists emulated via attrsets) to cause such effects,\n    but it would probably perform terribly.\n\n  * We can use builtins.fetchurl to call other HTTP-based microservices,\n    but only in very limited constraints, i. e. only GET, no headers,\n    and only if the tarball ttl is set to 0 in the global nix.conf.\n\n* Terrible error handling capabilities because builtins.tryEval actually\n  doesn\u0027t catch a lot of errors.\n\nTo prove that it actually works, there are some demo applications,\nwhich I invite you to run and potentially break horribly:\n\n    nix-build -A web.bubblegum.examples \u0026\u0026 ./result\n    # navigate to http://localhost:9000\n\nThe setup uses thttpd and executes the nix CGI scripts using\nusers.sterni.nint which automatically passed `depot`, so they can\nimport the cgi library.\n\nChange-Id: I3a22a749612211627e5f8301c31ec2e7a872812c\nReviewed-on: https://cl.tvl.fyi/c/depot/+/2746\nTested-by: BuildkiteCI\nReviewed-by: tazjin \u003cmail@tazj.in\u003e\n","web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d93a746aaaa092ffc3e7eb37e1df30bfd3a28435f"}],"resolve_conflicts_web_links":[{"name":"cgit","tooltip":"Open in GitWeb","url":"https://code.tvl.fyi/commit/?id\u003d93a746aaaa092ffc3e7eb37e1df30bfd3a28435f"}]},"parents_data":[{"branch_name":"refs/heads/canon","commit_id":"68f3ac64c4a2ae50dcb125f067692536f647e370","is_merged_in_target_branch":true,"change_id":"I61528516eb418740df355852f23425acc4d0656a","change_number":2745,"patch_set_number":5,"change_status":"MERGED"}],"branch":"refs/heads/canon","description":"Rebase"}},"requirements":[],"submit_records":[{"status":"CLOSED","labels":[{"label":"Conformant-Commit-Message","status":"OK","applied_by":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}},{"label":"All-Comments-Resolved","status":"OK","applied_by":{"_account_id":1000034,"name":"sterni","email":"sternenseemann@systemli.org","username":"sterni"}},{"label":"Verified","status":"OK","applied_by":{"_account_id":1000014,"name":"BuildkiteCI","username":"buildkite","tags":["SERVICE_USER"]}},{"label":"Code-Review","status":"OK","applied_by":{"_account_id":1000001,"name":"tazjin","email":"tazjin@tvl.su","username":"tazjin"}}]},{"status":"CLOSED"}],"submit_requirements":[{"name":"Verified","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Verified\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Verified\u003dCustom-Rule"],"failing_atoms":[]}},{"name":"All-Comments-Resolved","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:All-Comments-Resolved\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:All-Comments-Resolved\u003dCustom-Rule"],"failing_atoms":[]}},{"name":"Code-Review","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Code-Review\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Code-Review\u003dCustom-Rule"],"failing_atoms":[]}},{"name":"Custom-Rule","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"rule:Custom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["Custom-Rule"],"failing_atoms":[]}},{"name":"Conformant-Commit-Message","status":"SATISFIED","is_legacy":true,"submittability_expression_result":{"expression":"label:Conformant-Commit-Message\u003dCustom-Rule","fulfilled":true,"status":"PASS","passing_atoms":["label:Conformant-Commit-Message\u003dCustom-Rule"],"failing_atoms":[]}}]}
