HNHacker News
TopNewBestAskShowJobs

bvrmn

855 karma · joined September 17, 2016

submissionscomments
bvrmn··on Ternlight – 7 MB embedding model that runs in browser (WASM)
Demo works quite strangely. For example "how to use typescript with createContext" show only typescript entries on top. Similarity search failed.
bvrmn··on Excessive nil pointer checks in Go
Nice one. gcc/clang are smart enough to get .ok condition statically. I'm very curios how complex an expression could be.
bvrmn··on Excessive nil pointer checks in Go
That's the reason language/compiler should directly support optionality.

You can't fool yourself and have to handle all cases: https://godbolt.org/z/4GqMdPej3

bvrmn··on Excessive nil pointer checks in Go
I like maybe_value dereferences NULL with SIGILL and you have at least a backtrace with exact invalid access position.
bvrmn··on Excessive nil pointer checks in Go
Yes it is.

1) Most of pointers in real apps are non-nullable and it's nice to have enforcement from a compiler.

2) Good compilers verify you actually check nullable (optional) values have a corresponding check. In particular Zig literally forces you to unwrap value, so no unexpected state.

It's a really amazing QoL.

And no, optionality doesn't make type system any harder. Also C lacks alignment enforcement on type level and it's a real footgun which Zig also fixed. Zig has many warts but this part (optionality, alignment and slices) makes a big difference comparing to C without Rust/C++ level of type acrobatics.

> I also once believe that complex type systems are the answer, but over time I realized this is not really true.

It's suboptimal decision, you load your brain with stuff compiler should resolve for you.

Edit: ahah, just noticed your nick. Really appreciate your work on C improvements. Please ignore my yapping :) I literally know nothing comparing to you.

bvrmn··on Excessive nil pointer checks in Go
It's quite a delusional take from Bill. Wow. Using non-nullable (a sane language default) pointers in Zig is liberating experience. And it's still as low level as in C but instead of ship-and-pray you could state your intention with a type system.
bvrmn··on Linux eliminates the strncpy API after six years of work, 360 patches
NULL as a concept is fine. Inability to declare something as non-null is not.

There is a huge gap between developer expectation "it's pointing at something known" and hard reality confirmed by zillions of CVE. That's the reason optionality is prevalent in modern languages and type checkers (python, typescript), nowdays even Java has sane non-nullable types.

bvrmn··on Every Frame Perfect
I'm a happy user of android with animations turned off. It's the only mean to make it somewhat "snappy". IMHO lag is always worse than lack of fancy transient state in input -> UI change context.
bvrmn··on Everything in C is undefined behavior
I really like Zig's approach to UB. Especially alignment is a part of type. And all this wordy builtins for conversions. Starring to it makes you think what you doing wrong with data model it requires now 3 lines of casting expression.
bvrmn··on Modern C++ Programming: Busato
Another book tactically missing memory and ownership design for modern c++ apps. I think there is no more important topic for teaching. There are some slides in advanced sections but it's quite ironic one needs to know about it from the start!! Who owns memory? How to pass it? Move? Borrow? How to communicate it for readers? It's like a tribal knowledge.

Every time I touch enterprise C++ codebase it's a freakshow heavily struggling with memory management.

As reference the material could be good, as study it's very questionable.

bvrmn··on The Zig project's rationale for their anti-AI contribution policy
Just in case, I'm completely fine with the policy as-is. Even more, I'm ok with making no-sense project policies. I have no business to judge how to govern other's projects.
bvrmn··on The Zig project's rationale for their anti-AI contribution policy
I've assessed half a dozen before writing my own with following results:

    - 2 are python resource hog
    - 2 from AUR don't compile with modern GCC.
    - 1 uses gtk battery icon, but uses dark version on dark taskbar, unreadable.
    - 1 shows just black square.
Like I spent more time on assessment than I got a first working my tray. Amazing times.
bvrmn··on The Zig project's rationale for their anti-AI contribution policy
The funny thing LLM's are amazingly good with writing in Zig. They could inspect stdlib source code to fix compatibility issues with newer compilers and quite prolific with idioms.

