I wrote software to perform a similar analysis a few months ago. https://gregoryszorc.com/blog/2022/01/09/bulk-analyze-linux-packages-with-linux-package-analyzer/
Great post. Loved the analysis of the microarchitecture levels.
Linux Package Analyzer looks fantastic, I might try to run it myself at some point but the statistics you provide in the blog post are already super interesting on their own.
I’m surprised you didn’t seem to have submitted it here on Lobste.rs before.
The bar graphs in this article seem to only label every second instruction (the graph library omitted them for brevity?) Unfortunately in this context two neighboring bars aren’t related to each other, so this is a very important detail.
Good point, and indeed Chart.js omitted them by default for brevity.
I pushed a fix to display all labels, thanks!
Yes please! I also was under the impression that I was seeing more Ada related content emerging lately.
the link to the statement is broken, here’s the correct one
I was hoping for more resources on cross toolchains.
Can you add How To Retarget the GNU Toolchain in 21 Patches as a GNU Toolchain Resources? It’s the single best GNU Toolchain porting documentation I am aware of.
I have one of those I’m running FreeBSD on. I wish I could order another one, but they’ve become unobtainium, I have one in backorder for more than 6 months now.
In FreeBSD, all routing is done in kernel. There are no drivers to let the hardware handle it. I suspect NetBSD is the same?
Wouldn’t answer
be leaked in that function, or is there some implicit cleanup behavior that the article doesn’t mention?
No, there is no leak, kore_buf_stringify() returns a pointer to the contents of the buffer but its been NUL-terminated to turn it into a C string, it is cleaned up by kore_buf_cleanup().
I love new fonts, especially bitmap fonts. However, with pixels on screens getting smaller and smaller, bitmap fonts are often almost unusable. This is a sad state of affairs, because high-resolution bitmap fonts look extremely crisp on a display with tiny pixels. But there’s not many of them! Does anybody here know any high-quality bitmap fonts that look LARGE on hidpi screens? They must be 32 pixels height, for example.
The unifont is beautiful, but incredibly small when mapped pixel to pixel. If you zoom-it by a factor 2, it looks blocky, defeating the whole purpose of your display.
Funnily enough, what inspired me to make this was seeing this screenshot: https://www.puredarwin.org/Screenshots/Screenshot-2018-03-02.png
Even with the scaling, it looked really good and I wanted to figure out what font it was. Took a while to figure out it was XNU’s own font, so I got it.
Lavender should look good with 2x scaling too, but i’m not sure.
I think they mean a raster font for larger screens, not necessary a font with characters that are 8x8 pixels.
A bitmap font hand-optimized for larger screens sounds really cool. 32x32 pixels or whatever per glyph brings a lot of resolution.
I feel like bitmap fonts look really crisp in general. I can’t stand the blurry mess of anti-aliased fonts (don’t get me started on subpixel rendering). Windows used to be really good at applying various sizes of pixel-perfect bitmap fonts in its UI, but even they transitioned to the blurry mess after Windows 7. Nothing beats a font that was drawn by a skilled human, pixel for pixel. I always use raster/bitmap fonts in my terminals and IDEs if possible. As for scaling, you can just take a smaller one and upscale it by a whole integer factor. It still looks great.
Which font(s) do you like? I have preferred Terminus for many years, though I have been on mere 1080p HD for a while, so I don’t know if it would hold up in 4k or Retina, etc.
Does anybody here know any high-quality bitmap fonts that look LARGE on hidpi screens?
I’ve avoided buying a hi-dpi screen at least partly because I like bitmap fonts so much.
I created Spleen for exactly this reason, it comes in five sizes, including 16x32 and 32x64: https://github.com/fcambus/spleen
That’s great! I love it. Did you generate the large sizes automatically from the smaller, or you drew all of them by hand? Any plans for greek characters?
This looks like a cool project, with all the customizability, and different character variants, and all.
However, I’ve used bitmap Terminus (at 9px, on a big-enough screen) for many years, and nothing’s ever looked as clear and legible to me, even though I have been on the lookout for a good coder’s font, and have kept an open mind, being willing to try new fonts. Sadly, you can’t display bitmap Terminus on every system. Some systems can only render it not-bitmap (“smooth”), which ruins it.
If you are willing to try new bitmap fonts, you might find Spleen interesting: https://github.com/fcambus/spleen
Nice work! Could you post more about the basic mechanics of the testing setup itself with AFL + zonefiles? I’ve been meaning to get into AFL but haven’t quite gotten to it on my list yet. I’d love to try similar stuff on gdnsd’s zonefile parser, and eventually even use AFL to fuzz query packet parsing as well.
Sure, gdnsd can easily be fuzzed without any modifications.
Build it with AFL:
./configure CC=afl-gcc
make
Create some directories:
mkdir input output zones
Put a zone file in the ‘input’ directory, (I used a trimmed down version of all.rr.org, removing RR which gdnsd doesn’t support) and launch the fuzzer:
afl-fuzz -i input -o output -f zones/all.rr.org ./src/gdnsd -c . checkconf
While doing so, I found and reported two stack-based buffer overflows.
I love it. It’s like Terminus with significantly better curly braces.
Also, you have slashed zeroes, which is what all correct-thinking people prefer.
Also, you have slashed zeroes, which is what all correct-thinking people prefer.
I use a copy of Droid Sans Mono that I edited to have slashed-zeros. I love the font, but without slashed zeros (or even dot-zeros) it’s useless for coding.
Terminus doesn’t render properly on Windows, which is a shame, As Spleen is a bitmap font, I’m guessing I need .fon versions for Windows ?
For those that can’t (or don’t want to) edit fonts cosmix.org have a Droid Sans Mono with both dotted and slashed zero varieties.
Yes, I think .fon is the required format for bitmap fonts on Windows. I’ve generated some .fon files for all sizes here, but I don’t have access to any Windows machine, so I cannot test them. It would be nice if you could try and report results, thanks!
Ok I’ve had a go. They don’t render in Windows at all. :( Windows just shows ‘Courier New’ when I preview the files. Looking via HEX viewer, it seems that your .fon files are missing extra (repeated) meta-data that Windows seem to need. Thanks tho!
Does anyone know a BDF to PSF (for the Linux console) converter? Both names are so close to PDF it’s impossible to Google. If not, I’m probably about to write my own.
The font editor I use to create Spleen, gbdfed, has an option to export PSF files.
Because I’m dense… The layout displayed in gbdfed gets translated to my local codepage via psfu / the actual glyph names, right?
Also, in case people want to try with gbdfed themselves, you need to populate the first 32 codepoints or will get a weird error when trying to load the font and the screen will look bizarre. It seems to shift the codepoints down by 32 if you leave those blank…
Yeah I just tried exporting all the BDFs to PSF and none of them work properly. Either they error out setfont
or they fill the screen with garbage.
archlinux has one in aur via the debian thingy usage should be a simple manpage away…
I’d like to see screen shots of the lower resolution variants.
As an aside, does anyone else find the font used for the article to be very hard to read? Can’t quite put my finger on it, but it seems to have too much horizontal spacing or something.
Yes, I think the horizontal spacing is a little too wide. It seems to be the default spacing for the font that’s being used. If you’re curious about how to change the way it looks, try opening the developer tools and putting this into the Console.
document.body.style.letterSpacing = "-.04em"
This adds the value you specify to the font default spacing - hence the negative value, to reduce the spacing.
That does improve things, thanks! Incidentally, the font turns out to be “Work Sans”: https://fontlibrary.org/en/font/work-sans
I will create a proper site for Spleen with screenshots in various sizes, but meanwhile, here is a screenshot of the 5x8 version.
Pretty close, the poem used in one of the screenshots is “L’etranger” from “Le Spleen de Paris”. But yes, it’s indeed a reference to Baudelaire’s works.
Hi, I’m Frederic and I write mostly about UNIX and DNS related topics.
Link: https://www.cambus.net
There is a French sporting goods retailer called Go Sport, and the new Go logo immediately made me think of their logo.
Does anyone know what Kore is? There’s no links in the post, and the closest I could find was https://github.com/kframework/kore but I’m not entirely sure it is
I think it’s more likely https://kore.io/
Indeed, that’s the correct link. Kore is an easy to use web platform for writing scalable web APIs in C.
I used to work for an information security company called KoreLogic; we referred to ourselves internally as “Kore”.
Whenever I talked to someone from outside the company it would go like this:
“I work for KoreLogic Security. Not CoreLogic with a ‘C’. Not Core Security. Not Kore IO. KoreLogic with a ‘K’, but not the KoreLogic with a ‘K’ in the United Kingdom.”
(And for future reference, you should absolutely talk to the KoreLogic people if you need information security consulting. I cannot say enough nice things about them.)
Decent article and, even if it is a little dated, the core message is still relevant.
Loved this quote, which oddly enough I’d never encountered in my 20+ years of using *BSD:
BSD is what you get when a bunch of Unix hackers sit down to try to port a Unix system to the PC. Linux is what you get when a bunch of PC hackers sit down and try to write a Unix system for the PC.
Particularly relevant in the era of systemd et al. Hmm, it’s just reminded me of reading Bill and Lynne Jolitz’s 386BSD articles in DDJ when I was a schoolkid and trying to make head or tail of them.
“BSD is for people who love Unix. Linux is for people who hate Microsoft.” is a relevant quote, supposedly attributed to Theo de Raadt, but I can’t seem to find any source.
A quick web search finds the quote as I remember it (“Linux is for people who hate Windows. BSD is for people who love Unix.”), unattributed.
The quote from deraadt@ is “Linux people do what they do because they hate Microsoft. We do what we do because we love Unix” from this article.
the core message is still relevant
Is it really? Gentoo Linux evolved in a better *BSD replacement under all aspects.
Gentoo is nice, I guess, but to me it doesn’t feel like BSD at all. As a user I see GNU utils, man pages lacking quality, no SIGINFO
and not much coherence. As a sysadmin I see a Linux boot sequence, from bootloader to init scripts, and other management utils, such as partitioning tools. As a programmer I see glibc.
Look at Portage and not just at how “recipes” are no longer makefiles, but shell scripts. Look at all the extra functionality compared to *BSD ports: https://projects.gentoo.org/pms/6/pms.html
What extra functionality do you mean?
I used Gentoo for two years in 2014-2015 and liked it, and I may use it again soon. But it’s just not s BSD system, and BSD is not only (or even primarily) about ports.
I never understood the people who build a reduced set of back ends for clang. The extra back ends are such a tiny portion of the total code that it makes almost no difference to compile times or to final binary size and it dramatically reduces the utility of the final binary.
Last time I measured build time difference between a build with all backends and a build with only the X86 backend, the difference was rather significant.
All backends:
X86 backend only:
This was about one year ago, on Linux. More details here.
That’s not quite a fair comparison though, because now you can’t cross compile. If you need a cross-compiler for any architecture then you’re looking at another 8 minutes to build a version of LLVM that can target that one. Maybe I’m an outlier, but once I got used to a compiler that could target any architecture, I have found it incredibly limiting to go back to one that can’t. In particular, if I’m writing something performance critical, I often want to look at the generated assembly on 3-4 architectures to make sure that I’m not backing in any ISA-specific or ABI-specific assumptions.
The last line of your
ninja
output also reminds me that it’s not just clang, all of the other utilities use the back ends. Your first one, for example, generates anobjdump
that can disassemble only x86 binaries. If you want to look at an Arm binary, you need to install a separate version ofobjdump
. Again, that’s something I find incredibly annoying - I can’t just runobjdump
, I need to remember to invoke the specific one for the target that I’m disassembling.Did you mean that it doesn’t make a difference to the compile time of llvm/clang or when using clang (with all backends vs single backend) to compile other software?
It doesn’t make a significant difference to the compile time of llvm/clang, relative to the value of the features that you get in exchange. You can get a 100% reduction in the compile time of LLVM by not building any of it and then the built clang is useful for 0% of use cases. You get a 20% (actually surprised by that, it was much less last time I tried) reduction in LLVM’s build time by removing support for all cross-compile scenarios and any support for the other tools to interact with binaries for any other architectures (so no objdump, no readelf, and so on, for any binary that isn’t native to the host architecture). I consider that to be significantly more than a 20% reduction in features. Maybe I’m an outlier here.
Some platforms don’t have powerful build systems so what’s a small difference in compile time on a cpu-rich amd64 box may be a big difference on macppc or octeon, for example. How much utility is there in having an x86-64 backend available on an octeon machine?
Do you ever want to inspect an x86 binary on the octeon? If so, having an
objdump
that works there is useful. That’s a use case I hit pretty often.If the machine is very slow, then I’d generally cross build from another machine. That means:
lld
, orclang
, since I’m not going to use them on the slow system.