HNHacker News
TopNewBestAskShowJobs

medstrom

1,190 karma · joined January 15, 2021

submissionscomments
medstrom··on I've tracked every piece of clothing I've worn for three years (2021)
~~"buy what you need"~~

"do not go shopping until after something has a hole in it, then when you are there, replace only that"

medstrom··on Why I still blog after 15 years
I got one too: https://edstrom.dev
medstrom··on Xkcd 1425 (Tasks) turns ten years old today
I do not think branches merge, except maybe after intervention by a creative gardener.
medstrom··on How I Built My Blog
As someone with knowledge of JS, my favored static site generator is SvelteKit. I feel like for me, Jekyll and such things no longer offer a simplification.
medstrom··on They don't make readers like they used to
I've only met one person who spoke of HHGG (or "H2G2"), and it's surely a fandom like Star Trek, Star Wars or something, but I feel confused at your characterization. Is it especially common in HHGG to not branch out?
medstrom··on Greppability is an underrated code metric
Example of such a language?
medstrom··on Greppability is an underrated code metric
For the React components? I prefer the flat, curiously.

For the JSON keys, I agree somewhat, although it would be easy to compensate by vertically aligning the values.

medstrom··on In the beginning, there was computation
Bit like a codebase where different parts slowly accrete extra features that presume the presence of the other parts, so that you eventually have to read the whole to follow anything.
medstrom··on Greppability is an underrated code metric
What about groping? Groping around for text.
medstrom··on Greppability is an underrated code metric
FYI, many people use thin wrappers like this, it's still a primitive tool that doesn't parse the language, but it can handle that problem: https://jumpshare.com/s/zMENBSr2LwwauJVjo1wS (GIF)
medstrom··on Greppability is an underrated code metric
Mmh, I type "func\ lart(" when I need the literal string. But it's less often, so it's fair that it's slightly more to type.
medstrom··on Greppability is an underrated code metric
That's fair, I see many examples in this thread where people pass an exact string directly to grep, as you do. I'm an avid grepper, but my grep tool [1] translates spaces to ".*?", so I would just type "func lart(" in that example and it would work.

An incremental grep tool with just this one transformation rule gets you a lot more mileage out of grep.

[1] https://github.com/minad/consult/blob/screenshots/consult-li...

EDIT: Better demo https://jumpshare.com/s/zMENBSr2LwwauJVjo1wS

medstrom··on Greppability is an underrated code metric
Which of the examples are harder to read for humans?
medstrom··on Greppability is an underrated code metric
There is no conflict between improving tools and learning how to express your code in such a way that as many tools as possible work better OOTB.
medstrom··on Greppability is an underrated code metric
I like it, but it may be painful in languages where long variable names are common.
medstrom··on Greppability is an underrated code metric
I feel there are a few ways to invoke .map() in a readable way and many ways that make the code flow needlessly indirect.

Should be a judgment call, and the author needs to be used to doing both looping and mapping constructs, so that they are unafraid of the bit of extra typing needed for the loop.

medstrom··on Greppability is an underrated code metric
Oh, you're right.
medstrom··on Greppability is an underrated code metric
Norwegian still translates grep as "grip"/"grab". I always thought of grepping as reaching in with a hand into the text and grabbing lines. That association is close at hand (insert lame chuckle) for German and English speakers too.
medstrom··on Greppability is an underrated code metric
So Dutch/German make "begreif" a verb, for Swedish it is just a noun (that means "concept").

But "begrijpelijk" has a clone: "begriplig". An adverb based on a verb in a foreign dictionary. There is no verb that goes "begreppa", it's just "greppa".

medstrom··on Greppability is an underrated code metric

    const foo = () => {}
This function is not anonymous, it's called foo.
medstrom··on Greppability is an underrated code metric
Is it just hard to get used to, or does it fundamentally make something more difficult?
medstrom··on Greppability is an underrated code metric
Grok is right! I'd translate Swedish "greppbar" directly as "grokkable"; "att greppa" as "to grok".
medstrom··on Can solar costs keep shrinking?
What does it stand for?
medstrom··on Why Does Elisp Suck
That'd be better as

    (defvar foo-i 0)
    (defun foo ()
      (while-no-input
        (while (< foo-i 10000)
          (print (cl-incf foo-i))))
      (when (< foo-i 10000)
        (run-with-idle-timer 1 nil #'foo)))
Make a copy of all that, search-replacing "foo" with "bar". Run (progn (foo) (bar)). Both loops will complete eventually.

EDIT: OK, you explained what you call the normal way to do things. What kind of code is this that take >1 second in each repl? Out of curosity.

medstrom··on How de-Googled is Lineage OS?
What you describe sounds like the data on both of you gets stored due to your choice of messaging app, and you just don't get shown ads due to your choice of OS. Data may still be there.
medstrom··on Why Does Elisp Suck
But why does that matter? Help me understand.

To be fair I haven't used an elisp REPL, unless it counts that I use commands. Any command used in Emacs is an eval step in a REPL.

But you mean a REPL as in a console-style interaction, right? It seems an impoverished interaction model, only necessary with other languages since they are not also the editor process.

Ok I can't have multiple REPLs but neither can I type on multiple keyboards at the same time. So it seems to only matter when you are going to spin up some noticeable chunk of work to be done in the background, while the user interacts with the editor. And that is totally doable with `while-no-input`.

In what situation are you running two or more noticeably slow call stacks that need to happen inside the editor process?

medstrom··on Why Does Elisp Suck
The first question is why. Can you not use CL repls instead of elisp repls?
medstrom··on Why Does Elisp Suck
Even more simply, `while-no-input` has existed since 2007. And start-process since 1985. It has always been possible to make a mail "thread".

If the developer didn't use the old tricks, it doesn't seem likely they will use the thread trick either.

medstrom··on Why Does Elisp Suck
This seems a bug in the design of that REPL. Unless there's some reason the process has to be the same as the editor process.
medstrom··on Why Does Elisp Suck
It would also simplify the codebase, to scrap the native Windows support and outsource that responsibility to WSL.
← PreviousPage 4 of 26Next →