I've considered this for consolidating core hardware, but dual-boot doesn't do trust boundaries well. The Windows kernel still has full block access to the other device, so if it gets admin-level malware, it has free rein to infect the other system. At one point several years ago I got partway through a plan involving having most disks be externally pluggable (and assuming that firmware-level malware persistence is unlikely, which I'm not as sure about these days) but gave up for unclear reasons. I think if I were to try that again (and if I had the hardware for it) I'd try some kind of NAS approach to separate storage credentials from the OS.
You could indeed run Windows in a VM with PCI passthrough, and for a while long ago my desktop was Xen and I ran a Windows 7 domU which was attached to a second graphics card. Sharing a GPU at least used to be much harder; I think there's better options nowadays than before (paravirtualization-style GPU-command-level passthrough devices, and I assume some graphics hardware supports being split up for partial IOMMU passthrough in the way some high-end network cards do), but I don't know how they stack up for gaming performance.
However, the use case under discussion touches on things like handling kernel-level anti-cheat requirements, which is exactly the kind of place where I'd expect you to get in trouble trying to jigger around with virtual machines. Even before that point, I get the general feeling games and game platforms can get tetchy when you're not on Real Recognizable Hardware.
Normal/classical FDE doesn't truly protect integrity, only confidentiality. Supposedly LUKS2 allows you to run with --integrity, but it's an extra layer of I/O amplification, and if you're willing to take that hit then there's less incentive not to just use an external drive. https://security.stackexchange.com/questions/87367/does-luks...
As for Secure Boot, maybe? I haven't thought through how that would help in this context, but my instinct is to ask how you'd do the binding between “I intend to boot Y instead of X” and “only accept the boot signature for Y instead of X”, so that malware can't try to unexpectedly substitute X. It feels like there's probably places for attackers to mess around here unless you're very careful.
Not really. Regular exploits that allow attackers to gain SYSTEM level access frequently crop up in Windows (like the recent regpwn exploit). Someone who games on PC is likely into modding as well, and this is a frequent attack vector - so an innocent-looking mod executable could gain admin rights and make use of secure boot exploits like CVE-2023-24932 (assuming the system is using an unpatched BIOS). Even if the BIOS is patched, there's no guarantee that a similar exploit won't crop up in the future. You could update your system regularly to stay on top of things, but zero days exploits are also a thing - like, do you install updates the minute they come out? Probably not. And even if you do, it takes time to download and apply those updates, a window which could be used to execute zero days, by a hidden RAT.
You don't need any major resources to exploit systems these days in this manner, especially with AI in the mix.
The NonEmptyList in Cats is a product (struct/tuple) type, though; I assume the Haskell version is the same. The type shown in the blog post is a sum (union) type which can contain an empty enumerable, which contradicts the name OneOrMore. The use described for the type in the post (basically a convenience conversion funnel) is different and makes sense in its own right (though it feels like kind of a weak use case). I'm not sure what a good name would've been illustratively that would've been both accurate and not distracting, though.
Well you are right of course, I just wanted to explain what they wanted to show. Of course the type would be wrong if the second entry in itself is an empty list. I just wanted to explain the reasoning what they tried to accomplish
They could’ve done the Either type which would’ve been more correct or maybe EitherT (if the latter is even possible)
I don't think they were trying to accomplish the same thing as the Scala/Haskell version; these are just two completely different things that happen to share a name because the blog post gave the example a name that is confusing when read literally. The purpose of the Cats version is “there is always a head element”. The purpose of the union in the blog post is more like “this can be a collection, but many callers will be thinking of it as a single element, so don't put the burden on them to convert it”. I do think it's a weak case for them in a type theory sense (I would tend to position that kind of implicit conversion elsewhere in the language), but I can also see it being motivating to a large class of developers…
… wait, I've made a different mistake here while trying to explain the difference, haven't I? I was describing it as a sum type, but it's not really a sum type, it's really just set-theoretic union, right?
Which also means OneOrMore is unsound in a different way because it doesn't guarantee that T and IEnumerable<T> are disjoint; OneOrMore<object> initialized from [x] will always return [[x]] from AsEnumerable, won't it? If I'm interpreting the switch expression correctly and the first case predominates, since a list is-an object? I don't have a test setup handy; someone with actual C# experience, please tell me whether that's correct or whether the compiler signals an error here or something…
groff can produce output with links in it, and does by default in HTML mode! The GNU version of the Unix man page macro set has .UR and .UE for “URI start” and “URI end”. (I don't know whether these were present earlier in the lineage or whether they were introduced by GNU.) Also, the lowdown Markdown converter when in man output mode will output those for links. For fun, try:
echo 'Hi there! Have a [hyperlink](https://www.gnu.org/software/groff/manual/groff.html).' | lowdown -st man | groff -man -Thtml
There's also support for OSC 8 terminal hyperlink sequences throughout most of the groff toolchain: grotty(1) supports outputting them, and less(1) supports passing them through, including ^O^P and ^O^N gestures for moving between them. But man(7) says they're not enabled for grotty output by default. “Options” describes the rationale in its item for “-rU1”: “grohtml enables them by default; grotty does not, pending more widespread pager support for OSC 8 escape sequences.”
So if I set MANROFFOPT=-rU1 in the environment, I can get clickable links in man… if the man page author included them that way in the first place. I'm not sure how common that is in the wild, but grepping the ones on my system, I find firejail(1) contains a link to a GitHub issue embedded in that way, and it does indeed work when I hit ^O^N to seek to it and then C-mouse1—though the mouse gesture I have Alacritty using for links doesn't seem to work through tmux (there might be a way involving twiddling the tmux terminal-features setting, but I ran out of steam before trying this), and I didn't see a great way to get either grotty or Alacritty to style them on display instead of having them blend into the surrounding text, so it's still kind of scuffed in practice. (Though I bet the cool kids have moved on from Alacritty by now?) less displays the link target in the status line when you use the navigation commands, so it's not inaccessible, but for opening selected links directly from less with the ^O^O gesture rather than leaning on terminal support, it looks like you need to explicitly set the LESS_OSC8_ANY and/or LESS_OSC8_‹scheme› environment variable to a shell command that outputs a shell command pattern to substitute the link into; if I set LESS_OSC8_ANY='echo xdg-open %o' then it passes it to my Firefox. I wonder if they'd take a patch (or if any existing distributions patch it) to use that as the default?
That was a fun little rabbit hole to go down, thank you.
I mostly care about links inside the man page (look at man bash — there are tons of internal references like "described below under CONDITIONAL EXPRESSIONS" or "section SHELL BUILTIN COMMANDS below", or operators being underlined and looking like hyperlinks, which you can't easily interact with to just go to where they refer to. You have to employ full-text search, but it also turns up the references themselves, and good luck searching for the place where e.g. command "." is described) and links to other man pages, not the normal Internet URLs being clickable (those things are trivially copy-pastable into a browser next window).
Ah! Yeah, that makes more sense—I misinterpreted you at first since I don't normally think of “internal link” as the default exemplar of “hyperlink”. And yeah, I don't see good target markup for that. Stuff like starting your search regexp with “^ +” helps but is still janky. I'd tend to categorize this mostly as “man pages aren't meant to be long treatments of more complex software”, of course? Some large packages do something which I kind-of like but which I'm not sure would work well if everyone did it (mainly due to ergonomy around disambiguation) where they split up a bunch of their documentation into shorter pages with the origin as part of the section when making it accessible through man: pcap_init(3pcap) from libpcap, Bigarray(3o) from OCaml. Shells, as you notice, get hit by this really hard; Zsh tries to do some splitting in the man version of its docs, but it's really not enough, like I'd want to see fc(1zsh) (and then fc(1bash), etc.) but instead it's all in zshbuiltins. (Eventually I facepalmed when I realized an Info version was available and switched to that. The way I found this out was actually by eyeing the Zsh source tree and noticing that the documentation files were written in Yodl, which I'd never heard of, and then noticing that the schema they were using looked a lot like Info…)
… wow, hang on, I just checked for Bash, and it has an Info file but it says it's just an intro and the manual page is the definitive version‽ That's… hah. There must be some timeline jank around that; ambiguous NIH vibes around Info aside, I wouldn't have expected it from an actual GNU program! Did Bash show up before Info existed?
the notion that "contains —" ~= "AI generated" is a really dumb popular misconception: dashes have existed for hundreds of years. just because many people use them incorrectly or treat the hyphen as if it's some universal dash doesn't change that.
strunk & white taught me to use em dashes in something like elementary or middle school [1] — it's not hard to understand how to use them or type them... i'm baffled as to why people act like this is the case.
I've been using a reasonable gamut of Unicode punctuation in English for I think the majority of my life now as well—including this very comment, https://news.ycombinator.com/item?id=19365079 from 2019, and the above comment where I typed a horizontal ellipsis. I tend to attribute it to taking my language usage from relatively formal sources and being a desktop Linux user with a Compose key. I used to constrain myself to ASCII for email and source code, though, and would use TeX-like “--” and “---” and such instead; sometimes I would also just do that when temporarily on some setup where accessing the real stuff was harder.
But then, people have also been asking me whether I'm an AI for over twenty years, so…
Like it or not, current LLMs really like em-dashes and so usage of them is quite a lot of bayesian evidence in favor of the author being an LLM. It's unfortunate for the humans who use em-dashes but that's how it is.
All of the keyboard-driven terminal signals can be intercepted; catching INT (^C) for cleanup is just more common than the others. Only KILL and STOP cannot be caught.
^Z sends TSTP (not STOP, though they have the same default behavior) to suspend; some programs catch this to do terminal state cleanup before re-raising it to accept the suspension. Catching it to do full backout doesn't make as much sense because the program anticipates being resumed.
^\ sends QUIT, which normally causes a core dump and is rarely caught. If you have core dumps disabled (via ulimit -c 0 or other system configuration) then you can often use it as a harder version of ^C; this is how I would tend to get out of ‘sl’ in places where I found it unwantedly installed.
TECO (and thus Emacs) supported a commands like "read page" which turned into movement by page in Emacs, which is why ^L shows up in Emacs Lisp (and sometimes similar vintage code)
To some of the critics here: did you or did you not notice the “Somebody ought to write one of those […] Here, I'll even get the ball rolling” framing? A polished such article this is not claiming itself to be! I would go as far as saying the HN submission title is misleading as a result.
How's CL's GC performance for games nowadays? I've been slightly eyeing the upcoming Autumn Lisp Game Jam myself, but last I checked all the major libre CL impls, including SBCL, still used a full stop-the-world collector, which feels like a recipe for latency spikes. I saw flashes of stuff on sbcl-devel about someone working on a lower-latency one, but I don't know whether it got anywhere.
reply