For example I got a working application with minimal prompt like "I need an X11 tray icon app showing battery charge level". BTW result: https://github.com/baverman/battray/

Now I'm trying to implement a full taskbar to replace bmpanel2. Results are very positive. I've got feature parity app in 1h with solid zig code.

bvrmn··on CadQuery is an open-source Python library for building 3D CAD models
Oh boy. The major difference is coordinate transformations, global/local/face. OpenScad basically leaves you alone with math you should figure out on your own. Also it's math heavy for all other stuff, for example tangents, smooth connections, intersection coordinates, etc.
bvrmn··on 5NF and Database Design
For me NF>3 seems like an implicit encoding of underlying data logic. They impose additional restrictions (usually contrived and artificial, break really fast in real life) on data not directly expressed as data tuples. Because of that they are hard to explain, natural reaction: "why you just don't store data?".
bvrmn··on Build123d: A Python CAD programming library
Shameless plug: https://github.com/baverman/build123d_draft

Experimental extension to make code-cadding as terse as possible.

bvrmn··on Wayland set the Linux Desktop back by 10 years?
> Who is forced to use it? Just use X11, as you said (many times) you do already.

Recent versions of gnome session are compiled only with wayland support in archlinux. To change DE or distribution or use custom package is quite a stretch to call it's not forced.

bvrmn··on JSLinux Now Supports x86_64
I bet Fabrice could write JSAndroid which would provide no lag emulation experience.
bvrmn··on Lenovo’s new ThinkPads score 10/10 for repairability
Repairability score page[1] looks like a Lenovo advert.

[1]: https://www.ifixit.com/repairability/laptop-repairability-sc...

bvrmn··on Why does C have the best file API
Actually in Python you could recast (zerocopy) bytearray as other primitive C type or even any other structure using ctypes module.
bvrmn··on C++26: Std:Is_within_lifetime
Naming is atrocious indeed.
bvrmn··on Lines of Code Are Back (and It's Worse Than Before)
It's kinda hard to deliver value in fewer lines.
bvrmn··on KISS Launcher – fast launcher for Android
Thank you for posting it. It's the launcher I didn't know I need! My usage pattern is literally: use first desktop for often used apps and search for everything else. Samsung launcher search is quite shitty and slow and takes considerable amount of gestures to reach.

Installed and toyed with KISS for 30min and yes. It's perfect for me!

bvrmn··on Fossil versus Git
> 2.6 One vs. Many Check-outs per Repository

For practical cases `git worktree` allows to have multiple checkouts. Document marks this section as "partly disputed" with an external link. IMHO git worktrees has the same ergonomics as in fossil. This section kinda discredits the rest of the article.

bvrmn··on Japan joining growing global trend of declining democracy
> there's no central King whose greed for wealth can be satisfied once.

King and court and lords are the same amount of greedy bastards. The issue with kings is on another plain, what to do with power transfer to a new king. Democracy try to solve exactly this problem. What to do with individuals bending laws to be new kings is another issue to solve.

bvrmn··on Fabrice Bellard Releases MicroQuickJS
I could live with 1-indexing but a closed range array unpack (slices) is quite big toll and breaks nice intuitive invariant.
bvrmn··on The efficiency of truth: introducing the jot
1 case: 14w * 1h -> 0.014kWh * 40p of total cost. There is nothing complex.

2 case: It's an issue with mAh markings. Battery rated in Wh has same simple math.

There are no consumer issues jot solves. More over additional ~10^3 magnitude is consumer hostile.

bvrmn··on An attempt to articulate Forth's practical strengths and eternal usefulness
It's hard to see practical strengths, especially with provided code examples. Most of tax code is stack tossing hiding core logic.

Code as structure could be more conveniently expressed as language data structures as structure nowdays.

bvrmn··on A “frozen” dictionary for Python
It would be great to have **kwargs as frozendict by default. It could help with caching decorators to speedup key construction. For example natural key is simply `(args, kwargs)`.
bvrmn··on Scala 3 slowed us down?
That's my point. Python has convenient and good type design with str.join ignored by other languages.

For example I'm lost which abstract class to inherit in Scala to obtain mkString for my custom container.

← PreviousPage 2 of 23Next →