Recent submissions

Comment · 5 years ago
Is it a "javascript application" or a "page with text that uses javascript for dynamic features"...
Comment · 5 years ago
Comment · 5 years ago
You sure? https://forum.nim-lang.org/t/4022#25046 edit: the docs seem to say you're right, maybe that forum post is outdated but it's from nim's author.
Comment · 5 years ago
Not the commenter but which one of these is the defer generating?

    // option 1
    try {
      fp = os.open(x)
      fp.read()
    }
    finally {
      fp.close()
    }

    // option 2
    fp = os.open(x)
    try {
      fp.read()
    }
    finally {
      fp.close()
    }
Should we close if open fails? Maybe, maybe not, but with try/finally it is obvious which one it is doing.
Comment · 5 years ago
Nim's defer just wraps the current scope in a try/finally, with the deferred code running in the finally. It is probably better just to use try/finally directly because it's more explicit about what is in the try block. It's not worth it to obscure that just to avoid a new level of indentation...
Comment · 5 years ago
You can still hold on to references to textures and meshes you uploaded to the GPU without using a full-blown scene graph. Some state is necessary no doubt, but this seems more like unnecessary state that could be replaced by something more direct. But i don't know, i'm not familiar with three.js; the click handlers seem useful.
Comment · 5 years ago
That makes sense, but it seems like a case of building an abstraction to solve a problem caused by another abstraction. If a scene graph creates a new chore for me that necessitates yet another dependency, i think it'd be simpler to not fuss with these layers at all. That's a choice i don't have with the DOM.
Comment · 5 years ago
That looks neat but why would you need a react-style reconciler to render a webgl scene? It's immediate mode...every frame is rendered according to the latest state available. What is even being reconciled?
Comment · 5 years ago
Comment · 6 years ago
Yeah it's a bit bifurcated. Internally there's a lot of coupling -- HTML embedded directly in the C code and whatnot. This could be resolved if tools could be built on top of fossil, but the CLI code uses `exit` everywhere which makes it impossible to use as a library. I think they made an incomplete attempt at a JSON API, but what you really need is a proper linkable library like libgit2.
Comment · 6 years ago
It would at least be far less of an issue. I don't see anyone being confused that https://github.com/facebook/react is the official repo, and not https://github.com/react/react. It's the fact that a collapsed name is a shortcut that imbues it with this special stature. And i believe maven central doesn't even allow one-segment group names for new libraries, though clojars obviously does.
Comment · 6 years ago
I wasn't even addressing the crates.io team, i was addressing the author of the post.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton