Better HN
topnewbestaskshowjobs
Log inSign up

daoxid

43 karma · joined Feb 17, 2019 (7y ago) · 24 submissions

Submissions

comment 1mo ago · link · parent

I'm curious, when returning a dynamically sized array from a function, does the whole array need to be copied? C++/Rust would simple move the array out of the function (i.e., they would only copy the pointer to the underlying data), but it seems this wouldn't work in Goose if the stack the dynamic array lives in is cleared on return?

comment 5y ago · link · parent

> misappropriated Haskell/ML function syntax, enum/struct asymmetry

I'm curious, could you elaborate?

comment 5y ago · link · parent

Just delete all CSS files!

comment 5y ago · link · parent

Reading another article in this series, "Can You Boil an Egg Too Long?" [1] really made me smile. Apparently no one knows exactly what happens if you boil an egg for multiple months or years. This seems such a trivial thing compared to all the other stuff humans have discovered. On the other hand this also means almost anyone can expand the limits of human knowledge: you just need an egg, a reliable source of heat and water, and lots of patience. Granted, the knowledge gained may not change the world, but you will still be the first who is in possession of that knowledge!

[1]: https://www.nytimes.com/2020/06/09/science/randall-munroe-qu...

comment 6y ago · link · parent

In a linked blog post [0] and on the Rust performance page [1] the performance metric "instructions" is used. What exactly is meant by that? Number of instructions executed?

[0] https://nikic.github.io/2020/05/10/Make-LLVM-fast-again.html

[1] https://perf.rust-lang.org/

comment 6y ago · link · parent

> But in many cases, we have little ability to figure out how we came to a conclusion, while being much better at fabricating plausible and politically acceptable answers.

Hmm, too me it feels like I can explain the reasons why I came to a conclusion in many (but certainly not all) cases. You "just" need to clearly identify your feelings and emotions and separate them from your rational arguments.

Anyway, these are our own shortcomings and of course don't have to be adopted by any artificially built black-box model.

comment 6y ago · link · parent

Wait, what? Where has this been automated?

comment 6y ago · link · parent

I was more thinking about higher level reasoning. But yes, a lot of the lower level stuff just appears as thoughts in my mind seemingly out of nowhere.

comment 6y ago · link · parent

> You can always ask somebody to state their reason as a simple "if-then" statement, and they can make one up on the spot, but it'll be so oversimplified that it's basically a lie.

Well, I guess it depends on how self-aware a person is. I think the biggest danger is trying to rationally explain your decision when in fact it was based mostly on your feelings, in which case I agree that the explanation is "basically a lie". One needs to be honest when something is not based on a fact but on a feeling to prevent pointless discussions. (If I hold an opinion based on a feeling then you cannot convince me that I am wrong by giving me facts.)

> You can already do that. Just change that number in the input and see how the output changes.

Makes sense. But I guess transparent models would still be generally preferable because you can fully understand how the output is produced, whereas in black-box models you might have to ask quite a lot of questions to get a feeling for it, but even then you can't be sure that you have a full understanding of it.

comment 6y ago · link · parent

> I think it's important to note that human pattern recognition is basically black-box as well.

Agreed. But as you note, even though humans are basically black boxes we can ask them questions in order to find out how they came to a particular conclusion. (How reliable the answers to these questions are is of course a different matter.)

So maybe we don't necessarily need fully interpretable models but simply a way to ask black-box models specific questions about their state, e.g., "To what degree does a person's age influence the output?".

comment 7y ago · link · parent

Thanks! For some reason it didn't occur to me that Svelte could just compare the new array to the old array (if this is how it's implemented).

comment 7y ago · link · parent

I guess whether a structural comparison (VDOM) or a value comparison (Svelte) is more efficient really depends on the concrete use-case.

For example, even changing a single value in a big list requires the whole VDOM to be recreated, but should be very efficient in Svelte as it can directly modify the specific DOM node. On the other hand, as pointed out in the article you linked, if changing a value affects a large part of the DOM, but does not actually change that much, then value-comparing frameworks (e.g. Svelte) probably do a lot of unnecessary work compared to VDOM-based approaches (intuitively I would think that this case does not occur that often).

comment 7y ago · link · parent

The article says that

    items = items.filter(i => i !== item);
is compiled to

    $$invalidate('items', items = items.filter(i => i !== item));
So this invalidates the whole array, right? Would this then re-render the whole array, i.e., remove and recreate all DOM nodes? And if so, does Svelte support more fine-grained ways to update arrays?

comment 7y ago · link · parent

The way I understood it is that it would only perform code generation for trusted kernel code, not for arbitrary code provided by the user. Doesn't this resolve most (all?) security concerns?

comment 7y ago · link · parent

Yep, your example describes exactly (and better) what I meant. Thanks!

comment 7y ago · link · parent

This sounds nice! One Question: You said that DML changes are handled via "standard check in sql file". Does this simply mean a new SQL file for each migration? And how are DML changes connected to DDL changes? For example, if some code is two versions behind and updated to the current schema, wouldn't this mean that the DDL is updated in one step to the current state, but the DML potentially in two steps, breaking the update?

comment 7y ago · link · parent

Cool, I'll wait! (no pressure :) )

comment 7y ago · link · parent

Are there any write-ups about the internals of Svelte? I would be especially interested in how state changes are converted to concrete DOM updates.

comment 7y ago · link · parent

> In general, if I need an rvalue and it's legal to convert the lvalue I have into an rvalue, the compiler should do it automatically.

This is already done in some places. Example:

    std::unique_ptr<int> get_int() {
        auto p = std::make_unique<int>(1);

        // `p` is an lvalue but treated as an rvalue in the return statement.
        // (This would not compile otherwise because `p` is not copyable.)
        return p;
    }

comment 7y ago · link · parent

The Terranauts by T.C. Boyle is heavily inspired by the Biosphere 2 experiment. It contains a lot of gossip and petty behavior, and a lot of people seem to find the plot overall boring, but I still liked it. (I simply find the premise fascinating, and I think Boyle captures the atmosphere of people living closely together in a locked space well.)

comment 7y ago · link · parent

Are the more fancy scripts supported by Unicode used by real people in production? By scholars? With special fonts? Or is it more like Unicode just wanting to support everything, even though the target audience is actually using something else?

Asking because I'm impressed by the aim of the whole Unicode project but having no real experience with it beyond the basics.

comment 7y ago · link · parent

Although I generally agree with you, I think there is a difference between the emergent property of a coffee table and that of consciousness: the particles the coffee table is made of are "just" matter, and so is the coffee table itself. But consciousness seems to be something different than matter (or maybe this is just a false assumption of mine). So while I find it intuitive that a table emerges from a number of particles, I think there is a qualitative difference between particles and consciousness.

You can zoom into a coffee table until you see individual particles, but what would it mean to "zoom into" a consciousness?

comment 7y ago · link · parent

Does consciousness produce any measurable effect? For a time I thought consciousness is some kind of by-product of some kinds of computation which doesn't influence the computation itself. But how can I then know that I am conscious? And if I know that I am conscious, then consciousness must have a measurable effect, right? Because the knowledge that you are conscious should be reflected somewhere in your brain.

However, whenever I think about consciousness, I have the feeling that I am missing something obvious but important. It's just so confusing.

comment 7y ago · link · parent

I haven't really looked into it, but how does Sparta compare to Ikos (https://ti.arc.nasa.gov/opensource/ikos/)?