Fork me on GitHub
#clojure-europe
<
2023-10-01
>
reefersleep10:10:04

Good morning!

reefersleep10:10:37

Do you know of good examples about how to structure your Storybook/Clerk/Portfolio/etc component/style library? I've never used one, shame on me, and though I have some ideas, I'd love to see prior art, of which I assume there must be loads, if you know where to look.

pez10:10:45

Don’t know much about structuring this, but I find that Drei uses Storybook very nicely, especially for its documentation: Like here: https://drei.pmnd.rs/?path=/docs/staging-camerashake--docs

pez10:10:04

Good morning! Wishing I had something like #C03DPCLCV9N for Google Apps here.

borkdude10:10:36

how does that work?

pez10:10:09

Google Apps Script is JavaScript. It runs on the server. There’s a pretty nice editor, letting me run individual functions. Even with a half decent debugger. I can also run functions from the command line. But there’s no REPL. And it also gets pretty scary running some functions, depending on what the scripts do. (In my case I risk sending quite a lot of emails to people 😃.) So, it’s not like Joyride in that Google Apps can be scripted. It already can. But rather the convenience of Joyride, with the REPL and interactive programming. And a much nicer programming language than JavaScript. The last thing there, I can probably get around by using #C03U8L2NXNC, and then maybe use Joyride or Babashka to automate the upload of the transpiled scripts.

borkdude10:10:15

does that run on Node.js or something?

borkdude10:10:53

I think someone has run nbb or scittle in such an environment. You can use scittle.core.eval_string or import { loadString } from 'nbb'

borkdude10:10:15

also you could try to load squint, use compileString and then eval the result

pez10:10:18

You mean for the REPL part of things?

pez10:10:56

I don’t know think it’s a node environment. But for local development that could work, I guess.

borkdude10:10:31

I don't know enough about appstore to say anything about a REPL. Do you run such a thing locally then? But I think I read something about editing in a console. I was talking about that use case

pez11:10:58

I don’t think there’s a local Apps thing you can run. What is available is the ability to upload updates of a script and to run functions (afaik). You could build a REPL around that, probably, but it would be a bit slow, and not live in the Clojure sense of a REPL. Maybe something like: • Using Joyride or nbb for development of the scripts • No Apps API would be available to the REPL, so you would be factoring the code so that your logic isn’t tied to Apps. • Using squint to transpile the scripts to JS before uploading to the real environment. But I haven’t started to seriously consider going this way. Mostly missing the REPL a lot, when hacking on some scripts. 😃

borkdude11:10:51

you can use squint in a REPL now too

borkdude11:10:57

just not nREPL yet

borkdude11:10:03

and it has sharp edges

borkdude11:10:42

I did hack together some nREPL stuff on the plane, will resume hopefully soon, but it works with socket REPL now

pez11:10:01

Wow, didn’t know! Hoping for nREPL resumage soon!

borkdude11:10:36

this is using a i/o console repl via inf-clojure: https://twitter.com/borkdude/status/1703772869182800159

metal 1
vemv11:10:01

Depending on the use case, you may use "Alternative Runtimes" instead of Google Apps Script. AR means using arbitrary server backends to emit declarative markup that can accomplish a pretty wide range of tasks. I 'sold' and implemented this approach at a workplace, last year, for a Sheets integration.

pez11:10:15

Sounds a bit overkill for my use case, but also sounds like something I’d like to read more about, @U45T93RA6.

slipset10:10:30

Morning 🇫🇷 :man_climbing: 🪨

2
1