HNHacker News
TopNewBestAskShowJobs

nathell

6,179 karma · joined April 18, 2010

Just another Clojure hacker.

https://danieljanus.pl

meet.hn/city/52.2319581,21.0067249/Warsaw

submissionscomments
nathell··on Sadist – An old DOS game from 1998
The sequel, Sadist 2 (2000), has also been open-sourced. It shares many things with its predecessor, but, according to the author, the code is much more interesting. :)

https://github.com/gadzombie/sadist2

nathell··on Toaster: Pure CSS 3D Editor
Reminds me of this battle toaster by a friend: https://3dtotal.com/tutorials/t/making-of-battle-toaster-dan...
nathell··on Sadist – An old DOS game from 1998
It is indeed!
nathell··on Sadist – An old DOS game from 1998
Submitter (but not original author of the game) here.

Sadist (and its sequels) was little-heard of among the Polish gamers of the late 90s and early 2000s, but it did manage to amass something of a cult following. IIRC there was a small but vibrant forum in its heyday, and the game's online fanbook (now read-only) has 700+ entries.

The author, Grzegorz 'GAD' Drozd, was a frequent poster to pl.comp.lang.pascal in its heyday. In addition to Sadist, he also produced many other DOS and Windows freeware games, most of them single-handedly. His site (gadz.pl) is well worth checking out.

nathell··on How did the chess pieces get their names?
Do you have any source for the 90% figure? Some casual players do indeed use the alternative names, but pretty much everyone I know uses „hetman” for the queen. (I’ve even heard the colloquial abbreviation „heć”.) Literature uses the official names exclusively.
nathell··on GNU+Linux laptops with Libreboot preinstalled, based on coreboot
https://www.gnu.org/gnu/incorrect-quotation.html
nathell··on C Strings and my slow descent to madness
> Our last function is strcmp. It looks at two strings and determines whether they are equal to each other or not. If they are it returns 0. If they aren’t it returns 1.

No it doesn’t.

    RETURN VALUES
         The strcmp() and strncmp() functions return an integer greater than, equal
         to, or less than 0, according as the string s1 is greater than, equal to,
         or less than the string s2.  The comparison is done using unsigned
         characters, so that ‘\200’ is greater than ‘\0’.
nathell··on Show HN: Unknown Pleasures, a tiny web experiment with WebGL
„Love Will Tear Us Apart” might not be my favourite Joy Division song (that title goes to „Atmosphere”), but still I’m delighted to find this on HN #1. Splendidly executed. I watched in awe, then smiled at the final „Again” being rendered as a button.
nathell··on Automate your Python project with Makefile (2021)
Make wasn’t designed to be a task runner. It can be used as one, but it doesn’t make (pun not intended) a very good one, and it doesn’t have the best syntax, either.

Make is an artifact updater. Although it’s not its main focus, Peter Miller’s classical paper ‘Recursive Make Considered Harmful’ does a good job of explaining what it is.

One great benefit of make is that it’s present everywhere, so there’s no additional hassle of installing an extra tool. Depending on the project, this hassle-freeness may or may not outweigh make’s relative incomfort as a task runner.

nathell··on A rant on web font licenses
I like Matthew Butterick’s approach. He sells whole families at a time (on a pay-once basis), offers discounts if you get the whole library, and the license is short, to the point, and reasonable: https://mbtype.com/license/
nathell··on React is holding me hostage
I've been mostly using React from ClojureScript, via reagent and re-frame. I've mostly avoided the hype of hooks, except in interop where they've been a pain. And I second the sentiment of Mike Thompson, who says [0]:

> Humans have a cognitive bias: "what is focal is presumed causal".

> Political leaders know this. They like presenting good news themselves because they like to be "seen" as causal of good stuff, but they'll get a press secretary to deliver bad news. Movie directors know how to use this when framing their protagonists within the story.

> Unfortunately, the React team have lost themselves in this bias. They keep trying to make the most focal part of the system (components) also be the causal part. Please stop doing that! It is a mistake. Events are what's causal - they embody the user's intent.

> Just to be clear, I love React. What an utterly brilliant idea and great execution. I'm deeply grateful because, wow!, did it change things. It is just that I preferred React when it was only trying to be the V part of MVC. Everything since has been downhill.

[0]: https://day8.github.io/re-frame/FAQs/LoadOnMount/#why-this-d...

nathell··on Reliability: It’s not great
Came here to say pretty much this. Technical issues come and go; open communication is a core part of the company culture, and builds up trust.
nathell··on What is the minimal possible UK address?
Postcodes in Poland are much less granular than the UK ones, but you can still get by in more rural areas on the assumption of local postmen knowing the people. My parents used to routinely successfully receive letters addressed just

<my parents’ names> <town name>

where the town has circa 3K inhabitants.

