News for hackers. Stuff that matters.

arve0

Re:Plain Text Email on Friday March 22, 2024 @08:29AM (#39790006)
> if plain text were the only format possible

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

Re:Pure Bash Web Server on Saturday February 17, 2024 @12:57AM (#39406833)
> 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.

Re:Things you forgot because of React on Wednesday August 16, 2023 @05:04PM (#37153816)
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.
Re:Things you forgot because of React on Wednesday August 16, 2023 @08:19AM (#37145899)
Each loops over anything with a length property:

    {#each {length: 3} as _, i}
https://stackoverflow.com/questions/58213585/svelte-3-how-to...
Re:SQLedge: Replicate Postgres to SQLite on the Edge on Wednesday August 09, 2023 @01:05PM (#37065625)
A few I know: rqlite, dqlite, SQLite wasm, litestream.
Re:Offline Is Just Online with Extreme Latency on Wednesday April 19, 2023 @06:29AM (#35626470)
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.
Re:macOS keeps a huge wallpapers cache on Wednesday September 28, 2022 @03:57AM (#33005352)
The history feature in VSCode have saved me multiple times. To me, 200MB per workspace is worth it.
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?
Re:Highlights from Git 2.35 on Tuesday January 25, 2022 @12:59PM (#30075327)
Thank you, will try it out :-)
Re:Highlights from Git 2.35 on Tuesday January 25, 2022 @12:58PM (#30075307)
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.

Re:Highlights from Git 2.35 on Tuesday January 25, 2022 @11:58AM (#30074273)
Anybody know if it’s possible to run a formater before diffing? For example running “go fmt” or “prettier”?
Re:Apple to face EU antitrust charge over NFC chip on Wednesday October 06, 2021 @12:47PM (#28775262)
> 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.

Re:A new public beta of GitHub Releases on Wednesday October 06, 2021 @05:22AM (#28770905)
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...

Re:A new public beta of GitHub Releases on Wednesday October 06, 2021 @05:16AM (#28770861)
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.

Re:A new public beta of GitHub Releases on Tuesday October 05, 2021 @04:58AM (#28756933)
…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).
Re:Google illegally underpaid thousands of workers on Friday September 10, 2021 @06:14PM (#28487511)
> My question is, if it's so advantageous to employ people via onsite staffing firms (basically half of FAANG's workforce is employed this way), why doesn't Google stop directly employing people altogether?

Because it’s the mix that is advantageous, not either one (employees only vs contractors only).

Re:Podman: A tool for managing OCI containers and pods on Thursday September 02, 2021 @12:32PM (#28394124)
I’ve used wait-for-it with success.

https://github.com/vishnubob/wait-for-it

Re:Zx 3.0 on Monday August 16, 2021 @05:14PM (#28203074)
zx has a small dependency tree, 12 packages marked as "@types" and 36 regular packages[0].

If you are fluent in Node, it should be easy to avoid further dependencies.

0: https://arve0.github.io/npm-download-size/#zx

Also, why would evolution select for an equilibrium? With so many parameters I would expect oscillation.
Re:Dropping cache didn’t drop cache on Sunday May 09, 2021 @06:49AM (#27094929)
> The patch doesn't include any comment about a race condition in the actual code

…but it’s in the commit message, which is basically the same as a comment.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

Re:Zsh Tricks to Blow Your Mind on Thursday February 18, 2021 @02:25PM (#26184290)
One yuck about aliases, it doesn’t give you autocomplete. See abbr in fish shell for an alternative.
Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @01:56PM (#25649397)
Model X: 198” L x 79” W
Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @01:39PM (#25649137)
Sorry, thought you meant “initial” total purchasing price, if that makes sense. Road tax is back, this year. No ferry fee is only on Europe roads. No toll fee still. Also service cost is probably cheaper, as electric has less failing motor parts, not sure about the battery though.
Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @12:31PM (#25648081)
They are priced the same, I’ve bought this car to this price. The MSRP includes no sale tax (mva) and no horse power tax. Are you thinking of some other incentives?
Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @12:03PM (#25647630)
Yes, that is correct. But the argument is, «electric cheaper -> sells more». My argument is that the people of Norway wants electric, when priced the same. Electric is the new shiny that most people in Norway want.
Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @11:10AM (#25646949)
Kia niro comes out the same price, electric sells the most.

Hybrid 405k NOK [0] Electric 415k NOK [1]

0: https://www.kia.com/api/bin/docDownload?program=brochure&loc... 1: https://www.kia.com/api/bin/docDownload?program=brochure&loc...

Re:Electric cars make up 54% of cars sold in Norway in 2020 on Tuesday January 05, 2021 @10:58AM (#25646829)
Are you comparing a large car, Subaru Outback, to a small car, Model 3? Model X would be a fairer comparison, where model X is 300k NOK more in base model.
Re:Userscripts Are Fun and Are Still Very Much Relevant on Friday April 17, 2020 @02:14AM (#22896678)
web-ext does hot swap, see the sibling comment from insin to get a minimal manifest for a userscript.
Re:Things Markdown got wrong on Saturday April 04, 2020 @04:23AM (#22776967)
Have you seen the commonmark standard? Did not see that mentioned. https://commonmark.org/
Re:Things Markdown got wrong on Saturday April 04, 2020 @04:16AM (#22776950)
markdown-it [1] has a number of plugins that let you add extra features to commonmark. For adding attributes, I wrote markdown-it-attrs [2]. Combine that with a flexible static site generator, like metalsmith [3], and you have a solution adjustable to your needs.

1: https://github.com/markdown-it/markdown-it 2: https://github.com/arve0/markdown-it-attrs 3: https://metalsmith.io/

Older »