News for hackers. Stuff that matters.

petalmind

> to just copy a bash command from a website and run it (sometimes with sudo! O.o ) to install software.

how is that different from the good old days of

    wget ftp://ftp.something.org/software-2.10.tar.gz
    tar zxfv 
    ./configure
    make
    sudo make install

?
Re:Anthropic's Model Naming, Extrapolated on Wednesday June 10, 2026 @04:31PM (#48482229)
Claude Epitaph
Re:5NF and Database Design on Wednesday April 15, 2026 @06:00PM (#47785895)
I think I understand this "Cartesian product" reasoning behind 4NF/5NF, I just find it irrelevant I guess.

Cartesian product is explained in Kent: case (3) in https://www.bkent.net/Doc/simple5.htm#label4.1 ("A "cross-product" form, where for each employee, there must be a record for every possible pairing of one of his skills with one of his languages")

I do not explicitly mention this Cartesian product even tho it is present in both posts ("sports / languages" in 4NF, and "brands / flavours" in 5NF).

> it demonstrates [one of] the precise problem[s] the normal form sets out to solve: a combinatorial explosion of rows.

I just don't understand this wording of "a combinatorial explosion of rows" — what's so dramatic here? I don't need four iterations of algebra-dense papers to explain this concept, I think it's pretty simple frankly.

And my implicit argument is, I guess, exactly that you could design tables that handle both problems without invoking 4NF and 5NF — people are doing that all the time.

Re:5NF and Database Design on Wednesday April 15, 2026 @05:21PM (#47785398)
Thank you, your take on the evolution from spreadsheets to proper databases is englightening.
Re:5NF and Database Design on Wednesday April 15, 2026 @09:12AM (#47778511)
Could you share an example of writing stule that you enjoy?
Re:5NF and Database Design on Tuesday April 14, 2026 @04:20PM (#47770957)
> Might it be a consequence of lack of disk space in those early decades

A plausible explanation of "normalization as a process" was actually found in https://www.cargocultcode.com/normalization-is-not-a-process... ("So where did it begin?").

I hope someday to find some technical report of migrating to the relational database, from around that time.

Re:5NF and Database Design on Tuesday April 14, 2026 @04:16PM (#47770892)
I have so many questions about that. Should that normal form basically replace 5NF for the purposes of teaching?

Why do they hate us and do not provide any illustrative real-life example without using algebraic notation? Is it even possible?

I just want to see a CREATE TABLE statement, and some illustrative SELECT statements. The standard examples always give just the dataset, but dataset examples are often ambiguous.

> (in its joins)

Do you understand what are "its" joins? What is even "it" here.

I'm super frustrated. This paper is 14 years old.

Re:5NF and Database Design on Tuesday April 14, 2026 @04:04PM (#47770731)
Imperative mood "normalize" assumes that you had something not-normalized before you received that instruction. It's not useful when your table design strategy is already normalization-preservation, such as the most basic textbook strategy (a table per anchor, a column per attribute or 1:N link, a 2-column table per M:N link).

And this is basically the main point of my critique of 4NF and 5NF. They both traditionally present an unexplained table that is supposed to be normalized. But it's not clear where does this original structure come from. Why are its own authors not aware about the (arguably, quite simple) concept of normalization?

It's like saying that to in order to implement an algorithm you have to remove bugs from its original implementation — where does this implementation come from?

The other side of this coin is that lots of real-world design have a lot of denormalized representations that are often reasonably-well engineered.

Because of that if you, as a novice, look at a typical production schema, and you have this "thou shalt normalize" instruction, you'll be confused.

This is my big teaching pet peeve.

Re:5NF and Database Design on Tuesday April 14, 2026 @03:23PM (#47770210)
Yeah, no NULL is ever equal to any other NULL, so they are basically unique.
Re:5NF and Database Design on Tuesday April 14, 2026 @02:07PM (#47769084)
> Someone, somewhere writing down a list and that list being blessed with the imprimatur of Academic Approval (TM)

One problem is that normal forms are underspecified even by the academy.

E.g., Millist W. Vincent "A corrected 5NF definition for relational database design" (1997) (!) shows that the traditional definition of 5NF was deficient. 5NF was introduced in 1979 (I was one year old then).

2NF and 3NF should basically be merged into BCNF, if I understand correctly, and treated like a general case (as per Darwen).

Also, the numeric sequence is not very useful because there are at least four non-numeric forms (https://andreipall.github.io/sql/database-normalization/).

Also, personally I think that 6NF should be foundational, but that's a separate matter.

Re:5NF and Database Design on Tuesday April 14, 2026 @01:32PM (#47768609)
Frankly I don't think that overcounting is solved by normalizing, because it's easy to write an overcounting SQL query over perfectly normalized data.

I tried to explain the real cause of overcounting in my "Modern Guide to SQL JOINs":

https://kb.databasedesignbook.com/posts/sql-joins/#understan...

Re:5NF and Database Design on Tuesday April 14, 2026 @01:30PM (#47768571)
One day I hope to write about denormalization, explained explicitly via JOINs.
Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @02:29PM (#47652397)
Do you know if Redex could be a tool that would be useful in my situation?

Claude suggests it, but I need to learn a lot of Redex to understand how to apply it.

I have a general understanding of what operational semantics is. Or maybe, are there any Redex implementations for common programming languages? \lambda_v is a bit too abstract.

Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @10:00AM (#47649552)
You reimplement `while` in terms of `loop`, but do you know that `loop` is also a method :)
Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @09:40AM (#47649345)
Even Ruby `parser` gem uses S-expressions in their documentation: https://github.com/whitequark/parser/blob/master/doc/AST_FOR...
Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @09:18AM (#47649154)
> on the 'reflection' level, where most languages have specific keywords that cannot be used 'first class' with the rest of the language.

In Ruby this is also the other way around, and it's one of my pet peeves.

`Kernel#callcc` looks like a method (arguably, of a special class), yet it's impossible to re-implement directly in the language, as far as I can tell.

Same with `raise`, I keep forgetting that it's not a keyword even.

Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @08:39AM (#47648781)
Yeah, I was also going to say that conflating trivial syntax and "supremely easy to learn" is a very weak flex.

The first Smalltalk-80 book you randomly find is 560 pages.

Also, there is a weird bargaining with "but not block temporaries" and "not an instance variable". Why not? Half of the postcard is basically empty. Also, "except primitives" — how many primitives are there?

Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @06:23AM (#47647953)
> Ruby has syntax sugar, no need to remove the funny parts.

This is just an intermediate representation, it's not meant to be used directly (even though you can do that, of course).

Re:Rubysyn: Clarifying Ruby's Syntax and Semantics on Sunday April 05, 2026 @06:19AM (#47647914)
> Lisp? Then I would use Lisp...

Lisp has completely different runtime semantics. Even the lexical scope in Ruby is extremely peculiar. One of the hard parts of writing this document was to remove the intuitive influence of Lisp because it just doesn't make sense for Ruby.

Re:The largest number representable in 64 bits on Monday February 02, 2026 @05:03PM (#46862379)
Question: but how many different numbers can you fit in 64 bits using your encoding (sorry I understand the general approach but I have no idea how that fast hierarchy works). I guess it's still 2^64 different numbers?

So basically you have a very low density of representable numbers (2^64 / w218), I wonder how quickly it grows as you use more and more 1-bits, and is there even a correlation between the bit pattern and the corresponding number value?

Fantastic. Each case is basically an SCP object.
Re:Validating Your Ideas on Strangers on Sunday October 26, 2025 @04:57PM (#45715149)
"The Mom Test" book seems to be about this exactly: https://www.momtestbook.com/
Re:SQL Anti-Patterns You Should Avoid on Saturday October 18, 2025 @12:00PM (#45628356)
> Overusing DISTINCT to “Fix” Duplicates

I wrote a small tutorial (~9000 words in two parts) on how to design complicated queries so that they don't need DISTINCT and are basically correct by construction.

https://kb.databasedesignbook.com/posts/systematic-design-of...

Older »