HNHacker News
TopNewBestAskShowJobs

sarahdellysse

513 karma · joined October 14, 2011

submissionscomments
sarahdellysse··on We can no longer run Microsoft Store on 1809/LTSC 2019
Yeah they do. Run `wsreset.exe -i` in powershell and it'll install the Windows Store after a few minutes.
sarahdellysse··on Mozilla reverses course on its terms of use
Notably, the do not reverse the course on the selling of user data. This is still a non-starter Mozilla. Do you not realize who your core base is? The only people who still use Firefox are people who value privacy and extensibility in our tools. Still a "no" from me dawg
sarahdellysse··on Ask HN: Is the market still bad even for senior+ engineers?
I have 14 years experience and I've never seen anything like the job market for the last 1.5 to 2 years. In the past, when I was looking for a job, I'd have interviews scheduled within the first few weeks of looking. Nowadays any time I put feelers out I get nothing in response.
sarahdellysse··on Department of Government Efficiency
How is a large swath of the population okay with things like this? How do they not see such things as embarrassing on the national level? I just don't get it.
sarahdellysse··on Show HN: DBOS TypeScript – Lightweight Durable Execution Built on Postgres
Hi there, I think I might have found a typo in your example class in the github README. In the class's `workflow` method, shouldn't we be `await`-ing those steps?
sarahdellysse··on $20k bounty was claimed
Not OP, but prettier doesn't break template literals, but it will break non-literal sections of template strings. For example, if we wrote this:

    const foo = `aaaaaaaaaaaaaaa${bbbbbbbbbbbbb}ccccccccccccccc${ddddddddddd}`;
prettier would fix it to

    const foo = 
      `aaaaaaaaaaaaaaa${
        bbbbbbbbbbbbb
       }ccccccccccccccc${
        ddddddddddd
       }`;
(or something similar) and it would be fully equivalent.

I don't like it doing that either tbh but hey prettier is good enough in most cases its worth putting up with it

sarahdellysse··on An experimental Android WebView Media Integrity API early next year
> backed off WEI

for now

sarahdellysse··on Things you forgot (or never knew) because of React
> I’m still not exactly sure what the difference between useMemo and useCallback is

    const useCallback = (fn, deps) => useMemo(() => fn, deps);
That's it. That's all it is. `useCallback` is a shorthand for `useMemo`, when you want to memo a function definition.

Example:

    const handleButtonClick = useCallback((event) => {
      event.preventDefault();
      window.alert(`Hello, ${name}!`)
    }, [name])
is just shorthand for

    const handleButtonClick = useMemo(() => (event) => {
      event.preventDefault();
      window.alert(`Hello, ${name}!`)
    }, [name])
sarahdellysse··on Proposing a struct syntax for Python
So basically you want something like how typescript does, where you can do this:

    const config = {
      rootDirectory: "/tmp",
      shouldFrobnicate: false,
    }
I'm far from a python expert, more like a TS dev who occasionally tries to write Python, but when I'm in that situation I find that writing one-off classes seems to be python's way of doing things. I'm not a super big fan of it myself, but it works:

    from dataclasses import dataclass
    
    def _create_config():
      @dataclass(kw_only=True)
      class Config:
        root_directory: str = "/tmp"
        should_frobnicate: bool = False
      return Config()
    config = _create_config()
I experimented with making a decorator that could do something like this, but never got it working with `mypy` so I gave up:

    @iife
    def config():
      @dataclass(kw_only=True)
      class Config:
        root_directory: str = "/tmp"
        should_frobnicate: bool = False
      return Config()
the `@iife` would make it so that `config` was a variable, not a `def`, but yeah the whole thing stank so I gave up
sarahdellysse··on Show HN: A smarter Unix shell and scripting environment
> Some individuals, particularly those running Linux, follow a standard called XDG Base Directory Specification. While Murex does not adhere to this standard, instead conforming to the de facto standard defined by the past precedents of previous shells, in order to offer flexibility for those who do prefer the XDG specification Murex does support overriding its own default paths via special environmental variables.

no no no you're missing the point: on POSIX systems, go with XDG by default. cmon guys it's 2023 not 2003

