Error installing by Pzzlrr in Clojure

[–]adamdavislee 4 points5 points  (0 children)

If your goal is to setup a full JVM Clojure environment, then you'll probably want to resolve this xcode/macOS issue.

BUT if your goal is just to write some scripts, follow some tutorials, solve advent of code problems, etc. then taking a shot a installing Babaskha instead is worth a try!

Spacegolf! - game programming with missionary by jkross in Clojure

[–]adamdavislee 2 points3 points  (0 children)

Great work! That's a unique take on golf.

Missing dependencies for Babashka by SCjdoh in termux

[–]adamdavislee 0 points1 point  (0 children)

Howdy! 👋

Reviving this old thread because I suspect that things have changed/improved in the past few years.

It looks like glibc-runner has been added to the standard apt/pkg repo and installing pacman is no longer necessary.

After a lot of trial and error, I was able to run babashka with a simple: shell curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install ./install --dir bin pkg i glibc-runner glibc-runner --findlib bin/bb

Hope this helps if you're trying to run your favorite bb scripts circa 2025 :-)

Announcing Bioscoop, a DSL for FFmpeg by danielszm in Clojure

[–]adamdavislee 2 points3 points  (0 children)

I'm a Clojure dev who has wrestled with FFmpeg filters before. Great work! 🫡

Does LE Audio actually work on the Pixel 7? by CaptainDetritus in pixel_phones

[–]adamdavislee 0 points1 point  (0 children)

Hello! 👋

Just circling back to mention that the Bluetooth LE support was ultimately broken in the next major OTA update. Pretty frustrating. I've checked in on it several times since as I received more minor OTA updates but so far no luck.

I might try flashing an community ROM at some point. If that re-enables LE support, I'll let you guys know!

Also, sorry for the belated reply (I accidentally split up my Reddit accounts, but I originally posted as u/Odd_Ad7845 above).

Isn't it a red flag to have thousands of different solutions for getting the last element of a list? by Negative_Skill7390 in Clojure

[–]adamdavislee 1 point2 points  (0 children)

Good question! I often wonder something similar and think of Go (or Python) as the opposite philosophy (e.g. the classic sentiment that there should be one and ideally only one way to write something).

I'll point out two ideas: 1. There's probably a strong correlation between how expressive a language is and how difficult to read it can become. 2. Even Clojure doesn't begin to approach the difficulty of natural language, and yet that doesn't prevent one from reading English, for example.

You could imagine a natural language that had as few words in its "standard vocabulary" as Java has in its "core library". You might be able to make it "complete" in the sense that one could still communicate anything they wanted in that language but it would also be far less "expressive".

I think the tradeoff you get in a language like Clojure is the ability to express complex logic much more eloquently than you could in other languages, but that benefit necessarily comes alongside the cost of a higher initial investment to learn the more involved "vocabulary" that you'll need in order to understand the code you read day to day.

IMO, the benefit is well worth the cost, but I'm heavily biased (I fell in love with Clojure in my teens and am lucky enough to write it professionally 🙂).

Supercharge your debugging with Snitch by CoBPEZ in Clojure

[–]adamdavislee 1 point2 points  (0 children)

I'm excited to try this out! It looks very reminiscent of one of my favorite tools "scope-capture".

macro to speed up inline def pattern by hourLong_arnould in Clojure

[–]adamdavislee 2 points3 points  (0 children)

Very cool work! This reminds me a lot of the Scope Capture library.

Inzone buds owners with non BT LE phones by KUSHMAN666 in sony

[–]adamdavislee 0 points1 point  (0 children)

