Better HN
topnewbestaskshowjobs
Log inSign up

nathell

6,186 karma · joined Apr 18, 2010 (16y ago) · 918 submissions

Just another Clojure hacker.

https://danieljanus.pl

meet.hn/city/52.2319581,21.0067249/Warsaw

Submissions

comment 3y ago · link · parent

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/

comment 3y ago · link · parent

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...

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Also, Russian post successfully deciphering and delivering a mojibaked address: https://twitter.com/notrevenant/status/993170640625598470

246.

Berkshire Hathaway Inc(berkshirehathaway.com ↗)

1 points · by nathell · 3y ago · discuss

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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?

comment 3y ago · link · parent

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-...

comment 3y ago · link · parent

Anchorhead! My favourite game of all time.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

I did too! See a link elsewhere in this thread.

comment 3y ago · link · parent

Related: Autosummarized HN – https://danieljanus.pl/autosummarized-hn/

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Sure!

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

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

comment 3y ago · link · parent

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

comment 3y ago · link · parent

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

comment 3y ago · link · parent

My initial interpretation of the title was something that _displays_ the game inside the URL, using Unicode block characters.

comment 3y ago · link · parent

My favourite Crowley song is “Crowleymass” by Current 93. Adequately quirky.

comment 3y ago · link · parent

Thanks so much! I’ve sent you an email.

comment 3y ago · link · parent

Hey, OP here. This is great! I’d love to get this into the hands of Adrian (that’s the kiddo’s name).

Unfortunately, my hardware assembly skills are next to zero. Is there any chance to get a pre-assembled prototype? I’d happily pay for the BOM and blog about Adrian’s experience with this.

comment 3y ago · link · parent

I recently blogged about this. In Polish, but Google Translate does a recent job of conveying the story:

https://plblog-danieljanus-pl.translate.goog/2022/12/24/jak-...

266.

Ask HN: Alternatives to Scratch for a blind child?

219 points · by nathell · 3y ago · 67 comments

comment 3y ago · link · parent

I don’t think it should be a Show HN – AFAIK this tag is for one’s own creations.

comment 3y ago · link · parent

I play Polish Scrabble competitively, and IME there’s much more to the game than just memorizing the dictionary. A program that has full knowledge of the dictionary and always plays the highest-scoring word will easily yield to a human.

There’s virtually no strategy, but tactics is of paramount importance. Things like keeping your rack balanced; which one of several similarly-scoring words to play, based on your knowledge of the game state; when and what to exchange, etc. These factors are all at play very much intuitively, and are learnt with practice over the years.

Polish is especially fun to play because it’s highly inflected, meaning that:

- the number of unique words in the dictionary is about one order of magnitude greater than in, say, English or French – it’d be much harder for Nigel Richards to learn them all;

- keeping an eye on certain combinations of letters (that might form an inflective ending) is much more important.

Plus, there’s a small but vibrant community, with its very own history and folklore to be proud of. :)

comment 3y ago · link · parent

It was French, and Nigel Richards is not American but from New Zealand.

comment 3y ago · link · parent

In the same vein, although way outdated: Ruby extensions in D https://tomash.wrug.eu/blog/2009/03/03/rudy-ruby-native-exte...
1
8910
31