sarahdellysse··on Podman Desktop 1.0
Anyone have any experience running Windows and WSL2 with Podman Desktop? I'm running W11, with fedora in WSL2. What I've been doing with Docker Desktop is running Docker Desktop on Windows startup, and that gives me access to the docker machine in both powershell and inside my wsl2 environment (for the latter, docker-desktop installs a binary inside fedora-wsl2 at `/usr/local/bin/docker` that communicates to the host)

So far, I uninstalled Docker-Desktop and installed Podman-Desktop, and now I can run `podman` from powershell but not from fedora. I'm about to try `sudo dnf install podman` and hope it connects to the podman-machine? I dunno, it's not exactly clear

sarahdellysse··on What happened with ASUS routers this morning?
I recently picked up a Linksys e8450 (twin sibling of the Belkin RT3200) and flashed it with openWRT and it's been great; WIFI-6 speeds on a router that is actually configurable
sarahdellysse··on Rux: A JSX-inspired way to render view components in Ruby
even simpler, I have always wished that JSX/JSX-alikes would serialize to something like a tuple like `(tag: string | Component, attributes: Record, children: List)`, so your example would start looking something like this:

    <div class="example">
      <h1 id="heading">This is an example</h1>
      <h2>creating React markup</h2>
      <AnotherComponent foo="bar">
        <li>
          <a href="http://whatever.com">One list item</a>
        </li>
        <li>
          Another list item <hr />
        </li>
      </AnotherComponent>
    </div>
would translate to something like this:

    ["div", {"class": "example"}, [
      ["h1", {"id": "heading"}, ["This is an example"]],
      ["h2", {}, ["creating React markup"]],
      [AnotherComponent, {"foo": "bar"}, [
        ["li", {}, [
          ["a", {"href": "http://whatever.com"}, ["One list item"]],
        ],
        ["li", {}, [
          "Another list item",
          ["hr", {}, []],
        ],
      ],
    ]
and that all Rux/JSX/hyperscript/whatever would compile down to that
sarahdellysse··on A 'CSS reset' for TypeScript, improving types for common JavaScript API's

    input: Record<string, unknown>
sarahdellysse··on Ask HN: What sub $200 product improved your 2022
this is really interesting and something I hadn't thought about. Could you provide some examples? I wanna look more into this
sarahdellysse··on Ask HN: Anyone using proprietary Unix at work?
Back when I worked at OmniTI (from like 2015 to 2017), we had an in-house Illumos neé Solaris distro for cloud servers named OmniOS. I didn't use it too much myself as it was somewhat legacy but all the other devs who used it for prod debugging loved all the dtrace/zfs stuffs on it.
sarahdellysse··on Ask HN: Why JavaScript experts tend to not use TypeScript?
So say we had code like this:

  const safeSplice = (items, start, deleteCount, ...itemsToAdd) => {
    const copy = [...items];
    const deleted = copy.splice(start, deleteCount, ...itemsToAdd);
    return {
      deleted,
      list: copy,
    };
  };
We could put this as a jsdoc-style typescript comment just before the `const safeSplice` line:

  /** @type {<Item>(items: Array<Item>, start: number, deleteCount?: number, itemsToAdd?: Array<Item>) => { deleted: Array<Item>, list: Array<Item> }} */
or as a multi-line type declaration:

  /** @type {<Item>(
    *   items: Array<Item>,
    *   start: number,
    *   deleteCount?: number,
    *   itemsToAdd?: Array<Item>
    * ) => {
    *   deleted: Array<Item>,
    *   list: Array<Item>
    * }}
    */
Alternatively, you could do something like this in place of the above:

  /*
   * @template Item
   * @param {Array<Item>} items
   * @param {number} start
   * @param {number} [deleteCount]
   * @param {Array<Item>} itemsToAdd
   */
I started out doing the former because I liked using the typescript notation, but I ended up doing the latter more often as I could leave the return type off the signature, which I prefer to do
sarahdellysse··on AltTab – Windows alt-tab on macOS
Oh wow, this is great! I have tried other window-based application switchers but never really liked how they worked. I understand that macOS has a app-centric model but I find that switching between windows works so much better for me.
sarahdellysse··on Tell HN: Recovering 2FA accounts is difficult if your phone is stolen
I add the TOTP to my 1Password vault, I try not to use SMS for 2FA. That said, I should start keeping a list of all my accounts that _require_ SMS for 2FA