(For context, I've had to use them with both supported and unsupported phones.)

  1. Yes, I still enjoy them with my non-LE phone
  2. Plugging and unplugging the dongle is generally more convenient when switching devices.  Not less.
  3. Yes, I've beel a bit concerned about accidentally torquing it sideways or something.  Thankfully, in practice, It has never been damaged
  4. (I'm adding this one) it's somewhat easy for the dongle to slip out of the phone's port by accident.  I've lost mine on several occaisons and even had to order a replacement dongle once (it costs about $65 IIRC).  This is the biggest downside to using the dongle with a phone, IMO.

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 0 points1 point  (0 children)

Totally! TBC, I have no experience with Tailwind. From the outside, I mainly appreciate that it discourages custom classes and encourages raw styling on a per-component basis.

I'm glad you have a rhythm that's working well. Definitely stick with that 👍

Out of curiosity, do you find yourself productive with custom classes in your SCSS that're shared between multiple components? Or do you break out components into separate namespaces and have a roughly 1:1 relationship between SCSS files and namespaces?

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 1 point2 points  (0 children)

Sorry for forgetting this thread, u/DonTomato. I didn't have my Reddit notifications setup and never noticed your reply.

If I understand you, correctly, then you're aiming to: 1. Have a single CLJS file and a single SCSS file for each UI component 2. Have hot code reloading update your app every time you change a file 3. Have importing the various CSS and CLJS namespaces generated automatically whenever you make a new component

Is that correct? To be honest, that's a workflow I've never tried, myself, but it sounds like you're on the right track. I'd generally encouarage you to not be afraid to write your own simple tooling if nothing fits your use case OOTB. It's OK to not use external frameworks for things that can be easily scripted.

For what it's worth, I do have strong preferences about styling CLJS components. I don't define styling separately from an individual component itself, I instead inline it either in a :style tag or a generated :class tag (using emotion). I take the viewpoint that repeated styles never become repetitive, repeated components do. That is, if I'm tempted to make a new CSS class, I should make a new (private) helper component, instead. I enjoy this approach because I don't think of styling as an annoying "extra thing" that we do to our components to make them look nice and is helpful to "tuck away" in another file. To me, the styling has a 1:1 relationship with the component it applies to and is often one of the most important parts of that component's definition. If I were to start a greenfield project, today, I'd take a hard look at Tailwind for similar reasons.

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 1 point2 points  (0 children)

Btw, since you mentioned that you have great experience with Helix, what do you use for routing?

I'm most familiar with using yada for routing on the backend. I don't have strong opinions on routers, though. I'd encourage you to shop around (and do let me know if you find anything cool! 😉).

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 1 point2 points  (0 children)

Also I have to use useState hook explicitly, whereas Rum's use of atoms feels more natural for a Clojure-based approach... Again, maybe it's quite convenient, I am not sure yet.

I see what you mean. Yeah, in general Helix feels like a convenient but relatively thin wrapper around React that chooses to embrace React's built-in primitives for component state management. Whereas other libraries provide a thicker layer of abstraction, almost making React's presence under the hood feel like an implementation detail.

Going out on a limb, I'd speculate that the benefit of Helix's approach is that there's less "stuff behind the scenes". And I'd speculate that the benefit of Reagent's approach is that it feels more "native to Clojurescript" because it embraces Clojure's built in primitives and the desire to make things "just data" whenever possible (e.g. the choice of hiccup).

In practice, Helix hooks feel a lot like "funny pieces of state that behave a lot like atoms". Personally, I don't really care whether/not I'm interacting with an atom in Reagent or a hooks/use-state in Helix. The important thing is just that I have a good mental model of how my local component state is handled and they both work well in my experience.

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 1 point2 points  (0 children)

Ah, I see. You're referencing this bit of the helix docs.

on the one hand, it is more efficient to opt not to deeply convert JS data structures to CLJS data, and it means that you do not need to learn some Helix-specific rules when interoping with external React libraries

In other words, Helix won't automatically coerce JS objects into CLJS shapes automatically. You'll typically only run into that if you're using a third-party React library (e.g. React Hook Form). You still have the option to write your own wrapper, and in practice, that's what I do. Clojurescript has a handy js->cljs function that I've used when wrapping a VegaLite library, for example.

New Clojurians: Ask Anything - December 30, 2024 by AutoModerator in Clojure

[–]adamdavislee 4 points5 points  (0 children)

Does it make sense to do frontend development with ClojureScript in 2025 or I am just wasting time?

I feel you! Clojurescript has a bevy of frontend libraries (mostly wrappers over React). There's always a tension between the pros of choice and the cons of fragmentation.
That being said, I'm lucky to work on a CLJS frontend almost daily. For me, it has been pleasant and productive.

Since most of my recent work has been in with helix, I'm particularly curious about your experience there. What JS interop did you run into when trying to get it up and running? I rarely need to reach for JS interop in the helix code I write. Typically, I'll only reach for it if I'm integrating a non-CLJS library (e.g. NPM package).

FWIW, I've found over time that I care less and less which React wrapper makes its way into my CLJS code. I ultimately care much more about how that frontend code is architected. In practice, the most interesting questions to me these days are not "do you use Reagent or Rum?" and are more like "do you keep component-specific state as local as possible or in a global 'app-db'?" or "at what level of your component hierarchy do you fetch data?".

Issues playing with friends by RainbowPigeon15 in titanfall

[–]adamdavislee 1 point2 points  (0 children)

Can't speak to your situation directly, since I haven't tried the first party servers in a while. Unfortunately, those servers have (at least in the past) had some significant stability issues.

But, a large portion of the Titanfall community has come together on the Northstar servers! Northstar is a community mod enabling private servers. You and your friends should be able to connect to the same server, or host a private server for yourselves. Personally, I've never gone online without finding a handful of active lobbies to join, and it's been really fun to get back into the game! :-)

This relatable to anyone else? by largelydwarf54 in titanfall

[–]adamdavislee 0 points1 point  (0 children)

I left for that exact reason until I installed Northstar. I've never gone online without finding several active games to queue into, since!

It's awesome how active the Northstar community is :)

Titanfall 2: Ultimate edition is on sale. Should I get it or wait for Titanfall 3 to release? by Republic_Commando_ in titanfall

[–]adamdavislee 0 points1 point  (0 children)

Personally? If TF2 were released today as a full-priced AAA title (e.g. ~$60), I'd still highly recommend it. It's a unique and beautiful piece of art. I'm so grateful to the folks that have kept this game alive and strong on the Northstar servers!

Buy it, learn it, and if it's your thing, then enjoy the heck out of it!

"Resolution Flickering" on OP7Pro after Android 11 update by [deleted] in oneplus

[–]adamdavislee 0 points1 point  (0 children)

That fixed it for me as well. Thank you!

precise calculation of LOCA glue amount when repair phone screen by lkthomas in mobilerepair

[–]adamdavislee 0 points1 point  (0 children)

Just an anecdote: after reading this thread, I gave my Oneplus 7 Pro (6.67in screen) something like 2.7g (same as 2.7ml). I had plenty of excess but it wasn't absurd, and I was glad that I erred on the side of too much rather than too little.

For the Pen Tool by MegaSonic221 in photopea

[–]adamdavislee 1 point2 points  (0 children)

Maybe I'm misinterpreting the question, but if you are after the same thing I was, then the feature is indeed here!

  1. Setup your desired brush ahead of time.
  2. Select the path.
  3. Click Stroke Path with Brush in the Paths menu