Fork me on GitHub
#clerk
<
2023-06-30
>
octahedrion13:06:24

how does one display code from another namespace ?

mkvlr13:06:28

you can use the code viewer to show a string or form as code (`nextjournal.clerk/code`). If that code happens to be in another file or namespace, use whatever clojure you want to get it, e.g. slurp or clojure.repl/source-fn

mkvlr14:06:44

(nextjournal.clerk/code (clojure.repl/source-fn 'tap>))

mkvlr14:06:56

(nextjournal.clerk/code (slurp ( "clojure/core_print.clj")))

octahedrion07:07:37

thank you yes repl/source-fn is what I ended up using

Aziz Aldawood17:06:46

I am running build! on a single file and I get this output

; (out) 👷🏼 Clerk is building 1 notebooks…
; (out) 🧐 Parsing… Done in 3.602ms. ✅
; (out) 🔬 Analyzing… Done in 22.625ms. ✅
; (out) 🔨 Building "src/notebooks/target_achievement.clj"… Done in 13072.962ms. ✅
; (out) 🎨 Compiling CSS… 
; (err) Execution error (IOException) at java.lang.ProcessImpl/forkAndExec (ProcessImpl.java:-2).
; (err) error=2, No such file or directory
not sure how to debug this

mkvlr17:06:10

should give an error that tells you what’s wrong

mkvlr17:06:19

and npm install -D tailwindcss should be the solution

Aziz Aldawood19:06:36

Will try tomorrow morning 👍

👍 2
Aziz Aldawood08:07:47

I get the error message now 👍 removing css option make the compile work which is good. I tried to install tailwind but for some reason it is not working. I think I need to alias npx tailwindcss to tailwindcss

mkvlr08:07:31

oh whoops, we’re currently calling the https://tailwindcss.com/blog/standalone-cli

mkvlr08:07:59

should probably detect if either one is installed and use that

Sam Ritchie22:06:49

I made a video playing around with Clerk’s live-editing mode and some live-updating physics if anyone wants to check it out: https://www.loom.com/share/a458fac5af034bdeb03e971130f8f2c1 and here’s the notebook for anyone who wants to try this out themselves: https://emmy-viewers.mentat.org/dev/examples/simulation/ellipsoid/edit

👏 6
👀 4
mkvlr13:07:55

pretty unreal how smooth this is working, so good!

Sam Ritchie13:07:27

@U5H74UNSF and that’s after ditching a few performance enhancements I thought I needed…

🚤 2
Sam Ritchie13:07:35

@U5H74UNSF one blocker I encountered was that I wasn’t able to require namespace A from namespace B in the editor if A wasn’t already in the SCI context. It would be nice if the SCI loader could attempt to pull in a namespace from github, or from some other way of accessing the source

Sam Ritchie13:07:05

I’m going to get this latest batch merged, cut a release and then write up some thoughts on what’s next

Sam Ritchie13:07:21

@U5H74UNSF another idea would be an “edit” button

👍 2
mkvlr14:07:07

I think loading from GitHub should work using the primitives (js/fetch, read-string, eval &c)?

mkvlr14:07:17

would probably be good to switch to async sci eval

Sam Ritchie15:07:10

okay, new physics components are merged, I think I will do a release soon