Recent submissions

Comment · 2 days ago
Then you must have had such a good time that you forgot everyone’s flaws!
Comment · 2 days ago
> surrounded by his loyal band of perfect lieutenants, who apparently have zero desire to advance, and have no flaws at al

Sir, I believe you have not watched it.

Comment · 4 days ago
AI is definetly taking a big portion of the marketing budget as well.

Just today I was served a clearly AI-generated Halloween ad for Coca-Cola.

Comment · 4 days ago
That is how it has always been (not that I agree with it).
Comment · 5 days ago
My bet is that it will work ok in some cases and be confidently wrong in others.
Comment · 8 days ago
The private sector is more efficient, yes, but only at extracting value.
Comment · 9 days ago
Oh no!

Anyway...

Comment · 11 days ago
If you’re not charging anything for it it’s free press for the original content creators imho
Comment · 13 days ago
That is absolutely not the case.

Numerical loops in Lua are inclusive:

    for i=1,#t do t[i]=0 end
On the example above the i starts at 1 and goes up to (and including) the length of t.

With 0-based indexes, and that numerical loop format, it would be minus-one everywhere:

    for i=1,#t-1 do ...
Comment · 16 days ago
I had a similar impression. It feels "not idiomatic". I disagree on the diagostic though - I think parenthesis-free calls are not what define what idiomatic lua is.

To me it is more about expressiveness and usage of basic language features. For example here's how a text field is set up currently.

           ito.TextField(draft)
                :label("Name")
                :focused()
                :on_submit(function(value)
                    if value:match("%S") then
                        phase.value = "review"
                    end
                end)
                :on_cancel(function()
                    phase.value = "choose"
                end),

The field is created on the first line, and then altered further with subsequent method calls that alter it. This reads like someone very used to Rust (and its Builder pattern) and then translating it verbatim to Lua. A more native Lua interface for me would look like this:

           ito.TextField(draft, {
                label = "Name",
                focused = true,
                on_submit = function(value)
                    if value:match("%S") then
                        phase.value = "review"
                    end
                end,
                on_cancel = function()
                    phase.value = "choose"
                end),
           })
As in: just pass a table to the builder. And if they ned to modify it later, they can just do:

           some_textfield.on_cancel = <some other function>
No need to "guard" the internal table with those extra methods.
Comment · 16 days ago
Well, cancer operates like that, too.

I would like us to find a way to live without killing our host.

Comment · 16 days ago
> leverage their ubiquity

We live in different worlds

Comment · 17 days ago
> Someone made a fantastic joke website about how you can copy code with AI and claim it's made in a clean room, so technically you're not under any licensing agreements.

It is not a joke! The naming is so bad so it sounds like a joke. So people like the author assume it is a joke and move on without suing them. They are counting on that.

Comment · 17 days ago
"The world" xD
Comment · 17 days ago
Fair. I didn't include the word primarily in my sentence. Please assume it is included now.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton