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.
1,510 karma · joined March 11, 2015
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.
/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 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.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.
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.
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.
I've written a mod to CS2 and CS1 (granted not a big mods but few small ones), Paradox mod store doesn't limit you in depth of the code mods. What you are limited by is churn in the internals of the game engine, as most mods use monkey patching techniques that then break.
What I wished CS2 modding had some official way to monkey patch, so they could somehow try to detect incompatible monkey patching when people have 100s of mods installed. Suppose two mods modify WaterSystem, it would show the user both mods and locations they've attached at. It would help debug things down.
Many gamers blame original game devs for broken game even though it was fault of the mods they've installed. For us who knows programming, that is ridiculous because these mods are monkey patching at so deep level... but that is probably reason many games don't have official modding as it weighs down their reputation.
Rust has a lot of helpers to make it less verbose, even that error they demonstrate could've been written in some form `...code()?` with `?` helper that would have propagated the error forwards.
However I do acknowledge that writing Error types is boring sometimes so people don't bother to change their error types and just unwrap. But even my dinghy little apps for my personal use I do simple serach `unwrap` and make sure I have as few as possible.
Can you use GPG-agent for non-resident passkey challenges?
I also have Yubikey setup, but haven't thought of this.
Both times, first journalctl entry in the crash time is:
[drm:__nv_drm_gem_nvkms_map [nvidia_drm]] ERROR [nvidia-drm] [GPU ID 0x00000100] Failed to map NvKmsKapiMemory 0x0000000070a84e8b
Then KWIN dump etc.
Reminding me to buy AMD next.
That is very complicated if you take into account also Linux, Windows, iOS, MacOS, Android support, and related utilities like tray icon, etc. There are other efforts, too, but they are also wrappers. Like this C/C++ implementation https://github.com/webview/webview that targets only desktop operating systems.
const greeting = pipe('hello')
| upper
| ex('!!!')
await greeting.run() // → "HELLO!!!"
If you look at the tests file, it needs to be written like this to make it work: let greeting;
(greeting = pipe('hello')) | upper | ex('!!!');
await greeting.run();
Which is not anymore as ergonomic."Write a function to find years of experience by name? Return just the number, e.g. '12'."
It works much better, and it can single-shot many of the processing requirements just from type definitions it can infer from the data.
This way it's easier to stick to tabular formats that have easy reading libraries, like with TypeScript/JavaScript JSON, and with Python, maybe CSV...
This article just highlights how hard it is to make optional offline applications. I feel like there should be a database-level solution to all this synchronizing.
Postgres can't run on a phone, so that's not a candidate for fully-synced database.
If you can, it's easier to have every client fetch from cache, and then a cron job e.g., every second, refresh the cache.
In CDN feature to prevent this is "Collapse Forwarding"
What I meant was transpiling Luau (in memory or cached to disk) -> TypeScript -> typecheck with tsc -> take error outputs and line numbers -> transform back to Luau code via sourcemaps etc. This is potentially way easier than making your own checker for another structurally typed language.
User only sees Luau script in their editor, but it gets checked by TSC in the background.
Roblox might is such a big maker that they can re-invent the whole structural typing themselves, so they don't need to do that.
I do wonder if we could reuse TypeScript in other dynamic languages.
Transform Luau to a subset of TypeScript, check with tsc, transform errors and results back to Luau. In the same way, one could reuse a TypeScript language server. This way of utilising TypeScript's engine could jump-start many other type checkers for other dynamic languages.
That's one positive side of Azure.
[1]: https://learn.microsoft.com/en-us/azure/cost-management-
Also, I sometimes add a snippet of text from the content to the title of the bookmark, making it easier to search afterwards.
For the new ecosystem to win, it needs to have its own user base for companies building apps to recognize it. Even with SailfishOS, the banking apps still require Android compatibility layer, which is slowly eroded with Play Services and Play integrity check disabling those one by one in the coming years.
That is a very hard problem, unless someone with serious name recognition like Linus Torvalds starts to lead that kind of effort, or a big company like Microsoft suddenly decides that putting 1 billion towards GNU/Linux would be in their interest. With small efforts, it will remain scattered.
Crowdfunding has a lot of power if there is name recognition behind the effort. Star Citizen has already gathered $800 million with mostly enthusiasm and a good start. Who is there to lead the effort for GNU/Linux phone development?
FOSS/Linux has had many attempts at phones, but they need one good leader to do it, which is very hard unless someone with name recognition gets everyone to work on one project.
When it comes to this article, I doubt the 500x cheaper statement, we would see these already everywhere if that were the case.