1. 5

    I’m actually pretty surprised that there doesn’t seem to be a strong backlash against the idea. Perhaps it’s simply because of who the thread participants are? My impression, so far, has been that C programmers tend to be fairly anti-Rust, for one reason or another.

    1. 9

      I’m not a fan of Rust at all but it’s a more logical language to add support to the kernel for than many. Indeed I can’t think of a better candidate from currently popular languages. It has the same “compile to efficient code without a massive runtime or any garbage collection” emphasis as C, more so than C++.

      1. 2

        Arguably Zig has even more emphasis on “better C” rather than “better C++”, but it also has the same downsides (single main implementation tied to LLVM rather than being a standardized language with multiple independent implementations) while Rust has way more maturity and momentum.

        1. 2

          Usually technologies that are same-but-better have difficulty getting adopted, because an incremental benefit doesn’t seem worth a big switching cost.

          Rust dodges this by being significantly different at the same time. It’s not just C with a borrow checker, but brings new programming style and new idioms into the systems programming niche.

      2. 4

        I assume it’s because despite whatever problems the language may have, it seems to be the only safe language that doesn’t require a whole supporting runtime

        1. 2

          There’s a great talk from Bryan Cantrill about the whys: https://youtu.be/HgtRAbE1nBM

          1. 1

            I have minimal experience in the realm of such low-level programming, but I am very interested in programming languages. As an outsider, I have heard many positive things about Rust, but perhaps my view of the subject is limited. Out of curiosity, what informed your impression that C programmers tend to be anti-Rust? As an outsider and programming language enthusiast, I am always very interested to know how people approach new programming languages.

            1. 3

              I don’t know if C programmers are generally anti-rust (I’ve seen some people who do regular work in C and really enjoy Rust. I think Bryan Cantrill is one). But the people I’ve seen negative comments from tend to use C, C++ or Go for lower level programming and not see the point.

              1. 1

                FWIW: Bryan Cantrills new company (oxide) is a Rust shop.

              2. 3

                I have some experience with OS/low-level C, but not kernel-maintainer level, but I’ll guess anyway:

                C is at it’s core rather simple. When using the language for real-world applications, you’ll encounter all the concepts pretty quickly. There are a few quirks in the syntax that one might not expect (eg. interleaving a switch-case and a loop is possible), but all in all, the core is clean. Rust, from my experience has more primitives, it changes a lot, quickly (afaik).

                Another thing that comes to mind is the development environment/tooling. C’ development environment is basically everything and nothing, because a properly setup *nix operating system is basically already a development environment. The system is sort of defined and expanding in terms of itself, with make and such. Rust brings it’s own keychain, for reasons I don’t think are illegitimate, but makes it seem “alien”, not as “native” as C.

                That’s just my take from someone who still hasn’t finished more than 20% of the Rust Book (though not just because of the points I just mentioned), so my possible misconceptions about the language are intentional.

                1. 6

                  My impression is that C is only simple if maintaining and debugging the code is someone else’s problem.

                  1. 0

                    One doesn’t maintain a language, one maintains software. C “the language” is simple. The memory model is transparent, the syntax is clean, but of course too much simplicity can lead to an overcompensation of site-local complexity in larger projects, to make up for concepts you are missing (both from a usability and safety perspective), which is probably what you are referring to – but that’s not the same as to say that C is complicated.

                    1. 5

                      The problem is that “simplicity” isn’t worth anything when it creates complexity everywhere else.

                      You want thread safety? Good luck! You want optimized, reusable containers? Ugh, maybe an include header hack will do? You want memory safety? Better get fuzzing. You want dependencies, portability or cross-compilation? You’ll never stop getting bug reports about your build scripts.

                      1. 1

                        Fair enough, but the people who value the simplicity of the language over the environment, as to probably those who prefer C over Rust, would disagree, which is fine.

                      2. 4

                        the syntax is clean

                        https://cdecl.org

              1. 2

                On the substance, I tend to disagree about Type 1 (read it later) bookmarks. The trick is that a Type 1 bookmark should be just a really crappy Type 2 bookmark. So, for instance, https://jepsen.io/consistency might have the note “hierarchy of consistency models–need to internalize this”.

                It’s certainly true that a pure read it later function can be a backed up sewer pipe. My high-water mark in instapaper was almost 4000 links. The problem is that it’s a weird mix of functions: little jokes that I wanted to save, things I might want to reference, things I hoped to write something specific about. And other than occasionally jumping back 1000 items and seeing what’s there and still relevant, I don’t look at anything but the most recent content.

                I’m working towards a system that integrates all the functions. There’s a queue of read it later material, plus bookmarks filed by topic. For all the material, I save the html of the page I’m linking to. Where it stinks right now is that I don’t have a proper bookmarklet, and all the tagging/storage/search functions are awkward. I have a rewrite of a lot of things half-done.

                1. 1

                  The trick is that a Type 1 bookmark should be just a really crappy Type 2 bookmark.

                  Yeah. A lot of stuff is just there to augment my memory’s “I know I saw something about x” functions. I probably won’t revisit it unless it comes up, but the trick is that you don’t know what’s going to come up. Tagging aggressively and including a useful excerpt or brief impression helps a lot when you’re digging for a half-remembered reference.

                  I don’t make any promises to myself that I’ll one day revisit any given thing. It’s bookmarked to reduce the future search space.

                1. 1

                  Good review, and I also thought about Ousterhout’s book as a substitute while reading the criticism of Clean Code.

                  However, my recollection of Clean Code (7 years removed) is that it had more advice about programming in the small (rules about lines, if-statements, variable names, etc). Ousterhout’s book touches on these topics, but is mostly focused at the level of how to design modules, and I’d also say it’s more focused on principles than prescriptive rules.

                  Clean code (or a better substitute) is the kind of book you might give to someone in the first year of their professional programming career. Ousterhout’s book is something you’d give to someone with a bit more experience, who’s taking on more challenging work.

                  1. 1

                    What do you think of Code Complete? Clean Code seems to be getting recommended to a more recent generation of developers. I read Code Complete as an intern. When I got Clean Code I had filled in many of things which it covers, so maybe I’m not the best audience.

                    1. 2

                      Haven’t read it. I’ve heard enough that I’d like to, but I’m also reading less material on general programming techniques, and more on specialized topics these days.

                      Also, I think you have a typo in the third sentence–perhaps one of the mentions of Code Complete should be a different book title?

                      1. 1

                        I fixed up the last sentence. Good point on specialized topics.

                      2. 1

                        I think Code Complete is the better book. We need an updated addition. The linked article in this article shows how muddled Clean Code is and I’d have to agree.

                        1. 1

                          I remember reading that book and trying to apply it to a project I was working on at the time. I wasn’t that happy with the results. I mean the advice sounds good, fewer parameters, shorter methods, but to me it makes the code more confusing as you end up with comically short methods and naming gets harder. There are only two hard things in comp sci, naming, caching and off by one errors. But seriously coming up with good names constantly is a pain.

                    1. 96

                      I don’t know whether it’s appropriate to make this meta point here, or if it should be a separate thread. Defaulting to here, feel free to tell me it should’ve been a meta post.

                      This post is being down-voted as off-topic because it mentions race and gender, but that’s just people pushing a political viewpoint. Posts about hiring practices and salaries are considered on-topic, and so posts about who gets hired by tech companies are also on topic.

                      To confirm this, I did searches on “hiring”, “salary”, “compensation”, “ageism”, “age discrimination”, and clicked a bunch of links. I generally avoided stories that had only 1-3 upvotes, though I wasn’t completely systematic (I looked at titles to guess whether they were relevant to the title, and clicked through to the articles to confirm relevance–a few had side-notes like “I won’t talk about sexism/ageism” which I treated as not being on topic). I did not find more than 1 off-topic vote on any story.

                      My conclusion is that a significant subset of lobsters are happy to discuss how hiring should work, what effective hiring practices look like, how pay should be determined, etc, including age discrimination, but view any discussion of how race or gender affects that process as unacceptable. This is cowardly and intellectually dishonest.

                      Recruiting/Hiring Compensation Ageism Misc
                      1. 29

                        Thanks for doing this research to make your point, I think it’s the one of the best ways to advance meta conversations. (Also an excuse for me to remind that I’ll run queries so we can build these shared understandings.)

                        1. 7

                          One thing to consider is that almost all of your examples have either the “culture” or “practices” tag. People who would have down-voted these stories as “Off-Topic” might have actually hidden these tags. I know I’m one of these people (I’ve only discovered the story we’re currently discussing because someone pointed me to it out of band).

                          It would be interesting if @pushcx could run statistics on the most hidden tags. I wouldn’t be surprised if “culture” and “practices” are the most hidden ones.

                          1. 9

                            I think that’s reading too much in to it. Something hiring practices is mostly just about hiring and doesn’t touch all that much on politics, whereas this is a broad political topic (which also affects hiring, among many other things). Something like compensation also touches on politics, but significantly less so.

                            Additionally – and perhaps more importantly – this is also a topic that has been discussed … a lot, and that is also highly controversial. I think a lot of people are just tired of it, and even tired of the discussions which generally don’t really seem to go anywhere and pretty much always have the same arguments that we’ve all seem 20 times already.

                            In all honesty, I think your reply is kind of an example of that: you’re trying to guess what people’s intentions are with their downvotes and sling out accusations and insults. It’s not really a very productive kind of discussion. Perhaps it’s correct for a few downvotes, but are you sure it’s for all of them (or even any of them?)

                            1. 15

                              I think there’s a key point here - a topic being political doesn’t disqualify it from being also technical or relevant to professional practices like hiring. Is the bar for lobste.rs that content be technical, or that it be non-political?

                              It seems like a misuse of the off-topic tag to flag discussions readers are tired of or which have been had often before. Requesting a politics tag so it can be filtered may be more appropriate.

                              1. 10

                                a topic being political doesn’t disqualify it from being also technical or relevant to professional practices like hiring

                                I agree, and I’m actually in favour of a broad and lax interpretation of the “no politics” rule (more so than the current interpretation). I don’t have a problem with this story (I even upvoted it), or a discussion about whether or not the off-topic flags are appropriate. It’s just the “you’re being cowardly”-stuff that I don’t like, as people may very well have valid other “non-coward” reasons to flag.

                                1. 7

                                  I’m personally against political content on lobste.rs because I think that, despite the undeniable importance of the discussions this article means to engender, politics overwhelms technical content and attracts people with nothing to say about technology but lots of awful opinions. A politics tag is not going to stem the cultural change that implies. I have an image of a eugenicist hellscape that used to be a tech news aggregator, and I’m scared of it.

                                  1. 2

                                    As someone engaging in both of these kinds of arguments, I cannot see this effect. I see people who don’t engage with topics they consider political for lack of interest (I’m fine with that), but I have a hard time coming up with a particular person that does the reverse.

                                    1. 8

                                      I see people who don’t engage with topics they consider political for lack of interest

                                      How do you know it’s for lack of interest? That’s certainly not why I typically don’t engage in “political” topics. I mostly stopped, many many years ago, for a few reasons:

                                      • It’s nearly impossible to have meaningful political discussions online because everyone is so embedded in their tribe.
                                      • I have grown more and more fearful of expressing opinions against the zeitgeist. @friendlysock said it really well in this thread and I fully agree with him.
                                      • I got frustrated because every time I had a political discussion, it just went in circles.
                                      • Even people, like Scott Alexander, who dedicate their intellect (far superior to mine) and enormous portions of their time, have eventually succumbed to the Wrath of the Internet.

                                      Overall, discussing politics had a dramatic impact on both my own personal well being and of the people around me.

                                      In every forum the discusses “politics,” with perhaps maybe a couple exceptions, it’s been a complete and total shit show. And that includes forums that loosely match my own politics.

                                      There are significant reasons for not discussing politics outside of a desire to maintain the status quo. I don’t like the status quo, even though I’ve benefited from it. I’d love to see oodles of things change. Making some forums have “no politics” rules seems perfectly in line with that. Political discussion doesn’t need to happen everywhere.

                                      N.B. I use the word “politics” above in a narrow scope, and I do not mean “literally any action.”

                                      1. 5

                                        Making some forums have “no politics” rules seems perfectly in line with that. Political discussion doesn’t need to happen everywhere.

                                        The difficulty here is that many forums with no politics rules find it hard to apply those rules evenly over the political spectrum: someone posts something with a political undertone or implication which is in line with the political preference on that forum. This post is left alone. When someone replies to the political aspects of the post in a way which does not align with the politics favoured on that forum the reply is ‘no politics’ and the post is moderated or voted down. I’ve seen this happen fairly often on the orange site.

                                        1. 2

                                          Yup. Enforcing it fairly and evenly is pretty difficult, if not impossible. I’ve moderated various things over the years, so I really understand how difficult it is. But the alternative is just so much worse IMO. You can’t escape the Overton window.

                                          I’ve found that just being transparent, and at least making an effort to be even handed, goes a long way. But that doesn’t work every time either.

                                          It’s a process.

                                        2. 1

                                          I was a little imprecise there (reminder in the future: don’t post with 2 hours of sleep in 36 hours). I’ll try to salvage that: first of all lets replace “lack of interest” with “lack of engagement for whatever reason”.

                                          I don’t agree with your statements there.

                                          It’s nearly impossible to have meaningful political discussions online because everyone is so embedded in their tribe.

                                          I disagree there, strongly. The internet has challenges for debate, especially due to it’s nature of not being able to quit a debate. Still, it gives a wide variety of viewpoints.

                                          I have an equal distaste for politics discussions as I have for many tech discussions. Arguments are often absolute and tribalism in tech is extremely strong. Naming dissenting opinions like “Rust could learn a bit from Java” easily gets you flamed down.

                                          The lure of politics is that everyone feels entitled to speak of it, even if they are rarely practitioners or literally have no experience with the problem at hand. For example, I rarely talk about community management and running conferences with random people because they’ve grown very accustomed to ignoring the pragmatics. And not talking about structural problems makes it impossible for hackers to fix them.

                                          I’ll give you an example of both: I had very good conversations with people questioning if projects like “Rails Girls” actually reach their goal of bringing more women into Rails development. This is a fair challenge and one I and other organisers can answer on many levels. I have terrible conversations with people who start by asking why CoderDojos (a project that offers hacking meetups for kids) is not open to adults. The absurdity knows no bounds.

                                          The other problem is that people obviously flaming a debate with the very first post, which makes any start of a good debate impossible. I’m totally into the right of moderators to close bad discussions down, or calling people out for being obviously just in for the fist fight. I think it isn’t done often enough.

                                          And yet, on this very platform, I had many pleasing conversations.

                                          I regularly frequent non-tech venues (gaming and music boards) and similar issues exist, but boards are often more tightly and better moderated, with moderators having a much better lingo for that moderation.

                                          I also believe that the discussion techniques we are tought are for person to person discussion and new ones should be derived for online debates (such as: checking for peoples locale before assuming they are in silicon valley, as a I frequently experience when people tell me that Germans wouldn’t hold that opinion…).

                                          I have grown more and more fearful of expressing opinions against the zeitgeist. @friendlysock said it really well in this thread and I fully agree with him.

                                          But this is commonplace and has always been the case in hacker communites. There’s a huge strive for consistency in them. I’ll give an example: I believe that the hacker communities are fighting a losing war on many fronts because there’s certain sacred opinions. I have a number of opinions I usually hold back (e.g. that E2E encryption is not always necessary or that the belief the hackers do not work for the military or the secret service is mistaken).

                                          Also, all hacker circles often pose as having a unified ethos, a problem for example visible in the very common belief, that the military using open source is not its original intention. Nothing could be further from the truth and some of the important figures in the early times of our community are hardcore pro-military.

                                          I got frustrated because every time I had a political discussion, it just went in circles.

                                          I appreciate that you have this experience, though mine differs.

                                          Even people, like Scott Alexander, who dedicate their intellect (far superior to mine) and enormous portions of their time, have eventually succumbed to the Wrath of the Internet.

                                          Scott Alexander succumbed to the NY Times for wanting to publish his name. I don’t condone this practice, but I don’t feel like the relevance to this debate.

                                          In my point of view, we are paying down the cost of trying to keep politics out of hacker discussion boards. Shielding it off leads to two problems: lack of ability to have productive discussions (no training) and lack of engagement rules for them. Also, it leads to a very biased decision on what is political or not. Even just presenting a statistic can be considered a political act, depending on the subject, even if its method and analysis are technically interesting.

                                          I would even go as far and say that the FOSS and Open Source communities are inherently exploitable by avoiding or not having found a path for discussions and thinking about its politics - absurdly, by people who understand the mechanics of politics.

                                          This is the reason why I have a very liberal view on this topic: I appreciate that some people don’t like politics posts here, but I still see no evidence that they in any way impact the viability or usefulness of a platform where it’s also easy to just click the link above or below it.

                                          P.S.: I want to keep this out of the main post, but I can’t help that if I notice that when thinking of “Person I have dissenting opinions with but like to argue over the internet”, “burntsushi” is definitely a name that pops up.

                                          1. 3

                                            I was a little imprecise there (reminder in the future: don’t post with 2 hours of sleep in 36 hours). I’ll try to salvage that: first of all lets replace “lack of interest” with “lack of engagement for whatever reason”.

                                            Ah I see. I guess my comment could then be re-interpreted as, “the reasons for my lack of engagement are pretty unfortunate and may provide some insight into why a ‘no politics’ rule is useful.”

                                            There are some things you’re saying that I agree with, and some I disagree with. I think the biggest thing I disagree with in your comment is the—what appears to be—equivalency you’re drawing between “political” discussion and hacker culture. I think a number of statements in your comment seem to be implying that, with this one in particular:

                                            But this is commonplace and has always been the case in hacker communites. There’s a huge strive for consistency in them. I’ll give an example: I believe that the hacker communities are fighting a losing war on many fronts because there’s certain sacred opinions. I have a number of opinions I usually hold back (e.g. that E2E encryption is not always necessary or that the belief the hackers do not work for the military or the secret service is mistaken).

                                            Where “this” in “this is commonplace” is, I think, referring to my fear of expressing opinions against the zeitgeist. When it comes to hacker culture, I don’t really have the same kind of fear about expressing contrary technical opinions, despite the fact that hacker culture obviously has its religious zealots and things can get pretty heated.

                                            Maybe me being more clear would be productive. I’m not too afraid of getting shouted down by hackers over differing technical opinions. Similarly, I’m also not too afraid of getting shouted down for having political opinions that differ from the zeitgeist. What I’m afraid of is getting doxxed, and that having real consequences on my life and ability to help support my family. This kind of thing happens pretty regularly in the realm of politics (I can think of several examples off the top of my head), but is comparatively more rare in hacker culture. I’m guessing here, but the disparity is likely rooted in the exact point that you brought up: “The lure of politics is that everyone feels entitled to speak of it.”

                                            Maybe the underlying mechanisms of tribes themselves are similar when comparing hacker culture and political divisiveness, but the stakes and degree of severity are absolutely not. That changes things. It adds an intensity to the discussions, and that’s what fundamentally drives my fear.

                                            Scott Alexander succumbed to the NY Times for wanting to publish his name. I don’t condone this practice, but I don’t feel like the relevance to this debate.

                                            The act of publishing his name is not the Wrath I was alluding to. One needs only question why he doesn’t want his name published. Part of it is because it would be bad for his medical practice (and that’s not relevant to this discussion), but the other part of it is that he believes he would be doxxed. And that is relevant to this discussion, because it is deeply interwoven with the exact same reasons why I have largely stopped discussing politics on the Internet.

                                            I used to discuss politics on the Internet many years ago. It sounds like you’ve found a way to do it that strikes a balance, but I couldn’t. And to be honest, I don’t really see how I could. (Please keep in mind that fear is not the only reason I stopped, but it is the one I’m focusing on in this comment, because I think it’s the best way to point out the difference between hacker culture and general politics.)

                                            This is the reason why I have a very liberal view on this topic: I appreciate that some people don’t like politics posts here, but I still see no evidence that they in any way impact the viability or usefulness of a platform where it’s also easy to just click the link above or below it.

                                            I’ve never really bought this sort of thinking to be honest. It just seems like it ignores the fact that it seeps into many conversations, and just flat out ignoring it is hard. I’ve thought about leaving lobsters, in part, at least a few times because of it. (To be clear, I’ve thought about leaving not just because of the politics that seeps into lobsters, but also because of the bad faith technical discussion that is tolerated here.)

                                            P.S.: I want to keep this out of the main post, but I can’t help that if I notice that when thinking of “Person I have dissenting opinions with but like to argue over the internet”, “burntsushi” is definitely a name that pops up.

                                            :-)

                                        3. 1

                                          What is the reverse, sorry?

                                  2. 2

                                    view any discussion of how race or gender affects that process as unacceptable. This is cowardly and intellectually dishonest.

                                    There is no technical content in this post do I flagged it. I will continue to flag posts with no technical content.

                                    1. 27

                                      Most of your posts are technical, but I also see:

                                      I do not believe there is any obvious definition of “technical” (certainly not any agreed upon one) that divides things this way.

                                      1. 2

                                        the author’s personal experience maintaining an open source project

                                        Clearly had technical content.

                                        comment thread

                                        And thus not relevant at all to this discussion… Comment threads drift in how on topic they are and that’s accepted and normal on forums.

                                        In comparison, spamming a technical forum with highly politicised and totally non-technical submissions isn’t acceptable at all

                                  1. 4

                                    Wouldn’t it make more sense to have some kind of HTTP header and/or meta tag that turns off javascript, cookies and maybe selected parts of css?

                                    If we could get browser vendors to treat that a bit like the https padlock indicators, some kind of visual indicator that this is “tracking free”

                                    Link tracking will be a harder nut to crack. First we turn off redirects. Only direct links to resources. Then we make a cryptographic proof of the contents of a page - something a bit fuzzy like image watermarking. Finally we demand that site owners publish some kind of list of proofs so we can verify the page is not being individually tailored to the current user.

                                    1. 11

                                      The CSP header already allows this to an extent. You can just add script-src none and no JavaScript can run on your web page.

                                      1. 1

                                        very true. not visible to the user though!

                                      2. 5

                                        Browsers already render both text/html and application/pdf, and hyperlinking works. There is no technical barrier to add, say, text/markdown into mix. Or application/ria (see below), for that matter. We could start by disabling everything which already requires permission, that is, audio/video capture, location, notification, etc. Since application/ria would be compat hazard, it probably should continue to be text/html, and what-ideally-should-be-text/html would be something like text/html-without-ria. This clearly works. The question is one of market, that is, whether there is enough demand for this.

                                        1. 5

                                          Someone probably should implement this as, say, Firefox extension. PDF rendering in Firefox is already done with PDF.js. Do the exact same thing for Markdown by: take GitHub-compatible JS Markdown implementation with GitHub’s default styling. Have “prefer Markdown” preference. When preference is set, send Accept: text/markdown, text/html. Using normal HTTP content negotiation, if server has text/markdown version and sends it, it is rendered just like PDF. Otherwise it works the same, etc. Before server supports arrive, the extension probably could intercept well known URLs and replace content with Markdown, for, say Discourse forums. Sounds like an interesting side project to try.

                                          1. 8

                                            Browsers already render both text/html and application/pdf, and hyperlinking works. There is no technical barrier to add, say, text/markdown into mix.

                                            Someone probably should implement this as, say, Firefox extension.

                                            Historical note: this is how Konqueror (the KDE browser) started. Konqueror was not meant be a browser, but a universal document viewer. Documents would flow though a transport protocol (implemented by a KIO library) and be interpreted by the appropriate component (called KParts) (See https://docs.kde.org/trunk5/en/applications/konqueror/introduction.html)

                                            In the end Konqueror focused on being mostly a browser, or an ad-hoc shell around KIO::HTTP and KHTML (the parent of WebKit) and Okular (the app + the KPart) took care of all main “document formats” (PDFs, DejaVu, etc).

                                            1. 2

                                              Not saying it’s a bad idea, but there are important details to consider. E.g. you’d need to agree on which flavor of Markdown to use, there are… many.

                                                1. 2

                                                  Eh, that’s why I specified GitHub flavor?

                                                  1. 1

                                                    Oops, my brain seems to have skipped that part when I read your comment, sorry.

                                                    The “variant” addition in RFC 7763 linked by spc476 to indicate which of the various Markdowns you’ve used when writing the content seems like a good idea. No need to make Github the owner of the specification, IMHO.

                                                  2. 1

                                                    What’s wrong with Standard Markdown?

                                                2. 2

                                                  markdown

                                                  Markdown is a superset of HTML. I’ve seen this notion put forward a few times (e.g., in this thread, which prompted me to submit this article), so it seems like this is a common misconception.

                                                3. 4

                                                  Why would web authors use it? I can imagine some small reasons (a hosting site might mandate static pages only), but they seem niche.

                                                  Or is your hope that users will configure their browsers to reject pages that don’t have the header? There are already significant improvements on the tracking/advertising/bloat front when you block javascript, but users overwhelmingly don’t do it, because they’d rather have the functionality.

                                                  1. 2

                                                    I think the idea is that it is a way for web authors to verifiably prove to users that the content is tracking free. Markdown renderer would be tracking free unless buggy. (It would be a XSS bug.) The difference with noscript is that script-y sites still transparently work.

                                                    In the invisioned implementation, like HTTPS sites getting padlock, document-only sites will get cute document icon to generate warm fuzzy feeling to users. If icon is as visible as padlock, I think many web authors will use it if it is in fact a document and it can be easily done.

                                                    Note that Markdown renderer could still use JavaScript to provide interactive features: say collapsible sections. It is okay because JavaScript comes from browser, which is a trusted source.

                                                  2. 3

                                                    Another HTTP header that maybe some browsers will support shoddily, and the rest will ignore?

                                                    1. 2

                                                      I found HTTP Accept header to be well supported by all current relevant softwares. That’s why I think separate MIME type is the way to go.

                                                    2. 2

                                                      I think link tracking is essentially impossible to avoid, as are redirects. The web already has a huge problem with dead links and redirects at least make it possible to maintain more of the web over time.

                                                      1. 2
                                                      1. 6

                                                        I think there are two aspects to this. Below, I will use now old-fashioned word RIA(Rich Internet Application) to refer to “mutated application runtime”, its functionality, not its implementation.

                                                        Replying to “HTML, which started as document markup, should never have grown into RIA”, the author basically explains RIA-less HTML wouldn’t be much simpler, nor would it be much more efficient. In other words, the post is entirely about document, not RIA.

                                                        In my experience, when the argument is brought up, it is usually about RIA, not document. HTML-less RIA, not RIA-less HTML. HTML-less RIA, legacy free RIA implementation designed from scratch for RIA need, could be simpler and more efficient. There is also no backward compatibility need here. Writing a cross platform application runtime is a big task, so it isn’t easy, but the task is not helped by need to serve document markup legacy and web compatibility burden.

                                                        Flutter is a try to create HTML-less RIA. I doubt the author thinks Flutter does not make sense; it clearly does. Now, once we have HTML-less RIA, RIA-less HTML could save time specifying and implementing endless stream of APIs necessary for RIA, and focus on its already awesome styling and layout and rendering engine of document. I agree it wouldn’t be much simpler nor much more efficient, but it would also greatly help. This is why I feel the argument and the reply in the post is talking past each other.

                                                        1. 4

                                                          I think what the author is doing is responding to the many people out there on the Internet who treat this as a throwaway line (on HN for instance). I read most of them as asking for a RIA-less-HTML, and I think this is a good criticism of that idea.

                                                          I don’t know which of us is right about what people who use this line are asking for.

                                                          1. 2

                                                            You mentioned HN, so let’s try some empiricism. This article just hit HN front page. https://news.ycombinator.com/item?id=23599734 is a typical response. Note that it is entirely about RIA and whether DOM is a good basis for RIA, not about document, as I predicted.

                                                          2. 1

                                                            HTML-less RIA, legacy free RIA implementation designed from scratch for RIA need, could be simpler and more efficient.

                                                            I think our GUI builders like VB6 and Lazaurus already implied this by their feature vs footprint compared to web offerings. For more apples to apples, I also like to bring up Sciter because it’s so much more efficient than Electron etc. We could definitely do better than HTML and web browsers if just wanting to render content efficiently. Its dominance is a legacy and/or ecosystem effect, not technical superiority, at this point.

                                                            Edit to add: I’ll add that OS’s like MenuetOS fit a whole system in a floppy. Nobody’s building RIA’s like that for various reasons, esp productivity. It does imply our platforms or supporting libraries that the RIA’s run on could be much leaner. I’m thinking something like a GUI builder combined with a runtime lean like MenuetOS.

                                                          1. 3

                                                            There are incorrect factual assumptions here. “The presentational concerns for documents are different from application rendering” is incorrect; there’s a lot of overlap, and there is a continuum between static documents and interactive applications, with use-cases all the way along that continuum. “Something that doesn’t allow for stupid custom UI or behavioural tracking. Just text, images, videos, and links” is contradictory; embedded images, videos and links allow for lots of tracking and custom UI.

                                                            This is a slippery slope fallacy. Yes there is a continuum, but first, there already is a bright line (namely Web Permissions API). If it requires permission (audio/video capture, location, notification), it is not a document, simple and easy. Saying there is a continuum, even if true, is not an answer when it is used to justify clearly not continuous stuffs.

                                                            1. 3

                                                              Gmail works in my browser without granting any particular permissions. So Gmail is a document and not an application?

                                                              1. 3

                                                                If you study logic, you know if A then B is not logically equivalent to if not A then not B. Here A is requiring permissions and B is not being document. Thanks.

                                                                1. 1

                                                                  I understood the original article to be saying approximately “there is no bright line between pure documents and slightly-application-like documents”. When you said “there already is a bright line” I assumed you were talking about the same thing as the original article, but I can see now that you were talking about a bright line between pure applications and slightly-document-like applications.

                                                                  I agree that a “document” that requires permissions is very definitely an application, but I don’t see how that helps define which web-pages are very definitely documents.

                                                                  1. 2

                                                                    If you read my other reply, you will see that I consider defining definite application is more important than defining definite document, and yes I think this is the primary point of disagreement between me and the author.

                                                              2. 3

                                                                It’s not a fallacy–I don’t really see how you’d argue the opposite.

                                                                The author is considering a proposal to define a subset of the web that serves for documents. He argues that the goal is poorly defined, not that implementing a subset will mean you slip into some bad choice.

                                                                You responded by offering a well defined concept that doesn’t meet his goal. That’s not a refutation.

                                                              1. 33

                                                                This is starting to look like bullying. I think the post is fine, but posting it here to point and gawk isn’t. :(

                                                                1. 25

                                                                  If someone makes bold claims about a project, then there’s nothing wrong with pointing out when those claims aren’t accurate.

                                                                  1. 36

                                                                    If we had a post for every software project that was still shit in spite of bold claims, the frontpage would be worthless.

                                                                    1. 13

                                                                      It’s fair to say we don’t need a post for every piece of software that isn’t living up to its claims, but that doesn’t make this bullying.

                                                                      1. 17

                                                                        I think there are two differences here:

                                                                        1. @cadey wrote it but didn’t post it. I’m assuming @calvin shared it because he thought it was genuinely interesting content, not to bully V.
                                                                        2. It’s not just that V is still shit in spite of bold claims, it’s that V is still shit in spite of bold claims and incredibly toxic behavior by its community. The interplay between all three- toxicity, grandiosity, vaporware- makes this analysis especially interesting to me.
                                                                        1. -8

                                                                          What toxicity are you talking about?

                                                                          If V is vaporware then how are so many of us using it for our projects? https://github.com/vlang/v

                                                                          Here’s a cool one: a first-person shooter game bot https://github.com/EasyHax/Vack

                                                                          1. 16

                                                                            What toxicity are you talking about?

                                                                            You, in this thread, right now.

                                                                            This is the only time I’m going to reply to you. And I only replied because nobody else has explicitly called out your hostility.

                                                                            1. -4

                                                                              Defending V from misleading attacks – so misleading that the author has just retracted her original post – is not exactly a defensible definition of “toxic”.

                                                                              I don’t like seeing slander against important projects I care about. Surely you can understand!

                                                                              1. 13

                                                                                All I can see here is that the V community lives up to its infamy by bullying someone into taking down a critical piece on it.

                                                                                1. 15

                                                                                  I retracted the post because of people like you. It wasn’t just you, but I just wanted an end to it.

                                                                                  1. -5

                                                                                    If your post would have been factual then I wouldn’t have criticized it…

                                                                                    I hope you are in a better headspace for your future posts. I’m sure many of us would love to read more articles about WasmCloud, which is honestly one of the coolest projects I’ve ever heard of; would solve many important problems at once, and do so without reinventing the wheel.

                                                                                    (Dear readers: FWIW I didn’t ask for the post to be taken down. I was arguing against its content.)

                                                                        2. 3

                                                                          Did I miss some drama about this project?

                                                                          1. 3
                                                                          2. -3

                                                                            Which claims aren’t accurate, specifically?

                                                                            1. 8

                                                                              As far as I can tell, compiling 1.2 million lines of code in a second (second bullet point). I would also like to see some citations backing up the safety guarantees with respect to C to V translation. C has way too many gotchas for a bold claim like that. Also, the safety guarantee with the C and Javascript backends.

                                                                              1. -1

                                                                                You can download the project, generate 1 million lines of code using tools/gen_1mil.v and build it in 1 second with v -x64 x.v

                                                                                “ safety guarantee with the C backend” makes no sense, because you write the code in V, not in C. V won’t allow you globals, or shadowing etc. C can be thought of as an assembly language.

                                                                                1. 5

                                                                                  If only this benchmark actually worked. First I compiled the generator using:

                                                                                  ./v -prod cmd/tools/gen1m.v
                                                                                  

                                                                                  This already takes 1.3 seconds. I then ran the resulting binary as follows:

                                                                                  ./cmd/tools/gen1m > big.v
                                                                                  

                                                                                  The size of the resulting file is 7.5 megabytes. I then tried to compile it as follows:

                                                                                  ./v -prod big.v
                                                                                  

                                                                                  This takes 2.29 seconds, produces 7 errors, and no output binary. This is the same when using the -64 option, and also when leaving out the -prod option.

                                                                                  Even a simple hello world takes longer than a second in production mode:

                                                                                  v $ cat hello.v
                                                                                  fn main() {
                                                                                      println("Hello world")
                                                                                  }
                                                                                  v $ time ./v -prod hello.v
                                                                                  
                                                                                  ________________________________________________________
                                                                                  Executed in    1,44 secs   fish           external
                                                                                     usr time  1372,26 millis  350,00 micros  1371,91 millis
                                                                                     sys time   64,93 millis   28,00 micros   64,90 millis
                                                                                  

                                                                                  In debug mode it already takes 600 milliseconds:

                                                                                  v $ time ./v hello.v
                                                                                  
                                                                                  ________________________________________________________
                                                                                  Executed in  666,51 millis    fish           external
                                                                                     usr time  613,46 millis  307,00 micros  613,15 millis
                                                                                     sys time   52,61 millis   26,00 micros   52,59 millis
                                                                                  

                                                                                  With -x64 a debug build takes about 2 milliseconds.

                                                                                  Based on the above I find it hard to believe V would really be able to compile over a million lines of code in less than one second; even without optimisations enabled. I hope I am wrong here.

                                                                                  The hardware used is as follows:

                                                                                  • CPU: AMD Ryzen 5 1600X
                                                                                  • RAM: 4x Kingston KHX2400C15D4/4G, a total of 16GB
                                                                                  • SSD: Samsung 860 EVO 250GB
                                                                          3. 13

                                                                            maybe, but as icefox said I also feel like christine is giving V too much PR with it

                                                                            1. 5

                                                                              I agree that it’s unnecessary, though I can’t decide if it’s really bullying.

                                                                              I’ve heard about V two times since the last post hit lobste.rs. One time I posted Christine’s observations, one time someone else did. I think the message is out there, and at this point, it’s really only noteworthy if something changes.

                                                                              1. -5

                                                                                What message is out there? That the misleading attacks on V continue?

                                                                              2. 5

                                                                                Yeah there is some interesting technical content in the post, but the tone is offputting.

                                                                                1. 7

                                                                                  Abuse that gets a lot of “positive engagement” is deemed entertainment.

                                                                                  1. 3

                                                                                    I was amused to see it tagged “performance”, wonder if the pun was intentional on the submitter’s part.

                                                                                  1. 20

                                                                                    Of course everyone is free to spend as much money as they like, but if you want to start a blog and self-host, and might be discouraged, please let me give you another estimate that should 100% cover your needs:

                                                                                    • Cloud VPS to host your blog: 3 EUR per month (Hetzner / Scaleway / whatever)
                                                                                    • Domain: 12 EUR per year.

                                                                                    And then you still have plenty of resources left to run stuff on your VPS.

                                                                                    1. 12

                                                                                      And in case you decide to go with a static site, Netlify has an extremely generic free tier which would waive off those 3€ per month as well.

                                                                                      1. 3

                                                                                        Supporting your point, I have a non-optimized, web app written in Python with plain HTML and CGI serving people daily at under 30% utilization of a $5 VM. Static, cached website offloading to a CDN might be even cheaper.

                                                                                        1. 3

                                                                                          You can get a VPS for free (and domain as well), check out: https://matrix.org/docs/guides/free-small-matrix-server#get-a-free-server (yes, I wrote that page).

                                                                                          1. 4

                                                                                            If something if free, you’re the product. ;-)

                                                                                            1. 7

                                                                                              This isn’t like facebook/whatsapp/google(well, some of their services) where you cannot pay for the services. It’s a freebie to get you hooked. Start using and then discover you need more but don’t have the time/effort/resources to move someplace else, so you need to start paying to grow.

                                                                                              1. 1

                                                                                                I became really disenchanted with the US engineering program I went through when I found out that they only taught us to use $1000+ software titles. Not that open source existed for some of those titles then or now, but I felt a ton like the product…

                                                                                              2. 2

                                                                                                It’s actually really impressive that Oracle gives enough to run an actual ha service. It’s the core of any system to scale from one to two. Terraform even has the free tier all coded up (copyright Oracle, obviously): https://github.com/terraform-providers/terraform-provider-oci/blob/master/examples/always_free/main.tf

                                                                                              3. 2

                                                                                                Good point.

                                                                                                You can do things even cheaper if you use plain html/css files. I paid $37 on nearlyfreespeech, but I could’ve shaved off another ~$15 if I only had one site instead of two.

                                                                                                Bandwidth has never been a concern, but if it is, Cloudflare has a free plan.

                                                                                                1. 3

                                                                                                  I think a static blog can easily be hosted on netlify/git(hub|lab) pages for free

                                                                                                  1. 2

                                                                                                    I just now realized I didn’t specify a time frame. Whoops. That’s $37 for all of 2019, or $3 a month.

                                                                                                  2. 1

                                                                                                    With HTML and CSS knowledge one can just set up a static site.

                                                                                                    Of course it’s not as convenient as logging into a CMS but unless you have loads of traffic it will be free, most likely forever.

                                                                                                    1. 1

                                                                                                      Depending on how important it is for people to self-host, one might reconsider and use services like neocities, SDF or one of the many friendly tilde communities. True, you don’t get to decide that much, but you can still learn a lot under constraints, that you can then apply if you reconsider again later on and “self-host” (though that’s not always the right term with VPS’s).

                                                                                                      1. 1

                                                                                                        I’ve seriously considered hand writing a blog on Neocities, but my current blog takes an enough time as it is without having to hand code the entire thing. Would be a lot of fun though.

                                                                                                        1. 1

                                                                                                          As if you can’t use an SSG witth neocities. ;)

                                                                                                    1. 11

                                                                                                      £9/m for an SEO plug-in is a real eyebrow raiser

                                                                                                      1. 4

                                                                                                        I can’t help if but feel that everything SEO nowadays is a whole bunch of smoke.

                                                                                                        Search engines are incredibly smart in detecting and ignoring specific SEO techniques. Genuine, relevant organic content is still the best SEO you can do.

                                                                                                        1. 3

                                                                                                          I don’t do any SEO, and there’s no requirement to do it for a personal blog. Still, if the added name recognition gets him an additional .1% in salary or lets him shorten a job search by one day, it will pay for itself.

                                                                                                          1. 3

                                                                                                            Yeah, it’s not cheap that for sure. But it’s the plugin I get the most use from. Not only for SEO, but writing assessments too.

                                                                                                          1. 9

                                                                                                            If you’re concerned about speed, why are you writing in Python

                                                                                                            1. 17

                                                                                                              For me the reason is that you can get good speed in Python while keeping all the benefits of having a language like Python. This works in many different fields. The scientific(/“data”) community use Python as a thin flexible shim over a mess of highly optimised native code.

                                                                                                              I suspect that for most people who are writing web->database code like this, 5k requests/second off a machine that is 15 EUR/month is plenty.

                                                                                                              1. 8

                                                                                                                Path dependency - i.e. “this is how we got here”?

                                                                                                                If - for whatever reason - your initial implementation is in python, you can grow and scale quite a way.

                                                                                                                At a decent scale, a 10-20% perf saving (tweaking your current infra) can be quite a rational thing to pursue, even if longer term plans involve a significant rewrite into another tech stack.

                                                                                                                1. 8

                                                                                                                  Because you are also concerned about a few other things, as well as hoping for some speed.

                                                                                                                  1. 5

                                                                                                                    I really ought to write this up as a proper essay, but I see this kind of comment a lot, and I don’t get it at all. Of course performance matters, for any language!

                                                                                                                    Think of each quality a language can have (throughput, latency, predictability, library availability, speed of development, ease of deployment, safety, backwards compatibility, build time, etc…) as an axis. For each point in that space, different languages will be more or less fit for purpose. Each language ideally has a region along those various axes where it’s very good, perhaps even the best. As you move along the different axes, that language becomes less fit for purpose, and you start to make different choices about which to use.

                                                                                                                    If you go to the extreme of some axis, you’ll radically constrain the languages you consider. A web server that needs extremely low-latency with high throughput rules out a ton of languages, including Python. A web server of any kind is not going to be written in Bash.

                                                                                                                    However, even though Python is never going to be the language you choose for the most performance intensive jobs, improving Python’s performance will expand the region where Python is a good choice. The same goes for reducing the verbosity of Java, trying to write a shell without the foot-guns of bash, or every other seemingly quixotic improvement to a language.

                                                                                                                    Since Python doesn’t compete primarily on performance, it’s probably less important than improving the things that make Python great, but it is still valuable.

                                                                                                                    1. 4

                                                                                                                      I think it’s healthy to expect better performance from Python. I don’t see why it has to be relegated to the category of sluggish languages.

                                                                                                                    1. 2

                                                                                                                      Is the “explicit” vs “implicit” distinction a common one for search engines? I’m not familiar with it. I’m guessing that explicit means “literal” match, implicit means some kind of fuzzy/“guess what I mean” matching?

                                                                                                                      1. 5

                                                                                                                        Most search engines assume you’re looking for something common, and thus:

                                                                                                                        • “Fix” queries with typo & misspelling correction based on string edit distance and term frequency
                                                                                                                        • “Expand” queries by projecting your terms into some kind of topic space (embedding) and giving you results that score highly on nearby terms

                                                                                                                        These are great for natural language queries for popular resources, and really terrible for precise, niche queries.

                                                                                                                        1. 1

                                                                                                                          Hmm, I haven’t heard those terms being used either in this context. I definitely would find it a little more clear if it used the terminology you mentioned instead.

                                                                                                                          1. 4

                                                                                                                            Thanks, I’ve updated the terminology on the frontpage, and it should go live in a few minutes.

                                                                                                                        1. 3

                                                                                                                          The next time I read “Programs are meant to be read by humans and only incidentally for computers to execute”, I might refer them to Markdown.

                                                                                                                          Markdown’s author (John Gruber) is quite clear that he does not care about whether it has a formal grammar. When edge cases have been found, he might try to fix them (in his implementation), but will just as likely say that as the human author of markdown, you should avoid those parts of the language. He’s like the sorcerer’s apprentice, if the apprentice looked around at all the animated brooms splashing water and said “seems fine to me”. Perhaps he’s even right about that, it’s just a way of viewing the language that conflicts with what many programmers expect.

                                                                                                                          1. 6

                                                                                                                            Markdown is not a programming language that translates human-readable text into machine-interpreted code, it’s a markup that translate human-readable text into another form of human-readable text (rendered HTML).

                                                                                                                            Gruber isn’t the apprentice in this case, he’s the sorcerer. The apprentices are the people who insist that Markdown should be extended from its original role as a lightweight blog and comment format to be the end-all and be-all of documentation formats, covering every corner case imaginable.

                                                                                                                            IMHO Gruber did absolutely the right thing when he insisted on the CommonMark crew not to use the name Markdown. CM is a great project and it’s nice to have a formal spec, but it’s not the original Markdown that Gruber created, and that I’m still using as a Perl plugin to my Blosxom blog.

                                                                                                                            1. 1

                                                                                                                              I don’t really make a distinction between markup and program. It’s a language that’s interpreted by the machine to specify a transformation between data formats. It differs from a C/Haskell/Lisp/Perl/APL in many other ways, of course.

                                                                                                                              I think Gruber’s vision has some logic to it, but it’s really stressed by the wide use of Markdown. It would be easier if every user of Markdown was like Gruber–publishing on their own blog, using software they control. Instead, there are a lot of third-party sites that incorporate user-generated content in Markdown. That pushes you towards an unambiguous standard. It probably would’ve been impossible, but the right thing might have been to say “please don’t use the project like that.”

                                                                                                                              1. 2

                                                                                                                                I don’t really make a distinction between markup and program. It’s a language that’s interpreted by the machine to specify a transformation between data formats.

                                                                                                                                I can see your point. In this particular case, I’d argue that the distinction is fuzzy. Whether *text* or **text** shows up as italic or bold doesn’t have any real semantic meaning apart from “emphasis”.

                                                                                                                                Gruber just wanted to give users the options to use asterisks or underscores to provide emphasis, because that was the main drift of email formatting. Had he been more of a programmer and less of a pragmatist, he’d might have mandated the one or the other to avoid ambiguity. Instead he embraced it.

                                                                                                                                Markdown may be a terribly specced programing language/transform, but it’s a great, easy to use[1] tool to transform plain text into valid HTML. It generally Does What You Mean^TM. That’s why it won out.

                                                                                                                                [1] apart from stuff like specifying image links, and out-of-band links…

                                                                                                                          1. 26

                                                                                                                            inheritance is something that makes your code hard to understand. Unlike function, which you can read just line by line, code with inheritance can play “go see another file” golf with you for a long time.

                                                                                                                            This isn’t an argument against inheritance, it’s an argument against modularity: Any time you move code out of inline you have the exact same “problem” (to the extent it is a problem) and you can only solve it the same way, with improved tooling of one form or another. ctags, for example, or etags in Emacs.

                                                                                                                            1. 31

                                                                                                                              Inheritance has this problem to a much larger degree because of class hierarchies. Tracing a method call on a class at the bottom of the tree, requires checking every parent class to see if its overridden anywhere. Plain function calls don’t have that problem. Theres only a single definition.

                                                                                                                              1. 7

                                                                                                                                Plain function calls don’t have that problem. Theres only a single definition.

                                                                                                                                Unless we start using higher order functions when the function is passed around as a value. Such abstraction creates the exact same problem, only now it’s called “where does this value originate from”.

                                                                                                                                1. 5

                                                                                                                                  Yes, which is why higher order functions are another tool best used sparingly. The best code is the most boring code. The most debuggable code is the code that has the fewest extension points to track down.

                                                                                                                                  This is, of course, something to balance against debugging complicated algorithms once and reusing them, but it feels like the pendulum has swung too far in the direction of unwise extensibility.

                                                                                                                                  1. 3

                                                                                                                                    For extra fun, use higher-order functions with class hierarchies!

                                                                                                                                  2. 4

                                                                                                                                    The best is python code where the parent class can refer to attributes only created in child classes. There are equivalents, but less confusing, in languages like Java.

                                                                                                                                    1. 1

                                                                                                                                      Isn’t the example in the linked article doing exactly that?

                                                                                                                                      1. 2

                                                                                                                                        Okaaaay… what’s self.connect doing? Ah, it raises NotImplementedError. Makes sense, back to SAEngine:

                                                                                                                                        Not exactly. :)

                                                                                                                                        1. 1

                                                                                                                                          Check out Lib/_pyio.py (the Python io implementation) in CPython for lots of this.

                                                                                                                                      2. 1

                                                                                                                                        The overrides is mostly for modularity and reduce code duplication. Without classes, you might either end up with functions with tons of duplicated code, or tons of functions having a call path to simulate the “class hierarchies”. And yes, it’s going to make the code harder to read in some cases, but it also makes the code much shorter to read.

                                                                                                                                        1. 6

                                                                                                                                          Without classes, you might either end up with functions with tons of duplicated code

                                                                                                                                          Why? There is literally no difference in code re-using between loading code through inheritance vs function calls, apart from possibly needing to pass a state to a function, that could otherwise be held in class instances (aka objects). this is certainly less than class definition boilerplates.

                                                                                                                                          or tons of functions having a call path to simulate the “class hierarchies”

                                                                                                                                          The call chain is there in both cases. It’s just that in the class-based approach it is hidden and quickly becomes a nightmare to follow. Each time you call a method statically or access a class atribute, you are basically pointing to a point in your code that could be hooked to different points in the hierarchy. This is a problem. People don’t think it is a big deal when they write a simple class and know it well, because the complexity is sneaky. Add another class and all of the sudden you brought in a whole other hierarchy into the picture. Each time you read “this” or “instance.something”, you’re up for am hunt. And each other hierarchy you bring into the picture increases complexity geometrically. Before you know, the project is unmanageable, the ones writing it went on to some green field project, doing a similar mess again for some poor soul to struggle with after them.

                                                                                                                                          And yes, it’s going to make the code harder to read in some cases, but it also makes the code much shorter to read

                                                                                                                                          It doesn’t really. People fall for this because you can instantiate a class and get a bunch of hidden references that are all available to you at will without you need to explicitly pass them to each method, but you only get this through defining a class, which is way more verbose than just passing the references you need.

                                                                                                                                          All that said, what classes do offer in most languages is a scope that allows for fine grain control of data lifecycle. If we remove inheritance, then class members are akin to use global variables in non-OOP languages. But you can create as many scopes as you want. I which languages like python would do this as, for the same reason as OP, I suffer from working with OOP codebases.

                                                                                                                                          1. 4

                                                                                                                                            You make it sound like inheritance is the only way to reduce code duplication. In my experience that is simply not true, you can always use composition instead. E.g. Haskell doesn’t support inheritance or subtyping and you still get very compact programs without code duplication.

                                                                                                                                            1. 5

                                                                                                                                              Without classes, you might either end up with functions with tons of duplicated code, or tons of functions having a call path to simulate the “class hierarchies”

                                                                                                                                              This is only true in my experience if you’re trying a functional approach with an OO mindset. There are other ways to solve problems, and many of them are far more elegant in languages designed with functional programming as the primary goal.

                                                                                                                                          2. 5

                                                                                                                                            When you move a bit of code out of your file it’s not going to call back function from the first file. You going to even make sure this is the case, that there is no circular dependency, because it makes (in cases when a language allows to make you one) code harder to read. In case of inheritance, those games with calling everything around is just normal state of things.

                                                                                                                                            Of course, example in the article is small and limited, because pulling a monster from somewhere is not going to make it more approachable, but surely you’ve seen this stuff in the wild.

                                                                                                                                            1. 4

                                                                                                                                              You might do that, in the same way that you might carefully document your invariants in a class that allows inheritance, mark methods private/final as needed, etc. But you also might not do that. It sounds a bit as if you’re comparing well-written code without inheritance to poorly written code with it.

                                                                                                                                              Not that there isn’t lots of terrible inheritance based code. And I’d even say inheritance, on balance, makes code harder to reason about. However, I think that the overwhelming issue is your ability to find good abstractions or ways of dividing up functionality–the choice of inheritance vs. composition is secondary.

                                                                                                                                              1. 2

                                                                                                                                                It’s just that without inheritance it’s easier to make good abstractions. Inheritance affords you to do wrong thing easily, without any friction - just read a good article about that few weeks ago.

                                                                                                                                            2. 4

                                                                                                                                              Interesting article from Carmack about inlining everything:

                                                                                                                                              http://number-none.com/blow/blog/programming/2014/09/26/carmack-on-inlined-code.html

                                                                                                                                              1. 4

                                                                                                                                                This isn’t an argument against inheritance, it’s an argument against modularity: Any time you move code out of inline you have the exact same “problem” (to the extent it is a problem) and you can only solve it the same way, with improved tooling of one form or another. ctags, for example, or etags in Emacs.

                                                                                                                                                Not really, including code via accessing a class or object member forces you to manually go figure out which implementation is used, or where the implementation in a web of nested namespaces. In the case of function, each symbol is non-ambiguous. This is a big deal. If you have types A and B, with A having an attribute of the type B, each of these types containing a 3 level hierarchy, and you call A.b.some_b_method(). That could be defined in 9 different places, and if it is, you need to figure out which that symbol resolves to. This is a real problem.

                                                                                                                                                1. 2

                                                                                                                                                  This isn’t an argument against inheritance, it’s an argument against modularity:

                                                                                                                                                  Yeah, all code should be in a single file anyway. No more chasing of method definitions across multiple files. You just open the file and it’s all there…

                                                                                                                                                  1. 2

                                                                                                                                                    Any form of modularity should be there to raise the level of abstraction. ie. Become a building block, that is solid (pun intended) firm and utterly reliable, that you can use to understand the higher layers.

                                                                                                                                                    You can peer inside the building block if you need to, but all you need to understand about it, to understand the next level up, is what it does, not how it does it.

                                                                                                                                                    Inheritance is there to allow you to know that “all these things IS A that”. ie. I can think of them and treat all of them exactly as I would treat the parent class. (ie. The L in SOLID)

                                                                                                                                                    I can utterly rely on the fact that the class invariant for the superclass holds for all subclasses. ie. The subclasses may guarantee other things, but amongst the things they guarantee, is that the super class’s class invariant holds.

                                                                                                                                                    I usually write a class invariant check for every class I write.

                                                                                                                                                    I then invoke it at the end of the constructor, and the beginning of the destructor, and at the start and end of every public method.

                                                                                                                                                    As I become more convinced of the correctness of what I’m doing, I may remove some for efficiency reasons. As I become more paranoid, I will add some.

                                                                                                                                                    In subclasses, the class invariant check always invokes the parent classes invariant check!

                                                                                                                                                  1. 2

                                                                                                                                                    Things that I can fit in the format, I use Anki to study.

                                                                                                                                                    For sources, I started off keeping links (often with notes describing them) in org-mode. Because I was using multiple computers, I started developing a sync engine. That evolved into a web-server that contains those notes in org-mode, which has a gui to upload new links, with assorted commentary. It also parses the page that the links point to. It’s actually a total kludge, but on the plus side, it’s run for years and only ever requires restarts when I need to update the OS/nginx.

                                                                                                                                                    1. 1

                                                                                                                                                      I have been thinking about something like that. My phone keeps getting up to 80 tabs and most of them are just simple blogs. Thought it would be nice to make a small site for myself where I could send the link, pull the data down and keep track of related info (notes, similar sites, etc.). I haven’t done anything yet; it’s all just an idea right now.

                                                                                                                                                    1. 1

                                                                                                                                                      Within the category of state, I tend to break out a sub-category of processes, which model some data that evolves as it proceeds through the process. I guess the alternative to a process would be a “fact” (I’d never thought to name them before). The facts used will be different between different calls to a method (so they’re not constant), but they never really change.

                                                                                                                                                      Again, this is separate from the question of mutable vs. not, though I think a well-decomposed process object that has mutable state can be a pretty natural and relatively safe use of imperative/OOP programming. The mutable state would then consist of references to immutable fact objects.

                                                                                                                                                      1. 4

                                                                                                                                                        I don’t know: I have project overload. I’d like to work on a few of my existing projects (regex engine and constraint based property testing are calling my name). I also recently started writing a quick overview of how much memory common objects use in Hotspot. Then Rachel’s post made me think writing a simple server from scratch would be a nice exercise: https://lobste.rs/s/mk1jso/old_box_dumb_code_few_thousand.

                                                                                                                                                        1. 4

                                                                                                                                                          I can’t speak to Rachel’s intent, but the phrase that comes to mind is “easy things should be easy”.

                                                                                                                                                          This post seems to be saying “10k connections is easy if you don’t shoot yourself in the foot with your language/framework.” That 10M connections is possible (but perhaps not easy) is beside the point. Whether threads are the optimal choice is also beside the point.

                                                                                                                                                          From that perspective, even the details of the code are (arguably) beside the point. If the claim is “this can be done with bog-standard techniques”, who cares what her code looks like?

                                                                                                                                                          1. 4

                                                                                                                                                            As someone without any sysadmin type experience whose experience is with personal computers, and servers that have basically one or two users plus root, I think I’m missing some context.

                                                                                                                                                            Under what circumstances do you want a user’s home directory to not be under /home/?

                                                                                                                                                            1. 6

                                                                                                                                                              This kind of workflow is common when you have an infrastructure with many users and many machines, and you want your users to have access to their homedir regardless of which machine they’re logged into.

                                                                                                                                                              A typical solution to this is to store home directories on a central file server, and mount the home directories via some network filesystem on each machine. Especially if you have multiple file servers and share users across them, you probably want to mount these somewhere other than /home.

                                                                                                                                                              This is a really common pattern on platforms like HPC compute clusters, where many users are running jobs on a shared set of machines.

                                                                                                                                                              1. 2

                                                                                                                                                                Thanks, that’s somewhat helpful, and it’s a world I’m completely unfamiliar with, but what’s the need to run Chromium as themselves on that machine?

                                                                                                                                                                Admittedly, I have opened a web browser on a production machine, but I felt that represented that company’s “YOLO” approach to infrastructure.

                                                                                                                                                                1. 6

                                                                                                                                                                  but what’s the need to run Chromium as themselves on that machine?

                                                                                                                                                                  …what?

                                                                                                                                                                  These are the workstations the users use. Desktop systems where they do their work. Users usually want or need browsers.

                                                                                                                                                                  1. 3

                                                                                                                                                                    Funny: I literally did not process “log on” properly, I just assumed it was shorthand for connecting to a particular box with ssh or perhaps using an X11 environment.

                                                                                                                                                                    I remember going to the computer lab in university and grad school, and logging on to a shared machine. But at the time, I didn’t study CS, and didn’t think about how that was implemented. I treated the machines as analogous to a thin client to my webmail, etc. The idea that I had a home directory there and might keep anything there (as opposed to on my laptop) was quite foreign.

                                                                                                                                                                    Thanks for helping me to connect the dots.

                                                                                                                                                                  2. 4

                                                                                                                                                                    In the cluster usage model, I’ve seen a few different workflows that involved using a web browser to attach to a running job. If the cluster and the user’s desktop aren’t on the same network (or there’s a firewall, etc), then they might want to run a browser on a gateway node that mounts those filesystems. I personally think those workflows are pretty ugly, but they exist.

                                                                                                                                                                    Another usage model I’ve seen, which came to mind a little later, is “we only have a few very powerful workstations, and many more users”. Think really expensive CAD workstations with multiple GPUs. If you have, say, three workstations and fifteen team members, you might “check out” a workstation to do your really intensive design work but otherwise work on a regular PC. In those cases, you’d also want your home directory when you went over to the workstation, rather than having to haul around USB drives etc.

                                                                                                                                                                    1. 3

                                                                                                                                                                      This is at the University of Toronto, I would assume. So picture thousands of COMPSCI students using Ubuntu workstations around campus to log in and do course work. As a student, you’re not always going to be on the same machine all the time in this environment.

                                                                                                                                                                  3. 4

                                                                                                                                                                    Under what circumstances do you want a user’s home directory to not be under /home/?

                                                                                                                                                                    If an Unix user entity is used to host some service, not a real end user (say, MediaGoblin) one might want to have its home under /var/lib or even /data/media-goblin. Users aren’t just for end users.

                                                                                                                                                                  1. 9

                                                                                                                                                                    I don’t have an actual opinion about the topic. I’ve only worked on extremely complicated apps that had functionality where an SPA had clear benefits and tiny personal projects where anything goes.

                                                                                                                                                                    What I want is a quantification of what the author means by “many”. Do any developers deny that some applications serving dynamic content could work better with server side rendering? Do any developers deny that some work better with an SPA? If the answers are no, is it possible we’re just arguing about Rorschach tests?

                                                                                                                                                                    A nice experiment would be to take your browsing history for a day and categorize the pages based on how their frontends were structured. Bucket them into server side vs. SPA, then subdivide based on your perception of whether any of them seemed like[0] they’d be better off in other categories.

                                                                                                                                                                    I suspect that in 2020 you’d get more JS centric apps that should’ve been server rendered than vice versa. But that’s not the interesting question. The interesting question is how much disagreement would readers have? And why? Is it because they’re making different assumptions about usage? Or do they actually have disagreements about the best technical solutions, given the data about what the pages are doing?

                                                                                                                                                                    [0] I say seemed like because it’s quite hard to tell without seeing the full constraints the authors faced. Maybe you visit a site once a day, and server side rendering would be much better for you, but there’s a long tail of heavy users, and an SPA is beneficial for them.