HackerTrans
TopNewTrendsCommentsPastAskShowJobs

arve0

no profile record

comments

arve0
·2 jaar geleden·discuss
> if plain text were the only format possible

Hard to enforce? <p>this</p> is text too.
arve0
·2 jaar geleden·discuss
> without exposing the secret to the shell history file

Any command in shell with a space before it will be omitted from history.

Agree it should take input from stdin.
arve0
·3 jaar geleden·discuss
I'm not up to speed in JSX, how is it be better there? Don't one normally map over an array to loop? You cannot use for-loops inside JSX?

Or do you create an array of JSX-elements, like

    let elements=[]
    for (let i=0; i < 10; i++) {
      elements.push(<li key={i}>I'm number {i}</li>)
    }
    return <ol>{elements}</ol>;
Does not seem like an improvement to me.
arve0
·3 jaar geleden·discuss
Each loops over anything with a length property:

    {#each {length: 3} as _, i}
https://stackoverflow.com/questions/58213585/svelte-3-how-to...
arve0
·3 jaar geleden·discuss
A few I know: rqlite, dqlite, SQLite wasm, litestream.
arve0
·3 jaar geleden·discuss
When you do not rely on ACID for data consistency, you need to architect for eventual consistency. For example CRDT on collaborative editing a text document.
arve0
·4 jaar geleden·discuss
The history feature in VSCode have saved me multiple times. To me, 200MB per workspace is worth it.
arve0
·4 jaar geleden·discuss
I think they are solving for management, for example by locking down the dev environment. Not saying it’s impossible in desktop IDEs, but maybe harder?
arve0
·4 jaar geleden·discuss
Thank you, will try it out :-)
arve0
·4 jaar geleden·discuss
Yes, using a hook is optimal. But when reading repos without a style guide or formater, “pretty diffing” makes it easier to review.

Another use case is when you encounter that giga god-commit “added formater” which touched all lines in all files.

If you take this even further, you can tailor to anyones style taste, formatting on check out instead of check in. That leaves the stored code as a serialization format the compiler understands. Viewed code is in whatever format the programmer likes.
arve0
·4 jaar geleden·discuss
Anybody know if it’s possible to run a formater before diffing? For example running “go fmt” or “prettier”?