frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Piqe – AI marketing co-founder that handles community engagement while you code

https://getpiqe.com
1•tsjose•49s ago•1 comments

Linux Page Faults, MMAP, and userfaultfd for faster VM restores

https://www.shayon.dev/post/2026/65/linux-page-faults-mmap-and-userfaultfd/
1•shayonj•1m ago•0 comments

The State Policy Network

https://www.sourcewatch.org/index.php?title=State_Policy_Network
1•jamesgill•6m ago•0 comments

Locked Up but Not Locked Out: iOS App Pentesting Without Jailbreak

https://www.anvilsecure.com/blog/locked-up-but-not-locked-out-ios-app-pentesting-without-jailbrea...
1•depierre•10m ago•0 comments

AI Adoption Rapidly Growing in Public Sector

https://www.gallup.com/workplace/702983/adoption-rapidly-growing-public-sector.aspx
1•hn_acker•11m ago•0 comments

GitHome: Local Git repository management at scale

https://crates.io/crates/githome
1•agentk9•13m ago•0 comments

Patrons of Journalism

https://www.hamiltonnolan.com/p/patrons-of-journalism
2•thm•15m ago•0 comments

TTL Exceeded – In Memory of FX

https://phenoelit.de/fx.html
2•_tk_•16m ago•0 comments

50 Years of Thinking Different

https://www.apple.com/50-years-of-thinking-different/
2•mndren•17m ago•0 comments

Show HN: I built a heartbeat and uptime monitoring for developers

https://pulsemon.dev/
3•ramgale•18m ago•0 comments

Sunsetting Jazzband

https://jazzband.co/news/2026/03/14/sunsetting-jazzband
4•mooreds•18m ago•0 comments

Can you see Earth's shadow?

https://www.livescience.com/space/can-you-see-earths-shadow
2•Brajeshwar•19m ago•0 comments

My Claude Settings

https://twitter.com/JoshuaBaer/status/2032666249465942208
2•tosh•21m ago•0 comments

Knowing What Not to Animate

https://micro.bossadizenith.me/writing/animations
3•handfuloflight•22m ago•0 comments

Show HN: I made a tool to pixelate image

https://www.pixelateimage.co/
2•atharvtathe•22m ago•1 comments

The Pentagon Went to War with Anthropic. What's Really at Stake?

https://www.newyorker.com/news/annals-of-inquiry/the-pentagon-went-to-war-with-anthropic-whats-re...
2•mitchbob•24m ago•1 comments

Show HN: VibeNVR – Open-source self-hosted NVR with REST API and Homepage widget

https://github.com/spupuz/VibeNVR
2•spupuz•24m ago•0 comments

Team Human

https://onTeamHuman.com
1•andytratt•26m ago•0 comments

North Korea: secretive nation lands in spotlight at Women's Asian Cup

https://www.theguardian.com/sport/2026/feb/23/north-korea-womens-national-football-team-asian-cup...
1•PaulHoule•26m ago•0 comments

The ArXiv is separating from Cornell University, and is hiring a CEO for 300k/yr

https://mathstodon.xyz/@johncarlosbaez/116223948891539024
4•binsquare•26m ago•2 comments

AVL Tree

https://en.wikipedia.org/wiki/AVL_tree
1•Brysonbw•28m ago•0 comments

At a CNY class, locally-developed tech lets students hear earthworm brain waves

https://www.localsyr.com/education/at-a-central-new-york-classroom-locally-developed-tech-lets-st...
1•rolph•29m ago•0 comments

Due Processing: As Lawyers Go All-In on AI, the Courts Play Catch-Up

https://www.rstreet.org/commentary/due-processing-as-lawyers-go-all-in-on-ai-the-courts-play-catc...
1•hn_acker•29m ago•0 comments

The United States of Eugenics

https://conversationalist.org/2025/04/17/united-states-america-eugenics-politics-policy-race-scie...
5•jamesgill•31m ago•0 comments

AI Gets Wrong Woman Jailed for Six Months, Life Ruined

https://www.youtube.com/watch?v=mzS7dmCUzcQ
49•vaxman•34m ago•14 comments

An enormous brain in a jar? NASA's best space telescope saw something real weird

https://www.skyatnightmagazine.com/news/exposed-cranium-nebula-webb
1•rolph•35m ago•0 comments

CachyOS Is Now the Most Popular Desktop Linux Distro on ProtonDB

https://boilingsteam.com/cachy-os-is-now-the-most-popular-distro-on-proton-db/
1•ekianjo•36m ago•0 comments

MacBook Neo Teardown – Is This Apple's Repairable Era?

https://www.youtube.com/watch?v=Sb9YclnJIYM
1•G3rn0ti•36m ago•1 comments

CozoDB: Hippocampus for AI, with Embedded Datalog

https://www.cozodb.org/
1•measurablefunc•36m ago•0 comments

