biff

A web framework + self-hosted deployment solution for Clojure. Repo: https://github.com/jacobobryant/biff. Docs: https://biff.findka.com
2020-08-18T01:29:01.135200Z

(documents breaking changes)

ozzloy 2020-08-18T03:35:33.135400Z

\o/ congrats!

ozzloy 2020-08-18T04:49:48.137900Z

i connected gvim with fireplace, i think. i was expecting a split with a prompt where i could type stuff, a repl. gf goes to file in the ns form, so i think it's installed correctly. how do i get a repl, or is that not how fireplace is used?

2020-08-18T05:45:44.143700Z

fireplace has a sort-of repl (https://github.com/tpope/vim-fireplace#not-quite-a-repl), though I've never used it myself. I mainly use the following: • cpp for evaluating the current form • cpie for evaluating the current element • :Last for opening the last evaluation output in a buffer • c!! for replacing the current form with it's evaluated result • :%Eval for evaluating the current buffer (mapped to <leader>e) For one-off expressions, I just type them somewhere in the file, eval with cpp, then delete them. If I want to type several expressions, or I want to keep them around, I'll type them in a comment form.

2020-08-18T10:44:28.146600Z

@jshaffer2112 fyi I just pushed a commit that greatly simplifies biff.crux/notify-tx. I also added a DbClient protocol and a CruxClient implementation which includes all the crux-specific parts of notify-tx. I haven't made the other parts of that namespace (wrap-sub, wrap-tx) use the protocol though.

john-shaffer 2020-08-18T16:07:37.149300Z

Awesome! That looks like it will be easier to work out. Tests could be really helpful too. Please do submit them if you write some @ozzloy_clojurians_net.

ozzloy 2020-08-18T18:57:01.149800Z

@foo wait, then does that mean i can't do something like (js/alert "hi")?

ozzloy 2020-08-18T19:29:06.150100Z

no interaction with the browser?

2020-08-18T19:29:41.150600Z

you can do that

2020-08-18T19:30:25.151600Z

just type the form and then hit cpp on it, or try fireplace's quasi repl

2020-08-18T20:13:00.158900Z

btw the new biff.crux/client-results fn would be a good one to write tests for. it's a pure but fairly complex function. it takes a batch of db transactions and then figures out what messages should be sent to each client. it runs every time there's a new transaction. a good way to start would be running it manually with the example app then inspect the argument from the repl (there's a lot of stuff since we currently pass it the whole system map, but only parts of that are used). then you could examine the code paths and write tests to cover them.