News for hackers. Stuff that matters.

_54qb

Re:Things I Was Wrong About: Types on Monday September 28, 2020 @08:10AM (#24615730)
I still can feel very lost when refactoring a complex clojure system as opposed to something like Rust, because you have very little information about all the places in your codebase where a certain assumption was made.

You can go crazy and spec everything, in fact that can help, but:

- In practise, nobody does it

- Specs come with no guarantees. They could even be wrong.

- The official implementation stubbornly insists on not checking return types, so half of your annotation may just be glorified documentation (although you can use third party libs like orchestra)

Just imagine: Add a new required field to a spec, and get a convenient list of source code locations that you need to review. That's the promise of a statically checked system. It's not a silver bullet, but not having this leads to what I like calling "refactor anxiety" (i.e.: did I handle all cases?)

I still love clojure no matter what. I think in practise you can express so much, so elegantly, and with far less code, that your project size is always sorta manageable.

Re:First Impressions of GitHub Codespaces on Tuesday September 01, 2020 @05:13AM (#24339836)
While impressive technology, I still get that eerie feeling of my computer's ownership being slowly taken away from me. The problem is not Github codespaces offering us an alternative to traditional dev environments, the problem may be 10 years from now, when someone says: "All the coding is done on the web nowadays, why should we allow users to install compilers and dev tools on their machine? They may use those for hacking and compromising the security of our systems. They may hurt themselves in the process and sue us! Better not take risks". I'm afraid to go into a future where this is normal...
Re:Ask HN: Dark mode for HN please? on Saturday May 16, 2020 @09:21AM (#23203170)
IMO it's two separate things. Both useful on their own right.

High contrast is very useful for people with visual difficulties, but might even be counter-productive for certain types of eye strain.

I'm under the impression people asking for dark mode are looking for something that will emit less light off their screens, not necessarily make it look nore contrast-y, and the two are more often than not opposite.

Re:Be Nice and Write Stable Code on Tuesday July 24, 2018 @03:16AM (#17598772)
A very interesting talk by Rich Hikey (creator of Clojure) on the topic: https://m.youtube.com/watch?v=oyLBGkS5ICk

To summarize, any change that offers more (as in, more fields in the output) and/or requires less (more of the original parameters made optional) is non-breaking.

Edit: Of course, this is all under the assumption that the semantics of methods should never change. Instead of changing semantics, he proposes to just create a new method with a new name.

Re:Native Clojure with GraalVM on Sunday April 29, 2018 @08:36AM (#16951748)
However, I don't see a use case for GraalVM in long-lived server applications. For that, regular JVM clojure will do just fine.

On the other hand, using eval is almost never necessary in small standalone utilities.