Fork me on GitHub

Embarrassingly giddy about the authentication plugin. Started talking about it to a total stranger at Walmart at 2:30 am and soon security arrived. However, when I explained it to security they totally understood. Pretty soon the manager showed up and made me go over it all again. Everyone was excited and, weirdly, I ended up with the greeter job.

sheepy 2
🎅 1

I’m working on grokking the retrofit of an existing project with the new auth… there’s not too much in that project, so I could just create a new Biff project and bring the app in, or would it be trivial to upgrade the old project?


How old is the project? Haven't done the upgrade to 0.7.0 myself (yet) but the instructions have been amazingly helpful so far!


Oh, sweet! There are the upgrade directions. Thank you! I should have spotted that. I have :deps {com.biffweb/biff {:git/url "" :sha "83622612e39e5b0aaa6a496dac9c72947776a870"} There isn’t a :tag in my deps (or I’m not spotting it or not understanding)… but I can play around with it.


It mentions following upgrade directions for previous releases… maybe I should look at those.


I guess we can all deduce I haven’t been upgrading my Biff projects. 😳


Haha How old is that commit? Not that it matters, the upgrades are all quite painless (I went through them once) so I'd go ahead and just do them if I were you


> Dec 17, 2022 Ok that's not awfully old


I’ll do them all, and thank you for this help!

Jacob O'Bryant16:02:19

I've since started adding the tag to the biff dep in new projects so it's easier to see what version you're currently on--but yeah, you can just start at whatever release comes first after Dec 17 :)


my approach has been to generate a new template with the same names and use meld (my diff tool of choice) to figure out what I have to change

✔️ 1

Right on… thanks for the date to start after @U7YNGKDHA … and I’ll look at meld, for sure… sounds like a great tool for lots of things.


+1 on meld if you don’t have one that you like, yet. I used it until I jumped on the emacs train @U0X9N9ZK5

Jacob O'Bryant01:02:51

Note also that with all the releases that include changes to the default project, I separate those changes into their own commits and link to them from the release notes' upgrade instructions. e.g. was the commit for the latest release. (Most releases don't have quite so many changes fortunately.)

🤝 1

@U03810HB7QS since I’m a hopeless Emacs addict… what is your approach now?


Its using ediff heavily under the hood so its good to look at those docs, too magit also uses ediff


I need to get better at reading docs. I’ll practice on these.

✔️ 1

I was dabbling in magit, too… was a bit baffling… I’ll look at those docs too.


Take your time and don’t get stuck fiddling with emacs. I have been writing software for awhile and it took me a bit of time to really understand how to use alot of the features that emacs and its ecosystem offer. As long as you are having fun and making progress on your goals, its worth digging into. If it’s frustrating and blocking you, just use something else


Sound advice. Emacs is a bit like NYC… infinite but I only need a few things.


Not to turn this into an Emacs megathread… but have you been live loading deps with anything i.e. pomegranate?


No, I have not


Feel free to DM

👍 1

How do I execute a bb task from repl instead of calling it from the command line? can someone explain the structure of bb.edn? What exactly this line means in it?

{:deps {com.eelchat/tasks {:local/root "tasks"}}
I know, probably this isn't a biff-specific question, and I'm a noob in babashka as well, and this bb.edn is from biff's tutorial

Jacob O'Bryant23:02:50

you could do ( "bb" "name-of-task"). or use an editor-specific command for launching a shell command (e.g. :!bb name-of-task in vim). bb.edn is a babashka-specific config file; I believe it's discussed in the Tasks section of the babashka book. that :deps line lets you define tasks in a separate folder/project instead of defining them inside the bb.edn file. it has the same format as :deps in deps.edn


Ah, that's a bit inconvenient. For some reason, I expected to be able to run bb tasks as easily from the repl as from the command line. When I connect to bb dev instance of a biff app, I can't even require babashka namespaces. Even though presumably they should be transitive and available. Interestingly if I run bb nrepl-server and connect to it, I can see babashka.tasks and even run tasks in the repl, e.g. (tasks/run :hello) But I can't run com.biffweb.tasks/dev task, it is blocking the repl.

Jacob O'Bryant01:02:00

> For some reason, I expected to be able to run bb tasks as easily from the repl as from the command line. Yeah, you can think of bb tasks more like shell scripts that just happen to be written with parens. > When I connect to bb dev instance of a biff app, I can't even require babashka namespaces. Even though presumably they should be transitive and available. The babashka tasks are stored in a separate project from the main Biff library and your application. Babashka namespaces are available to tasks since they're being run with babashka. If you want to call your tasks directly from your main repl, you could add your tasks folder as a dependency by adding {:deps {com.eelchat/tasks {:local/root "tasks"}} to your deps.edn file. You'll also need to add explicit dependencies for any babashka libs that are used by the tasks, e.g. or (I'm not sure where the babashka tasks lib is stored; didn't find it from a quick search). That being said--is there a reason that calling bb hello etc as an external command doesn't work? If you just want to have repl access while you develop tasks, running bb nrepl-server would be the way to go.


> is there a reason that calling bb hello etc as an external command doesn't work? well, initially, I just wanted to find a way to restart the server. I figured I can just eval (com.biffweb/refresh), but since I started digging, now I want to be able to call any task from the repl :) If I figure out how to tweak com.biffweb.tasks/dev so it doesn't block when called from the repl, that may work.

👍 1
Jacob O'Bryant04:02:35

for the dev task there's a chicken-and-egg problem: that task starts up the jvm process + repl server, so if you already have a repl started, then calling dev would give you a second jvm + repl.

Jacob O'Bryant04:02:14

I'm not sure what would be causing it to hang 🤷


yeah, it calls clojure (clj cli), which by default creates repl. I need it to create nrepl instance or something... anyway... it's not hugely important. I didn't mean to waste your mental energy on that. You already helped me.


Thank you!

Jacob O'Bryant05:02:39

no worries, and you're welcome!