Fork me on GitHub
#clojurescript
<
2022-01-11
>
zimablue11:01:13

hey guys I have a weird question

zimablue11:01:01

if one had a hard requirement to be a pure-clojurescript app but wanted to target native/web through webGL (not through divs etc), what library would one use? I saw SKIA and membrane but if I understand, skia has a c++ dependency and membrane not sure

p-himik11:01:18

If SKIA run on web, then it can't have a C++ dependency. It seems that they deliver all such code as a WebAssembly bundle. In the end, you will have just a bunch of JS files - no C++ dependencies at all.

p-himik11:01:02

Also, just as an additional point of data - the exact library that you might need depends on what exactly you want to do. It may very well be that you don't even need a library and can just use WebGL directly.

zimablue12:01:02

good point, I guess it could have some mandatory backend but that would be a strange design. sorry the weirdness of the scenario slightly broke my brain

zimablue12:01:04

thanks for the help

👍 1
phronmophobic19:01:28

Skia is a graphics library. It can be run natively, but can also be built via WebAssembly to be used in the browser, https://skia.org/docs/user/modules/canvaskit/

👍 1
phronmophobic19:01:26

Unless you're also using skia to target other platforms, it's probably much easier just to use the canvas API directly.

Chase15:01:45

So if I have a cljs app and offload the db/auth to something like Supabase or Firebase does that mean I can just bundle up the cljs as js and serve it on these new "serverless" options like Vercel, Netlify, and Cloudflare Workers? I'm pondering if I truly need a backend (and of course also asking if I can also do the opposite and go old school server side rendering instead but that can be a different convo elsewhere) for a project I am starting.

Aleed16:01:19

curious - as i was thinking about this myself - would you use supabase with clojurescript? it didn’t seem optimal in regards to a db api compared to other clj solutions, but supabase would offload a lot of work

Chase15:01:17

Yeah that was my plan. Just translate the curl or js commands to Supabase with cljs. I'm curious why you don't think that would be optimal.

Aleed15:01:06

personal preference, the interop syntax is more clunky to write - especially when compared to the datalog api’s available

Chase15:01:46

Makes sense. I'm more worry about handling the auth for an app so I felt more comfortable offloading that to other professionals. Since I wanted to do that I figured since Supabase and Firebase offer auth services as well as the actual db I should just concentrate the effort there.

Aleed15:01:02

yep, that plus easy subscriptions and the administrative table UI for the database make it tempting! but i’ll prob hold-off for my use-case

Chase15:01:55

Maybe I'll be the guinea pig for the community. If I really get into it maybe I can try and create a Clojure library for better interacting with it as I am seeing some similar community libraries for other languages. I've been wanting to get a first good open source project up and running to give back to the community.

metal 1
Chase15:01:34

@U0CKDV6DB has also been exploring it a little bit and has this public repo if you want to look there for one approach: https://github.com/theianjones/fulcro-should-i-train/blob/master/src/com/example/supabase.cljs

👍 1
leif15:01:47

The Programing Research Laboratory at Northeastern University is conducting a study on the usability of visual and interactive syntax for ClojureScript. Participation involves filling out a questionnaire and is expected to take about 30 minutes. The questionnaire consists of multiple choice and free form responses. All questions are optional and responses are anonymous. If you are interested in participating, please visit: https://study.visr.pl (Chrome Recommended) To learn more about visual and interactive syntax for ClojureScript, please visit: https://prl.ccs.neu.edu/blog/2022/01/06/introducing-visual-and-interactive-syntax-realized-visr-for-clojurescript-and-javascript/ If you have any questions, please contact: <mailto:[email protected]|[email protected]>