HN user

Ciantic

1,500 karma
Posts8
Comments430
View on HN

That is what I also wonder, who added that tootbrush statement there? Given that Oral-B has done replacable batteries for years, and they have dominant position, I'm thinkin that statement didn't come from lobbies. Maybe someone who are making the law is reasoning with itself or small group and didn't know that replacable batteries in toothbrushes are already a thing.

I also have Kobo Clara BW, and don't like swipe gestures, or any gestures whatsoever.

I (now) know why I don't like that, because regular book and magazines, you don't have to think about how you hold it. Your thumb isn't going to magically flick a page by accident if you take a firm grip on it. With gestures only e-ink books, I have to take extra caution how I hold it so that it doesn't trigger something.

I also discovered that these days motherboards come with a payload in their chipset, which gets installed automatically in background unless you figure out to turn it off from BIOS before installing Windows. In my case it was bunch of ASUS useless stuff, not just drivers, some "Armoury Crate" etc. Which just keeps running in background. I've switched to KDE, that kind of solved itself.

SQLite has no date data type. Also SQLite has no way to call EXPLAIN on query and get the dummy type name either for arbitrary SELECT query, so you can't even infer it, if you were to use the dummy type name "DATE" or "DATETIME".

Yeah, "?." as safe navigation operator even in JS where it already exists is eye-sore. They could use some other single character instead of two characters. Question mark is already doing a lot with ternaries etc.

Instead of obj?.:method?.(…) it would be like obj#:method#(…)

Replace # with your favorite extra character instead of questionmark.

Deno 2.8 2 months ago

Node refuses to support TypeScript within node_modules, see https://github.com/nodejs/node/issues/58429 this means you can't do "Typescript-only npm packages".

They made that intentionally at the beginning:

