HNHacker News
TopNewBestAskShowJobs

sixthDot

211 karma · joined July 2, 2023

submissionscomments
sixthDot··on Bash Prompts Collection
ty giles
sixthDot··on I'm Unsatisfied with Easing Functions
Basically any transfert function that is used as interpolator can also be used as "easing". E.g a quadratic Bézier (let's say with empirically determined coeffs). One lesser known I used to like much is the super ellipse, although very costly.
sixthDot··on Strategies for Fast Lexers
A problem I see with talking exclusively about lexing is that when you separate lexing from parsing you miss the point that is that a lexer is an iterator consumed by the parser.
sixthDot··on -2000 Lines of code
Halstead complexity ([0]) might interest you. It's a semi-secret sauce based on the count of operators and operands that tells you if your function is "shitty".

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

sixthDot··on Learning C3
Many languages propose a system of ranges:

    case 'a' .. 'z', 'A' .. 'Z', '0' .. '9', '_': ...;
although when working with enumerators, there is a still a risk caused by the fact that re-ordering enumerators or adding new ones can break the switches.

Despite of the drawback I prefer. Also a Range can be a formal expression which simplifies the grammar of other sub-expressions and statements, not only switches but also array slices, tuple slices, foreach, literal bitsets, etc.

sixthDot··on Initialization in C++ is bonkers (2017)
> int x = void;

this is what the D programming language does. Every var declaration has a well know value, unless it is initialized with void. This is nice, optimizing compilers are able to drop useless assignments anyway.

sixthDot··on Compressed music might be harmful to the ears
Compression reduces the range between the lower and the higher level so your ears are faced to a more or less "constant" pressure. Personally when I was into home production I only dared eating the peaks with a limiter and reasonable settings, e.g to gain one or two db, never more.

On top of that another problem with compression is that it is not neutral, bad compressors, especially in the digital domain can introduce aliasing.

Also search for the "loudness war". This is how we called the problem back in the mid 2000's.

sixthDot··on Show HN: BugStalker - a modern Rust debugger
any Machine Interface planned (à la GDB/MI)?
sixthDot··on Things Zig comptime won't do
Sure, CTFE can be used to generate strings, then later "mixed-in" as source code, but also can be used to execute normal functions and then the result can be stored in a compile-time constant (in D that's the `enum` storage class), for example generating an array using a function literal called at compile-time:

   enum arr = { return iota(5).map!(i => i * 10).array; }();
   static assert(arr == [0,10,20,30,40]);
sixthDot··on Memory Corruption in Delphi
> Make sure to initialize newly allocated memory before it is read.

The FreePascal compiler would warn about the missing init (first example of the "The Heap and Use After Free" section).

That being said I think that uninitialized locals is really something from an other age. Modern languages should always default-initialize locals. Speed of execution is not an issue as optimizing-compilers are able to remove dead assignments.

sixthDot··on "The kebab and the French train station": another view
What do you mean by

> Strasbourg is German

?. Humor ?

sixthDot··on Autoped
A precursor to electric scooters ?
sixthDot··on The need for memory safety standards
while I agree on the idea I clearly see that instead of proposing solutions, a bag of programming languages are suggested.
sixthDot··on A Clang regression related to switch statements and inlining
esoterism or not, according to the author the problem is a regression.
sixthDot··on Google Changed the Gulf of Mexico to the Gulf of America on Maps
The displayed name depends on the country. For example here in France we have "Golfe du Mexique (Golfe d'Amérique)", so the historical name is still more important than the one inspired by a whim, even if it is indicated between parens.
sixthDot··on Nocc – A Distributed C++ Compiler
Would you say that this tool is required because cpp is slow to compile or is it still useful even with a module system (or whatever would make it a fast-to-compile-proglang) ?
sixthDot··on GitHub Blog – 4 steps to building a natural language search tool
if the author posted this:

- https://github.com/nonprofits is a 404

- https://github.com/github/forgoodfirstissue should be replaced with https://forgoodfirstissue.github.com/

sixthDot··on 21st Century C++
So now even H news are being poluted with IA.
sixthDot··on Ratzilla
https://github.com/orhun/ratzilla
sixthDot··on Ratzilla
I'll save your time : project homepage[1]

[1]: https://github.com/orhun/ratzilla

sixthDot··on GitHub Is Down
meh.

As usual that will be fixed within the 10 to 600 mins.

sixthDot··on USA restricts Swiss access to AI computer chips
Ironically Swiss has recently ordered a batch of F35, supposily to maintain good relationship w/ the U.S.
sixthDot··on French police free kidnapped Ledger executive
The french gov position on cryptos is more like "we warn you that we cannot do anything so dont come crying".
sixthDot··on Type Inference in Rust and C++
> Full disclosure: This whole section was missing a subsection about Class Template Argument Deduction (CTAD), which I apparently completely forgot existed. So I am adding it now.

D has something similar too (aka IFTI), but otherwise that is more like the C++ inference system. So you can actually infer many things by a call to a function. Examples

array base type:

    void v1(T)(T[] t);
    int[] arg1;
    v1(arg1); // during monomorphization `T` is `int`
template (unspecialized) + its generic args:

    void v2(T,U)(T!(U) tu);
    struct S(T);
    S!int arg2;
    v2(arg2); // during monomorphization `T` is `S` and `U` is `int`.
sixthDot··on Bunkers in Albania
Give me a single example of a useful bunker in the history of war. With my modest knowdeldge, from the Maginot line to the Atlantic Wall, none. They're pretty much like locks. Can be cracked with a cocktail of goodwill and *time*.
sixthDot··on The most viewed articles of 2024
Would be interesting to known if those articles were also entry points, e.g right after a search.
sixthDot··on I think about Zig and Rust
> however it has very little interest in being expressive for general purpose programming. It has no: [...] multi-line comments

How does this have to do with expressiveness ?

sixthDot··on Obvious things C should do
Most of D users would rather call that "static contracts". I dont know why the author choose to call that "unit test".
sixthDot··on Obvious things C should do
Haven't you noticed that the homepage does not include the X widget anymore ? It's been removed [1] exactly because of that, i.e the content is not public anymore.

[1]: https://github.com/dlang/dlang.org/pull/3714

sixthDot··on Printf debugging is ok
yeah, printf is not "pure", it can modify CPU flags so it's not always an adequate tool.
← PreviousPage 2 of 6Next →