HNHacker News
TopNewBestAskShowJobs

kreco

324 karma · joined January 26, 2018

submissionscomments
kreco··on Zig's comptime is bonkers good
> Cool, you now invented your own DSL and half-baked meta programming macro language

I'm not sure I'm following your statement. What he said was to use a C program to parse C code and emit additional C code. There is no mention of DSL.

> for something that shall have been in the language to begin with.

The whole point of this discussion is to debate on that.

I have no strong opinion (yet) but the meta program looks easy to understand compared to the pandora box of metaprogrammaing withing the language (since it requires standardization, limitations etc.).

kreco··on C++ proposal: There are exactly 8 bits in a byte
That's interesting because maybe a byte will not be 8-bit in 45 years from now on.

I'm mostly discussing from the sake of it because I don't really mind as a C/C++ user. We could just use "octet" and call it a day, but now there is an ambiguity with the past definition and potential in the future definition (in which case I hope the term "byte" will just disappear).

kreco··on C++ proposal: There are exactly 8 bits in a byte
Now you can also enjoy the fact that you can't even compile:

  std::cout << (std::byte)32 << std::endl;
because there is no default operator<< defined.
kreco··on C++ proposal: There are exactly 8 bits in a byte
I'm totally fine with enforcing that int8_t == char == 8-bits, however I'm not sure about spreading the misconception that a byte is 8-bits. A byte with 8-bits is called an octet.

At the same time, a `byte` is already an "alias" for `char` since C++17 anyway[1].

[1] https://en.cppreference.com/w/cpp/types/byte

kreco··on Whence '\n'?
> The thing is, why 10? Why not 9 or 11? The code says "if you see 'string of newline character', output 'newline character'". How does the compiler know what a newline character is? Its code in turn just says "if you see 'string of newline character', treat it as 'newline character'"...

You can look into the ascii table then.

10 is the line feed. '\n' is there to help human because it makes more sense than '10'.

Nobody is asking why 'a' is equal to '61'.

From the codebase, you know that '\n' is a char. A char is a value between 0 and 255, if you explicitly convert '\n' to int then you happen to find the ascii value and you are good to go and there is no need to pretend there is any poetry in this.

Requoting you:

> "if you see 'string of newline character', output 'newline character'"

It simply becomes "if a you see 'the arbitrary symbol for the new line', output 'the corresponding ascii value'".

I read the quote as "if you see 'a', output 'a' in ascii code." which is not mysterious in any kind of way.

IMO, the article does not make sense at all because it pretends to wonder where an hexadecimal value is coming from, but with any other kind of symbol it would be the exact same article, you enter 'a' and find some weird hexadecimal value and you won't be able to correctly trace it from the source code.

It would make sense it 'a' would display 'a' but '\n' would display some hexadecimal garbage in a text editor.

kreco··on LLaMA now goes faster on CPUs
> Where the big studios like Pixar uses CPUs (not GPUs) to render their movies due to the cost/perf (and access to larger amounts of RAM).

I wonder if (or when) this will change once integrated GPUs become "mainstream", the CPU/GPU share the same RAM AFAIK.

kreco··on Overview: What are Cpp2 and cppfront? How do I get and build cppfront?
> // 'BufferSize' is an object defined as a synonym for the value 1'000'000

> BufferSize: i32 == 1'000'000;

So "value : i32 = 10" is variable, but "value : i32 == 10" is a constant.

The difference is so subtle I'm not sure I like it.

Later in the documentation you can find "equals: (a, b) a == b;" which is a function but it feels like I need to decipher it because "==" is not for alias in this case.

Retaking the example of "equals: (a, b) a == b;" it feels also odd to omit the braces because they are even enforced for if/else branches.

I have to admit that everything was interesting until the "Summary of function defaults" part.

kreco··on Overview: What are Cpp2 and cppfront? How do I get and build cppfront?
Note that the "<<" operator for std::cout is not related to the language itself but related to the standard library.
kreco··on Overview: What are Cpp2 and cppfront? How do I get and build cppfront?
> Because ++ and -- always have in-place update semantics, we never need to remember "use prefix ++/-- unless you need a copy of the old value." If you do need a copy of the old value, just take the copy before calling ++/--

I actually wish ++ and -- operators were removed. This would simplify everything, nothing to remember whether it's prefix or postfix operator, whether it copies something or not, you would just do "value += 1" and be done with it.

- Less mental overhead.

- Remove an extra way of doing the same thing.

kreco··on The day I canceled my Spotify subscription
> That was expensive. Really expensive. At somewhere around $15-20 dollar for an Album, buying an Album a week took up about all my allowance - and most of the measly income from side jobs I've made as an adolescent.

Interestingly, Spotify you have been as streaming service and an MP3 shop where you actually pay the music like 0.5€ so you could actually do whatever you want and listen to your music the way you want.

The current situation is that you don't own anything and you can't just deal with raw files (which locks you into a quite shitty UI).