An audio reader for your X/Twitter feed(

https://xeder-app.web.app/
1•sanjastepa•37m ago•1 comments
Open in hackernews

LSP client in Clojure in 200 lines of code

https://vlaaad.github.io/lsp-client-in-200-lines-of-code
164•vlaaad•10mo ago

Comments

whalesalad•10mo ago
This is the most Java-y Clojure I’ve probably ever read. Just use Java? It’s so verbose and complex for what it is doing. Breaking this down into smaller functions and using core.async would make it even more succinct.

Just want to emphasize this because clojure is indeed a small, lesser known language that has a hard enough time attracting users. This is not what anyone would consider an idiomatic example of using clojure.

roenxi•10mo ago
Would it be 200 lines of Java? It'd be 200 lines of just for the boilerplate. It isn't really a selling point of Clojure because it is subjective, but low-syntax high-terseness look of the code is in itself a reward for using the language.

And there isn't anything especially wrong with sticking to Java primitives if someone is comfortable with them. They work fine for Java programmers. The dude doesn't need to learn a new async library to write an LSP client if he doesn't feel like it. Code works, its easy to read, easy to understand and modify.

koito17•10mo ago
Line count is not very useful to compare without the context of standard library size, third-party dependencies, etc. The code in TFA depends[1] on a JSON library[2] that is about a thousand lines of code (excluding tests) wrapping a Java library for JSON decoding.

Then there's other things to consider, like the fact that this LSP client, while succinct, pays not only the cost of loading Jackson, but also the cost of loading clojure.core, which is quite non-trivial[3]. Startup time for LSP servers and clients definitely matters to some, considering that e.g. even clojure-lsp recommends running native executables over JAR files[4]. Can't find documentation proving it's for quick startup, but it's a plausible rationale for their recommendation of a binary over a JAR.

Note: I have used Clojure professionally and in hobby projects. I think it's nice that one can interactively develop a minimal LSP client and the resulting amount of work is roughly 200 lines of code. I say "minimal" because it's unclear how this client deals with offsets reported by LSP servers, which are all given as offsets in a UTF-16 encoded string. In any case, I still think advertising "LSP client in 200 lines of code" hides valuable information regarding functionality, implementation, "actual" code size, and trade-offs made in the choice of technology stack.

[1] https://github.com/vlaaad/lsp-clj-client/blob/a567e66/deps.e...

[2] https://github.com/metosin/jsonista/blob/c8f2b62/project.clj...

[3] https://clojure-goes-fast.com/blog/clojures-slow-start/#cloj...

[4] https://clojure-lsp.io/installation/#embedded-jar-legacy-exe...

pron•10mo ago
Between records and compact classes [1] Java's boilerplate isn't what it once was.

[1]: https://openjdk.org/jeps/512

newlisp•10mo ago
It's idiomatic "low-level" Clojure, though. Not everything is a happy place where you're just manipulating maps and vectors like in most examples.
0x1ceb00da•10mo ago
> lesser known language that has a hard enough time attracting users

For very good reasons.

dig1•10mo ago
I don't see why this wouldn't be considered idiomatic clojure code; it makes proper use of all the facilities provided by the language and the main intention of this code is to follow the article. Additionally, the clojure core team often encourages not to shy away from using java code directly, as this approach strikes a good balance between performance and language expressivity.

> It’s so verbose and complex for what it is doing. ... and using core.async

I think this code is actually quite straightforward and easy for a clojure developer to understand. In fact, using core.async in this case would be overkill and could complicate things further.

daveliepmann•10mo ago
This looks like the other completely normal, idiomatic Clojure programs I've seen which manipulate a StringBuilder. And as Clojurians go I'm far to the succinctness/concision-preferring end of the spectrum.

I'm curious to see your core.async-based version :)

askonomm•10mo ago
Holy crap is this unreadable or what (notably the lsp-base fn). There's a reason why in most Clojure companies I've worked at we try to make as small functions as possible, because otherwise it very very quickly becomes an unreadable mess, and you write code after all for humans to read, because if you didn't, you might as well just write binary. But, I'm not surprised many people don't want to get into Clojure or Lisps in general, because it takes a boatload of conventions and active discipline to make it a good experience.
slifin•10mo ago
To me something unreadable is code that I cannot statically make any assertions about the runtime behaviour of the code

This function you're complaining about looks like 2 virtual threads doing program input reading and output writing for the LSP client given some ArrayBlockingQueues in about 25-30 lines

If I wanted the complete story I could use Clojure's inbuilt test runner to slip some ArrayBlockingQueues in there and run it under record with Flowstorm

Then leisurely seek through the entire state of the program, to get the play-by-play of how this works

There are so many good design choices in this language and a good 30% of colleagues I run into are not even doing the basics of like running a REPL, I think some people just need to clock in with a decade of C# or PHP or TS or JS or Python or whatever to get a taste of a language with next to no inbuilt immutability, statements instead of expressions, no reload-ability in the language semantics and just crapshot debuggers that run in lockstep with the program execution