nathell··on What is the minimal possible UK address?
Also, Russian post successfully deciphering and delivering a mojibaked address: https://twitter.com/notrevenant/status/993170640625598470
nathell··on I don't like making the best things
Stoicism in general has aged very well. When I read Marcus Aurelius’ Meditations, I was amazed at how relevant the thing still is, even though it’s 1.8K+ years old at this point.
nathell··on Writing JavaScript without a build system
One of my favourite hacks I did recently was in 2020 when soup.io was unexpectedly discontinued with short notice; to promote my scraping framework, Skyscraper, I quickly whipped up a content downloader. It produced an archive of assets, and I also added a rudimentary browser.

The beauty of it was that it was a single static HTML file, copied verbatim to the archive. The only moving part, apart from the actual images/posts/videos, was a file called soup.js, which was just `window.soup=` plus the content metadata as JSON.

I didn’t even bother to have a separate JS file for the actual code, much less a build system. I put the JS right into a `<script>` tag in the HTML. I used ES modules, HyperApp as a minimalistic React/Redux workalike, and mini.css for some sane default styling.

I was amazed at how far I could get with such a rudimentary tooling. 117 SLOCs of HTML+JS, working equally well served from a server and from a local filesystem, complete with pagination, permalinks, and a jump-to-page dialog.

Here it is in action, serving a friend’s soup archive: https://soup.tomash.eu/archive (warning: some content can be touchy and/or NSFW). View source for a glimpse of how it works.

nathell··on Pangram
Marcin Ciura has famously discovered many new Polish pangrams:

https://marcinciura.wordpress.com/2018/06/24/perfect-polish-... https://marcinciura.wordpress.com/2018/12/17/more-perfect-po...

And submitted an IOCCC entry in 2019 on the topic:

https://www.ioccc.org/2019/ciura/hint.html

nathell··on Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data
It is easy enough to wrap libc's qsort() with LD_PRELOAD, sure. The problem is heterogeneity: qsort() is by far not the only sort implementation the machine is running. Even identifying them all might be a daunting task, not to mention figuring out how to wrap them.
nathell··on Show HN: Glidesort, a new stable sort in Rust up to ~4x faster for random data
This got me thinking about sorting.

I wonder how many times per day (or, indeed, per second) my computer does sorting of any kind. I just checked a largish codebase I'm working on, and about 0.12% SLOCs invoke the standard library's sort. But that's just a random codebase. What about the kernel, the browser, the VMs, the graphical subsystem of the OS? Could I capture all these sorts' inputs to generate My Real-Life Sorting Corpus of One Day's Worth of Data? And then compare the performance of different sorting algorithms on that corpus?

I'm pretty sure this kind of research has been done before. Can someone point me towards relevant literature?

nathell··on Wtfdoesthiscompanydo.vercel.app
I used to run Autosummarized HN, which would summarize Twitter submissions as something along the way of: „Twitter has detected that JavaScript is disabled in the browser, and asks the user to enable JavaScript or switch to a supported browser.”

Example: https://danieljanus.pl/autosummarized-hn/previously/2023-01-...

nathell··on Ask HN: Great text based games to play?
Anchorhead! My favourite game of all time.
nathell··on Show HN: Summate.it – Quickly summarize web articles with OpenAI
I guess it boils down to the difference in prompts. Mine is just "Summarize the following article in one sentence: %s\n\n", whereas Summate’s asks for more detail. Also, I’m on text-davinci-002, which tends to produce less verbose output than text-davinci-003.
nathell··on Show HN: Summate.it – Quickly summarize web articles with OpenAI
I did too! See a link elsewhere in this thread.
nathell··on Show HN: Summate.it – Quickly summarize web articles with OpenAI
Related: Autosummarized HN – https://danieljanus.pl/autosummarized-hn/
nathell··on Project Mage is an effort to build a power-user environment in Common Lisp
Me: this task is big, I’m not at all sure whether it’ll take a week or two, let’s better subdivide it into subtasks and estimate each one in turn

This guy: I am pretty sure I can get done in ~5 years

Seriously, though, fingers crossed! I no longer use CL professionally, but it will always have a dedicated spot in my heart. I’ll be keeping a close eye on this.

nathell··on The Yaml document from hell
Sure!

Spec: https://github.com/edn-format/edn

Example (linter config): https://github.com/clj-kondo/clj-kondo/blob/634294183a0aa2ca...

nathell··on The Yaml document from hell
EDN’s my favourite config format.

+ Simple (like JSON)

+ Has comments

+ Extensible

+ Built-in sets, UUIDs & timestamps

+ Well-suited to configuration (cf. Aero)

+ Lispy (well, Clojurey)

- Lispy (well, Clojurey)

- Handwavey specs

- Not widely supported

nathell··on 'Oumuamua: An analysis of the debate regarding the first interstellar visitor
Nitpick: it's ʻOumuamua, not 'Oumuamua. The initial letter is the ʻokina (U+02BB), representing a glottal stop.

https://en.wikipedia.org/wiki/%CA%BBOkina

nathell··on Show HN: URL Snake
My initial interpretation of the title was something that _displays_ the game inside the URL, using Unicode block characters.
nathell··on Aleister Crowley, the Wickedest Climber Ever? (2022)
My favourite Crowley song is “Crowleymass” by Current 93. Adequately quirky.
← PreviousPage 7 of 26Next →