Hacker News new | past | comments | ask | show | jobs | submit | arve0's comments login

> if plain text were the only format possible

Hard to enforce? <p>this</p> is text too.


A few <p>tags</p> in a larger text are ugly but not too bad. Most HTML e-mails are 200 lines of tag soup without any content, then 100 lines of content wrapped in several layers of tags and finally 50 more lines of tag soup without any content.


Don't forget that the parts you are trying to read are actually text embedded in images


> 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.


This requires `setopt HIST_IGNORE_SPACE` (zsh) or `HISTCONTROL=ignorespace`/`HISTCONTROL=ignoreboth` (bash/ksh) to be set and may not be enabled by default in many distros (e.g. NixOS doesn't, Alpine doesn’t, etc).

Always check your shell before assuming this will work!


Each loops over anything with a length property:

    {#each {length: 3} as _, i}
https://stackoverflow.com/questions/58213585/svelte-3-how-to...


That's not really a huge improvement over just making a sparse array though, is it? Looks more confusing to me. Could be wrong but I'm pretty sure e.g. Array(1000000000) does not actually allocate much.


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.


It's just JS: You can do that, or you can use any helper method, or write your own helper. Can't really do that in Svelte.


A few I know: rqlite, dqlite, SQLite wasm, litestream.


rqlite[1] creator here, happy to answer any questions.

[1] https://www.rqlite.io


(I guess I can test or ask in the rqlite Slack etc)

Can I try to use a UNIX socket to TCP socket so I can use rqlite as a drop-in sqlite replacement (where a client expects a file)? for ex:

socat TCP-LISTEN:4000,reuseaddr,fork UNIX-CLIENT:/path/to/sqlite


No, rqlite doesn't support that kind of access. No reason it couldn't, but it currently only exposes a HTTP API.

https://rqlite.io/docs/faq/#is-it-a-drop-in-replacement-for-...


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.


The history feature in VSCode have saved me multiple times. To me, 200MB per workspace is worth it.


Are you not using Git/any SCM or what?


They don't do anything automatically. VSCodes feature does keep every saved state of every file


Of course not. But why would I need "every saved state of every file"? The number of times that would have saved me would be zero, because I never ended up in a case where that would have saved me. Things I need saved are saved as stashes/things put in git, and the rest are things I don't need saved.

What scenarios are there where things like this would have saved me somehow?


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?


X Windows and RDP/VNC, it is nothing new.


Anybody know if it’s possible to run a formater before diffing? For example running “go fmt” or “prettier”?


I haven't tested this, but maybe it will serve you as a starting point.

Throw this script into $PATH (let's say into ~/.local/bin/diff-fmt):

  #!/bin/bash
  exec delta <(gofmt "$1") <(gofmt "$2")
here I'm using delta as the difftool: https://github.com/dandavison/delta

and then, once:

  $ git config --global interactive.diffFilter diff-fmt


Thank you, will try it out :-)


Wouldn't it be better to do that before committing? Or by using a hook?

Since diff is used to make patches it could ruin things I imagine..


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.


> If another company wants to provide NFC capability for credit cards, they can and the actual credit cards already do.

The other companies wants to provide NFC capabilities for their mobile bank/direct payment app. Like Norwegian “Vipps”, direct instant payments between any Norwegian bank.


And within the EU (EEA incl) these systems are interoperable, I can use my German bank's debit card in France, Italy, and ironically also in Switzerland. Even via NFC...


…which is nice, when the master is not tagged and you’re trying to find out “does this release include the bug fix in pr #123” (without cloning and/or jumping between tags/branches).


There's already a "compare" selector on the current/old releases page that lets you do just that with two clicks.


Thank you, that is useful, but basically same as "jumping" between branches.

@pronik's reply was spot on, viewing the merge commit, which shows which branches and tags the commit is included in. Example: https://github.com/openshift/okd/commit/e278fba2d8a5aea6b7bd...


Which is extremely easy: you click on the actual patch that has been merged and look under the commit message where all the tags containing this particular commit are shown.


Thank you. Tried on the commit in PR, did not show up, but the merge commit did.

I guess it's dependent on merge strategy, where squash merge will not include the initial commit hash. Or maybe "pr commit view" excludes the same info.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: