Threads for doomslug

  1.  

    This looks really nice!

    I wonder if you could integrate your smart heuristics with fzf’s UI? I think fzf can cooperate with another process to generate candidates.

    1.  

      Thank you! I haven’t looked into it, but that might be possible! I personally like the simplicity of zf, and was/is a fun personal project to learn Zig. But someone else wants to integrate it into fzf, and it is possible, then I think that would be great!

    1.  

      Well done on detailing out the use cases, it’s good to see a user-centered approach for CLI tools!

      1.  

        Thanks for the kind words!

      1. 1

        To test my theory I analyzed many repositories from GitHub and found that in a typical codebase the majority of filenames are unique.

        Counter example: index.html

        Another counter example:

        $ cd repos/nixpkgs/master/
        $ find -type f | grep default\\.nix$ | wc -l
        21650
        

        I commonly match the name of the directory instead.

        1. 5

          Yep! That’s a perfect example of when that observation doesn’t hold. Maybe I didn’t make things clear enough, but I do understand that file names aren’t always unique. That’s why I also have a feature for making path matching more accurate later in the post.

          1. 3

            Great! Once again i did not read the full post.

            1. 1

              No worries :)

        1. 8

          Could one create a custom allocator that does garbage collecting for you?

          I do not know much about garbage collection in general so I do not know if this is a stupid question. :P

          1. 8

            Yes! Not a stupid question. This has been done in C, a well-known example being the Boehm-Demers-Weiser garbage collector which has already been ported to Zig here: https://github.com/mitchellh/zig-libgc

            1. 4

              Note that it’s not a port, but instead a Zig Allocator wrapper around the C library. The Zig compiler is also a C compiler and can import C headers natively which is pretty neat nonetheless.

              1. 1

                Oops that’s right, thank you for the correction!

              2. 2

                That’s really cool! Thanks.

            1. 8

              Whoa, I’ve been referred to as “a C developer”… I’m not sure if I deserve that qualification!

              Overall a pretty good overview of Zig! One small thing,

              A distinctive feature of Zig is that it does not deal with memory allocation directly in the language. There is no malloc keyword like in C/C++.

              Well C++ does has the new operator, but malloc is part of the C standard library. I think I understand the author’s intent though: Zig doesn’t have a global allocator. This is something I’ve been thinking about a lot lately. The more I use Zig the more I appreciate the convention of explicit allocators passed to functions. It makes heap allocations very clear in code, and it has made it very easy for me to confidently write an allocation-free fuzzy finding Zig module while still relying on the standard library.

              1. 2

                Besides trying to recover from being sick the past few days, I’ll be working on my side project at https://rpgportrait.app by

                • Adding in some mechanisms for resilience against workers getting overloaded
                • Adding Google and Apple login as options to lower friction of creating an account

                Edited to add:

                And apparently also looking for a new job. Hit by layoffs shortly after posting this. :(

                1. 2

                  Sorry to hear about the layoffs. Hope the job search goes well!

                  I shared rpgportrait with a friend who is into D&D and he is enjoying it!

                  1. 2

                    Thanks! Really appreciate both the well wishes and spreading the word about rpgportrait.app. :)

                    1. 1

                      You’re welcome! He’s spread it around his various D&D groups now :)

                1. 1

                  At work: Last Thursday and Friday we had a hackathon where we could “work on almost anything you want” during work hours. So I made a tiny game with tic80 that includes tons of inside jokes from my team. (This was my first time using tic80 and I would absolutely use it again.) I’m excited to demo it today! Then it’s back to the brutal PHP version upgrades…

                  Not work: Still working on my fuzzy finder, and maybe diving into raylib this week as a replacement for SDL2 for my rewrite of Reckless Drivin’.

                  1. 3

                    There’s only one simple rule when it comes to the length of the sequences: all lengths must match. Passing arrays of different length is safety-checked UB (i.e. you will get a panic in safe release modes).

                    Does this mean you have to check the sizes of the sequences before you use them in non-safe release modes?

                    1. 6

                      As an example, here is how this new syntax affected std.mem.copy:

                      --- a/lib/std/mem.zig
                      +++ b/lib/std/mem.zig
                      @@ -196,13 +196,8 @@ test "Allocator.resize" {
                       /// Copy all of source into dest at position 0.
                       /// dest.len must be >= source.len.
                       /// If the slices overlap, dest.ptr must be <= src.ptr.
                       pub fn copy(comptime T: type, dest: []T, source: []const T) void {
                      -    // TODO instead of manually doing this check for the whole array
                      -    // and turning off runtime safety, the compiler should detect loops like
                      -    // this and automatically omit safety checks for loops
                      -    @setRuntimeSafety(false);
                      -    assert(dest.len >= source.len);
                      -    for (source, 0..) |s, i|
                      -        dest[i] = s;
                      +    for (dest[0..source.len], source) |*d, s|
                      +        d.* = s;
                       }
                      

                      The TODO is solved, the @setRuntimeSafety is no longer needed, and the assertion is performed by the slice of dest to match the source length.

                      This was not a motivating source code example when deciding on the new syntax - it was a happy side effect of the change.

                      1. 1

                        That’s a neat use of slices. So slicing checks the bounds, and aborts if they are wrong, e.g. if the source is longer than the dest?

                        1. 1

                          Correct.

                        2. 1

                          this also functions as a nice reminder that postfix deref is pretty neat

                        3. 2

                          To my understanding, yes. Though I expect in practice this wouldn’t be an issue. One of the motivating examples for this feature is StructOfArrays. Those arrays are all the same length so there wouldn’t be a concern in that case.

                          And in the case of iterating over multiple arrays/slices with potentially differing lengths: without this for loop syntax, you would need to do bounds checking before or during the loop anyway, so I think the behavior of the for loop makes sense. Rather than have the for loop truncate any longer slices, the surrounding code will handle mismatched lengths to be more explicit

                          1. 2

                            Thanks. I see how this feature would make SOA code neater.

                            What still makes me uneasy about this is that if you don’t check your bounds (because you assume the arrays are the same length), and you run a non-safe release this would be UB.

                            Unless I got this wrong, there’s no bounds checking in that case, right?

                            1. 2

                              That is correct. I just tested. In a safe mode there is a runtime panic “for loop over objects with non-equal lengths” and in an unsafe release mode it seems to iterate for the length of the first array entry, with no bounds checking.

                              I think this fits well with Zig’s approach to safety. In a more critical piece of code you could use ReleaseSafe with bounds checking. Then a block of code that needs particular optimizations could have @setRuntimeSafety(false) to remove bounds checks for example.

                              1. 2

                                Thanks for the detailed explanation :)

                                So you could have a whole app compiled as safe release, and disable safety selectively. Nice.

                                1. 1

                                  You’re welcome, and that’s correct

                        1. 3

                          This Helix editor keeps popping up under the vim tag, which is annoying to me because this is not about vim at all.

                          1. 2

                            Maybe there needs to be an “editors” tag, or a “cli” tool tag. I think helix is very on topic for lobsters, but there really should be a better way to categorize it.

                            On the other hand, the “programming” tag seems to be a catch-all, meant to be used “no specific tag applies”

                            1. 1

                              Just suggest a different tag!

                              1. 2

                                I’ve already done this, and many times before.

                            1. 1

                              At work I’m working on PHP version upgrades for our legacy codebase. While it’s nice that new PHP versions have support for type declarations, it is very difficult to confidently upgrade old code. This should have been started well before I joined the team and it’s a lot of work…

                              Outside of work I have been on a roll making consistent updates to my various open source projects. I’m still working on my fuzzy finder and it gets better by the day!

                              1. 4

                                In addition to the talk, it’s worth clicking through to see the author’s minslides tool that was used for the talk. I am amazed at how simple it is to implement a slideshow in a single html file with only a couple lines of JS and CSS.

                                1. 2

                                  It’s so neat! the j,k controls threw me a bit but i really like it.

                                  1. 3

                                    have you … have you never heard of vim?

                                    https://xkcd.com/1053/

                                    1. 1

                                      I love that XKCD! Such good advice for life, especially if you have children.

                                    2. 2

                                      They threw me somewhat more on a mobile device with no keyboard.

                                  1. 3

                                    Hopefully making a little headway in an experiment writing a text editor in Rust using Bevy (inspired by @healeycodesblog post).

                                    Curious if anyone knows of any good literature on the subject of designing and implementing text editors (or IDEs, I suppose). I found a few books and papers from the 90s but had trouble with anything more recent, other than blogs.

                                    1. 2

                                      That blog post (re)inspired me too! Over the last year or so I have collected many bookmarks of blog posts detailing the implementation of text editors, but I haven’t found much beyond that. So I’m also interested in any information others have to share!

                                    1. 3

                                      This will also work since we’re not returning the address of the array:

                                      Hm, will it? It feels like that’s more or less the same dangling pointer as in the first example, no?

                                      1. 5

                                        Yep, that’s the same dangling pointer problem. Perhaps they intended something like this:

                                        /// Returns an array with comptime-known length by value
                                        fn zigBits(comptime len: usize) [len]u8 {
                                            const message = [_]u8{ 'z', 'i', 'g', 'b', 'i', 't', 's' };
                                            return message[0..len].*;
                                        }
                                        
                                        1. 4

                                          Yep, that’s correct. Both &message and message[0..] in Zig will return the same slice, so either way its the same dangling pointer problem.

                                          1. 1

                                            So it’s just a coincidence that it prints the right thing?

                                            1. 2

                                              Yep, inserting a function call after zigBits() and before printing the message would likely overwrite the stack memory pointed to and cause it to not work.

                                              1. 1

                                                Thanks. There’s an issue on GitHub with planned escape analysis. It would have catched that kind of a bug.

                                          2. 2

                                            Updated the post about why it doesn’t work. Thanks!

                                          1. 4

                                            I’ve been working on my Zig Lua bindings package again this week. It has nearly 100% api and test coverage, but the docs aren’t completed. Only about 50% of the public functions have accurate comments. That’s because wrote the Lua 5.4 bindings first, then copied them for the other versions of Lua I support. So I’ll probably keep working on docs!

                                            1. 5

                                              I noticed today that this book was made freely available as a PDF in October of 2022. Here is a direct link to the book: http://www.lua.org/gems/lpg.pdf

                                              1. 8

                                                I’m releasing a new version of zf! I’ve worked hard this last month to add some new features, refactor a lot of code, and fix a few bugs too. I have mentioned zf a lot in passing, but this is also the first time I feel like it is ready for general use, so I’ll also be writing a post to share more about zf.

                                                It will be nice to relax once that’s all done. I’ll celebrate with a nice weekend hike. Then it’s off to the next side project!

                                                1. 3

                                                  I was successful in updating my fuzzy finder to support Unicode over the weekend, so this week I’ll be adding one last feature I have planned for my next release. So hopefully I’ll have a new version out by the end of the week!

                                                  It’s return to office this week. I’ve been in the office regularly for months now, but I’m not excited for the everyone to be back. Going to be crowded and noisy! Oh well.

                                                  1. 1

                                                    I’m quickly learning how complex unicode text editing can become. So hopefully I’ll be able to set aside a larger block of time to overcome the initial barriers and change my paradigm from how I’ve always done things with ASCII. Fun to learn new things!

                                                    And I’ll also go check out a nearby avalanche that is on a popular trail lower in the mountains (from a safe distance!)

                                                    1. 57

                                                      The way this PR was written made it almost seem like a joke

                                                      Nobody really likes C++ or CMake, and there’s no clear path for getting off old toolchains. Every year the pain will get worse.

                                                      and

                                                      Being written in Rust will help fish continue to be perceived as modern and relevant.

                                                      To me this read a lot like satire poking fun at the Rust community. Took me some digging to realize this was actually serious! I personally don’t care what language fish happens to be written in. As a happy user of fish I just really hope this doesn’t disrupt the project too much. Rewrites are hard!

                                                      1. 52

                                                        This is what it looks like when someone is self-aware :-)

                                                        They looked at the tradeoffs, made a technical decision, and then didn’t take themselves too seriously.

                                                        1. 14

                                                          Poe’s Law is strong with this one. Not knowing the author of Fish, I genuinely can’t tell whether the commentary is 100% in earnest, or an absolutely brilliant satire.

                                                          1. 30

                                                            Given the almost 6,000 lines of seemingly high quality Rust code, I’m going to say it’s not a joke.

                                                            1. 27

                                                              Gotta commit to the bit.

                                                              1. 3

                                                                Oh, sure! I meant the explanation in the PR, not the code itself.

                                                              2. 3

                                                                Same. After doing some research into the PR though, I’m pretty sure it’s in earnest. XD

                                                              3. 1

                                                                For sure! After I looked deeper and found that this person is a main contributor to fish things made more sense. I totally respect their position and hope things go well. I just thought the way it was phrased made it hard to take seriously at first!

                                                              4. 28

                                                                The author understands some important but often underappreciated details. Since they aren’t paying anyone to work on the project, it has to be pleasant and attractive for new contributors to want to join in.

                                                                1. 3

                                                                  It only “has to be” if the project wants to continue development at an undiminished pace. For something like a shell that seems like a problematic mindset, albeit an extremely common one.

                                                                  1. 13

                                                                    For something like a shell that seems like a problematic mindset

                                                                    Must it?

                                                                    Fish seldom plays the role of “foundational scripting language”. More often it’s the interactive frontend to the rest of your system. This port enables further pursuit of UX and will allow for features I’ve been waiting for for ages

                                                                    1. 2

                                                                      For something like an interactive shell, I generally feel that consistency beats innovation when it comes to real usability. But if there are features that still need to be developed to satisfy the fish user base, I suppose more development is needed. What features have you been waiting for?

                                                                      1. 11

                                                                        https://github.com/fish-shell/fish-shell/pull/9512#issuecomment-1410820102

                                                                        One large project has been to run multiple fish builtins and functions “at the same time”, to enable things like backgrounding functions (ideally without using “subshells” because those are an annoying environment boundary that shows up in surprising places in other shells), and to simply be able to pipe two builtins into each other and have them actually process both ends of the pipe “simultaneously”.

                                                                        There have been multiple maintainer comments over the years in various issues alluding to the difficultly of adding concurrency features to the codebase. e.g. https://github.com/fish-shell/fish-shell/issues/238#issuecomment-150705108

                                                                2. 24

                                                                  Nobody really likes C++ or CMake, and there’s no clear path for getting off old toolchains. Every year the pain will get worse.

                                                                  I think that the “Nobody” and “pain” there may have been referring to the dev team, not so much everyone in the world. In that context it’s a little less outlandish a statement.

                                                                  1. 28

                                                                    It’s also not really outlandish in general. Nobody likes CMake. How terrible CMake is, is a common topic of conversation in the C++ world, and C++ itself doesn’t exactly have a reputation for being the language everyone loves to use.

                                                                    I say as someone who does a whole lot of C++ development and would pick it above Rust for certain projects.

                                                                    1. 13

                                                                      Recent observation from Walter Bright on how C++ is perceived:

                                                                      He then said that he had noticed in discussions on HN and elsewhere a tectonic shift appears to be going on: C++ appears to be sinking. There seems to be a lot more negativity out there about it these days. He doesn’t know how big this is, but it seems to be a major shift. People are realizing that there are intractable problems with C++, it’s getting too complicated, they don’t like the way code looks when writing C++, memory safety has come to the fore and C++ doesn’t deal with it effectively, etc.

                                                                      From https://forum.dlang.org/post/uhcopuxrlabibmgrbqpe@forum.dlang.org

                                                                      1. 9

                                                                        That’s totally fine with me.

                                                                        My retirement gig: maintaining and rescuing old C++ codebases that most devs are too scared/above working on. I expect it to be gross, highly profitable, and not require a ton of time.

                                                                        1. 7

                                                                          C programmers gonna have their COBOL programmer in 1999 moment by the time 2037 rolls around.

                                                                        2. 4

                                                                          C++ appears to be sinking

                                                                          And yet, it was the ‘language of the year’ from TIOBE’s end-of-year roundup for 2022, because it showed the largest growth of all of the languages in their list, sitting comfortably at position 3 below Python and C. D shows up down at number 46, so might be subject to some wishful-thinking echo-chamber effects. Rust was in the top 20 again, after slipping a bit.

                                                                          TIOBE’s rankings need to be taken with a bit of a grain of salt, because they’re tracking a lot of secondary factors, OpenHub tracks more objective things and they’re also showing a steady increase in the number of lines of code of C++ changed each month over the last few years.

                                                                          1. 40

                                                                            TIOBE has +/- 50% error margin and even if the data wasn’t unusable, it’s misrepresented (measuring mentions picked by search engine algorithms over a historical corpus, not just current year, not actual usage). It’s so bad that I think it’s wrong to even mention it with “a grain of salt”. It’s a developer’s horoscope.

                                                                            TIOBE thinks C popularity has halved one year and tripled next year. It thinks a niche db query language from a commercial product discontinued in 2007 is more popular in 2023 than TypeScript. I can’t emphasize enough how garbage this data is, even the top 10. It requires overlooking so many grave errors that it exists only to reinforce preexisting beliefs.


                                                                            Out of all flawed methods, I think RedMonk is the least flawed one: https://redmonk.com/rstephens/2022/10/20/top20-jun2022/ although both RedMonk and OpenHub are biased towards open-source, so e.g. we may never learn how much Ada DoD actually uses.

                                                                            1. 10

                                                                              My favourite part about the RedMonk chart is that it shows Haskell going out through the bottom of the chart, and Rust emerging shortly afterwards, but in a slightly darker shade of red which, erm, explains a lot of things.

                                                                    2. 17

                                                                      The rationale provided tracks for me as someone who is about to replace an unpopular C++ project at work with Rust. Picking up maintenance of someone else’s C++ project who is no longer at the company vs. picking up someone else’s Rust project have looked very different in terms of expected pain / risk IME.

                                                                      “Getting better at C++” isn’t on my team’s dance card but “getting better at Rust” is which helps here. Few working programmers know anything about or understand native build tooling these days. I’m the resident expert because I know basics like why you provide a path argument to cmake. I’m not actually an expert but compared to most others in my engineering-heavy department I’m as good as it gets. Folks who do a lot of C++ at work or at home might not know how uncommon any thoroughgoing familiarity with C and C++ is getting these days. You might get someone who took one semester of C to say “yeah I know C!” but if you use C or C++ in anger you know how far that doesn’t go.

                                                                      I’m 34 years old and got my start compiling C packages for Slackware and the like. I don’t know anyone under 30 that’s had much if any exposure unless they chose to work in embedded software. I barely know what I’m doing with C/C++ despite drips and drabs over the years. I know enough to resolve issues with native libraries, FFI, dylibs, etc. That’s about it beyond modest modifications though.

                                                                      tl;dr it’s difficult getting paid employees to work on a C++ project. I can’t imagine what it’s like getting unpaid volunteers to do so.

                                                                      1. 13

                                                                        It does seem weird. We find it easier to hire C programmers than Rust programmers and easier to hire C++ programmers than either. On the other hand, there do seem to be a lot of people that want a project to hack on to help them learn Rust, which might be a good opportunity for an open source project (assuming that you are happy with the code quality of learning-project Rust contributions).

                                                                        1. 27

                                                                          The difficulty is that you need to hire good C++ programmers. Every time some vulnerability or footgun in C++ is discussed, people say it’s not C++’s fault, is just a crappy programmer.

                                                                          OTOH my experience from hiring at Cloudflare is that it’s surprisingly easy to onboard new Rust programmers and have them productively contribute to complex projects. You tell them not to use unsafe, and they literally won’t be able to cause UB in the codebase.

                                                                        2. 4

                                                                          I personally don’t care what language fish happens to be written in

                                                                          You might not, but a lot of people do.

                                                                          I wrote an tool for myself on my own time that I used often at work. Folks really liked what it could do, there’s not a tool like it, and it handled “real” workloads being thrown at it. Not a single person wanted anything to do with it, since it was written in an esoteric language. I’m rewriting it in a “friendlier” language.

                                                                          It seems like the Fish team thought it through, weighed risks and benefits, have a plan, and have made good progress, so I wish them the best.

                                                                          1. 4

                                                                            Not a single person wanted anything to do with it, since it was written in an esoteric language.

                                                                            Oo which language?

                                                                            1. 1

                                                                              I’d rather not say, I don’t want anyone to feel bad. It’s sufficient to say, “As of today, not in the TIOBE Index top 20.”

                                                                              The bigger point is that it was a tool I had been using for over a year, which significantly improved my efficiency and quality of life, and it got rejected for being an esoteric tech, even though I provided executable binaries.

                                                                              1. 1

                                                                                That sucks. Yeah, I don’t mean to ask to hurt anyone’s feelings, I’m just always curious to know what people think are “esoteric”, cuz esoteric on lobste.rs (Factor, J, one of the advent of code langs) is going to be very different than esoteric at my job (haskell, rust).

                                                                          2. 4

                                                                            As a happy user of fish I just really hope this doesn’t disrupt the project too much. Rewrites are hard!

                                                                            Same here. As a user, it doesn’t bother me in which language it is written in. They should absolutely pick the language that allows them to be more productive and deliver more. I have been an happy fish user for 13 years, it is a software that proved useful from.day one. And every realease there are clear important improvements, often times new UX additions. I wish them a smoot migration.

                                                                            1. 4

                                                                              If you’re curious about the size of the rewriting project: I ran tokei on the repo and it counted 49k lines of C++ 8k lines of headers 1k lines of CMake (and 57k lines of Fish, so there’s also a lot that won’t need to be rewritten)

                                                                              1. 3

                                                                                They posted this little bit later:

                                                                                Since this PR clearly escaped our little bubble, I feel like we should add some context, because I don’t think everyone caught on to the joking tone of the opening message (check https://fishshell.com/ for similar writing - we are the shell for the 90s, after all), and really got what the idea here is.

                                                                                1. 3

                                                                                  The follow up contains:

                                                                                  Fish is a fairly old codebase. It was started in 2005

                                                                                  Which means I still can’t tell the degree to which he’s joking. The idea that a codebase from 2005 is old is mind boggling to me. It’s not even 20 years old. I’ve worked on a lot of projects with code more than twice that age.

                                                                                  1. 1

                                                                                    To put things into perspective, 2005 to 2023 is 18 years — that is the entire lifespan of the classic MacOS.

                                                                                    Or, to put things into perspective, the Mac has switches processor architectures twice since the Fish project was started.

                                                                                    Most software projects just rot away in 18 years because needs or the surrounding ecosystems change.

                                                                                    1. 2

                                                                                      To put things into perspective, 2005 to 2023 is 18 years — that is the entire lifespan of the classic MacOS.

                                                                                      Modern macOS is a direct descendent of NeXTSTEP though, which originally shipped in 1989 and was, itself, descended from 4BSD and CMU Mach, which are older. Most of the GNU tools are a similar age. Bash dates back to 1989.

                                                                                      Most software projects just rot away in 18 years because needs or the surrounding ecosystems change.

                                                                                      That’s probably true, but it’s a pretty depressing reflection on the state of the industry. There are a lot of counter examples and a lot of widely deployed software is significantly older. For example, all of the following have been in development for longer than fish:

                                                                                      • The Linux kernel (1991)
                                                                                      • *BSD (1991ish, depending on when you count, pre-x86 BSD is older)
                                                                                      • Most of the GNU tools (1980s)
                                                                                      • zsh (1990)
                                                                                      • NeXTSTEP / OPENSTEP / macOS (1989)
                                                                                      • Windows NT (1993)
                                                                                      • MS Office (1990)
                                                                                      • SQL Server (1989)
                                                                                      • PostgreSQL (1996)
                                                                                      • Apache (1995)
                                                                                      • StarOffce / OpenOffice / LibreOffice (original release was 1985!)
                                                                                      • MySQL (1995)
                                                                                      • NetScape Navigator / Mozilla / Firefox (1994)
                                                                                      • KHTML / WebKit / Blink (1998)
                                                                                2. 2

                                                                                  This is the actual world we live in. This is what people really think.

                                                                                  1. 1

                                                                                    Why does everyone hate CMake so much?

                                                                                    I find it far easier to understand than Makefiles and automake.

                                                                                    Plus it runs on ancient versions of Windows (like XP) and Linux, which is not something most build systems support. And it mostly “just works” with whatever compiler you have on your system.

                                                                                    1. 20

                                                                                      Makefiles and automake are a very low bar.

                                                                                      Cargo can’t do 90% of the things that CMake can, but it’s so loved, because most projects don’t need to write any build script at all. You put your files in src/ and they build, on every Rust-supported platform. You put #[test] on unit tests, and cargo test runs them, in parallel. You can’t write your own doxygen workflow, but cargo doc gives you generated reference out of the box for every project. The biggest criticism Cargo gets about dependency management is that it’s too easy to use dependencies.

                                                                                      This convention-over-configuration makes any approach requiring maintaining a DIY snowflake build script a chore. It feels archaic like writing header files by hand.

                                                                                      1. 15

                                                                                        I find it far easier to understand than Makefiles and automake.

                                                                                        Why does everyone hate being punched in the face? I find it far more pleasant than being ritually disemboweled.

                                                                                        And it mostly “just works” with whatever compiler you have on your system.

                                                                                        CMake is three things:

                                                                                        • A set of core functionality for running some build tasks.
                                                                                        • A truly awful macro language that’s been extended to be a merely quite bad configuration language.
                                                                                        • A set of packages built on the macro language.

                                                                                        If the things that you want to do are well supported by the core functionality then CMake is fairly nice. If it’s supported by existing packages, then it’s fine. If it isn’t, then extending it is horrible. For example, when using clang-cl, I was bitten by the fact that there’s hard-coded logic in CMake that adds the /TC or /TP flags to override the language detection based on the filename and tell it to use C or C++. This made it impossible to compile Objective-C. A few releases later, CMake got support for Objective-C, but I can’t use that support to build the Objective-C runtime because it has logic in the core packages that checks that it can compile and link an Objective-C program, and it can’t do that without the runtime already existing.

                                                                                        I’ve tried to use CMake for our RTOS project, but adding a new kind of target is incredibly hard because CMake’s language is really just a macro language and so you can’t add a new kind of object with properties of it, you are just using a macro language to set strings in a global namespace.

                                                                                        I’ve been using xmake recently and, while there’s a lot I’ve struggled with, at least targets are objects and you can set and get custom properties on them trivially.

                                                                                        1. 3

                                                                                          Plus it runs on ancient versions of Windows (like XP)

                                                                                          Only versions no one wants to run anymore (i.e. 3.5 and older).

                                                                                          1. 3

                                                                                            its an entire set of new things to learn and it generates a makefile so I worry that I’ll still have to deal with the problems of makefiles as well as the new problems cmake brings

                                                                                        1. 6

                                                                                          I own a 1641 German Lutheran Bible that was passed down from my ancestors. I want to learn more this week about its history. Things like where was it printed? How much would it have cost at the time? How many of my edition were printed? I’m planning on asking the owner of a local store that specializes in old books for info. If anyone here knows other resources to look at please let me know!

                                                                                          Also finally practicing Unicode string processing this week so I can add it to my fuzzy finder.

                                                                                          1. 4

                                                                                            For general questions about bibles, the effect of printing presses, etc., the AskHistorians subreddit is very good. It is heavily moderated and has great content.

                                                                                            For questions specifically about your book, try the BookCollecting subreddit. Post photos of the cover and the title page there and you might get a response from an expert.

                                                                                            1. 1

                                                                                              I hadn’t considered that, thanks for the ideas!