nbb

sher 2023-10-24T09:06:03.741889Z

Submitted a PR extending fastify server example, please take a look https://github.com/babashka/nbb/pull/340

borkdude 2023-10-24T09:07:12.700559Z

I am trying the example, what is the login password? 😆

borkdude 2023-10-24T09:08:21.728059Z

maybe make this more obvious in the README?

sher 2023-10-24T09:08:24.386619Z

Should mention it in README or the Login page.

borkdude 2023-10-24T09:08:36.263109Z

also just user / password (simpler) would be good enough

sher 2023-10-24T09:09:23.720659Z

Will update the details and ask for your review later.

sher 2023-10-24T09:10:40.642839Z

Remaining task: • add endpoint tests • RBAC using casbin

sher 2023-10-24T09:19:45.172939Z

Found it out the hard way that #js is not recursive, for deep-tree objects. applied-science/js-interop is very helpful. But one have to be careful of what data structure is being passed as argument.

sher 2023-10-25T11:26:52.611369Z

Would like to be helpful in squint progress on JS side. Not much use of me as Clojure dev (yet).

borkdude 2023-10-24T09:25:30.368319Z

yes

Kirill Chernyshov 2023-10-24T09:57:46.777739Z

clj->js is recursive as well

👍 1
borkdude 2023-10-24T09:58:23.483219Z

In #squint all of this is a lot easier since everything is just a JS object ;)

👍 2
👀 2
sher 2023-10-24T10:24:38.639349Z

squint has compile command to see what JavaScript code it generates. Nice.

sher 2023-10-24T10:27:04.959479Z

Maybe an uninformed question, but, why would one choose squint over nbb for writing a backend service (e.g.: using fastify etc.)? Is nbb purposed for scripting, but squint provides full interop with JavaScript?

borkdude 2023-10-24T10:27:12.386989Z

Not just to see, it is the code that JS will execute

borkdude 2023-10-24T10:28:34.149329Z

@sherzod squint is still in development so it's a bit experimental, but I would encourage everyone to try it to make progress in improving it. the REPL experience isn't as good as nbb right now, no nREPL, but this is something I'm working on

borkdude 2023-10-24T10:28:54.482019Z

but using vite or bun, the watch functionality is very convenient

borkdude 2023-10-24T10:29:07.756859Z

squint watch watches your :paths that are described in squint.edn

borkdude 2023-10-24T10:29:19.964719Z

you can see this in action in squint/examples/vite-react

sher 2023-10-24T10:37:44.979499Z

Great, will try to re-create the same backend service on squint . What nbb lacked is the compile step, where the developer could investigate the output JavaScript for debugging purposes. Is it a correct assumtion (analogy)? a) TypeScript -> (bun/tsc/esbuild) -> JavaScript b) ClojureScript -> squint -> JavaScript

borkdude 2023-10-24T11:00:24.648079Z

yes

1