1. 3

    Interesting that the reviewer is using Linux 4.19, considering 4.18 was released on Sunday (2 days ago) so the merge window just opened for that version.

    1. 1

      There is no way in heck that linus will merge some DIY home rolled crypto code into the kernel

      1. 11

        It seems like you may not recognize the author. I would typically agree with you on first glance, but given who it is and what it is I wouldn’t be surprised if it got merged.

        1. 8

          That’s a good point but missing key detail. I’ll add author did WireGuard which has had good results in both formal verification and code review.

        2. 7

          Where else is kernel crypto code rolled?

            1. 2

              High praise from linus!

            2. 2

              Why not? How would Linus even know if some crypto code was DIY nonsense?

              (The subtext of these commits from Jason is that the existing kernel crypto APIs are not particularly good, IMO.)

            1. 3

              I started following Phil’s guides a few months ago when I had the itch to write a kernel. After I had completed everything he had written with the 1st edition, he abandoned it to move on to a 2nd edition - just my luck. I’m glad he’s still pushing out regular updates with the 2nd edition, the 1st edition was starting to become out-of-date. For example - one of the most important parts for writing a kernel in Rust is the global_allocator attribute, which was stabilized a little over a month ago, with a number of changes that are incompatible with the 1st edition’s code (IIRC - it’s been a little while since I looked at the memory allocation post).

              I’m interested to see how he approaches the memory management and remapping of the kernel in the 2nd edition. One thing that bothered me about the 1st edition was that he shows you how to implement a simple “bump” heap allocator, without a “free” function. Instead of completing that allocator and adding “free”, he instead linked to his other linked-list allocator without going into its implementation details. I scoffed and decided to write my own heap allocator, using the buddy allocation method. I even started writing a blog post about it - maybe I’ll get off my ass and finish it one of these days, I’m sure it would prove useful to someone.

              1. 1

                please write about it! I have implemented a bitmap allocate but it has limited utility. A buddy system could basically be your allocator for all.

              1. 3

                Although it’s not as pretty, the column(1) (core?)util does something similar. Given the example input from the README for Miller, throwing it through column -s ',' -t produces this output:

                county      tiv_2011    tiv_2012    line         construction
                SEMINOLE    22890.55    20848.71    Residential  Wood
                MIAMI DADE  1158674.85  1076001.08  Residential  Masonry
                PALM BEACH  1174081.5   1856589.17  Residential  Masonry
                MIAMI DADE  2850980.31  2650932.72  Commercial   Reinforced Masonry
                HIGHLANDS   23006.41    19757.91    Residential  Wood
                HIGHLANDS   49155.16    47362.96    Residential  Wood
                DUVAL       1731888.18  2785551.63  Residential  Masonry
                ST. JOHNS   29589.12    35207.53    Residential  Wood
                

                Of course, you don’t get the processing language that Miller appears to provide for more complex data mangling. It looks like a very nice tool for that sort of thing.

                1. 4

                  I’ve been watching Jon Blow’s language design since he started in 2014, and I gotta say, he’s made some impressive leaps and bounds. The original “conceptual” talks[1] that don’t feature any of the code at all have a lot of great justification for his design decisions. Of course this video four years later as he’s actively been working on the project, and I’m interested to see how this has diverged from and expanded on his original vision.

                  [1] First talk, second talk.

                  1. 2

                    I feel like this would be a great way to help teach someone how to play Dwarf Fortress. Cool project.

                    1. 2

                      These are a lot of interesting pictures and diagrams - is there a video of a presentation to go with this?

                      1. 6

                        I haven’t watched the entire thing yet, so I’m not certain, but I believe this is the recording: https://www.youtube.com/watch?v=-7GMHB3Plc8

                        1. 1

                          Ahhhh thank you

                      1. 25

                        Nice article. I must admin that I am a systemd fan. I much prefer it to the soup of raw text in rc.d folders. Finally, an init system system for the 1990s.

                        1. 13

                          I’ve never had a problem doing anything with systemd myself - I think a lot of the hate towards it stems from the attitude of the project owners, and how they don’t make any effort to cooperate with other projects (most notably, IMO, the Linux kernel folks). Here’s a couple of interesting mailing list messages that demonstrate that:

                          1. 11

                            Exactly.

                            I was initially skeptical about the debug ability of a systemd unit, but the documentation covers things to great depth, and I’m a convert to the technical merits. Declarative service files, particularly when you use a ‘drop-in’, are a definite step up from the shell scripts of sysvinit.

                            The way the project tries to gobble up /everything/ is a concern though, given their interactions (or lack thereof) with other parts of the community.

                            1. 2

                              My impression is that the resistance to systemd stems from it not being unixy. Not being Debiany, even.

                              I use for i in ..., sed, grep, awk, find, kill -SIGHUP, lsof, inotify, tee, and tr all damned day to mange my system, and systemd has left me blind and toothless.

                              I’m still working on my LFS-based replacement for my various Debian desktops, vms, and laptop.

                              1. 1

                                Declarative service files, particularly when you use a ‘drop-in’, are a definite step up from the shell scripts of sysvinit.

                                I’ve never found “systemd vs sysvinit shell scripts” to be a particularly compelling argument. “Don’t use sysvinit shell scripts” is a perfectly fine argument, but doesn’t say much about systemd. There are loads of init systems out there, and it seemed to me that systemd was never in competition with sysvinit scripts, it was in competition with other new-fangled init systems, especially upstart which was widely deployed by Ubuntu.

                                1. 1

                                  In the case of Debian, it’s basically sysvinit or systemd.

                                  1. 2

                                    That’s still not much of an argument for systemd; it’s just passing the buck to the Debian developers, and going with whichever they chose. That’s an excellent thing for users, sysadmins, etc. to do, but doesn’t address the actual question (i.e. why did the Debian devs make that choice?).

                                    According to Wikipedia, the initial release of systemd was in 2010, at which point Ubuntu (a very widely-deployed Debian derivative) had been using upstart by default for 4 years.

                                    Debian’s choice wasn’t so much between sysvinit or systemd, it was which non-sysvinit system to use; with the highest-profile contenders being systemd (backed by RedHat) and upstart (backed by Canonical). Sticking with sysvinit would have been an abstain, i.e. “we know it’s bad, but the alternatives aren’t better enough to justify a switch at the moment”. In other words sysvinit’s only “feature” is the fact that it is already in widespread use, with all of the benefits that brings (pre-existing code snippets, documentation, blogposts, troubleshooting forums, etc.).

                                    These days systemd has that “feature” too, since it’s used by so many distros (including Debian, as you say), which was the last nail in sysvinit’s coffin: at this point sysvinit is mostly hanging on as a legacy option (Debian in particular cares very deeply about stability and compatibility). Choosing between Debian sysvinit and Debian systemd isn’t so much a choice of init system, it’s a choice of whether or not to agree with the Debian developers’ choice to switch init system. And that choice was between systemd, upstart, initng, runit, daemontools, dmd, etc. They abstained (stuck with sysvinit) for many years, until around 2015 when the systemd vs upstart competition was resoundingly won by systemd, with Ubuntu switching away from upstart and Debian switching away from sysvinit.

                                    As I saw all of this going on, my interpretation was:

                                    • Around 2005 every popular distro was using sysvinit because of its entrenched base, a few users advocated for alternatives like initng but the distros didn’t find the improvements to be worth the cost.
                                    • Ubuntu switched to upstart, making init systems a hot topic: sysvinit became viewed as legacy, upstart was being looked at closely by other distros and it seemed like, once it got enough real-world usage, many might switch over.
                                    • Systemd appeared, inspired by Apple’s launchd, and gradually gained users. At this point sysvinit was already seen as legacy and the question was what systemd offered that upstart didn’t.
                                    • Debian debated switching init system, and with input from Ubuntu developers they both agreed that systemd was the better option (from my understanding, systemd’s “lazy” approach was a fundamentally better fit to the init problem than upstart’s “eager” approach). Upstart basically died at this point.
                                    • All subsequent debates about systemd focus on how it’s better than sysvinit, which was never really in question.

                                    To me, comparing systemd to sysvinit is like those shampoo adverts which claim their product gives an X% improvement, but the fine-print says that’s compared to not washing ;)

                                    1. 1

                                      OpenRC is drop-in and works perfectly fine. I dropped it in and I’m using it on all my installs with no issues.

                                      1. 1

                                        I think maybe you’ve misunderstood me.

                                        I don’t mean you can install systemd and it will continue to work with sysvinit scripts.

                                        I’m referring to systemd’s “drop-in” unit configurations. You can override specific parameters of a unit without having to replace the whole thing.

                                        https://coreos.com/os/docs/latest/using-systemd-drop-in-units.html

                            1. 1

                              Link appears broken, but the cached versions work. Here’s a link to one:

                              https://archive.is/urHjP

                              1. 9

                                You can form your own opinion here: https://github.com/xtermjs/xtermjs.org/pull/54

                                Contributors feeling entitled to have their patches merged is indeed an recurring Problem in OSS.

                                1. 10

                                  This replier (not sure if he is a maintainer or not) approaches this issue perfectly, IMO. He is patient and calmly explains the reasons why projects won’t merge PR’s simply because they exist and pass all checks/tests. The person making the PR really comes off as entitled, and seems to conflate saying “no, we won’t merge this PR” with impoliteness.

                                  Thanks for linking, it helps with the context of this post.

                                1. 4

                                  I’m an ASCAP member. I can’t think of anything good to say about this idea. But, as an ASCAP member. No thank you. We don’t need to replicate that model. Nope.

                                  1. 1

                                    Care to elucidate on the shortcomings of the model?

                                  1. 4

                                    Oh man, the memories. Great video, thanks for sharing – I doubt I would have run across it otherwise.

                                    1. 2

                                      tl;dw, what is it about? A documentary about the game?

                                      1. 6

                                        It’s really an overview of adventure games during the late 80s through the 90s all the way to today - with a focus on the Monkey Island games and SCUMM-built games (as well as their competitors). If you love that style of adventure game you’d probably get a lot out of this video.

                                        1. 2

                                          Ah, alright! Thanks! I’ll take a look later when I have time.

                                          1. 1

                                            I watched the one about Quake from the same channel. It was nicely done, but a bit long and minor repetitive. Will keep this one for later since I still want to play Monkey Island unspoiled one day :)

                                      1. 27

                                        Agreed wholeheartedly with everything on this list (esp. Docker and Nix) except for the Code of Conduct line. Sadly, we’re living in a time where assholes need to be explicitly uninvited.

                                        1. 15

                                          I don’t share the concept of gender with the FreeBSD CoC. When growing up, i observed the world with my own eyes, and found that its an rather arbitrary abstraction not providing value. Should others be allowed to force me to use that concept against my conscience? I’m not rude or disrespectful towards peers (inc. actual transgender persons) because of that.

                                          Does that make me an asshole that needs to be explicitly uninvited?

                                          1. 20

                                            If you do the things that the FreeBSD CoC says you shouldn’t do (calling people by names they’ve explicitly said shouldn’t be used especially) then yes. Otherwise I don’t really see how it affects you?

                                            1. 10

                                              Having control over the abstractions people use also limits what those people can express. Achilles and the Tortoise is a good illustration of that.

                                              Forcing these abstractions over people is what violates their autonomy, which is why the FreeBSD CoC was so controversial in the first place. Its that the proponents argue that you have nothing to fear if you are “a good person”, equating lawfulness with being a good person. Which is fundamentally wrong. Yes, Edward Snowden violated laws, but i doubt he is a bad person because of that.

                                              1. 11

                                                Can you be more practical, less philosophical, and provide an example of something you’d say, that the CoC would consider wrong? (No bad intentions or hidden agenda in this question, just generally wondering how a real life example of the issue looks like for you).

                                                1. 12

                                                  “/me hugs nullp0tr

                                                  “You shouldn’t beat your children tho”

                                                  “I dislike that you program killer robots for the CIA”

                                                  1. 6

                                                    Thanks for the examples. I understand your frustration with it a bit more now. How would you deal with someone who’s constantly hugging or backrubbing someone else after being asked to stop? and how does your view on gender affect your empathy towards people with a different view and who get offended by someone who’s constantly using the wrong pronoun?

                                                    1. 11

                                                      Constantly harassing another user will get you warned, kicked or even banned with our without a CoC. Worst case (if the channel moderation doesn’t care) is that you need to block/set them on your ignore list.

                                                      I don’t have an generic attitude on that, and i didn’t have IRL conflicts on pronouns yet. The transgender persons i interacted with were respectable persons and individually got me to use their preferred pronoun without force.

                                                      Conflict is a component of daily life. Persons who handle conflict by getting offended and expecting others to change their mind are akin to the kid in the mall throwing a tantrum because mom wont buy the gummy bears. That’s just shitty diplomacy and wont get you anywhere. Embodying such an attitude into an community law will make your community a toxic place.

                                                      1. 6

                                                        I don’t have an generic attitude on that, and i didn’t have IRL conflicts on pronouns yet. The transgender persons i interacted with were respectable persons and individually got me to use their preferred pronoun without force.

                                                        So is it okay in your opinion to intentionally use the wrong pronoun if the persons in question were not respectable?

                                                        Constantly harassing another user will get you warned, kicked or even banned with our without a CoC. Worst case (if the channel moderation doesn’t care) is that you need to block/set them on your ignore list.

                                                        What’s the difference between having a written rule about what would get you banned and not having one?

                                                        Conflict is a component of daily life. Persons who handle conflict by getting offended and expecting others to change their mind are akin to the kid in the mall throwing a tantrum because mom wont buy the gummy bears. That’s just shitty diplomacy and wont get you anywhere. Embodying such an attitude into an community law will make your community a toxic place.

                                                        How would you handle conflicts created by racism, sexism, etc in a non toxic way?

                                                        1. 9

                                                          So is it okay in your opinion to intentionally use the wrong pronoun if the persons in question were not respectable?

                                                          If people start interacting with me by insulting me, then i definitely wont let them tell me how to call them.

                                                          What’s the difference between having a written rule about what would get you banned and not having one?

                                                          Power. Rulemakers wield extraordinary power because they are the ones who interpret a situation as lawful or unlawful. Not getting in trouble with the law is, to an extent, doing good diplomacy with the rulemakers.

                                                          How would you handle conflicts created by racism, sexism, etc in a non toxic way? Ideally:

                                                          • Tell that i did not find it appropriate, explain why
                                                          • Optional discussion, quite often its just an misunderstanding
                                                          • Avoid being antagonistic, not calling them sexist or insults (burns bridges instantly)

                                                          Best case is that i can base my standpoint upon their values. Using authoritative power to deploy sanctions should always be the last resort.

                                                          1. 3

                                                            If people start interacting with me by insulting me

                                                            What are the ways you get insulted? What if someone does it by accident?

                                                            If people start interacting with me by insulting me, then i definitely wont let them tell me how to call them.

                                                            Didn’t you just say being diplomatic is key?

                                                            Persons who handle conflict by getting offended…

                                                            I’m confused why you would revert to being a kid in the mall by not calling someone by their preferred pronoun if they insulted you. I agree with your overall idea of being diplomatic.

                                                            1. 2

                                                              Thanks for taking the time to clarify your stand.

                                                              It seems you’d rather have an environment of mutual respect and no single/few figures that can decide on what constitutes as wrong doing selectively, and you’d rather solve the issues the FreeBSD CoC tries to address through diplomacy and listening to all parties?

                                                              How would you go about implementing your ideal conflict resolution approach in real communities? (alternatively, do you have an example of a community that already does that or something similar?)

                                                              1. 4

                                                                My preference aren’t as exotic at it seems on the first view.

                                                                I dont need to implement it on my own, its already live in such an community, an local instance of the Chaos Computer Club in germany. Hacker culture tends to be decentral and skeptical of authorities in general, probably because hackers tend to be persons that value personal autonomy high. Socially adjacent communities (alot of artists here!) and companies share alot of the mindset.

                                                                Edit: These communities are also the ones where most positive feedback about my CoC-critical stuff comes from. I think i hit a nerve there that already bothered quite some people

                                                    2. 7

                                                      “I think that the memo that James Damore wrote about gender diversity efforts at Google was by and large correct and that Google was wrong to fire him. He should be considered welcome to contribute in good standing to this open-source software project if he so chooses.”

                                                      Any code of conduct that allowed me to say that sentence is (probably) fine; any code of conduct that treated me saying that sentence as a violation is not fine.

                                                      1. 5

                                                        That is a surprisingly good litmus test. Regardless of your actual view on the Damore memo or subsequent furore, a CoC that can penalize you for expressing your view about a person or situation like that is probably overstepping the mark.

                                                        It’s not whether someone would agree with you that he should be welcome to contribute to a project, it’s whether you are allowed to say it. In that regard I really like it as an overreach test.

                                                        1. 4

                                                          I’ve read the whole memo. I think he gets some things wrong and disagree with him here and there, but I’m glad I read it. Overall he does have a lot of good points, and it does show a big problem with the “leftness” of silicon valley tech culture.

                                                          Instead of trying to get more women in STEM/tech, how about we make it more socially acceptable for everyone, both men and women, to go after things they actually like to do. How many people do you know in tech, both men and women, hate their cubeville life. So many people I know, no matter how enthusiastic they might seem at times, deep down, do not like their jobs. We’ve got Dilbert, Office Space, We the Robots and so many other things in entertainment that show how awful these jobs can be. People want to escape.

                                                          I feel like there is a lot of pressure on men (and I guess now more on women) to earn enough to provide for a family. We mock people with English or Philosophy degrees with their steamy piles of debt; debt the previous generation would not have had because they could pay for school by working at a grocery store. The cost of education is too high and it’s being turned into a pipeline to the industry that is in demand. The debt locks people in.

                                                          Want to solve income inequality? Make everyone’s income public. Every employee knows what every other employee makes and that should be a Federal mandate. Why the fuck is there a taboo over income anyway. If you know what people are worth, you know what you should be wroth. I have a hypothesis that if you could somehow measure confidence, people’s incomes would directly correlate with their confidence level and not their genders.

                                                          I think people are locked into a certain political ideology and the false left/right paradigm that they fail to see the real issues are not the issues they’re addressing. Those are symptoms of a much deeper cause.

                                                          1. 4

                                                            I honestly haven’t read the memo. Is it something specific in the memo that you wanna be able to express your agreement with? or do you want to be able to express any opinion regardless of what it entails?

                                                            1. 1

                                                              I’m still overall confused by James Damore’s memo. It was mostly an incoherent mess when I read it. What part was he right about in regards to Google’s gender diversity efforts?

                                                          2. 3

                                                            Ok. What do you do that violates the CoC that isn’t bad? So far all I’ve heard is weird analogies that don’t really make sense. Can you articulate your concrete concerns?

                                                            1. 9

                                                              Not fighting for moral autonomy because you agree with it is analogous to not fighting for free speech because you agree with what the state says.

                                                              I do enjoy my moral autonomy, i exercise it, and i expect other people to let me do it. And the FreeBSD CoC says, “not here”. So i avoid FreeBSD.

                                                              Like free speech, moral autonomy is an essential part of democratic society (Lawrence Kohlberg: “Moral Development”), even if not everyone needs it.

                                                              1. 7

                                                                Not fighting for moral autonomy because you agree with it is analogous to not fighting for free speech because you agree with what the state says.

                                                                This is entirely disingenuous. FreeBSD is not the state, and requiring that contributors to an open source project not express violent prejudice against other contributors in order to be allowed to contribute is not at all similar to state censorship.

                                                                I do enjoy my moral autonomy, i exercise it, and i expect other people to let me do it.

                                                                Thanks for clarifying. You should realize that this is literally the purpose of CoCs like this one. You value your ability to do whatever you like over the productivity and comfort of others, and that’s not the attitude FreeBSD, Rust etc want in their community, because it tends to decrease productivity and cause burnout, not to mention just being a pain in the ass to work with.

                                                                So, yes, I agree with the others in this thread. Please continue to avoid FreeBSD, and if possible, me as well.

                                                                1. 3

                                                                  FreeBSD is not the state, and requiring that contributors to an open source project not express violent prejudice against other contributors in order to be allowed to contribute is not at all similar to state censorship.

                                                                  Would you not avoid a project that required you to limit your freedom of speech simply on principle? Or, if you would not, do you at least understand why someone else might on principle?

                                                                  The only difference in this example is that you at least have a reasonable choice of simply not using/contributing to FreeBSD if you disagree.

                                                                  1. 5

                                                                    Would you not avoid a project that required you to limit your freedom of speech simply on principle?

                                                                    Assuming you don’t mean “freedom of speech” (as in, freedom from state censorship) and actually mean “freedom to say whatever you want, whenever you want, in whatever forum you want”, this question is so broad as to be meaningless. If you DO mean “freedom of speech”, then it is so narrow as to be irrelevant, since the policies of open source projects don’t affect your legal freedom of speech. In either case, you miss the point.

                                                                    Community standards exist in order to prevent, in specific spaces, behavior that will adversely affect the community that creates them. All communities have standards. Codes of Conduct formalize and write down those standards, and allow people to examine them. If a community with standards by which one did not wish to abide existed and was otherwise appealing, one might join it and be unpleasantly surprised. On the other hand, a CoC allows one to see, up front, the norms and standards of a community. This is good.

                                                                    Therefore, it seems like @liwakura doesn’t disagree so much with the existence of a CoC as with the community standards many of them encode - in particular, those of the Node.js and FreeBSD communities. Now comes the critical point:

                                                                    Rather than engage with specific problems in the CoC (e.g., “[specific rule] is open to serious abuse and provides little protection for the accused”, et cetera), liwakura focused on the “restriction of autonomy”. Yes, community standards restrict autonomy. That is the point. They prevent behavior such as the purposeful, spiteful misgendering liwakura described as a likely outcome with a negative interaction with a trans person, or purposeful ignorance (as in, the noun form of “to ignore”, not as in lack of knowledge) of social structure of gender- and sex-based oppression. By preventing those behaviors from being displayed by liwakura in FreeBSD spaces, the CoC has succeeded.

                                                                    In other words, the CoC says “If you’re going to be a jerk, such as in these specific ways, stay out”, and liwakura’s response was “How dare you tell me that you don’t want me to be a jerk in these specific ways! I’m going to do what you say and not participate in your community, but also whine about it on the Internet.”

                                                                    1. 2

                                                                      Community standards exist in order to prevent, in specific spaces, behavior that will adversely affect the community that creates them.

                                                                      From what I’ve seen, the CoC being enforced in these specific spaces does not usually happen - they are enforced outside of those spaces as well. If I say some homophobic stuff on IRC, and it gets screencapped and posted on Twitter, do I get kicked out as a member of Project XYZ that uses a CoC which specifically prohibits that sort of language? Obviously I’ve said it, and there is public record of it - but I wasn’t saying it in context of the project, or to any member of the project, and in a (relatively) private setting. If I’m punished for something like that, then I’ve lost moral autonomy outside of the project.

                                                                      1. 1

                                                                        I would consider that to be a very arguable case. Is it possible that one’s external behavior will negatively impact the project and its community? Yes. Is your objection about moral autonomy outside the project valid? Also yes.

                                                            2. 0

                                                              Ok. What do you do that violates the CoC that isn’t bad? So far all I’ve heard is weird analogies that don’t really make sense. Can you articulate your concrete concerns?

                                                        2. 2

                                                          To be fair, I fall between the OP and the parent. Aside from one pre-COC level FreeNAS, I don’t use FreeBSD (which is the example) because of the shitty CoC. I’m not opposed to a well-structured one, but FreeBSD doesn’t appear to have one. Using a product means you condone the producer’s practices. I don’t use Facebook. I’m slowly degoogling my life, and I’m getting rid of Linux. Amazon Prime will be a hard plaster to pull off, but I’m working up to that. I see FreeBSD the same way - I don’t support their CoC implementation, ergo I won’t support the product by using it.

                                                          The very fact that any online discussion quickly devolves into poisonous ad-hominem is reason enough for me to be put off by the presence of one, but they can serve a purpose when well implemented (if GNU had a well-designed CoC then the recent Glibc abort() debacle could’ve been handled through it for example). When they’re poorly implemented like with FreeBSD, it’s not properly serving it’s existing community.

                                                          1. 2

                                                            Why are you getting rid of linux?

                                                            1. 5

                                                              It’s a combination of factors, some of which are due to shitshows like systemd, issues with breaking compatibility (e.g. ifconfig) and the realisation after moving to docker that for the most part, I have absolutely no idea what code is running on these systems.

                                                              I wrote about this in another comment here: https://lobste.rs/s/yxswhm/what_are_you_self_hosting#c_8reclz

                                                              To be fair, a lot of this is a result of my own poor personal choices, but I now feel like I’m fighting Linux to make it do what I want predictably, and not do things I didn’t tell it to do. It’s very reminiscent of MacOS’s shift a few years back.

                                                              I’m going to spend some time with Alpine simply because that’s what a lot of my docker containers for public systems run on, but I’m not building new systems to run docker, no longer buying raspberry pis (thanks, binary blobs) and instead of migrating to Linux, I’m migrating a lot of systems to Open and NetBSD. I would’ve chosen FreeBSD, but the CoC debacles mean I’m less comfortable supporting it. My next NAS build may well run Illumos instead.

                                                        1. 5

                                                          I always thought it interesting how the GNU tools have this split-brain between emacs and vi keybindings. I know that readline (by default) uses emacs, but I believe you’re able to make it use vi-like keybindings instead (or maybe that’s just a feature of Bash?). The two tools I use daily that use vi keybindings are man and less. And then you can see GNU’s influence with info because they use emacs bindings.

                                                          All in all, it’s a pain and I’m a vim guy so beyond single-line editing on the command line, emacs bindings are completely foreign to me. As a result info pages are almost useless to me because I have no idea how to correctly navigate them. ¯\_(ツ)_/¯

                                                          1. 12

                                                            I believe you’re able to make it use vi-like keybindings instead (or maybe that’s just a feature of Bash?)

                                                            That’s actually mandated by POSIX, as part of the definition of set for the shell. There was originally a proposal to have an “emacs” mode as well, but as the POSIX rationale document states:

                                                            In early proposals, the KornShell-derived emacs mode of command line editing was included, even though the emacs editor itself was not. The community of emacs proponents was adamant that the full emacs editor not be standardized because they were concerned that an attempt to standardize this very powerful environment would encourage vendors to ship strictly conforming versions lacking the extensibility required by the community.

                                                            Gotta love Emacs users ;)

                                                            1. 2

                                                              The original FSF crew were all (most?) emacsphiles, according to Brian Fox.

                                                              Source: many discussions with Brian Fox.

                                                              1. 1

                                                                Aw, man, Brian Fox. What’s up with him these days? I wish I could have been there in the early days of the FSF.

                                                              2. 2

                                                                …I believe you’re able to make it use vi-like keybindings instead…

                                                                In ~/.inputrc:

                                                                set editing-mode vi
                                                                set keymap vi
                                                                

                                                                As a result info pages are almost useless to me because I have no idea how to correctly navigate them.

                                                                That’s why I install pinfo on every Linux machine I use. It’s still not vi-like bindings, but it’s lynx-like bindings, which are at least easy to learn.

                                                                1. 1

                                                                  The two tools I use daily that use vi keybindings are man and less.

                                                                  If you’re on some reasonably “normal”-ish Linux distro and haven’t gone out of your way to configure things otherwise, man is most likely just displaying its output via less, so those are kind of one and the same as far as keybindings go – and less actually isn’t a GNU program.

                                                                  1. 1

                                                                    FWIW, less supports both bindings.

                                                                    1. 0

                                                                      info pages

                                                                      Pet peeve. They’re info manuals not pages. Manpages are called that because individually each was supposed to be but a single, one-page cheat sheet of the full Unix manual.

                                                                      The whole point of TeXinfo was to generate full manuals all at once, and in multiple formats, with an index, a table of contents, chapters, menus, and hyperlinks. If you don’t like the text-based info reader, there is HTML and PDF output as well. Use those!

                                                                      … but I know you’ll tell me next, if it’s not in a text-based terminal, you don’t want to read it. In that case, just read the raw .info[.gz] files. They’re plain text files with a few ASCII control characters.

                                                                    1. 9

                                                                      While I love the fact that Microsoft is trying this, I somehow don’t believe that it will be a major success. There is already conan, buckaroo and hunter, and your OS’s package manager of choice. But how many people actually use these? And even if you wanted to use them, you might not be able to, because not all are supported by all build systems. What build systems, you ask? Well, you could use make, either with pkg-src directly or with the higher-level automake? Nah, scratch that, better go with premake. Or maybe try out ninja combined with meson, like all the other cool kids? Most people seem to use and dislike cmake. And the really daring are trying to bolt a module system onto C++. I think C++ is beyond saving because it has too many moving parts, and Microsoft won’t fix that. But then again, that’s probably not their mission, anyways.

                                                                      1. 6

                                                                        This is pretty much how I feel. The first thing I thought when I saw this was, “another one?”

                                                                        I applaud the efforts to give C++ a unified environment, and the fact that it’s coming from Microsoft is much more of a blessing for the tool than anything else could be. Since C++ (and C) have existed as sort of decentralized languages compared to something like Ruby, Rust, or Python, and the fact that there is so much C++ code out there (legacy or otherwise), I doubt that the landscape will change very much within the next decade or two.

                                                                      1. 3

                                                                        If anyone wants a larger video than the embedded one, here’s a link to the browser-width player:

                                                                        https://player.vimeo.com/video/248214009

                                                                        1. 1

                                                                          Yeah, but can it run DOOM?

                                                                          1. 4

                                                                            In my free time I’m trying to write an OS targeting little ARM microcontrollers (currently working with Teensy 3.6, and hopefully RPI0 soon enough). Work has finally quieted down so I hopefully have energy in the evening to continue.

                                                                            This week, I’m still trying to get an LED to blink from the bare metal. I’m stealing using PJRC’s Arduino libraries for the Teensy 3.6 and incorporating a lot of it into my codebase. I’m learning a lot about the world of watchdog timers, crossbars, and confusing hardware defaults. It’s a lot of fun, even if the fun comes from complaining.

                                                                            I’m still not sure what I want the OS itself to do, though. I know I want to

                                                                            1. make it a toy project exploring stupid ideas (what if the filesystem was like JSON?)
                                                                            2. make it easy to plug ‘n’ play user-space software with peripherals like GPIO

                                                                            but everything else is up in the air. Maybe I’ll figure out what I want as I write it. I’ve never written a kernel or an OS before, so it’s all a learning experience.

                                                                            1. 2

                                                                              One thing that really frustrates me about programming language landing pages is when the author foregoes showing any example of what the syntax looks like. This page even says:

                                                                              A simple, familiar syntax optimized for readability: alignment and indentation, everything is an expression, separation with newline, simple grammar, optional type annotations…

                                                                              What does that mean? The link on it leads nowhere, and the Github repository doesn’t have any clear examples that I can see.

                                                                              1. 2

                                                                                I was playing around with a toy language I made in Rust. Here’s the program entry function, 50 lines. How readable is it?

                                                                                fn run_program<P: AsRef<Path>, Q: AsRef<Path>>(
                                                                                    path: P,
                                                                                    dump: bool,
                                                                                    optimize: bool,
                                                                                    compile_only: bool,
                                                                                    search_dirs: &[Q],
                                                                                ) -> Result<()> {
                                                                                    let mut ast_tree = ImportAST::new();
                                                                                    ast_tree.import_ast(search_dirs, path.as_ref())?;
                                                                                    let ir_compiler = CompileIR::new(ast_tree);
                                                                                    let compiler = CompileBytes::new(ir_compiler.compile()?);
                                                                                    let fun_table = {
                                                                                        let fun_table = compiler.compile().chain_err(|| "Compile error")?;
                                                                                        // run optimizations
                                                                                        if optimize {
                                                                                            // TODO : Optimization groups
                                                                                            OptimizePipeline::new(fun_table).optimize()
                                                                                        } else {
                                                                                            fun_table
                                                                                        }
                                                                                    };
                                                                                    if dump {
                                                                                        for f in fun_table.iter().filter_map(
                                                                                            |(_, f)| if let &internal::Fun::UserFun(ref f) =
                                                                                                f as &sbl::bc::Fun
                                                                                            {
                                                                                                Some(f)
                                                                                            } else {
                                                                                                None
                                                                                            },
                                                                                        )
                                                                                        {
                                                                                            eprintln!("- {} {}", &f.name, "-".repeat(69 - f.name.len()));
                                                                                            f.dump();
                                                                                        }
                                                                                    }
                                                                                    if !compile_only {
                                                                                        let mut vm = VM::new(fun_table);
                                                                                        let res = vm.run();
                                                                                        // Dump the VM state on error if we're dumping code as well
                                                                                        if res.is_err() && dump {
                                                                                            eprintln!("- Begin VM state ---------------------------------------------------------------");
                                                                                            vm.dump_state();
                                                                                            eprintln!("--End VM state -----------------------------------------------------------------");
                                                                                        }
                                                                                        res
                                                                                    } else {
                                                                                        Ok(())
                                                                                    }
                                                                                }
                                                                                
                                                                                1. 2

                                                                                  That looks close – I guess it depends on if compile() has “passes”. What I’m saying is that I would like all the passes “pulled” to the top level, in a flat structure, so I can just read them from top to bottom. That’s of course my preference and you can organize your cmopiler how you want :-)

                                                                                  1. 1

                                                                                    It’s been a while since I’ve looked at this project, but I do believe compile() is a single “pass”, depending on your definition. Things get a little hairy in the AST stage because I designed the language so that functions and imports are order-agnostic, so there are probably multiple passes when that gets built in the beginning.

                                                                                    The more I think about it, another feature the language has, called “bake” blocks, allows for code to be run and return values before the actual main function gets run. Without getting too in-depth on the details, this means that the final compilation may depend on previous compilations. And of course, bake blocks may have more bake blocks embedded inside of them (because hey, if it’s worth doing, it’s worth overdoing, right?) so those pre-compilation stages depend on pre-pre-compilation stages. So that final compile() call may be more complex than I originally thought.