Yeah, overspecification is a real danger. In one of the projects I work on, almost everything is speced, and it's a real pain in the ass.
So the total Clojure code base is roughly around 65k LOC?
That’s pretty impressive as well
There is a lot in Java already to build upon. There is a sweet spot for a language, being small enough to be stable, but not so small you need a lot of additional libraries for it to be practical. Clojure seems to do this well.
I would be interested to see Rich Hickey’s take on designing cloud services 😬 Currently learning GCP at work, it’s so much stuff, I wonder how much of cloud’s complexity is incidental
well, there are so many sub-services that must interop inside a cloud platform, complexity grows organically. That gets even worse when you want to respect backward compatibility (and you do want that)
when cloud services talk about lambda/functions, I just feel that they took Erlang and put fancy UI on top of it. In erlang you can replace a module without shutting down whole app. I wish Clojure come up such feature.
@phoenixai2082 you mean reloading namespace? as in (require ... :reload-all)
?
I wonder how much of cloud’s complexity is intentional
causing vendor lock in is too lucrative to not be a major goal
There are some thoughts on cloud in Rich's talk on datomic ions: https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/DatomicIons.md
Yeah, I feel like Clojure's hot code reload it at least on par with Erlang.
But by itself hot code reload is not used much, even in Erlang. Much simpler to just restart the whole app.
@phoenixai2082 actually some of the tools used by aws & co for this is oss
like firecracker
that is something we do in repl. usually apps are packaged as jar/war. but in erlang a single file (module) can be reloaded in production
basically you create a vm profile for your "function", with all it's deps, start the service, snapshot it and when invoked you just run from the snapshoted state
I didn't knew it existed. thanks.
it's a very nice project
Erlang hot-core reload is actually much worse than Clojure, because you can't really do it in a dev environment AFAIK – you need a proper OTP release and writing migration handlers for existing state etc, so I think hardly anyone uses it "just because it's there". For hardcore Erlang users it's a great option for deployment though.
Working on a project at work where we have a number of js file that are named like foo.12.0.0.js, bar.27.0.0.js etc and each time you change you these files you have to bump the version number...
IT's so ridiculous.
And then of course update all the files that reference those js files to reference the new file names.
Looking for recommendations on libraries for building documentation and blog pages. Preferably something I can integrate with Reagent!
https://clojureverse.org/t/what-is-your-favourite-way-to-document-your-programs/7353 this recent thread on clojureverse discusses a lot of options for docs
@jjttjj thanks! That thread seems more focused on code/API docs, and I'm really looking to build product documentation — something like https://clojure.org/guides/getting_started
I started using https://www.mkdocs.org/, but I'm not a fan because 1. it introduces a non-Clojure project to our stack, and 2. it's hard to integrate cleanly with our public-facing SPA (Reagent) website
git/subversion exist for this purpose. are you guys not using it?
He says it's because the browsers at the sites won't pick up changes to the js unless the file name changes and users won't see changes after deploy without a hard refresh.
But there has to be a better way!
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
set this for JS file
In HTTP 1.0 days we used to append timestamp or version number to js url in query string
but now you use cache-control
Thank-you ill look into that!
clojure provides a repl in clojure.main, you can load new definitions in your process if your ops flow is OK with it
I've done it in the distant past, but in recent jobs we decided reproducibility (strict mapping from identifiable artifact to code) was more important so haven't used the feature
Looking for examples of Clojure projects that use Makefile or something similar to list tasks that are commonly invoked. You may reply in a thread.
Not sure if this helps, but antq uses a https://github.com/liquidz/antq/blob/main/Makefile
Thanks. a Makefile with almost all tasks "phony", same as clojure-lsp: this is what I see a lot
Can you be more specific about what you're looking for? I use Just for one of my work projects and I've been quite happy with it.
@flowthing I am building a task runner within babashka so I want to know what people are using these days: https://github.com/babashka/babashka/issues/756
OK. The project is private, but I copy-pasted the Justfile above.
Thanks. So this confirms my hypothesis that deps.edn invites to using tools like make or just because nobody can remember all these invocations from the top of their head
Certainly.
I just remembered I use a Makefile for Sigel: https://github.com/eerohele/sigel/blob/master/Makefile But it's the same story as with the other ones: just phony tasks.
A Makefile equivalent is also useful in CI: if the command for one of the tasks gets updated, it's enough to just update it in one place.
Exactly. So with bb's task runner, this would become:
bb :fix-fmt
bb :bump-deps
bb :clean:test
etc.I don't claim this is an example worth following, but it is small, simple, and easily modified: core.rrb-vector has one small bash script for tasks on JVM https://github.com/clojure/core.rrb-vector/blob/master/script/jdo and another for similar corresponding tasks with JavaScript: https://github.com/clojure/core.rrb-vector/blob/master/script/sdo
Anyone know android phones? I'm having a strange problem with my phone and my headphones. When the headphones are plugged in and their is music playing and the headphones jiggle a little in the headphone jack the music pauses and the lady in my phone tells me the time. I have no idea what is going on or why it's doing this. I assume the headphone jack is slightly damaged over time but how this translates to telling me the time, I can't fathom.
try cleaning out the headphone port?
The headphones dont even have buttons or anything on them
the headphone port can register certain connections between pins as button press events
the jiggle of a plug in a broken port can create spurious connections between pins
oh no. SOunds like it might mean a new phone...
> the lady in my phone There's your problem :troll:
speaking of "the lady in my phone" my galaxy note 9 has a dedicated "bixby button" and in the current OS there's no way to reassign or disable the button, so I have a dedicated physical switch on the device whose purpose is to make an annoying assistant that I never want to use wake up and talk to me
I had some stupid Google assistant thing on my TV. I was watching an episode of Joe Rogan and his guests said something like "Ok, Google is blah bnlah", it stopped the episode and was waiting on voice input... Dumb!
haha
But I guess people are using these voice assistants. I jsut feel a bit daft talking to my phone / tablet / tv
My Android phone often wakes up and asks if it can help, while we are just watching TV. I haven’t managed to train Google to only respond to my voice 😐
I don't care if it's a voice assistant or "push button to make a fart sound" - I don't like intrusive features that can't be turned off