Readit News logoReadit News
paholg commented on Asahi Linux lead developer Hector Martin resigns from Linux kernel   lkml.org/lkml/2025/2/7/9... · Posted by u/Mond_
CopperWing · 7 months ago
The DMA subsystem maintainer has some reasons: at this time you can disable all rust drivers when building the Linux kernel but you cannot disable rust wrappers to C language APIs. So if you need to change for example the DMA APIs, you also need to fix the rust wrapper before submitting the C patches otherwise you cannot even build a C only kernel.
paholg · 7 months ago
I don't think that's true. I have seen R4L folks reiterate time and again that C changes are allowed to break Rust code, and they will be the ones to fix it.
paholg commented on Exploring Typst, a new typesetting system similar to LaTeX   blog.jreyesr.com/posts/ty... · Posted by u/judell
justinpombrio · a year ago
You can do that in a couple different ways in Typst. First, if the user passes content into the template, then it's the user's content that ultimately gets to choose its styling. That is, there are three places that a style can be set:

1. In the content passed that the user passes to the template

2. In the template itself

3. By the user, outside the template

They take priority in that order.

OTOH, if the template really wants control, it can take optional styling arguments with defaults, and do as it likes with them. And if it wants content from the user that the user doesn't get to style, it can take that content as a string.

It's a fantastic system, so far as I've seen.

paholg · a year ago
I think they were saying they want a format instead of PDF where the reader can change those things.
paholg commented on I prefer rST to Markdown   buttondown.email/hillelwa... · Posted by u/BerislavLopac
bluGill · a year ago
I get what you are saying, but the world is not static. The concept of bookmarks and deep links thus is flawed because they do not/cannot follow changes in the world. Bookmarks need to take a snapshot of the reachable web (this is probably impossible...) or they need to expire after a few months so that the world can change.

I would hate if all nurses manuals had to accept the bookmarks of some book from 1820 just because someone once had a bookmark to the bloodletting section.

paholg · a year ago
As you said, it's not static. You can update the content of pages.

You can also reorganize things and keep old links as 302s.

At a minimum, you should be aware of when you're breaking links and it should be a conscious decision.

paholg commented on I prefer rST to Markdown   buttondown.email/hillelwa... · Posted by u/BerislavLopac
steveklabnik · a year ago
paholg · a year ago
Awesome! You and Carol rock!
paholg commented on I prefer rST to Markdown   buttondown.email/hillelwa... · Posted by u/BerislavLopac
steveklabnik · a year ago
Carol put in a tremendous amount of work to build tooling to go between Markdown and Docx. The publishers used the docx versions for print.

That doesn’t mean that I think Markdown is inadequate or the wrong decision, but it’s not just a “write in Markdown and you’re good” sort of situation.

paholg · a year ago
Ah, good to know! Is that tooling public anywhere, or was it pretty tailor-made just for the Rust book?
paholg commented on I prefer rST to Markdown   buttondown.email/hillelwa... · Posted by u/BerislavLopac
photonthug · a year ago
Thanks, but this does not seem to involve hosting? What I'm saying is, static site generation is no problem at all, because even without all the choices for frameworks, pretty much everyone has to speak at least one templating language and read/write both markdown and rst anyway. But it's surprising that writing your project docs and rolling your own static-site generator is faster than figuring out github-pages and/or readthedocs hosting from scratch.

For hosting static sites, I actually like AWS amplify, and integrating it with github seems currently easier and certainly more flexible than trying to use github pages. But I don't really want the hassle of a custom domain or a subdir on existing inappropriate domains for every new project I start.

This isn't about being cheap either BTW, I think it's important that self-hosting should NOT be the best way to get a friction-free setup for small-to-medium sized project docs. There's a major benefit just to the recognizable domains for github-pages / readthedocs, which is that I know I'm about to look at some kind of technical project documentation that is most likely a labor of love, rather than marketing fluff or a "sign up for the preview here!" bait and switch.

paholg · a year ago
That's what I meant by instructions on automated deployments. MdBook generates HTML, so you don't need anything fancy to host it.

This example shows a fairly short GitHub action to deploy to GitHub pages: https://github.com/rust-lang/mdBook/wiki/Automated-Deploymen...

paholg commented on Where does the name "algebraic data type" come from?   blog.poisson.chat/posts/2... · Posted by u/082349872349872
marcosdumay · a year ago
Given the types: I = A + B; J = C; X = A; Y = B + C

Is I + J the same type as X + Y?

If your types are tagged, they aren't. Because that's what tags do.

paholg · a year ago
Okay? I don't know what point you're making.
paholg commented on Where does the name "algebraic data type" come from?   blog.poisson.chat/posts/2... · Posted by u/082349872349872
marcosdumay · a year ago
I really don't like this view (but looks like I'm a small minority).

Types shouldn't have an algebra similar to numbers, they should have an algebra similar to sets. While for numbers A + A + A = 3A, on sets A ∪ A ∪ A = A.

Types are all about predicate satisfaction, and predicates don't change their value because they can be proven in more than one way. In practice, defining type sums as tagged sums leads to your algebra, and also leads to a lot of confusion between structure and denomination that would be completely avoided if sums and tags were independent operations.

paholg · a year ago
The difference is mostly a matter of perspective, isn't it?

In Rust, if I have

``` enum Foo { A(u32), B(u32), C(u32), } ```

Then the number of representable states is deduced my an "algebra of numbers", but the size is deduced by an "algebra of sets".

For example, the size of Foo is just 8 (4 bytes for u32, and 4 for the tag + alignment).

paholg commented on I prefer rST to Markdown   buttondown.email/hillelwa... · Posted by u/BerislavLopac
bluGill · a year ago
HTML is a bad choice - I want to be able to reorganize my site without have a million dead links. Even if I know what the correct organization is today, requirements will change and so in the future something will be wrong.

With rST I can link to a section and move that section to a different document and the links all still work (or if they don't I get an error for each and so I know where to look). With markdown and html I link to a specific document and since each is a document generator there is no warning if I typo the page name (there are a number of tools to look for dead links in html). With markdown I cannot link into a section of the page, only the page itself (some extensions to markdown allow this)

paholg · a year ago
What you see as annoying, I see as a strength. You shouldn't break links; they don't only exist in your site. People will have them bookmarked or shared on the web.

There's nothing worse than finding a post online that seems like it will cover your exact issue, but the link is now a 404.

u/paholg

KarmaCake day354July 3, 2017
About
[ my public key: https://keybase.io/paho; my proof: https://keybase.io/paho/sigs/o9yHMvmMOPfwkKqOGiymsDtB9qOquhKlK4uD82lb_PA ]
View Original