This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-18
Channels
- # adventofcode (12)
- # asami (2)
- # babashka (95)
- # beginners (17)
- # biff (5)
- # calva (1)
- # clojure (90)
- # clojure-europe (15)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (6)
- # clojuredesign-podcast (2)
- # clojurescript (34)
- # clr (1)
- # community-development (42)
- # cursive (11)
- # data-science (1)
- # datomic (13)
- # graalvm (5)
- # hoplon (2)
- # hyperfiddle (32)
- # off-topic (1)
- # pathom (6)
- # releases (1)
- # shadow-cljs (25)
- # squint (4)
- # xtdb (10)
Hello #biff! Trying to learn this framework. Coming up against some sticky areas for someone like me; a Clojure novice:
• The bb dev
command seems to just run clojure
so, if like me you think "aha! I'll run bb dev --help
", you get the help text for clojure, which confused me somewhat at the start. For the record, I was trying to find out how to change the port on which the webserver listened.
• On that subject, it seems to have 7888 repl port hard-coded. Can that be made a variable?
Many thanks for your time. It looks like a very promising project!
Hey! I actually might be switching from bb
to plain clj
altogether--I'm experimenting with this currently. Sounds like this is another indication that would be a good thing to do/try.
For the nrepl port, you can edit config.edn
. there's an option in the :tasks section that should have a "--port" "7888"
but you can edit. That being said, commands that interact with the production app via nrepl (`bb prod-dev`, bb soft-deploy
) will still expect it to be on port 7888. I'll make those commands configurable too, perhaps during the switch from bb to clj if that happens.
Thanks for the quick reply! I must not understand the code enough as I thought 7888 was hard-coded at L#276 at https://github.com/jacobobryant/biff/blob/master/tasks/src/com/biffweb/tasks.clj#L276 Switching to clj I agree would make things a fair bit clearer, although I do really like the fast startup of bb so I'm a bit torn. It seems that many of the tasks just call out clojure anyway so it's not like bb's fast start-up is being used here.
oh yeah, that's another bit that should be configurable/inferred. Although it doesn't determine which port is actually used, it does give a hint to your editor on which port it should try to connect to.
I had the same thoughts on bb vs. clj. One factor in favor of clj is that for the commands that don't involve starting up the app, startup time might not even be that slow. e.g. time clj -e nil
takes 0.6 seconds on my machine, so the main startup time cost is just from require
ing stuff. And the commands that don't involve your app's codebase don't necessarily need to require that much stuff.
I could possibly also do this stuff automatically to make requires faster: https://clojure.org/guides/dev_startup_time