HNHacker News
TopNewBestAskShowJobs

sixthDot

211 karma · joined July 2, 2023

submissionscomments
sixthDot··on Zig's comptime is bonkers good
Just admit that discussions about proglangs are just so delicate. They turn people mad. End of the story.
sixthDot··on Zig's comptime is bonkers good
sure, and hygienically, it's not a preprocessor thing.
sixthDot··on The Rise of the French Fry Cartel
On the trivial point of view, I've never get why don't people just buy cheap potatoes, peals them, slice them, and finally fry them. If you're not clever enough to do that be not surprised to be abused by a cartel.
sixthDot··on Printf debugging is ok
That post does not mention how contracts can help as preliminaries clues on the nature of the bugs.

Sure you can printf or run gdb, or whathever, but first if something like a contract has failed it will be easyer.

sixthDot··on That's not an abstraction, that's a layer of indirection
Another criticism would be the time spent to compile those abstractions, even if in fine the "zero cost" goal _at runtime_ is reached.
sixthDot··on If constexpr requires requires { requires } in C++
looks like D template constraints.
sixthDot··on Biggest shell programs
everything you can do in `git gui` is actually a silly shell script but that works for me.

https://github.com/git/git/blob/master/git-gui/git-gui.sh

sixthDot··on They don't make them like that any more: the Yamaha DX7 keyboard
The one at the output cant really fix aliasing. At this point bad things have already folded in the normal spectrum.
sixthDot··on They don't make them like that any more: the Yamaha DX7 keyboard
> being the spiritual predecessor

There was the FM7 before. It already fixed the UX/UI problems of the hardware version.

sixthDot··on A pretty visualisation of the European power grid (2022)
Also the name of the power plants is missing, on top of the fact that the data is outdated. For example after a little check I see that the Fessenheim PP (France) is still represented, although it's not producing anymore.
sixthDot··on Borgo Programming Language
The first thing I do when I hear of a new PL is to look at its bug tracker.
sixthDot··on Singleton Design Pattern: Managing Global States in Your Applications
Depending on the language used sometimes you can even hide the type of the singleton instance in a function body (also assuming the PL support local static decls), so instead of having `TypeX.instance()` you can just have `xInstance()`.

Otherwise, the article does not mention the problem of race conditions but sometimes it might be better to use static constructors instead of performing lazy construction in the instance getter.

sixthDot··on Inserting a 0 bit in the middle of a value
Well it is already the case, for example things like ROR or ROL are generated by optimizers[1] from certain patterns of bitops.

[1]: https://godbolt.org/z/eE1cx9GT4

sixthDot··on Unit tests as documentation
> Good documentation is good as far as it aids understanding. This might be a side effect of tests, but I don't think it's their goal. A good test will catch breaks in behaviour, I'd never trade completeness for readability in tests, in docs it's the reverse.

