Readit News logoReadit News
arve0 commented on Plain Text Email   notes.ghed.in/posts/2024/... · Posted by u/rpgbr
vouaobrasil · 2 years ago
This threat comes up a lot...but I gotta say I HATE HTML emails. Luckily thunderbird converts most of them to a more or less plain text look but the conversion is never truly like plain text. Plain text looks so much nicer...

I think email would be a lot better if plain text were the only format possible.

arve0 · 2 years ago
> if plain text were the only format possible

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

arve0 commented on Pure Bash Web Server   github.com/dzove855/Bash-... · Posted by u/shakna
solatic · 2 years ago
> UX

I would agree, but so much of day-to-day Kubernetes is arcane CLI commands to begin with. Other stuff that is non-trivial to do on the CLI but comes up in most reasonable production deployments:

  * Rotating secrets without exposing the secret to the shell history file (hint: kubectl apply -f can take - to signify atdin, but not kubectl patch!)
  * Ensuring your edits to a ConfigMap pass application-level validation (i.e. your configuration changes won't crash your app, not just that it's a valid ConfigMap)
  * Anything to do with user auth or RBAC
  * Scaling the default persistent volume size of a StatefulSet
The truth is that Kubernetes is a platform, and just like how most people don't want to run a bare copy of Bash or VIM on their laptop, people will figure out aliases, one-liners, and other functions to help make them effective. So some of working effectively with Kubernetes means, yes, building your own custom debug containers, and writing your own helper shell stuff.

arve0 · 2 years ago
> 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 commented on Things you forgot (or never knew) because of React   joshcollinsworth.com/blog... · Posted by u/inner_square
jchw · 3 years ago
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.
arve0 · 3 years ago
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 commented on Things you forgot (or never knew) because of React   joshcollinsworth.com/blog... · Posted by u/inner_square
jchw · 3 years ago
Web Components have got to be the single most overrated web feature I've ever witnessed in the many years I've been messing around with browsers. You know, even WITH React and no Web Components, there was already a pretty reliable way to integrate third party libraries into React without a ton of glue: the DOM. Like for example, if you want to integrate a text editor like Monaco or Quill, basically all you have to do is give it a DOM node and tie together whatever props/events/bindings you want. You don't really need monaco-react, which is not even a large library to begin with.

The main reason why React is still popular is, drum roll please... The programming model. JSX is not an antiquated idea, it is still one of the better ways to integrate the UI part of a JS application into the JS part directly. I greatly prefer JS logic inside of my HTML versus a bespoke template language specifically because it's easy to compose and construct complex logic in.

I've been messing around with Svelte a bit in spare time. I really like Svelte and will probably continue to use it, but the two things I will note is:

- The integration with Web Components is imperfect and doesn't really hit me as something I would seek out.

- The templating logic in the HTML feels decidedly inferior versus just being able to use JS logic and JSX. Try doing a for loop where you count up; the best answer I could find on the internet was to construct an Array using `Array(number)` and enumerate over it...

What I really want is actually more like React's programming model with Svelte's "compiling down to nothing" mantra.

But this Web Components fervor, I know people get very heated about it, but I strongly believe that in 10 years it's going to be one of those grotesquely complex legacy features nobody can get rid of.

arve0 · 3 years ago
Each loops over anything with a length property:

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

Deleted Comment

arve0 commented on SQLedge: Replicate Postgres to SQLite on the Edge   github.com/zknill/sqledge... · Posted by u/clessg
DANmode · 3 years ago
List a couple?
arve0 · 3 years ago
A few I know: rqlite, dqlite, SQLite wasm, litestream.
arve0 commented on Offline is just online with extreme latency   blog.jim-nielsen.com/2023... · Posted by u/samwillis
mfbx9da4 · 3 years ago
Example? I don't see the link
arve0 · 3 years ago
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 commented on macOS keeps a huge wallpapers cache   giuliomagnifico.blog/tips... · Posted by u/giuliomagnifico
323 · 3 years ago
Unfortunately lots of apps keep large caches.

For example almost all electron apps keep the last two or so versions around when they auto-update. And since Electron apps are around 250 MB that's 0.5 GB of old versions per app.

I recently discovered a big cache - in terms of file number, 6000 files - of basically every edit I did in the last 6 months in VS Code - called Local History. Also, every directory you launch VS Code in will have a workspace cache associated with it, it can be 200 MB if you have C++ files in it, and VS Code will not remove it when you delete the original dir.

And so on...

I wish they would all integrate into a master clear caches system app, where you would have the opportunity of seeing them and clearing them. A bit like on Android.

arve0 · 3 years ago
The history feature in VSCode have saved me multiple times. To me, 200MB per workspace is worth it.
arve0 commented on Ace, CodeMirror, and Monaco: A comparison of browser code editors (2021)   blog.replit.com/code-edit... · Posted by u/williamstein
productceo · 4 years ago
I think in Stack Overflow Developer Survey or in the State of JS Survey, 3% or less responded they use cloud IDE. I wonder whether they are solving some real problem that cannot be solved in desktop IDE, and whether they will really take off one day.
arve0 · 4 years ago
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 commented on Highlights from Git 2.35   github.blog/2022-01-24-hi... · Posted by u/ossusermivami
5e92cb50239222b · 4 years ago
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

arve0 · 4 years ago
Thank you, will try it out :-)

u/arve0

KarmaCake day136August 11, 2014View Original