HNHacker News
TopNewBestAskShowJobs

xlii

3,506 karma · joined August 23, 2017

https://xlii.space

e-mail me: alexander (at) kaminski.se

submissionscomments
xlii··on Zig and the design choices within
For me, personally, it is nice because it's bare metal where I want it and not bare metal when I don't.

C is very basic and (especially when you stick to something like C99), can be very tedious to write. In C, if I hope for smarter things I need to write them by hand; usually there are no ways of achieving some goals without just crunching out the code. Zig preserves C qualities but also gives some extra tools that are completely optional and makes it less tedious than C.

I believe that Zig's popularity is also caused by general tendency of some people. Some prefer to fix a segfault than spend half a day refactoring something that was supposed to be easy but is causing half of the codebase to be rewritten.

(Oh, and Zig is also an escape hatch to easy CGo :))

xlii··on Shake Build System
Yes, I read that, but I wouldn't be surprised if dropping Haskell dependency was implementation goal. It was probably easier to rewrite and use Starlark than convince big groups of engineer to learn Haskell ;)

In this context Meta using Rust for Buck2 makes a lot of sense.

xlii··on Shake Build System
I'm looking for something that'd allow me to build N versions of Emacs + run tests on those (isolated). Buck2 is promising, but I'm not a huge fan of Starlark/Python.

Shake seems interesting, any active happy/unhappy users here?

xlii··on Who needs Graphviz when you can build it yourself?
The Piano chart on prototype is an example, that's for discussing piano keys and chords on basic level.

I already implemented (in other prototype) diagram for event calculus (i.e. consideration of event stream through addition of new events like rollback, modify etc.)

On paper I have designs for point-in-time designs, scenario divergence and also some fun ones like a bingo card template. Diagrams are one thing, but there's also a design for collaboration and play-replay capabilities.

That being said, that's only a design right now with a simple prototype on the website :)

xlii··on Who needs Graphviz when you can build it yourself?
This is a concept I'm working around with Microdiagram (microdiagram.com) prototype.

i.e. having a general purpose diagram/graph layout is hellishly difficult, but most of the diagrams/charts follow much simpler rules, thus it's much easier to have N languages, each for 1 type of diagram, than 1 language for N types of diagrams.

xlii··on Show HN: MicroDiagram Prototype
Even though it's silent here I have a development writeup in case someone is interested :)

https://xlii.space/eng/microdiagram-prototype/

xlii··on Using Emacs as a TUI
I didn't know about kkp package. Need to try it out - especially on MacOS there are still performance issues (that I work on) so having workable terminal with all the keybinds available would be helpful.

By the way, recently Kitty introduced variable sized text, which probably could be integrated in Emacs, too, to have my favorite feature - font resize per frame :)

xlii··on Three ways formally verified code can go wrong in practice
That's true, just as I cannot possibly measure car speed given innate measuring error which is not a defense from getting a speeding ticket.

Formal proving isn't about getting to "my model is reality" but having step above mere imagination or educated guess. That's why it's possible to model paradoxical models. Given N systems they all can fail at the same time and there's nothing that can be done to guarantee message RECV+ACK. So at some point there's invariant saying "ok, we say that 3 out of 5 systems will always work". If you break invariant all hell is loose but at that point many weird stuff might happen.

Usually when one needs to think about message passing in a way like [0] formal proving can save lives (or bottoms, depending on the context).

[0]: https://xlii.space/eng/network-scenarios/

xlii··on Three ways formally verified code can go wrong in practice
There's this place for formal proving that most people won't get to and think it's stupid. I was such person some time ago, but then started to work on the system that: Required 2-3 months for implementation, had no room for error, made processing mistakes cost in thousands of Euros (even silly things). Than you start to wonder "hmmm... how can I use something better than just good practices and judgement? How can I _prove_ design A works".

And usually there are tangible problems to avoid: Ensuring that money won't get lost in transaction. Making sure that legal paperwork will be delivered or returned on time. Or that CSV file costing arm and leg for a single row won't have more rows than necessary. Many of these problems are borderline paradoxical. It's known that (as with Two Generals) there are no complete solutions. Usually it's like playing a catch with reality. A game that goes "what happens if we duplicate money mid-flight?" - "which system is source of truth in case of fraud", "do we rather risk false negative or accept MIA state" etc.

Sure, it's fun to model a crossroad with streetlights and a chicken just for kicks, but the main "why?" for formal proving is having "this design is good because I've seen the proof of it" moment.

But what kind of questions are asked is just as important. I can bet asbestos met all the standards it was checked against :)

xlii··on MAML – A new configuration language
Disclaimer: I'm a Cuelang[0] fanboy

Do yourself a favor and use Cuelang instead.

Word of warning though: documentation isn't the best and takes some time to get, but once it clicks...

[0]: https://cuelang.org

xlii··on Vibing a non-trivial Ghostty feature
Today, for the first time ever, I had to kill a terminal with all the tabs because it became unresponsive.

Welp, that explains it. I haven't changed terminal in a while anyway...