The D language standard library uses both. When you generate the documentation from the comments attached to a declaration, the following unittests (they are identified using a special markup, (that is just triple slashes...) are also included.

Example once rendered [0], in the source you see the examples are actually unit tests [1].

[0]: https://dlang.org/phobos/std_algorithm_searching.html#.all

[1]: https://github.com/dlang/phobos/blob/master/std/algorithm/se...

sixthDot··on Fedora Packaging: Staying Close to Upstream Projects
In the examples of Exceptions,

> Distribution Integration

Yeah, so much. Example that happend a few years ago, in a project I particpated to:

downstream sends a patch to support an alternative build system, the patch includes a CI run. Gentle upstream accepts. One day downstream stops giving a s**t and consequently does not maintain the support anymore. Eventually at some point the CI breaks. Now upstream has extra-work, while initially it did not really want to support the alternative build system.

sixthDot··on Code Generation in Rust vs. C++26
I agree, isn't it a pitty. D should have worked more. Why the heck people ignore it ? They prefear speaking about zig, odin, c3, v, nim, crystal, etc ? I eventually look at their bug trackers and see bugs that have been fixed since years in D ;)
sixthDot··on Code Generation in Rust vs. C++26
> Now, C++ does have one code generation facility today: C macros. It’s just a very poor and primitive one. Poor because of their complete lack of hygiene to the point where you could be accidentally invoking macros without knowing it (and standard library implementations guard against that), and primitive because even remarkably simple things conceptually (like iteration or conditions) require true wizardry to implement. That said, there are still plenty of problems today for which C macros are the best solution — which really says something about the need for proper code generation facilities.

The D language has both: introspection (__traits, is, etc.) plus hygienic code generation (mixin, static if, static foreach, etc.).

sixthDot··on Kris Kristofferson has died
He played "Me and Bobby McGee" at the Isle of White festival (1970). For some reason, the audience was not enjoying and he decided to left the stage before the end of the song.

Fantastic moment [1] I enjoy watching semi-frequently.

[1]: https://www.youtube.com/watch?v=Qmk94uooJCU

sixthDot··on Floating megabomb heaves to near the English coast
No, equal TNT power equivalent can have different effect depending on the nature of the explosive. The heat spreaded from an amonium nitrate blast, like in Beyrut, does not last as long, from [0],

> However even on this basis, comparing the actual energy yields of a large nuclear device and an explosion of TNT can be slightly inaccurate. Small TNT explosions, especially in the open, don't tend to burn the carbon-particle and hydrocarbon products of the explosion. Gas-expansion and pressure-change effects tend to "freeze" the burn rapidly. A large open explosion of TNT may maintain fireball temperatures high enough so that some of those products do burn up with atmospheric oxygen [...]

See also the "Relative effectiveness factor" paragraph [1]

[0]: https://en.wikipedia.org/wiki/TNT_equivalent

[1]: https://en.wikipedia.org/wiki/TNT_equivalent#Relative_effect...

sixthDot··on Kate's grammar tool: BNF dialect converter and railroad diagram generator
Excellent, the rules can be hyper linked [1] ! My PL documentation relies on that, hence why I'm stuck with code blocks and formal EBNF..., gotta try this product instead

[1]: https://katef.github.io/kgt/doc/gallery/c99-rrd.html#struct-...

sixthDot··on I Like Makefiles
> Once you try to build anything beyond a toy, it quickly becomes chaos.

Of course the chaos is not caused by, "very hypotheticaly" let's say, a compiler or maybe a language without modules.

How would you estimate that ? 20%, 40%, or 70%, true ?

sixthDot··on The Black Death is far older than we thought
Yes we speak about the same thing.
sixthDot··on The Black Death is far older than we thought
> Curiously, the mega-settlements of the Trypillia culture suddenly disappear from the archaeological record around 5400 years ago. In fact, populations decrease all across Northern Europe to such an extent that the period has become known in the field as the Neolithic Decline. Recent DNA evidence has suggested a possible answer: Yersinia pestis.

I've recently watched a documentary about those "proto-villages" found (... to be bigger than initially thought) in Moldova but the hypothesis for their decline was else (still according to the doc.): the theory was that at some point they just became too big to function as a whole. Initially when the size was reasonable there was also a kind of "proto-democracy" that worked naturally but that did not scale, and when the settlements became bigger that cohesion did not work anymore and people left.

That being said, the theory of a plague also makes sense, the more the people the more the chance to spread it.

sixthDot··on K340A: The Brain Computer of Chernobyl Duga Radar [video]
yeah that looks stupid. I just said that this theory exists. It's related to the fact that "we dont know what the Luga was for". As often, when people dont know exactly, they imagine things. That's all. I'm amused ;)
sixthDot··on K340A: The Brain Computer of Chernobyl Duga Radar [video]
I know. Everybody knows. There was a test. During this test they managed to highlight a serious design flaw ;) It's clear, it's documented.

What I say is that eventually a marginal frame of people dont believe that fact and instead prefer to believe something wrong ;)

For instance: "chernobyl accident was meant to impeach the Duga to ever work".

sixthDot··on K340A: The Brain Computer of Chernobyl Duga Radar [video]
Yeah... those are the "constants value" generators... those who initally were shipped with non-magnetic pins, those of the "prank".
sixthDot··on K340A: The Brain Computer of Chernobyl Duga Radar [video]
> So little is known

That's also why there's even a conspiracy theory about the Duga. It obviously hasn't been proved but the idea is that the Chernobyl reactor accident would be a U.S sabotage targeting the Duga.

sixthDot··on Malaysia started mandating ISPs to redirect DNS queries to local servers
yes, that was well understood. A country decides to filter because the least poor citizen, those who have internet access, prefer to gamble online to make money.
sixthDot··on What's new in C++26 (part 1)
> if (auto [to, ec] = std::to_chars(p, last, 42))

I'm not into plusplus, however i'm curious. How the tuple get evaluated to a condition ? is that lowered to if `to && ec` ?

sixthDot··on Malaysia started mandating ISPs to redirect DNS queries to local servers
> online gambling (39 per cent)

well well well. People on HN will be surprised to know that the internet is a complete shit hole. "I thought the internet was made for the good of humanity".

← PreviousPage 3 of 6Next →