frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Developing a Space Flight Simulator in Clojure

https://www.wedesoft.de/software/2025/09/05/clojure-game/
64•todsacerdoti•2h ago

Comments

MathMonkeyMan•2h ago
Guile has [multi-methods][1] and [fast hash maps][2], but not yet [dynamic vectors][3].

Clojure's data structures are easier to use, though.

[1]: https://www.gnu.org/software/guile/manual/html_node/Methods-...

[2]: https://www.gnu.org/software/guile/manual/html_node/Hash-Tab...

[3]: https://lists.gnu.org/archive/html/guile-devel/2022-01/msg00...

exabrial•1h ago
Clojure is such a departure for me, coming from C-Like languages. I have absolutely no idea whats going when looking at the code.
rufusthedogwoof•1h ago
it's not code it's data. :) -macro
roenxi•55m ago
Fun fact: the big difference isn't the syntax. Lisps only go from foo(bar baz) to (foo bar baz) which is a change but not really much of one. The change is actually the immutable and high performance basic data structures. Clojure can do something that something like C can't do - cheaply create a copy of something with a small change. That leads to a completely different preferred code style in the Clojure community that is a big departure from C-like languages which make heavy use of variables. The code is doing something practically different from what a C-like language can ergonomically handle.
JoshCole•41m ago
Lisps (like Clojure) treat code as data (lists), so you write: `(if x (y) (z))` instead of Python’s `y() if x else z()`. So the code is more concise, but does less to walk a novice through it.

This gains a huge advantage, which allows even more concision: all code is data, so its easy to transform the code.