Currently there is consensus that Node.js should NOT run TypeScript files inside `node_modules. It is not supported to avoid package maintainers to release TS only package.

If I saw this in my CI script:

    curl -X POST $GITHUB_CACHE_URL < wololo.exe
It would make me pause, but now that it is a misfeature in YAML configuration it is more widely used. Point of bash scripts they are auditable, and understandable.

I didn't prescribe what the bash script would be, because it would differ on use case. If I wanted to share artifacts from other runs I would probably use podman and make sure I start new runs from known good condition, but because I understand that. Some other would use nix or whatever else.

What I want to focus on is mental model of your CI pipeline, and problem with too much YAML, consider this quote:

Cache scope is per-repo, shared across pull_request_target runs (which use the base repo's cache scope) and pushes to main. A PR running in the base repo's cache scope can poison entries that production workflows on main will later restore.

This is very difficult to understand, and teach to new people, because everything is configured as YAML, yet everything is layed out in the background to directories and files.

What if your CI pipeline was old-school bash script instead? This would be far more obvious to greater amount of people how it works, and what is left behind by other runs. We know how directories and files work in bash scripts.

Could we go back to basics and manage pipelines as scripts and maybe even run small server?

`android docs` is the superpower we need for everything. NPM / pnpm should have similar `npm docs` that would allow humans and agents to search for type-signatures and JSDocs.

It is so annoying that each agent has its own ideas where it tries to get the docs, usually by blindly grepping.

Let me present you my favorite, how do you figure out dirname, basename and filename in batch script?

    set filepath="C:\some path\having spaces.txt"

    for /F "delims=" %%i in (%filepath%) do set dirname="%%~dpi" 
    for /F "delims=" %%i in (%filepath%) do set filename="%%~nxi"
    for /F "delims=" %%i in (%filepath%) do set basename="%%~ni"

    echo %dirname%
    echo %filename%
    echo %basename%
It is just as intuitive as one would expect.

I know not all, but Debian/Ubuntu/Fedora does, and while the intended purpose of multi-stage releases is not necessarily security but stability, it still does help up with security too. Because third parties can look and scan the dependencies while they are still not in stable.

Most of the supply chain vulnerabilities that ended up in the NPM would have been mitigated with having mandatory testing / stable branches, of course there needs to be some sort of way to skip the testing but that would be rather rare and cumbersome and audited, like it is in Linux distributions too.

NPM should learn from Linux distribution package managers.

Have a branch called testing, and packages stay in testing for few weeks, after which they go to stable. That is how many Linux distributions handle packages. It would have prevented many of these.

Advising every user of npm/pnpm to change their settings and set their own cooldown periods is not a real choice.

ChatGPT has style settings, you probably should set it to something else than the default. Go to your personalization settings and change base style and tone. I have set it as 'efficient' which is less cheery. I can see why attention economy would lead setting the defaults towards more 'affirming' as it keep people more engaged and coming back.

I've been using podman, and for me it is good enough. The way I use it I mount current working directory, /usr/bin, /bin, /usr/lib, /usr/lib64, /usr/share, then few specific ~/.aspnet, ~/.dotnet, ~/.npm-global etc. I use same image as my operating system (Fedora 43).

It works pretty well, agent which I choose to run can only write and see the current working directory (and subdirectories) as well as those pnpm/npm etc software development files. It cannot access other than the mounted directories in my home directory.

Now some evil command could in theory write to those shared ~/.npm-global directories some commands, that I then inadvertently run without the container but that is pretty unlikely.

I wish they support Linux wholeheartedly, a lot of toolkits and GUI frameworks do it by half-assing things, mostly because Wayland is difficult to understand.

In Wayland you have multiple ways to render windows, not just the XDG top level window. It works via surfaces, and here is a list I've discovered so far:

  - XDG Top Level Window
  - Child Window
  - Popup Surface
  - Layer surface (like task-bars, shell overlays)
  - Subsurface (region in another surface)
  - IME Panel Surface (surface that follows text cursor)
There probably is others too.

It is diffifcult to find high-level toolkits that support all of the above.

I've used Claude and AWS CDK to build infra code during past year, it is great help but it is not to be trusted. I would not even consider it for Ralph Wiggum Loop style iteration or let alone allowing it to run `cdk deploy` or `cdk destroy`. It can generate decent looking constructs, but it comes up values for you like serverlessV2MinCapacity or sometimes it creates resources I don't need. It can end up costing a lot if you then deploy something you didn't expect to.

Since running destroy and deploy also takes a long time, gets stuck, throws weird errors etc, one still needs to read the docs for many things and understand the constructs it outputs.

If I understand this problem was in rkyv, and solution is using rkyv with glue code. I hope they could integrate some sort of official derive macro `rkyv::Sparse` for this if it can't be done automatically in rkyv.

More and more of the internet of humans need to rely on recommendations of other humans. Lobste.rs and other like such that retain the tree of joined people could work for other communities as well. Kind of like return of the FTP warez scene of 90s but for the rest of us.

I've used Smithay's Rust client toolkit for a few months now. For making apps it is still sometimes have unsafe wrappers disguised as safe. It has a lot of internals wrapped in Arc<>, but in my tests, the methods are not safe to call from different threads anyhow, you will get weird crashes if done so.

I will seek to dive-in to how Wayland API actually works, because I'd really like to know what not to do, when the wrappers used 'wrong' can crash.

I have these plugins: git, zsh-autosuggestions

    /usr/bin/time -f "%e seconds" zsh -i -c exit
    0.06 seconds
This is acceptable, maybe the zsh-autocomplete is the problem for author or something else?

I originally switched to ZSH + Oh My Shell because it opens so fast. Ideally plugins would initialize asynchronously but it's not very easy with shell scripts I think.

I have Kobo, but their decision to enable secure boot in newer models, and consequently pushing out FOSS choices as operating systems makes me think I won't get another Kobo. Yes the Nickel menu works still with secure boot enabled devices. I like to think that devices I buy might have different use-case in future, and secure-boot enabled devices seriously harm that.

designed to replace legacy shell scripting ... as arguments are passed as a structured array, not a raw string to be parsed by a shell

I find shell scripters prefer ubiquity and readability over raw performance. And making it mandatory to give arguments as arrays worsens the readabilty. However having both options would be good, your example doesn't actually require the shell escaping so it could have simpler way.

Here is equivalent in Deno for instance

    #!/usr/bin/env -S deno run --allow-all
    import $ from "jsr:@david/dax"; 
    const command = $`grep -r keyword .`.pipe($`wc -l`);
    const result = await command;
Deno (via library) and Bun both have $ that can also handle escaping, e.g.
    const dirName = "Dir with spaces";
    await $`mkdir ${dirName}`; // executes as: mkdir 'Dir with spaces'
I don't think syntax is your biggest hurdle though, biggest hurdle is that Bash is so common, Powershell was supposed to be better shell scripting, yet it takes nowhere outside Windows space.

Given that I've been using actively this just month, my opinion is bit biased.I run myself basically Fedora 43 KDE version: https://www.fedoraproject.org/kde/

However, for folks who don't want to install some random packages, maybe Atomic version of the distro is better: https://fedoraproject.org/atomic-desktops/kinoite/

Atomic Linux desktops has the neat feature for ability to "rollback" if installation fails. A lot like with ChromeOS, the updates are done in atomic fashion and the flipped over to new version.

Normal Linux distributions are more mutable, atomic are lot more immutable.

I switched to Linux in the past month.

First, I installed GNOME based Fedora 43, that was a mistake. I got it working "somewhat" like Windows, with Dash to Panel etc. widgets, but stability was not there after all the hacks.

Then I figured I try KDE Plasma, and this is so close to Windows that I made the switch permanent. Even little things like double-clicking on top, or bottom resize handle vertically maximizes the window, like in Windows.

KDE is not just better than Windows, but it is way more configurable out of the box. I really like window rules, which allows to set window locations, always on top settings for specific Chrome PWAs or other windows. KDE Settings panel is light years ahead of Windows, it has all the settings in one place, kind of like the old Control Panel.

There is rough spots, but not that many... I did end up buying AMD GPU, as with Nvidia GPU I had bunch of bugs.

I wanted to switch to Linux for a long time now because Windows Subsystem for Linux just wasn't good enough, it was mediocre. All the development happens with tools that have bash scripts as a glue. Windows was a hindrance at this point for me.

Right now I'm trying to learn to write small native Wayland GUI apps that use minimalish amount of memory, this is a bit tricky compared to Win32, but with new toolkit libraries pretty doable.

Electron vs. Tauri 8 months ago

Yeah, I switched to Linux and my single Tauri app was not cooperating.

They do have an effort to use Chromium Embedded Framework for rendering the webview, it's potentially much more stable in Linux. [1] It is nowhere near finished but you can run the cefsimple example, and it rendered me a window in Wayland.

CEF is also bundled in many distros, like Fedora 43, so if it can be linked with Linux distros version of CEF, then the binary stays smaller.

[1] https://github.com/tauri-apps/cef-rs/tree/dev/examples