xlii··on One-man campaign ravages EU 'Chat Control' bill
I'm not as fiercy minded as Joachim, but this article is manipulative as hell:

   - "spam campaign"
   - "trying to pass a European bill aimed at stopping CSAM"
   - "a bill _seen by privacy activists_ as breaking encryption and leading to mass surveillance" (emphasis mine).
The journalism at its worst. I don't think I ever click on anything politico.eu related.
xlii··on Talent Is Alignment
That's what my music teacher told me. I agree but then I have that irresistible pull for "do more, complicate, extend". And with change of seasons my fingers became stiff which is annoying.
xlii··on Talent Is Alignment
Seems that the researchers didn't popularize this part good enough. I have some suspicions why this might happen, but it's already into complex consideration area. I'm thinking about something that's called "limited working memory".

It also impacts on mappers vs packers phenomenon and might by linked with alexithymia (which sounds rare but is quite common - especially for men).

xlii··on Talent Is Alignment
That's correct, it's just reality is too complicated to put in simple numbers.

I play 1-3 hours daily per usual, but had 5-10h sessions sometimes. Once my family left and I sat 18h hours while practicing sounds.

And yes, I play everyday, as mentioned I have other devices so on vacations/trips I always have something with me. Usually small synthesizer. It's not a full piano, but allows me to explore chords, check various finger positions etc.

xlii··on Talent Is Alignment
I discussed this with doctors and I was told that visual and audible aphantasia exist, but visual one is much more known. It seems I have both, which explains why I never could learn in classical way through repetition, hearing etc.

However I need to also say that after this year I sometimes can humm in my mind simple tunes like "Old McDonald", "Twinkle Twinkle" or that Looney Tunes piano melody that was always portrayed during rigging the piano, so it might not be hopeless.

xlii··on Talent Is Alignment
This is often discussed in Psychology (https://en.wikipedia.org/wiki/Fake_it_till_you_make_it#In_ps...)

Regarding gym beast - it has few effects: - you eat bigger portions - you go to gym more often - you try harder (i.e. bigger weights etc.)

I can atest that this works _for me_, but using confidence to reach a goal is quite common.

xlii··on Apple Photos app corrupts images
I feel it's OM camera issue.

I've been importing raws for years from Sony and earlier from Pentax and didn't experience it.

In fact searching for "OM image corruption" shows bunch of results not related to Apple Photo.

My guess is that OM has buggy SD driver which starts deletion before actual read finished.

xlii··on I feel Apple has lost its alignment with me and other long-time customers
Living in Poland I cannot agree more.

Almost no features from last 2 years in available here. Not even Genmoji toys (because iPhone language has to be set to English). Siri still doesn't support Polish and it cannot even discern between Polish and English - it cannot read text messages at all, even though it's possible if done manually, still worthless in CarPlay/airpods.

And come on, this is low hanging branch. Local models can do speech to text easily and most of the voice fronts can keep fluid conversation.

Lately I've been considering Linux laptop for work (since I live in Emacs anyway and I still yearn for the trackpoint) and just skip over generations iPhone/iPad generations until I'm ready to migrate my family's photo library elsewhere.

I can understand lack of novelty (outside of revolting, in my opinion, new look), but I'm really starting to feel like a completely neglected customer.

xlii··on Type checking is a symptom, not a solution
And I'll recommend Turing Complete game on Steam if someone wants to have full journey.

It's a puzzle focused on creating electronic components (with the goal of creating a running computer). Since it's more educational than competitive it's rather smooth journey.

But in the end there's not only assembler but there are actual electrons in the system that take time to reach CPU. It took me 2-3 days to finish during Holiday period and it made me much more aware of what is happening under the hood.

xlii··on Neovim Pack
Seems like a plausible idea but working with clocks my first question would be "whose clock is it". Is it repository defined clock? My clock? Git remote’s clock?

AFAIK this can be used for hashes, but friends don’t let friends use clocks in software developments (unless it’s last resort).

xlii··on Go is still not good
I don't share experience about not being suitable about bare metal. But I do have experience with high level languages doing similar things through "innovative" thinking. I've seen int overflows in Rust. I've seen libraries that waited for UDP packet to be rebroadcasted before sending another implemented in Elixir.

No Turing complete language will ever prevent people from being idiots.

It's not only programming language API and syntax. It's a conceptual complexity, which Go has very low. It's a remodeling difficulty which Rust has very high. It's implicit behavior that you get from high stack of JS/TS libraries stitched together. It's accessibility of tooling, size of the ecosystem and availability of APIs. And Golang crosses many of those checkboxes.

All the examples you've shown in your article were "huh? isn't this obvious?" to me. With your experience in C I have no idea you why you don't want to reuse same allocation multiple times and instead keeping all of them separately while reserving allocation space for possibly less than you need.

Even if you'd assume all of this should be on stack you still would crash or bleed memory through implicit allocations that exit the stack.

Add 200 of goroutines and how does that (pun intended) stack?

Is fixing those perceived footguns really a missed opportunity? Go is getting stronger every year and while it's hated by some (and I get it, some people like Rust approach better it's _fine_) it's used more and more as a mature and stable language.

