HackerLangs
TopNewTrendsCommentsPastAskShowJobs

bvrmn

837 karmajoined hace 10 años

comments

bvrmn
·hace 4 días·discuss
Demo works quite strangely. For example "how to use typescript with createContext" show only typescript entries on top. Similarity search failed.
bvrmn
·hace 18 días·discuss
Nice one. gcc/clang are smart enough to get .ok condition statically. I'm very curios how complex an expression could be.
bvrmn
·hace 19 días·discuss
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
·hace 19 días·discuss
I like maybe_value dereferences NULL with SIGILL and you have at least a backtrace with exact invalid access position.
bvrmn
·hace 19 días·discuss
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
·hace 20 días·discuss
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
·hace 20 días·discuss
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
·hace 28 días·discuss
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
·hace 2 meses·discuss
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
·hace 2 meses·discuss
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
·hace 2 meses·discuss
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
·hace 2 meses·discuss
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
·hace 2 meses·discuss
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
·hace 3 meses·discuss
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
·hace 3 meses·discuss
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
·hace 3 meses·discuss
Shameless plug: https://github.com/baverman/build123d_draft

Experimental extension to make code-cadding as terse as possible.
bvrmn
·hace 4 meses·discuss
> 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
·hace 4 meses·discuss
I bet Fabrice could write JSAndroid which would provide no lag emulation experience.
bvrmn
·hace 4 meses·discuss
Repairability score page[1] looks like a Lenovo advert.

[1]: https://www.ifixit.com/repairability/laptop-repairability-sc...
bvrmn
·hace 4 meses·discuss
Actually in Python you could recast (zerocopy) bytearray as other primitive C type or even any other structure using ctypes module.