1. 4

    This doesn’t seem very C-like.

    I realize C is old and has had many styles and that the idioms of C are weaker than most other languages, but still. This seems anti-idiom to me.

    1. 0

      would have been nice to use RFC example IP range instead of the public IPs used in the examples.

      1. 2

        maybe this example is trying to reinforce Dynamically Addressed Peers, and using RFC ips only would not take as much attention of the reader as using, or…

      1. 1

        Can someone ELI5 why this is interesting? Or maybe ELI66. I don’t understand.

        1. 2

          It’s a take/parody on sites like http://isitfridayyet.net/, but you don’t have to set up your own domain. Hence “as a service”.

        1. 7

          Is Genode really a special-purpose OS? What is that purpose? The project home page says:

          The Genode OS framework is an open-source tool kit for building highly secure component-based operating systems. It scales from embedded devices to dynamic general-purpose computing.

          When I think special-purpose OS, I think of proprietary things like JunOS, TIMOS, FortiOS, ZyNOS for network switches – and the odd open-source competitor like VyOS, which is just a specialized Linux distro. Other purpose-specific distros like Kali, Tails, Qubes come to mind too. I think Linux is being painted with an awfully broad brush here. I mean, even Android uses the Linux kernel, right?

          But, the overall sentiment is right on the money. And don’t even get me started about browsers!

          1. 1

            yes, and while android core may not be another example of vendor purpose os, it sure seems like the most commonly shipped android devices do fit the bill.

          1. 10

            Adding some new AVX 512 intrinsics to rust.

            1. 1

              Thank you.

            1. 1

              How well does it handle forking? One semi-common use I have is having multiple people try to test a website. Right now I use code like the below. Does this roughly do the same?

              #!/bin/env python
              from socketserver import ForkingMixIn
              from http.server import SimpleHTTPRequestHandler, HTTPServer
              class ForkingSimpleServer(ForkingMixIn, HTTPServer):
              import sys
              import os
              if sys.argv[1:]:
                  port = int(sys.argv[1])
                  port = 8000
              if sys.argv[2:]:
              server = ForkingSimpleServer(('', port), SimpleHTTPRequestHandler)
                  while 1:
              except KeyboardInterrupt:
              1. 1

                It is written in Go. There is no forking, concurrent requests are handled via concurrent goroutines.

              1. 6

                Interestingly this runs very counter to some common wisdom. See “Things you should never do” by Joel https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

                At my last team I used the “paying down credit card debt” analogy. You allocate a portion of your budget to it (hopefully enough to avoid the balance increasing), but you also still spend money on food every month.

                The cynical view of this is that you kind of need to rate limit “fixing all the things” because software developers often conflate “technical debt” with “> 6 months old and not using the latest framework or pattern from my favorite blog”. The questions I usually use to guide these conversations are:

                1. What quantifiable pain does $X cause to us in terms of velocity or outages or security exposure?
                2. If we take action $Y, what leads us to believe that the pain will lessen?

                So basically you have to convince me there’s a problem, and you have to convince me the recommended solution will actually fix the problem and that we can expect it to be cost effective.

                1. 9

                  This is a very old post at this point, and I think some historical context about Fog Creek is worth pointing out:

                  Because of Joel’s inflexible position on this, Fog Creek ended up CREATING THEIR OWN PROGRAMMING LANGUAGE and then porting the whole codebase to C# with their hand-rolled compiler.

                  I don’t consider that to be any less risky than a full-scale rewrite.

                  1. 2

                    Interestingly this runs very counter to some common wisdom. See “Things you should never do” by Joel https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

                    A good followup to “Things you should never do” is Lessons from 6 software rewrite stories, which is about the ways some companies are able to do complete rewrites.

                    1. 1


                      For the above reasons, the original post is IMO poor advice.

                    1. 2

                      congrats, you’ve met, but not exceeded, the 21yr old C10k problem - https://en.wikipedia.org/wiki/C10k_problem - on 10yr old hardware.

                      I guess I agree with the author that it is very sad if most people don’t know that this is what is possible. This is what has been possible for 21yrs.

                        1. 1

                          one could also create a socket connection between nodejs and .net and do the same communication over it.

                          1. 1

                            Using TCP has some downsides cuz other processes in the same machine could maliciously or accidentally connect to it. Especially if it talks http, miscreants might be able to get a browser to send requests to it with CSRF attacks. Various commercial products have shipped RCEs doing this, so you at least need authentication in the protocol to not introduce vulns.

                            Using a pair of anonymous pipes as stdin & stdout works fine.

                            On cursory reading it sounds like Windows might not yet have socketpair even though some support for AF_UNIX sockets has existed for a while now.

                            1. 1

                              That’s true, and since they are consumed as stream all would work with no changes. Using sockets has the added complexity of having to choose a port. stdin and stdout are already there and ready to use.

                            1. 3

                              “Flash has been there from the dawn of the Internet” is something only a person with 93 in their nickname could write. ;)

                              [ActiveX] acts as a middleware between Java and Flash applications

                              Ok, I feel old for having seen the horrors of ActiveX (even though my nickname in the same format would only have 88 in it). But, for the record, the cool thing about ActiveX is that you could write ActiveX controls in any language. Of course, they would only run in IE for Windows, which completely negates that advantage, but still, before Emscripten there was nothing else that allowed you to write web frontend code in C++ if you really feel like it.

                              1. 2

                                They(ActiveX apps) also usually have nothing to do with Java or Flash.

                                1. 1

                                  That was an implied point but yeah, I didn’t actually say that. I’ve made a PR to remove those factually incorrect statements though.

                              1. 15

                                Is there actual data supporting the notion that code in memory-safe languages rots more than C code?

                                Java and JavaScript have been around for long enough to have a track record, and both are very good at keeping old code working. Rust and Go haven’t been around for as long but both seem to take care to keep old code working.

                                1. 1

                                  A great point, that IMO should flag this post as inaccurate.

                                1. 2

                                  The SMB client is faster than it has ever been since they ditched samba as their client. Finally I get decent speeds to my local NAS.

                                  For me, it is worth upgrading just for this.

                                  1. 14

                                    I think the only other occurence of long options with single-dash prefix I have ever seen is in X11 tools. Why break with the de-facto standard way of doing things?

                                    find(1) would also be a popular example, but I’m quite sure I have seen a few more.

                                    1. 4

                                      Oh yeah, I forgot about that one, even though I use it almost evey day. ;)

                                      1. 2

                                        Also another example I remembered would be qemu.

                                      2. 1

                                        and gcc

                                        1. 3

                                          That’s tricky, because most of gcc’s flags are of the form -[one letter key][rest of the word is the value], which is kind of another thing again?

                                      1. 2

                                        can someone explain to me what is so mind blowing?

                                        1. 3

                                          I was trying to get across this sense of wonder that I had while watching the SICP lectures.

                                          Throughout the book and lectures you use cons cells to build up abstractions, and then use those abstractions to build up other abstractions. Eventually you have multiple layers. For example, you may cons together numbers to represent a point. And then cons together points to represent a line. And then cons together lines to represent a polygon.

                                          At some point the authors/lecturers point out that cons itself could be implemented using nothing but procedure calls. When doing that, we end up with this whole tower of abstractions and not a single “concrete” (not sure if that’s the right word or not) type. All we need are procedures/functions.

                                          Maybe this was more mind-blowing to me than it should’ve been, but it felt like opening my eyes and seeing the world a little bit clearer.

                                          1. 5

                                            I think Gruber is basically right re: the traditional incentives of open source being misaligned with producing high-quality user interfaces:

                                            Talented programmers who work long full-time hours crafting software need to be paid. That means selling software. Remember the old open source magic formula — that one could make money giving away software by selling “services and support”? That hasn’t happened — in terms of producing well-designed end user software — and it’s no wonder why. In Raymond’s own words, the goal is:

                                            software that works so well, and is so discoverable to even novice users, that they don’t have to read documentation or spend time and mental effort to learn about it.

                                            It’s pretty hard to sell “services and support” for software that fits that bill. The model that actually works is selling the software itself.

                                            That being said, I’ve started using Pop_OS! from System76 recently, and it feels very polished in a way that I’m not used to with traditional Linux distros, where often the choice has felt like:

                                            • Build your own lightsaber from scratch, or
                                            • Use Ubuntu and get opted into whatever way Canonical is trying to monetize this week (e.g. shipping your searches to Amazon, running dynamic ads in the MOTD, etc).

                                            It seems like System76 taking the Apple approach — that is, making money by selling hardware — is part of the reason they’ve found their footing there.

                                            1. 2

                                              probably worth noting that 99% of popos IS ubuntu

                                              1. 3

                                                I mean, System76 built their own UI and replaced Canonical’s, which is kind of to Gruber’s point.

                                                (And they ripped out the weirder Canonical stuff like ads + tracking.)

                                                And Ubuntu itself is based on Debian unstable… ;)

                                            1. 1

                                              spacemonkey did this

                                              1. 1

                                                looks like a modern version of the same clevo hardware that they used to base their Pangolin models off of.

                                                1. -8

                                                  eh, not really