a thoughtful web.
Share good ideas and conversation.   Login or Take a Tour!
bfv's profile
bfv


stats
following: 55
followed tags: 28
followed domains: 1
badges given: 6 of 63
hubskier for: 2859 days




recent comments, posts, and shares:
bfv  ·  42 minutes ago  ·  link  ·    ·  parent  ·  post: Please share buggy Hubski things here.

Also the runaway italics spread to all the comments below!

bfv  ·  48 minutes ago  ·  link  ·    ·  parent  ·  post: Please share buggy Hubski things here.

Previews and posts seem to speak different markdown dialects.

    for d in */

renders the \ in preview (so displays \*/), but interprets it as escaping the * when displaying the post (so displays */), while

    for d in /

displays */ in preview, but interprets the * as markup in the post.

bfv  ·  1 hour ago  ·  link  ·    ·  parent  ·  post: Why is my bash loop not working?

Are you sure ffmpeg was finished before your deleted its input? It sounds like it was just taking longer than you expected.

If that's not it, I don't know. The script doesn't look obviously wrong to me, but you're complicating this more than you need to, and simplifying is often an easier way to fix bugs than figuring out why the complicated thing isn't working. For looping over files in the current directory you want for and a glob:

    for d in in */

do

...

done

will loop over just the subdirectories of the current directory. */ only matches directories, so you don't need the test.

Using a subshell to reset the current working directory is going around the world. pushd/popd are what you want. Try

    for d in */

do

pushd "$d"

ffmpeg -f concat -i mylist.txt -threads 35 -c copy concat.avi

popd

done

Since you're not doing set -e you don't need to worry about ffmpeg failing and leaving you in the last directory the script was working on when it failed.

bfv  ·  1 day ago  ·  link  ·    ·  parent  ·  post: Hubski Craft Fair v1.50 - January 16, 2020

I'm morbidly curious what one does with an erotic chess set. Is it just a decoration? Do you ask people if they want to come up and see your etchingschess set?

bfv  ·  1 day ago  ·  link  ·    ·  parent  ·  post: GNU Guile 3.0.0 released

Guile 3 is interesting because of the JIT. They've been working towards it for over 10 years. Guile is made for embedding in applications written in other languages, particularly C, the way emacs lisp is embedded in emacs. It wants to integrate more tightly with the application its embedded in than Python or Lua do, and that imposes constraints that have historically made it very slow.

But you're asking about lisp in general. I'll talk about Common Lisp instead of Scheme, because I know it better.

So every dynamic language has a thing called a repl, but it's not the same thing as the lisp repl. It's only a little facitious to say this is a complete Common Lisp implementation (that only works with sbcl):

    (sb-ext:save-lisp-and-die "dumblisp" :toplevel #'(lambda () (loop (print (eval (read)))) :executable t)

read with no arguments reads the next lisp object from standard input. Type (+ 2 2) and you get a list containing the symbol '+', the integer 2, and the integer 2.

eval takes a lisp object and, well, evaluates it. The language isn't defined in terms of text, it's defined in terms of how eval interprets its argument. (eval (list '+ 2 2)) is equivalent to typing (+ 2 2) at the repl, (eval "(+ 2 2)") is not.

A corollary of that is transforming programs is just manipulating lists, and you can teach eval new transformations. So, if you really miss while loops from some other language, you can write

    (defmacro while (test &body body) `(do () ((not ,test)) ,@body))

And now

    (let ((i 0)) (while (< i 10) (incf i) (format t "~a~%" i)))

works like while in C. You've added while loops to your lisp. That's how most control structures are implemented. If you expand that expression all the way (unfortunately there's no builtin function to do it in CL) you'll get something involving TAGBODY, which is equivalent to a set of labels and gotos in C and translates straightforwardly into jump instructions when passed to the compiler.

Common Lisp's support for object oriented programming, the Common Lisp Object System, was originally implemented as a library using the same mechanism, and in fact most implementations just incorporated the library with minor optimizations rather than modifying their compilers when it was incorporated into the standard. Here's an implementation of Prolog in around 400 lines.

There's other stuff of course. A lot of us just like the syntax. For greybeards it's synonymous with functional programming. Image-based persistence is really cool. A high-level language that can be about as efficient as C if you care enough to give it hints is handy for projects where that matters. Convenient metaprogramming is the feature that really distinguishes lisps from other languages now though, things like garbage collection and strong but dynamic typing started with lisp but have since become ubiquitous.

If you're interested, Practical Common Lisp and Paradigms of Artificial Intelligence Programming (in that order!) are both great books to start with.

bfv  ·  4 days ago  ·  link  ·    ·  parent  ·  post: The Academic Apocalypse: The crisis of English departments is also a crisis of faith.

This is the first I'm hearing about Escher not being a "real" artist. I am completely willing to believe that this is because I am a soulless math nerd who only talks about art with other soulless math nerds and engineers and we all love him because he made art about soulless math nerd things, but it's still news to me.

bfv  ·  11 days ago  ·  link  ·    ·  parent  ·  post: Deceased GOP Strategist's Daughter Makes Files Public That Republicans Wanted Sealed

She turned them over to Common Cause last year. She just posted them to Google Drive.

bfv  ·  14 days ago  ·  link  ·    ·  parent  ·  post: What are your favourite newsletters?
bfv  ·  14 days ago  ·  link  ·    ·  parent  ·  post: "If Hell had a Cheesecake Factory" - Dr. Phil's house is for sale

    A more dramatic space comes in the dining room, which is cloaked in bold shades of black and gray and features a wall of guns — which the family representative said is actually an “anti-gun art installation."

I wonder if anyone has ever tried that excuse on the ATF.

bfv  ·  18 days ago  ·  link  ·    ·  parent  ·  post: Los Angeles may force Uber to use electric vehicles, mayor says

Unless they've gotten much better since I was looking into electric cars, it doesn't seem like driving for Uber with an electric car would be viable. You'd spend too much time charging your car and not getting paid. It might be viable for a more conventional taxi service, because you could have a more cars than drivers and let drivers swap cars when the one they were driving needs to charge.

bfv  ·  22 days ago  ·  link  ·    ·  parent  ·  post: Hallmark Movies are Fascist Propaganda

I guess because I crawled under my rock around the time it came into being I was unaware the Hallmark Channel existed, so you just made my evening sending me down the decline and fall of the tv god-botherer empire rabbit hole. Thank you for that.

hey poor, you don't have to be poor anymore

bfv  ·  24 days ago  ·  link  ·    ·  parent  ·  post: Hubski Craft Fair v0.75 - December 24, 2019 (WIP)

What are you looking to use illustrator for? To my naive eyes patterns on jewelry you've linked to in the past looked like they'd be more easily done algorithmically than by pushing splines around by hand, and there are plenty of fun places to go with that.

bfv  ·  26 days ago  ·  link  ·    ·  parent  ·  post: 362nd Weekly "Share Some Music You've Been Into Lately"

We only deploy the Hubski police for Daft Punk posts.

bfv  ·  26 days ago  ·  link  ·    ·  parent  ·  post: 362nd Weekly "Share Some Music You've Been Into Lately"

There aren't rules. I only try to stick to new stuff because I post something every week and no one wants to hear what my favorite Skinny Puppy track of the week is every week.

bfv  ·  28 days ago  ·  link  ·    ·  parent  ·  post: The 2019 Haters' Guide to the Williams Sonoma Catalog