6,186 karma · joined Apr 18, 2010 (16y ago) · 918 submissions
https://danieljanus.pl
meet.hn/city/52.2319581,21.0067249/Warsaw
comment 3y ago · link · parent
comment 3y ago · link · parent
> 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
<my parents’ names> <town name>
where the town has circa 3K inhabitants.
comment 3y ago · link · parent
246.
Berkshire Hathaway Inc(berkshirehathaway.com ↗)
1 points · by nathell · 3y ago · discuss
comment 3y ago · link · parent
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
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:
comment 3y ago · link · parent
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
Example: https://danieljanus.pl/autosummarized-hn/previously/2023-01-...
comment 3y ago · link · parent
comment 3y ago · link · parent
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
Spec: https://github.com/edn-format/edn
Example (linter config): https://github.com/clj-kondo/clj-kondo/blob/634294183a0aa2ca...
comment 3y ago · link · parent
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
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
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