Fork me on GitHub
#off-topic
<
2021-03-23
>
emil0r08:03:24

So the total Clojure code base is roughly around 65k LOC?

emil0r08:03:41

That’s pretty impressive as well

gklijs09:03:31

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.

vlaaad12:03:23

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

mpenet12:03:50

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)

phoenixjj12:03:39

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.

vlaaad13:03:31

@phoenixai2082 you mean reloading namespace? as in (require ... :reload-all) ?

phoenixjj13:03:55

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

noisesmith19:03:34

clojure provides a repl in clojure.main, you can load new definitions in your process if your ops flow is OK with it

noisesmith19:03:19

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

emccue13:03:53

I wonder how much of cloud’s complexity is intentional

emccue13:03:29

causing vendor lock in is too lucrative to not be a major goal

4
☝️ 1
Timur Latypoff13:03:38

Yeah, I feel like Clojure's hot code reload it at least on par with Erlang.

Timur Latypoff13:03:06

But by itself hot code reload is not used much, even in Erlang. Much simpler to just restart the whole app.

mpenet13:03:07

@phoenixai2082 actually some of the tools used by aws & co for this is oss

mpenet13:03:10

like firecracker

mpenet13:03:55

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

phoenixjj13:03:58

I didn't knew it existed. thanks.

mpenet13:03:30

it's a very nice project

orestis14:03:54

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.

Stuart14:03:07

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...

phoenixjj16:03:05

git/subversion exist for this purpose. are you guys not using it?

Stuart16:03:24

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.

Stuart16:03:00

But there has to be a better way!

phoenixjj17:03:34

set this for JS file

phoenixjj17:03:22

In HTTP 1.0 days we used to append timestamp or version number to js url in query string

phoenixjj17:03:45

but now you use cache-control

Stuart17:03:50

Thank-you ill look into that!

Stuart14:03:12

IT's so ridiculous.

Stuart14:03:41

And then of course update all the files that reference those js files to reference the new file names.

🤯 2
wombawomba15:03:06

Looking for recommendations on libraries for building documentation and blog pages. Preferably something I can integrate with Reagent!

jjttjj16:03:17

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

wombawomba16:03:56

@U064UGEUQ 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

wombawomba16:03:28

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

borkdude20:03:47

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.

andy.fingerhut21:03:02

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

👍 1
borkdude10:03:04

Thanks. a Makefile with almost all tasks "phony", same as clojure-lsp: this is what I see a lot

flowthing11:03:33

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.

borkdude11:03:11

@U4ZDX466T 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

flowthing11:03:36

OK. The project is private, but I copy-pasted the Justfile above.

borkdude11:03:39

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

flowthing11:03:43

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.

flowthing11:03:29

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.

borkdude11:03:26

Exactly. So with bb's task runner, this would become:

bb :fix-fmt 
bb :bump-deps
bb :clean:test
etc.

1
👍 1
Stuart23:03:37

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.

walterl23:03:33

> the lady in my phone There's your problem troll

awesome 1
sova-soars-the-sora19:03:40

try cleaning out the headphone port?

Stuart23:03:13

The headphones dont even have buttons or anything on them

noisesmith23:03:20

the headphone port can register certain connections between pins as button press events

noisesmith23:03:53

the jiggle of a plug in a broken port can create spurious connections between pins

Stuart23:03:23

oh no. SOunds like it might mean a new phone...

noisesmith23:03:57

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

Stuart23:03:17

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!

Stuart23:03:56

But I guess people are using these voice assistants. I jsut feel a bit daft talking to my phone / tablet / tv

seancorfield23:03:17

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 😐

noisesmith23:03:29

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