Many applications don't even worry about GC. And if you're developing some critical application, pair it with Zig and enjoy cross-compilation sweetness with as bare metal as possible with all the pipes that are needed.

xlii··on Go is still not good
I don't agree with most of the article but I believe I know where it comes from.

Golang's biggest shortcoming is the fact that it touches bare metal isn't visible clearly enough. It provides many high level features which makes this ambience of "we got you" but fails on delivering proper education to its users that they are going to have a dirt on their hands.

Take a slice for example: even in naming it means "part of" but in reality it's closer to "box full of pointers" what happens when you modify pointer+1? Or "two types of nil"; there is a difference between having two bytes (simplification), one of struct type and the other of address to that struct and having just a NULL - same as knowing that house doesn't exist and being confident that house exists and saying it's in the middle of the volcano beneath the ocean.

The Foo99 critique is another example. If you'd want to have not 99 loop but 10 billion loops each with mere 10 bytes you'd need 100GiB of memory just to exit it. If you'd reuse the address block you'd only use... 10 bytes.

I also recommend trying to implement lexical scope defer in C and putting them in threads. That's a big bottle of fun.

I think that it ultimately boils down to what kind of engineer one wants to be. I don't like hand holding and rather be left on my own with a rain of unit tests following my code so Go, Zig, C (from low level Languages) just works for me. Some prefer Rust or high level abstractions. That's also fine.

But IMO poking at Go that it doesn't hide abstractions is like making fun of football of being child's play because not only it doesn't have horses but also has players using legs instead of mallets.

xlii··on Go is still not good
After spending some time in lower level languages Go IMO makes much more sense. Your example:

First one - you have an address to a struct, you pass it, all good.

Second case: you set address of struct to "nil". What is nil? It's an address like anything else. Maybe it's 0x000000 or something else. At this point from memory perspective it exists, but OS will prevent you from touching anything that NULL pointer allows you to touch.

Because you don't touch ANYTHING nothing fails. It's like a deadly poison in a box you don't open.

Third example id the same as second one. You have a IMessage but it points to NULL (instead NULL pointing to deadly poison).

And in fourth, you finally open the box.

Is it magic knowledge? I don't think so, but I'm also not surprised about how you can modify data through slice passing.

IMO the biggest Go shortcoming is selling itself as a high level language, while it touches more bare metal that people are used to touch.

xlii··on ADHD drug treatment and risk of negative events and outcomes
One thing to keep in mind that methylphenidate is contextual and metabolic related.

Hard focus work could make it work shorter, but also some have metabolism so quick that they burn through medication. That's controlled by doctors so no worries, but I know people who take IR forms every 2 hours, and for those XR forms don't work at all (as it's like 2 complete cycles with all side effects).

xlii··on Flipper Zero dark web firmware bypasses rolling code security
If someone wants to stole the car they will steal it.

Stealing a car is not the same as stealing a candy. In Europe all parts are marked so it takes significant effort to sell or modify such cars. It's not like people steal them and then sell it at yard sales.

As for the "beaters": shortly after Russian invasion on Ukraine plenty of cars were stolen in Poland. Not the expensive kind but usually 10-30 years old cars with big and reliable engines (V6, V8). I know 6 people that had Jeeps Grand Cherokee stolen (different generations).

My uncle wanted to renovate Isuzu Rodeo with completely rusty frame but V6 engine of a value of like 300€ and it was stolen too.

And it happened ~1 month after it started.

xlii··on Ask HN: Have you ever regretted open-sourcing something?
Ehh.

When people reminisce about "the old internet" they tend to forget how hostile it was.

Being devils advocate it wasn't common for young people to engage in the activity but harsh and unfair critic was happening often.

It still exists today, but in much smaller scale than back then.

xlii··on The Big Oops in type systems: This problem extends to FP as well
I agree with the article. I was trying to statically type event calculus in OCaml and didn't found any sustainable way to implement it.

In order to even get a piece of system tracking the amount of boilerplate was enormous.

It won't help in delivering complex logic and might even be a costly mistake. E.g. if exploratory attempt costs 3 days of refactoring to implement and then it uncovers unexpected behavior those 3 days on type adjustment is just time lost.

Today seeing many complicated systems in both non-static typed and strongly typed languages I have opinion that's only matter of preference. Dragons live everywhere.

xlii··on Why leather is best motorcycle protection [video]
Isn't it true for every occupation that deals with the falloff of any activity?

E.g. https://www.lemonde.fr/en/international/article/2024/01/19/s...

xlii··on Our Farewell from Google Play
As a counter point - I just downloaded Canabalt from Apple Store, that wasn't updated in 7 years and it works just fine. The oldest app I found (that still had App page) are 10 years old without updates and I see many released in 2011 that I can download but doesn't have app page anymore.

My point is that one cannot make an argument over bad implementation. E.g. Sony is known for pulling down games or even stores for older devices whereas Steam allow people to download games bought decades ago.

← PreviousPage 7 of 22Next →