Fork me on GitHub
Cora (she/her)01:02:32

here's my filesystem shim that I want to get working with babashka

Cora (she/her)01:02:55

it's not 100% tested quite yet

Cora (she/her)01:02:56

but I think all I'll be adding is a posix-ish shim so you can do stuff like (ls path) or (touch path) or (cp-r path1 path2) and similar


your fs utils look like they could be quite handy!

Cora (she/her)06:02:52

the testing is such a slog, though


looking at your tests i appreciate them as they look to be giving usage examples and expression of behavioral intent :thumbsup:


@corasaurus-hex Cool! I'll wait for the official announcement and some docs, then we could add it to the README of babashka?

👍 4

handy script for generating the most recent entry from a gitlib for deps.edn:

#!/usr/bin/env bb

(require '[ :refer [sh]]
         '[clojure.string :as str])

(let [[username project branch] *command-line-args*
      branch (or branch "master")
      url (str "" username "/" project)
      sha (-> (sh "git" "ls-remote" url branch)
              (str/split #"\s")
  {:git/url url
   :sha sha})
$ gitlib.clj nate fs
{:git/url "", :sha "75b9fcd399ac37cb4f9752a4c7a6755f3fbbc000"}
$ clj -Sdeps "{:deps {fs $(gitlib.clj nate fs)}}" -e "(require '[nate.fs :as fs]) (fs/creation-time \".\")"
#object[java.nio.file.attribute.FileTime 0x5c748168 "2019-07-05T14:06:26Z"]

👍 8

woah, TIL about git ls-remote...


that's nifty