Fork me on GitHub
Aaron West00:02:38

Confirming isak's comment, I had to combine stderr with stdout, as follows, to get output from the shell command: /usr/bin/ffmpeg -i myfile.mpg 2>&1 | grep Duration | cut -d' ' -f4 | cut -d, -f1

Aaron West01:02:57

Also, you should not need to shell out to a cmd.exe or bash shell to run ffmpeg, provided you pass the arguments properly to the process execute command. (much later); I added a comment to the gist as an improved version, to remove cut/split/grep/bash dependencies. (I'm still a Clojure novice, so my code is not well-formatted)


@tallpeak fyi def inside a function alters a single global value, but it's easy to move those defs into the adjacent let


but yeah, def inside any other form is very rarely what you want

Aaron West02:02:33

I guess I liked def for testing in the repl, but should remember to reformat my code a little after my interactive testing/debugging


I use Component + tools.namespace.repl and very occasionally I encounter these spurious errors: java.lang.IllegalArgumentException: No implementation of method: xxx of protocol: #'yyy found for class: zzz The code is certainly right, it's simply a code loading issue Can one fix these without a JVM restart?


Using :extend-via-metadata and meta to implement protocols made these errors go away for me


@vlaaad hmm... trouble might arise when most of the app reloads but the the via-meta protocol implementations do not, and therefore get out of synch.


How to fill a vector like [:a :b :c] with seperators :sep to get this: [:a :sep :b :sep :c]?


(def v [:a :b :c])
(vec (interpose :sep v))

🙏 40

works for me


yup it works now


must've been a blip

Alex Miller (Clojure team)16:02:59

It’s github pages, so not much I can do if it is


@alexmiller Do you use a SSG? If so, which one?

Alex Miller (Clojure team)16:02:26

(so I guess no) :)

😅 5

Static Site Generator, like Jykell or Hugo

Alex Miller (Clojure team)16:02:46

oh, it’s jekyll, just path of least resistance

👍 5
Alex Miller (Clojure team)16:02:36

if I wanted to spend time on it I’d use a Clojure one like stasis (Strange Loop site is done with that) or Cryogen

Alex Miller (Clojure team)16:02:20

for something like this, Cryogen is probably ideal


cool, thank you!