kreco··on Implication for C++ [pdf]
Interestingly I find the examples very difficult to understand.

I replaced the table "raining? umbrella? faithful?" with "raining? umbrella? dry?".

Then made sense in my head only if I write something like this:

dry = umbrella || !raining

If I use my umbrella. I'm don't care it rains. Otherwise I will be dry only if it does not rain.

kreco··on Vale's first prototype for immutable region borrowing
Is it less "safe" than your own restricted definition then... maybe?
kreco··on Intel One Mono Typeface
I love it ! No extra mental process to really know if a brace is a brace of a bracket.
kreco··on Scaling up the Prime Video audio/video monitoring service and reducing costs
At this point isn't the lesson to use serverless stack for fast iterative processes then use a custom solution once you know exactly what you want?

I have 0 experience with serverless/cloud. Just a thought.

kreco··on Why Janet?
For you Janet is obvious or non obvious?
kreco··on GitHub Packages Is Down
I did not know package managers relied on Github, this is the most unwise thing to do from a package manager perspective.

Anyone could just change username/organization and break thousands/millions of build.

kreco··on On PBKDF2 iterations
It looks strange to use "computational time" in order to slow down the server.

In such scenario you are describing I believe an explicit delay like "thread_or_task.sleep()" would be even better?

I believe that the "computational time" should be increased exactly for the "client-side" brute force. For example, if the attacker already have the password hash, the salt etc.

kreco··on Nuclear physicist explains why fusion ignition is hailed as a major breakthrough
> Everything i have heard about this makes it sound more like a milestone than a breakthrough.

I guess milestone assume you already know you will reach it.

I also think breakthrough as a lot of meaning and people would assume there is a few years before a real application.

In a sense it's probably a breakthrough within the scientific ring rather than from the people perspective.

kreco··on Open Source and Saying “No”
While I understand and agree to the solution you provide, I would dare to call it a workaround.

Since Github default culture is to use issues in a certain way, in which the maintainers are actually the bottleneck, most people will keep using it thinking it's the standard and correct way to do it.

Unrelated to the above, you mentioned the paid extra feature, I really wish to see this implemented in a source forge to see how it goes.

kreco··on Open Source and Saying “No”
The main issue mentioned in the article is to use Github.

The "issues" on Github could be "bugs", "feature request" or even "improvement" (it could be anything actually).

If I were to maintain a project by myself I would rather just deal with bugs or performance issue, and allow feature request in a separated queue where people can upvote it and discuss. The feature request queue could sit there forever as it's just a view of what people wants and not how the project should go.

Also react-native-fs mentioned in the article only have 4 bugs opened. The rest is just noise and unlabelled issues. Note that there might be a considerable amount of bugs in those unlabelled issues.

As a maintainer I should not spend my time to label anything, either you enter it as bug and I'm considering it since bug are supposed to be critical, either it's not and it's going into a sperate queue I can read whenever I have more free time.

kreco··on Rust Nation – A UK Conference for Rustaceans
> unknown content

Can't you see it will be the best event ever for the same reason that this post is on the front page of HN? It's about Rust.

kreco··on Rust Nation – A UK Conference for Rustaceans
Not sure what is there intention.

Usually it costs a lot because organizers expect companies to pay their staff to go there and "learn" stuff.

Milking people using rust professionally does not sound profitable.

It's also hard to justify to pay and go somewhere instead of just doing some livestream.

kreco··on Why are sex workers forced to wear a financial scarlet letter?
Especially because it also means that potential OnlyFans competitor will come across the same fate. So there is no need to worry about them (unless the owners intended to get massive cash asap).
kreco··on Cake – A C23 compiler frond end written from scratch in C
It's all of them.

A transpiler is still a compiler. A front-end compiles to an intermediate state (C99 in this case).

kreco··on BigFAT – Backward compatible FAT extension for unlimited file size
Nothing beats the simplicity of FAT.

Btrfs has a lot of bugs while being active for a long time. This is mostly related to its complexity.

If I'm going to implement a filesystem for a custom hardware I would definitely not chose btrfs.

kreco··on German digital signage ban prompts confusion
You also need to consider all the future signs as well in the equation.
kreco··on Rustle: Svelte compiler rewritten in Rust
Yeah, it's close to an empty project.

But since it's web-dev related and rust-dev related it deserves the front page on Hacker News...

kreco··on Why the Windows Registry sucks technically (2010)
Is this sarcastic?

I mean, the versioning part sounds good, but JSON like request?

I do believe people don't know what inefficient/efficient a system can be depending on the data format they are using.

kreco··on Losing faith in UX
Th worst part is that if say "You could have both, speed and gifs" no one would "believe" it could happen.
kreco··on Bing is now Microsoft Bing as the search engine gets a rebrand
I assume the point would be to be aware of it beforehand.
← PreviousPage 5 of 6Next →