In Clojure if you want to add support for unless, a thing like if, but evaluating the opposite way you could do this: `(defmacro unless [p a b] `(if (not ~p) ~a ~b))`. Obviously if you wanted to do the same thing in Python you would in practice do `z() if x else y()`. However, you would do it that way because Python isn't as powerful a language. To actually do the same thing in Python you would need to...

1. Add __future__ support.

2. Update the Python language grammar.

3. Add a new AST type.

4. Add a new pass stage to the compiler.

5. Add a python library to integrate with this so you could use it.

Then you could do something like:

    from __future__ import macros

    defmacro unless(pred, then: block, else_: block = []):
        return q[
            if not u(pred):
                u*(then)
            else:
                u*(else_)
        ]

So in the trivial case its just hundreds of lines harder plus requires massive coordination with other people to accomplish the same feat.

This sort of, wow, it takes hundreds or thousands of lines more to accomplish the same thing outside of Lisp as it does to accomplish it within Lisp shows up quite often; consider something like chaining. People write entire libraries to handle function chaining nicely. `a.b().c().d().map(f).map(g)`. Very pretty. Hundreds of lines to enable it, maybe thousands, because it does not come by default in the language.

But in Lisp? In Clojure? Just change the languages usual rules, threading operator and now chaining is omnipresent: `(->> a b c d e (map f) (map g))`. Same code, no need to write wrapper libraries to enable it.

rookderby•1h ago
Beautiful visuals. I'd like something to dock with.
nodesocket•1h ago
Wow, this is impressive not using standard gaming framework like Unity or Unreal.
adastra22•17m ago
I mean it is pretty cool, but do people not roll their own graphics engines anymore? When was in to hobby game dev back in 2000 or so, we all wrote our own systems.
shaunxcode•14m ago
This is awesome! Very nice example of malli in practice!

A lightweight react playgound powered by esm.sh/TSX

https://sandbox.beyond.is/
1•forhappy•33s ago•0 comments

Leptos

https://leptos.dev/
2•Bogdanp•7m ago•0 comments

Ohio senator introduces 25% tax on companies that outsource jobs overseas

https://www.foxnews.com/politics/gop-senator-drops-hammer-companies-shipping-jobs-overseas-crucia...
2•TMWNN•10m ago•0 comments

Show HN: I developed a free mobile web app to scan chess board and give analysis

http://snap-chess.com
1•coolwulf•13m ago•0 comments

Show HN: Inception: Automatic Rust Trait Implementation by Induction

https://github.com/nicksenger/Inception
1•bietroi•16m ago•0 comments

Thoughts on Evals

https://www.raindrop.ai/blog/thoughts-on-evals/
2•vinhnx•17m ago•0 comments

Be the LetsEncrypt in your homelab with step-ca

https://jan.wildeboer.net/2025/07/letsencrypt-homelab-stepca/
1•ericdiao•19m ago•0 comments

Mark Zuckerberg Sues Mark Zuckerberg

https://techcrunch.com/2025/09/04/mark-zuckerberg-sues-mark-zuckerberg/
2•m463•20m ago•0 comments

Please check my Hacker News account biography for a way to donate

1•ciaisdeepstate•20m ago•1 comments

Ubuntu Failed to download Linux-firmware

https://discourse.ubuntu.com/t/failed-to-download-issues/66698
1•ericdiao•22m ago•0 comments

Air Pollution Can Drive Devastating Forms of Dementia, Research Suggests

https://www.theguardian.com/environment/2025/sep/04/fine-particulate-air-pollution-trigger-forms-...
2•m463•22m ago•0 comments

Ask Yi – I Ching reading, free online, tailored to your question

https://askyi.app/
1•buildsbyray•26m ago•1 comments

How to Blow Up a Planet

https://www.nybooks.com/articles/2025/09/25/how-to-blow-up-a-planet-abundance-klein-thompson/
1•mitchbob•37m ago•1 comments

Show HN: Random Meme Generator – A Fun, Lightweight Web App

https://my-memes-81phxmvun-r123singhs-projects.vercel.app/
1•rocky101•40m ago•0 comments

Chemical Breakthrough Could Solve Our Plastic Waste Problem

https://oilprice.com/Energy/Energy-General/Chemical-Breakthrough-Could-Solve-Our-Plastic-Waste-Pr...
1•walterbell•44m ago•0 comments

GOP Cries Censorship Over Spam Filters That Work

https://krebsonsecurity.com/2025/09/gop-cries-censorship-over-spam-filters-that-work/
81•todsacerdoti•45m ago•16 comments

Silksong brings Steam to its knees,attracts more day1 players than BF6 open beta

https://www.techradar.com/gaming/despite-bringing-steam-to-its-knees-silksong-attracted-more-day-...
1•croes•59m ago•0 comments

Analog vs. Digital: The Race Is on to Simulate Our Quantum Universe

https://www.quantamagazine.org/analog-vs-digital-the-race-is-on-to-simulate-our-quantum-universe-...
2•nsoonhui•1h ago•0 comments

Exclusive and adaptive therapeutic music for psychedelic therapy

https://wavepaths.com/
1•fcpguru•1h ago•0 comments

Zero-Click Remote Code Execution: Exploiting MCP and Agentic IDEs

https://www.lakera.ai/blog/zero-click-remote-code-execution-exploiting-mcp-agentic-ides
2•k5hp•1h ago•0 comments

Delete X Tweets – Remove Twitter Posts

https://chromewebstore.google.com/detail/delete-x-tweets-remove-tw/hlnlgomflnboogkaampmdhiaifjkfcgc
2•qwikhost•1h ago•1 comments

Why Forums Died (and what makes them thrive)

https://3.st/2025/09/06/why-forums-died-and-what-makes-them-thrive/
4•qwm•1h ago•0 comments

Ask HN: What are some great use cases for Google's new NanoBanana?

1•miletus•1h ago•1 comments

MonoGo – .NET 8 C# 2D game engine build ontop of MonoGame

https://github.com/MonoGo-Engine/MonoGo
1•vyrotek•1h ago•0 comments

Things Every Hacker Once Knew (2017)

http://www.catb.org/~esr/faqs/things-every-hacker-once-knew/
2•colinprince•1h ago•0 comments

How Apple's face ID works [video]

https://www.youtube.com/watch?v=MLtgsv4RyPs
2•mgh2•1h ago•0 comments

AI and the Rise of Techno-Fascism in the United States

https://www.theatlantic.com/podcasts/archive/2025/09/ai-and-the-fight-between-democracy-and-autoc...
14•breve•1h ago•0 comments

Transforming access to the brain, without drilling through the skull

https://www.vonova.io/
2•fcpguru•1h ago•1 comments

Physicists create a time crystal that humans can see

https://phys.org/news/2025-09-physicists-kind-crystal-humans.html
3•geox•1h ago•0 comments

At least 475 workers detained in major ICE raid at US Hyundai factory

https://www.theguardian.com/us-news/2025/sep/05/immigration-ice-raid-hyundai-georgia
8•wslh•1h ago•1 comments