1. 5

    Let us appreciate the dedication of the developer behind this repository, John Hodge. The first commit happened in November 2014. The repository now has 4287 commits, most of which are his. And now, this compiler fully bootstraps rustc on x86-64 Linux. I think that is really impressive and it’s also motivational for myself, to keep going with my (much smaller and less significant) projects.

    1. 8

      I’ve had the experience that whenever I created such a file where the name “doesn’t matter”, I ended up stumbling across it some time later and I had no clue what it did and why it was there. I then had to open it and think about why it was there. And don’t get in the habit of deleting files with weird names, next thing you know is you’ve got some data loss or outages on your hand. Give your files names, even if it’s just ThisFileCanSafelyBeDeleted.txt. You won’t regret the additional 2 seconds you spent, it will pay for itself even if you just prevent confusing yourself once in your entire life.

      1. 3

        This might speak to the hostility of the architecture I inherited more than anything, but if I saw a file named ‘ThisFileCanSafelyBeDeleted.txt’, the last thing I would do is delete the file.

        That said, I do tend to name vmware snapshots something similar – usually something like ‘delete after DD-MON-YYYY - jgf’ so people know who made it, how long I needed it for, and whether it’s safe to delete. Your idea is similar and quite good, maybe if I can break through the gaslighting from my arch I’ll adopt it.

        1. 1

          I usually make tmp/ in my working directory if I need it, then name files in there whatever I want.

          Unfortunately in college I thought it was funny to name my scratch files loldongs and the habit has stuck. I’m not proud.

        1. 2

          My strategy against this BS at the moment is to use temporary containers for every tab.

          You open your tab, do your thing, when it closes everything gets wiped.

          If you click on a link to another domain, it opens in a new container.

          Then I just have an extension that auto-clicks ‘accept all cookies’ because they all disappear when I close the tab anyway.

          Some of those dialogs where you choose what cookies you want are painful to use!

          1. 2

            Keeping the cookies at bay is easy. What measures do you take against more advanced tracking techniques like canvas render fingerprints? There are many such techniques that go far beyond just cookies. Do you use straight NoScript? The internet is woefully broken without JavaScript.

            1. 2

              Nothing more than what ublock origin provides, plus some router level ad/tracker blocking. Blocking 3rd party trackers is an easy measure I can take that doesn’t break the internet, and this includes a lot of companies known to use fingerprinting. It’s not perfect, but then nothing is.

              Aside from that I don’t really want to go down the canvas blocking, noscript rabbit hole. I used to do it and found I was just spending too much time disabling noscript for sites I was never going to revisit. Places I frequent tend to have RSS so I just use that anyway.

            2. 1

              This isn’t about cookies. The laws talk about personally identifiable information. Cookies are one way of collecting this, but they’re not the only way. With your approach, if the site uses some other mechanism (tied to IP address, for example), then it is completely legal. If you don’t permit it and the site is found to be violating the law then the information commissioner can impose huge fines.

              1. 1

                I do the same on my laptop. On my iPhone I’ve started strictly using private browsing mode. No problems accepting all cookies when I kill the tab in 3 minutes anyways.

              1. 30

                Not really a blog, but https://lwn.net/ by far. Some of the best reporting on current events regarding Linux. Also the only site where I pay to read articles, well worth it.

                1. 4

                  only site where I pay to read articles


                  1. 8

                    It’s a really well written response to a rant, full of technical details, and it sums up nicely to: NetworkExtensions framework is a total mess, AppleStore model doesn’t help, and developing on Mac on a low level is not fun (last one is my interpretation).

                    1. 2

                      Apple doesn’t give us a lot of control over anything

                      This is the point where every self-respecting hacker would uninstall this operating system and install something that gives them control, like Linux. It is a mystery to me how so many brilliant people let their machines be dominated by these bullies day in day out.

                      1. 12

                        This is the point where every self-respecting hacker would uninstall this operating system and install something that gives them control, like Linux.

                        Are you suggesting that I uninstall Linux in order to install Linux?

                        In order for WireGuard to be useful, people need to be able to use it. And that means porting it to other operating systems, even the ones that you find icky and make me tear my hair out. Perhaps you’re a man of principle and figure, “don’t stoop to Apple! Boycott the OS! Don’t spend your time on it! Don’t help that world!” But this still misses the point that I want to make things that are useful to people, even to people who haven’t made the same choices as you and me to use Linux. And on a more personal level, I’d like to be able to use WireGuard with friends and family who run other operating systems like macOS or Windows. “Convince them instead to drop their computers in the sink and get a Thinkpad W701ds to run Linux instead!” Please…

                        1. 1

                          Are you suggesting that I uninstall Linux in order to install Linux?

                          Everyone knows that True Hackers™ install a new distro at least once every 127 days. They also have a cron job to recompile the kernel every night.

                          At any rate, for me, personally, life is just too short to have to deal with this kind of stuff. I’m all for pragmatism and I can deal with less-than-idea (“broken”) APIs and all of that, but the whole “we approved your app yesterday but we’re rejecting today’s update to fix a critical error because of some obscure small donation link to a non-profit” is just … yeah nah, I can’t deal with that kind of dystopian insanity completely devoid of any reason. So kudos for putting up with that.

                        2. 2

                          Are you considering every laptop owner, a self-respecting hacker?!

                          You certainly don’t need to be a “hacker” to use a VPN, if you target specifically the authors of the posts, then they probably have their reasons and it would be interesting to know about them.

                          1. 2

                            Are you considering every laptop owner, a self-respecting hacker?!

                            Of course not.

                            if you target specifically the authors of the posts, then they probably have their reasons and it would be interesting to know about them.

                            Yes, I’m specifically talking about them. In addition, there are a lot of programmers who use macOS, some of which I know personally and hold in high esteem. The most common reasons I hear are the quality and software integration of the touchpad, music & media applications and the form factor & hardware of the laptops. I can respect the music & media argument (just like you would use Windows for games), the other points are a rather low price for your hacker soul.

                            1. 2

                              I rarely “hack” my Linux system though; most of the times I want things to Just Work™.

                              My definition of “just works” is rather different than the average macOS user – to quote an ex-girlfriend: “why don’t you use your computer like a normal person?” – but that’s just a matter of taste.

                      1. 10

                        Fun fact, the Rust compiler does not have to arrange struct fields in the order they are defined, therefore it can pack for you without you having to do anything. If you want a stable ABI, you write #[repr(C)] on the line before the struct keyword, this gives you C-style control over the field order (https://doc.rust-lang.org/reference/type-layout.html#the-c-representation).

                        1. 4

                          What the user wanted here, when adding the last prop, was to set a top level property.

                          But what really happens is that the property is added to the second item of the "chars" array.

                          I have a hard time believing that anyone who has ever written or modified an INI file would be confused about this. Considering that this is the only illustrated criticism of TOML in this entire post, I’m puzzled as to why this person switched away from TOML.

                          Now, I understand what they mean when they call the language alien and confusing. But so are YAML, XML, etc. when you first encounter them, it’s just that people are accustomed to these decades old languages. Is it possible to create a configuration language that is intuitive to inexperienced newcomers and covers all the use-cases of TOML? Time will tell.

                          1. 5

                            The problem isn’t with the software author. Being the author of broot, I wouldn’t have to change the format if I was the sole user. The problem is when people stop trying to configure your software because the changes they do have no effect.

                            Adding a line to a configuration file is something that linux users do all the time.

                            People who’ve been told that to achieve an effect they would have to add this line in their config.toml file won’t read the whole file to scan whether there’s a better location, they’re used to add it at the end as they do for example in their .bashrc file. Of course, coming back later they would probably try to organize everything but they won’t because their first reaction is that there’s a bug in the application since the added line did nothing.

                            I don’t pretend that TOML is bad for everything but that such confusion makes it unsuitable for many programs as it has proven to be for broot.

                            1. 4

                              I see. I wish you went into more detail about this in the blog post because it’s a good point.

                              I think the solution here is not to use the global scope at all in an INI/TOML file, such that it’s always clear what section an attribute belongs to. In addition, your application could throw warnings or even errors if unknown keys are detected (careful with backwards compatibility, though), or it could print the configuration back to the user so that they can check if everything is configured properly. It could also offer a dry run of configuration parsing.

                              Interestingly, I noticed that many Linux utilities have this configuration problem, and many just “swallow” any nonsensical configuration and exhibit default behaviour, something that has often cost me a lot of time. It’s even worse if they use their own configuration language that is often fraught with parser ambiguities and problems. It’s good to see developers like you caring about how users interact with the configuration file.

                              1. 2

                                Thanks, I’m editing my blog post to take this into account, and try to make it clearer.

                                1. 1

                                  I think the solution here is not to use the global scope at all in an INI/TOML file

                                  That seems the obvious solution to me as well, if this single confusion that users have is the only issue with the format. Generally speaking, I also think this is better than this proliferation of almost-but-not-quite JSON formats, each with their own “conveniences” added that might cause more confusion. Especially the unquoted string values and possibly the implicit comma on newline seem like footguns in disguise.

                                  Comments, optional trailing commas and unquoted string keys seem like much more obvious advantages to me. Especially considering unquoted keys don’t have the ambiguity of “should the key be evaluated?” (which JS actually never does, but for example Python does) and “is this key a reserved JavaScript keyword?” like in JavaScript. But then, if you drop that it’s technically not eval() able anymore in a JS interpreter, which was arguably JSON’s biggest “advantage” (with all the security problems that entailed).

                            1. 2

                              I don’t. I just use Notepad++. As long as the project is below 100k LoC and I wrote everything myself, I don’t need it. For larger projects at work, I use Eclipse CDT (for C/C++). I’ve also been looking into Visual Studio Code combined with Rust Language Server (RLS), that looks pretty promising and has helped me out a couple of times.

                                1. 3

                                  The translation provided by Google is really good. I wanted to translate it for Lobste.rs, but I couldn’t have done it better myself. To be honest, I was surprised about the quality of the translation. This is on the level of a skilled native speaker (of both languages).

                                  1. 3

                                    I’m not sure I can agree with that assessment, the language used in the translation is very peculiar, it’s pretty clear to a native speaker that it’s an automatic translation.

                                    1. 3

                                      It’s certainly not perfect, but a lot of the time when a non-professional translator translates stuff, the results tend to be less-than-perfect too. I notice this myself too when I translate stuff from Dutch to English or vice versa – it seems the brain has to “context switch” all the time between the languages, leading to some rather curious results. For decent results I need to come back to it an hour later and copy-edit the lot extensively, and it’s not uncommon I find that I accidentally used words in the wrong language (especially words like “the”, “a”, etc.)

                                    2. 0


                                      Tutanota wants to file a complaint against the decision, but this has no suspensive effect. “We therefore had to start developing the monitoring function”, a spokeswoman told c’t in mid-November. If the complaint is successful, the function will not be activated or removed again.

                                      (my emphasis).

                                      I mean, the gist of this is that Tutanota plans to appeal, but they will have to abide with the court’s decision until the appeal is successful. I read the last sentence as “if the appeal is successful, the monitoring function will be removed”, but the machine translation is ambiguous.

                                      1. 1

                                        My crappy B1 German skills read the section in question more as

                                        Tutanota wants to appeal the decision, however this has no suspending effect [on the judgement]. “We still had to develop the surveillance mechanism” explained a spokeswoman in the middle of November to c’t [the publication]. Should the appeal be successful, one would not activate the function [which must nevertheless be implemented in the mean time], or, more specifically, the function would be removed once again [if it is developed fully and deployed as required before the appeal decision].

                                  1. 2

                                    Let’s pretend that JPEG has finally died (again) and GIF and PNG are both gone.

                                    To me, PNG hits the perfect sweet spot for lossless images. It has decent compression, speed and is supported everywhere. It’s also relatively low complexity. The format has grown on me, even though significantly better lossless compression exists. So I’d be sad about its disappearance.

                                    1. 1

                                      PNG is perfectly fine, as is JPEG. In fact, if we actually implemented the entire JPEG spec that would be pretty neat. Hierarchical coding is in there, which is key for coding large pictures efficiently. I am highly skeptical of introducing new formats when web people can’t even use JPEG correctly.

                                      The only thing really missing is a format that can do lossy compression with transparency. You can kinda hack it with PNG, quantizing color values, but it’s not great.

                                    1. 2

                                      My biggest problem is slow linking. Even if I only change a single file, I have to wait 5-10 seconds just for the linker. I was excited to try out faster lld linking, but none of the recommended lines worked (on x86_64-pc-windows-gnu).

                                      The RUSTFLAGS failed with

                                      error: failed to run `rustc` to learn about target-specific information
                                      Caused by:
                                        process didn't exit successfully: `rustc - --crate-name ___ --print=file-names "\"-C" "link-arg=-fuse-ld=lld\"" --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
                                        --- stderr
                                        error: multiple input filenames provided (first two filenames are `-` and `"-C`)

                                      Looks like there’s some escaping stuff going on when you do it on Windows.

                                      The Cargo.toml flags failed with unused manifest key warnings:

                                      warning: unused manifest key: target.x86_64-pc-windows-gnu.linker
                                      warning: unused manifest key: target.x86_64-unknown-linux-gnu.linker

                                      Not sure if I’m doing anything wrong or if the guide recommends things that weren’t tested at all.

                                      (EDIT: The tutorial is wrong. These keys have to be added to config.toml, not Cargo.toml. Now it cannot find lld but that’s already progress.)

                                      1. 3

                                        I’m not happy about this. On embedded devices, you usually only have SSH but not SFTP. So then you need to build OpenSSL and enable that service. SCP always works out of the box. It’s silly to claim that SCP is insecure. Duh, you’ve got SSH access. That’s like saying it’s insecure to use the same key to open the trunk of the car and to start the engine.

                                        1. 4

                                          What SSHd comes with SCP but not SFTP? I think even Dropbear has SFTP, and OpenSSH comes with a simplistic internal sftp server if the full one is unavailable.

                                          1. 2

                                            Dropbear has optional SFTP, but only if you compile OpenSSL yourself and add the library and enable it. Vanilla Dropbear only has SCP.

                                            1. 2

                                              https://tinyssh.org/, but it can make use of OpenSSH’s SFTP subsystem with ... tinysshd -x sftp=/usr/libexec/openssh/sftp-server /etc/tinyssh/sshkeydir https://tinyssh.org/faq.html

                                              So it does not count.

                                            2. 2

                                              It’s silly to claim that SCP is insecure. Duh, you’ve got SSH access.

                                              As is explained in the article, it’s context-dependent, because it’s not necessarily the case that “duh, you’ve got ssh access” – in scenarios where a user has been granted scp-only access with the intent of limiting them to simple file-transfer operations, the fact that scp allows arbitrary command injection is actually a pretty gaping vulnerability.

                                              1. 2

                                                I read the article too. People who give SCP-only access to untrusted third parties and expect it to be secure are making a mistake. That is simply not how SCP is supposed to be used. You have to assume that your SCP users have all the rights of the account whose SSH key SCP logs in with. This is the granularity with which access rights are enforced in the SCP model.

                                                1. 1

                                                  …and yet it happens, and will in all likelihood continue to happen. We can blame users for not understanding all the ramifications of arcane implementation details, but it’s a very easy misunderstanding to fall into – man scp just says “secure file copy” after all, not “secure file copy and command execution”. Humans being what they are, making things hard(er) to misuse is an important side of designing for security.

                                            1. 28


                                              Edit: To expand a little, now that I’ve had some coffee, let me repeat one of soc’s points a little more vigorously: C++ will not get better until they start taking things away as well as adding things. I still have vivid memories of reading through a C++ book in undergrad, back in 2004 or something, and thinking “ok, I can’t just entirely avoid pointers in favor of references… so what good are references besides making more ways of doing the same thing?”

                                              1. 10

                                                References serve an entirely different purpose than pointers. A pointer is a type that can be NULL, so it may represent an optional object, whereas references are (theoretically) never NULL and always valid. These are valuable safety features. However, you would find it extremely difficult to write C++ code that exclusively uses references and no pointers. So both have their place in the language, though I would replace almost all pointers with std::unique_ptr if C++11 is available.

                                                I agree with the sentiment that the relentless growth of C++ and the reluctance of the committee to deprecate features is the source of many problems. Even though I know and write C++ for many years, I still find C++ features that weren’t previously known to me on a daily (!) basis. In other words, for thousands of days, I am daily surprised by this language. The complexity is unfathomable.

                                                1. 5

                                                  references are (theoretically) never NULL and always valid.

                                                  They are never NULL and often invalid. Like when you saved a reference to something that either (a) went out of scope; (b) was the result of dereferencing a pointer to memory that was freed afterwards. You can also make a null reference if you try very hard, but that doesn’t happen in practice, whereas invalid references sure do.

                                                  1. 3

                                                    You can also make a null reference if you try very hard, but that doesn’t happen in practice

                                                    That’s just not true.

                                                    void foo(int& i);
                                                    p = nullptr;

                                                    is not at all hard, nor is it it even that uncommon.

                                                    1. 3

                                                      It has never shown up in my 4 years of commercial C++ experience + 5 years non-commercial before that.

                                                      1. 1

                                                        I’ve seen it in the wild; debugged a core dump that had it. The evil thing is that the program crashes at the point where the NULL-reference is used, not where NULL is dereferenced (in compiled assembly, dereferencing a pointer to store it in a reference is a no-op). These two points may be far apart.

                                                      2. 1

                                                        This is undefined behavior.

                                                      3. 1

                                                        They shouldn’t be invalid, but it’s not entirely enforced by the compiler. The idea is that by using references, a programmer signals to the reader of the code that the value is intended to be a non-NULL valid object, and if that is not the case, the error is at whatever line of code that creates this invalid reference, not the one that uses it. In the wild, even inexperienced C++ programmers rarely create invalid references simply because it is harder to do so, whereas they routinely create invalid pointers. In addition to that, invalid references are almost always a programmer error, but invalid pointers are a regular occurrence and often part of a design that allows and accounts for such states.

                                                        1. 4

                                                          The idea is that by using references, a programmer signals to the reader of the code that the value is intended to be a non-NULL valid object, and if that is not the case, the error is at whatever line of code that creates this invalid reference, not the one that uses it.

                                                          Yes, nonetheless it happens. And it doesn’t matter that “somebody else” made the error. The error is still there and it’s your code that crashes. I feel much better using a language that doesn’t put me in such situations.

                                                          In the wild, even inexperienced C++ programmers rarely create invalid references simply because it is harder to do so

                                                          For some definition of “rarely”. I’ve often seen code that passed references to objects wrapped in std::shared_ptr (often to avoid ARC overhead) into function arguments where those functions captured those by reference in lambdas which were executed after the std::shared_ptr freed the memory. Similarly, this regardless of its type is in practice used like a reference. There’s a lot of code in the wild that does something like PostTask([this] { /* do smth */ });.

                                                          At the end of the day it doesn’t matter that “the error is somewhere else”. If the language makes something remotely straightforward, I’m sure to have to deal with that in a shared codebase at one point no matter how few errors I make myself.

                                                          1. 2

                                                            Yes, whatever the compiler doesn’t prohibit is likely to end up in the codebase. However, I still think that references are valuable and provide better safety than pointers. Obviously it would be better if making mistakes was impossible. I’m not whitewashing C++’s serious shortcomings here.

                                                            As for the discussion about invalid references, I’ll leave you with this short story: http://www.gotw.ca/conv/002.htm

                                                      4. 3

                                                        References serve an entirely different purpose than pointers.

                                                        The official (D&E of C++) purpose of references is to enable operator overloading.

                                                        1. 2
                                                    1. 10

                                                      That reminds me of the time when I realized that I made the grave mistake of making all my tables have the encoding utf8_unicode_ci and thinking they were UTF-8, not knowing that utf8_unicode_ci is a legacy broken encoding that only supports up to 3 bytes per character. How naïve of me to assume that utf8 means UTF-8. I realized it when I tried to insert some 4 byte UTF-8 characters and the database spewed back errors at me. You should always use utf8mb4_unicode_ci [1]. That was my big WTF moment with MySQL. Not surprised that there are more skeletons in the closet.

                                                      [1] https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci

                                                      1. 7

                                                        MySQL is full of WTFs. The most recent one I ran into is that GROUP_CONCAT has a maximum length, when exceeded will just silently truncate the resulting string.

                                                        Another one that sticks out in recent memory is that it thinks "foo " = "foo" is true (so trailing spaces don’t matter). Oh, and the always fun gotcha that DDL statements aren’t transactional. PostgreSQL was such a breath of fresh air after having dealt so often with the pain of having migrations half-applied and then crashing (while writing them). And this kind of nonsense goes on and on and on.

                                                        1. 2

                                                          You’re not the only one. I got caught by this one when someone stuck an emoji in a search query that ended up in a URL.

                                                          1. 2

                                                            Having worked with Oracle databases before, this really explains why Oracle the company was happy to buy MySQL - like sees like.

                                                            1. 1
                                                            1. 6

                                                              Boost::Asio (async I/O, network library) calls these strand. I’ve worked extensively with Boost::Asio and I conclude that strands are not worth it unless extreme performance requirements force you to use them. You just don’t want yet another scheduler in your pipeline. In particular, it’s difficult to keep track of what happens when and why. In C++, you have the additional problem of lifetimes (when is the object deleted), which is alleviated by std::shared_ptr, but then suddenly your objects live because some strand somewhere still has a std::shared_ptr to it, and it’s very difficult to have an overview of lifetimes and memory management. You trade a whole lot of inconvenience for a tiny bit of performance.

                                                              1. 1

                                                                Oh! I’ve done this before. I’ve had surprising luck contacting original authors; perhaps I should dig some up…

                                                                1. 1

                                                                  You also reversed and reimplemented the game? That’s awesome, I’d love to read more about it. Did you reverse the game logic by inspecting the binary? Did you figure out the exact logic how the enemies move? I did everything down to pixel perfection, but I couldn’t fully figure out the AI.

                                                                  1. 1

                                                                    No, not this game, but similar games. I have a soft spot for that early Windows shareware aesthetic, but this game was new to me.

                                                                    1. 1

                                                                      Hah, here I thought that I could finally get some answers to my open questions about the game internals. I’d still be interested in your reversing of other games.

                                                                      1. 1

                                                                        It’s mostly just reimplementation, sadly.

                                                                1. 2

                                                                  About a year later, the programmer of the game, Rüdiger Appel, contacted me through my website. We had a nice e-mail exchange in which he revealed that the game was originally written in Pascal and that the source code is unfortunately lost. You can find more information about the game and the source code of my clone on GitHub. Note that this was my first larger JavaScript project, so the code quality is mediocre at best.

                                                                  1. 9

                                                                    The most hilarious thing about MQTT is not mentioned. Look at the Quality of Service (QoS) parameter [1]. It has three levels, and the highest guarantee is “Exactly once (assured delivery)”. If someone designs a protocol for a highly distributed system and offers you this option, you know that you can safely discard the protocol and use something else (it is generally impossible to make such a guarantee). In a highly distributed system, error handling is the secret sauce. You can’t just delegate that to some magical mechanism that “guarantees” your delivery (most likely with blind retries). You can’t just live in blissful ignorance of the ugliness of network problems or failing devices. Your software on each device in the network needs to handle all these error states and respond accordingly. I personally think that MQTT brings little to the table that actually addresses the problems of a highly distributed system.

                                                                    [1]: https://en.wikipedia.org/wiki/MQTT#Quality_of_service_(QoS)

                                                                    1. 8

                                                                      I’m surprised bitmap fonts survived for so long. They should have been removed from everything ages ago! The presence of this ancient technology is still causing unpleasant surprises sometimes.

                                                                      1. 11

                                                                        As somebody who exclusively uses bitmap fonts (Misc Fixed in particular is my absolute favorite), this comment pains me.

                                                                        1. 3

                                                                          Can you describe the OS, desktop environment, browser, text editor, IDE, etc. you’re using? I love bitmap fonts because of their enhanced clarity and design, but most software is unable to handle them properly. I have yet to find a setup that lets me use bitmap fonts across the board, from desktop environment all the way to the applications. SerenityOS seems to do really well on this front.

                                                                          1. 5
                                                                            • Distro: Gentoo
                                                                            • Environment: no DE (I use bspwm or openbox as my WM)
                                                                            • Browser: Pale Moon
                                                                            • Editor: Emacs
                                                                            • Graphical Toolkits: Athena (Emacs), Gtk (everything else)

                                                                            I’ve gotten almost everything to work with Misc Fixed, with the exception of Discord.

                                                                            Even with BBD (Bandaged Better Discord) I still can’t get it to use the Misc Fixed font. -_-

                                                                            1. 1

                                                                              Try using Ripcord https://cancel.fm/ripcord/ for Discord. It supports any font you like, and additionaly it’s a fully native Qt application, not an Electron crap.

                                                                        2. 4

                                                                          Fonts more than many other things in normal graphics depends on the ‘context of use’ and what price you must pay versus the price you can tolerate paying. It’s your cycles and all that but the vector step is a big and pricey complexity leap – rough incremental cost (anything non-printer):

                                                                          • bitmap ascii-set? font in cache and straight masked bitblt (< 100loc range)
                                                                          • bitmap hdpi / color? multiple caches, fetch/add per pixel (< 500loc range)

                                                                          (arguably hershey vector font set kind of things fit in here somewhere, but mainly embedded use?)

                                                                          • bitmap to intermediate-vector->bitmap? fetch+mul per pixel, heavy format parsing+intermediate buffer+glyph cache+device dependent shaping+raster cache and complex data formats (multiple support libs and years of work)
                                                                          • cursive/kerned? picking / selection operations require LTR/RTL sweep (mouse motion gets pricey)
                                                                          • shaped/substitutions/ligatures? all string and layouting operations more complex, table preprocessor/lut
                                                                          • gpu drawing context? atlas packing cache management, reduced feasible set of active use glyphs
                                                                          • ZUI? mipmap levels and filtering..
                                                                          • 3D/VR? offline (m)SDF gen, manual fixups for troublesome glyphs..

                                                                          I use most of that range daily, whenever possible though, bitmap for the win (and cycles).

                                                                          The thing with that discussion though is like, while bitmap fonts may have some space optimization weirdness that makes parsing a little bit of work, for what they are, it doesn’t register on the complexity scale. Heck, those fun emojis are embedded PNGs forcing both bitmap management and pixel-scaling to be there anyhow..

                                                                          Given two particular names in that thread, I’d go with ‘obstinate’..

                                                                        1. 15

                                                                          I feel like GUI programming needs an analogous rule to the Linux Kernel’s “We do not break user space!” rule. If your decision to remove something causes distressed comments and workaround tutorials to spring up like mushrooms, you probably blundered - no matter the amount of cleanup it allows you to do in your code base. It is really frustrating when the maintainers of an ubiquitous library mark your bug report as “wontfix” and close it. On the other hand, will you, the user, step up, take on the burden of this problem and straighten it all out? My experience is that if you submit a clean bugfix and are willing to talk and work with people, they will accept your PR.

                                                                          1. 8

                                                                            GUI programming for Windows in C and C++ pretty much follows the “We do not break user space!” rule.
                                                                            Cake, for example, is a Windows 1.0 application that I ported to Win64 as a weekend hack.
                                                                            I think these are the only code changes that would be needed to get the application working on Win32.

                                                                            1. 2

                                                                              I saw one of the participants’ name turn up and instinctively knew that it would turn into an unpleasant outcome that would leave everyone worse off.

                                                                              My approach is to stay as far away from the Gnome project and that individual as possible, and it kinda works.