News for hackers. Stuff that matters.

maggit

Re:Jellyfin founder Andrew leaves team on Tuesday July 21, 2026 @02:20AM (#48988725)
It's worth noting that Swiftfin finally had a new release for tvOS this summer which is worth checking out if you're interested in Jellyfin on Apple TV
Re:Remove Black Color with Shaders on Tuesday December 23, 2025 @08:23AM (#46365144)
It is indeed badly aliased. The technique demonstrated does not take into account antialiasing in the initial render, which causes this issue. There are ways to improve it, but I would advise against this approach in general since it doesn't handle these edge cases well.
Re:Ralf Brown's Files (The x86 Interrupt List) on Monday November 03, 2025 @03:13AM (#45796887)
x86-64 introduced a `syscall` instruction to allow syscalls with a lower overhead than going through interrupts. I don't know any reason to prefer `int 80h` over `syscall` when the latter is available. For documentation, see for example https://www.felixcloutier.com/x86/syscall
Re:Minesweeper Thermodynamics on Thursday September 04, 2025 @02:58AM (#45124368)
There was a Minesweeper on here that used a SAT solver, but I cannot find it at the moment. As I recall, it never had any issue with resolving the board quickly. I think it dynamically resolved where the mines would be as you played the game, and if you clicked a square that could be a mine, it would be a mine, except, I believe, when there were no open squares that were safe.

(Edit: Here it is! https://pwmarcz.pl/kaboom/ And the write-up: https://pwmarcz.pl/blog/kaboom/ )

This is similar in spirit to my take on the game: https://magnushoff.com/articles/minesweeper/

Unfortunately, not being familiar with SAT solvers, my implementation can grind to a halt in some configurations :)

It's more a matter of your personal preference and previous exposure to different languages. The way Rust reads is one of its super strengths in my book. I also really enjoyed Standard ML in university, and Rust picks up some of that (via OCaml).
Re:Gnome / mutter triple buffering patch merged on Wednesday March 19, 2025 @04:29AM (#43409440)
Adding some detail to this: With three buffers, you have one front-buffer (what's currently visible on screen) and two back-buffers. Let's call them A, B and C, respectively. This lets you work on the next frame in, say, B, and when it's ready, you queue it up for presentation. At the right time, then, the roles of the buffers will be switched, making B the front-buffer and A a back-buffer.

The third buffer comes into play if you want to start working on the next frame _before_ the switch has occurred. So you start drawing in C, and if the right time should hit, the display system can still flip A and B. In this case, triple buffering gave you a head-start with drawing the frame in C.

Going further, if you complete the frame in C still before the A/B switch has happened, you queue up C as the next frame, instead of B. Then, you can start working on the next frame again in B. With this scheme, there is no sense in having more buffers than three.

Re:Iterated Log Coding on Wednesday February 26, 2025 @05:59AM (#43182618)
Exact integers doesn't seem to be its strong suite. Can it even represent 3 exactly?

Running code from the linked notebook (https://github.com/AdamScherlis/notebooks-python/blob/main/m...), I can see that a 32 bit representation of the number 3 decodes to the following float: 2.999999983422908

(This is from running `decode(encode(3, 32))`)

Re:Iterated Log Coding on Wednesday February 26, 2025 @04:07AM (#43182081)
That's true for normal binary encoding of integers, but I think we should understand the question in context of the post: What's the number of bits required in iterated log coding?
Re:Iterated Log Coding on Wednesday February 26, 2025 @03:18AM (#43181809)
Cute! I wonder if it would be amenable for use as a variable-width encoding for, say, DCT coefficients in a JPEG-like codec..?
I have realized that there is a big design space here, as I recently did a write-up of my take, Id30. 30 bits of information encoded base 32 into six chars, eg bpv3uq, zvaec2 or rfmbyz, with some handling of ambiguous chars on decoding.

https://magnushoff.com/blog/id30/

Re:macOS Containers v0.0.1 on Tuesday September 26, 2023 @04:14AM (#37656057)
"System Integrity Protection (SIP)" seems to be the correct name here, for anyone as confused as me :)

(More details here: https://support.apple.com/en-us/102149 )

Re:Noclip.website: A digital museum of video game levels on Tuesday August 08, 2023 @04:31PM (#37055072)
Ah! That's what got me. Private mode is my default. I can confirm that I get it working in Firefox outside of private mode. Thanks :)
Re:Noclip.website: A digital museum of video game levels on Tuesday August 08, 2023 @09:31AM (#37048702)
Same experience with Firefox, seems to require Chrome. There is a security-related error in the console.
Re:Linux kernel VP9 codec V4L2 control interface on Tuesday September 14, 2021 @01:40PM (#28528104)
It looks like it implements hardware acceleration of the VP9 codec for some specific hardware (Rockchip VDEC and Hantro G2). This opens up playing, for example, lots of YouTube videos with less CPU usage on devices with that hardware. I can't comment on whether or not it "took so long" as I have no idea which hardware this is.

The title makes it out to be something fundamental in Linux, but this is just one driver becoming more complete.

Re:Show HN: Yarr – Yet Another RSS Reader on Monday September 14, 2020 @02:28PM (#24473424)
I, too, would have appreciated slightly more documentation. Here are two questions I had, and what I figured out.

Many RSS readers are stand-alone GUI applications. I would have appreciated an up-front notice that this is a hosted solution. (Which is what I am looking for. I'd like the same view of what's read and unread on my different devices, thank you)

Different RSS readers use different storage backends. I dug through your code, and it seems to use SQLite, which is exactly what I hoped for. It's a huge difference in deployment and system administration headaches whether it uses an embedded or a hosted database.

Looks interesting! I'd also appreciate a prebuilt binary for Linux, but I understand that it's still early days. Paying attention :)

Re:Memories – 256 bytes demo winner of Revision 2020 on Tuesday April 28, 2020 @01:17AM (#23003649)
I haven't had a look at the source code for this, but I expect that it syncs with the screen refresh rate.
Re:How to manage HTML DOM with vanilla JavaScript only? on Thursday April 02, 2020 @02:08PM (#22761814)
I recently did a write-up of my experience with writing maintainable code with vanilla JS: https://magnushoff.com/blog/dependency-free-javascript/

I am a huge fan of React for the maintainability of the resulting code, and this was my attempt to regain some of that without the dependency.

Re:The History of the URL on Friday March 06, 2020 @10:14AM (#22504180)
>Also encoding ampersands into a URI (URL) using HTML encoding schemes is also common, but that is incorrect.

To encode any string (for example a URL) containing & in HTML, you must HTML-encode that &. Using & in the value of the href attribute for an a-tag must result in a URL containing just & in place of the entire entity. This is a property of HTML that has nothing to do with URLs or URL encodings.

I have recently experimented with writing dependency-free JS. I ended up using Webpack and Babel, but no frameworks or libraries, and I find it quite nice to work with. These are my tips for making the best of it: https://magnushoff.com/blog/dependency-free-javascript/
Re:Kaboom: an unusual Minesweeper on Sunday December 29, 2019 @10:54AM (#21906485)
Right, so, in my book, reasoning based on facts such as "these squares are clear" are _considering_ those squares.

This is in contrast to the local rules I first describe that consider only a very limited part of the board, and there is a pre-determined hard limit for how much would ever need to be considered for these rules.

Re:Kaboom: an unusual Minesweeper on Friday December 27, 2019 @01:52PM (#21893393)
It's been some years, but I think it boils down to the definition of when you are _considering_ some part of the game state.

Right off the bat, I cannot agree that abc must contain exactly 2 mines. From what we can see, abc contains _at most_ 2 mines. There may or may not be mines in what you have left out, and we cannot know without considering what's there.

I haven't written a formal proof for that statement, but I have been unable to solve it to my own satisfaction by reasoning about a reduced view of the board.

Re:Kaboom: an unusual Minesweeper on Thursday December 26, 2019 @02:38PM (#21886110)
In complex situations it is easy to come to the conclusion that you have to guess, but sometimes there is an elaborate connection you might have missed. This game is sure to call you out on any mistakes you make of this kind.

That would at least make this game more strict and perhaps even more difficult.

Re:Kaboom: an unusual Minesweeper on Thursday December 26, 2019 @02:08PM (#21885925)
Great read!

It's in a similar vein as the variant I developed, which makes you declare that you are in a situation that requires a guess. I don't use an SAT solver, and I prepopulate the board.

https://magnushoff.com/articles/minesweeper/

In comparison to the Simon Tatham version mentioned at the end of the article, my game allows all game configurations while Tatham's version guarantees solvability by restricting the possible configurations.

Re:How I decide between many programming languages on Wednesday September 11, 2019 @05:12AM (#20937957)
Similarly, only Rust has "non-standardized, only one meaningful implementation" listed as a con, even if this is true for several of the others as well.
Re:Why Not Rewrite It in Rust? (2016) on Friday June 07, 2019 @09:55AM (#20124488)
(2016)
Re:Graphics Team ships WebRender MVP on Tuesday May 21, 2019 @01:43PM (#19972585)
No, only tried on stable. Looking forward to testing 67 when I get the update.

I should clarify that I am talking about the situation when running Firefox with GDK_BACKEND=wayland.

UPDATE: Ooh! Firefox 67 in my package manager! I am happy to report that I am now able to use Firefox with WebRender on Wayland directly. One glitch so far: It leaves a one-pixel row transparent at the bottom of the screen. Weird :)

Re:Graphics Team ships WebRender MVP on Tuesday May 21, 2019 @09:36AM (#19969972)
As a desktop Linux user, I'd guess it's harder to make it work right (because of, among other things, driver issues) and it affects a smaller portion of the user base of Firefox. Oh well.

Fortunately it's easy to opt in to, and in my experience works well on an oldish Intel chip.

Unfortunately, it fails hard with Wayland, putting no pixels on the screen. (In my experience) But I'm using it happily through XWayland.

Older »