1. 1

    Project drama, flagged.

    Alternately, maybe a release tag would be appropriate.

    1. 13

      This is a really big project, used by a lot of people, was the flagship in terms of performance for rust webservers.

      1. 13

        And it is being removed nominally due to drama and armchair quarterbacking. There is already at least one comment here already doing the same stuff the author cites as why they’re shutting down the project.

        That’s why I believe it is worth flagging–is it more likely something constructive is going to happen in the comments, or just that people will dump on the project and navelgaze about the Rust ecosystem and software at large?

        1. 3

          I hadn’t heard about this at all until today. I think this can still be constructive by looking at all sides of it.

          1. 2

            A constructive thing that might happen is that people may trust each other enough here that an opposing opinion is taken seriously instead of immediately discarded and argued against without listening?

        2. 7

          Agreed. After some time an article or two will emerge about it. Those are more appropriate for lobste.rs.

          1. 8

            I disagree if only because Klabnik is one of the dwindling number of programming thought-leaders that should command deep respect. Even if the post itself isn’t everyone’s cup of tea (it certainly is mine FWIW), I think that we should always welcome articles from people like Klabnik on lobste.rs and let The Great Arrows of Up and Down decide.

            1. 6

              and let The Great Arrows of Up and Down decide.

              I disagree with this position. Klabnik mentioned how reddit’s degradation is built into reddit itself, and IMO he’s right and this is exactly why.

              I think this kind of drama is inherently poisonous for communities like lobste.rs (and reddit), because it attracts a lot of attention (and thus upvotes) and because of the kind of discussion that it generates, which only leads to more drama. It’s a vicious cycle.

              A little bit is fine every now and then, but too much of it will kill the community. So just be careful :)

              1. 4

                Funny you say that since he left Lobsters after declaring it a toxic community. I did read his article on HN, though.

                1. 1

                  If I recall correctly, this comment was regarding the github link, before the Klabnik article was merged with it(?*)

                  • I’m unfamiliar with this feature of lobste.rs
                  1. 1

                    Entries that cover the same “topic” can be merged together.

                2. 1

                  Calling this drama is extremely dismissive. Someone got hurt to the point of quitting and you’re just being needlessly mean.

                  1. 6

                    People get hurt during drama all the time, that’s rather what makes it drama. It is precisely because somebody got hurt that I don’t think rehashing it here is something we should normalize.

                    I don’t believe Lobsters should be a secondary attack vector.

                    1. 1

                      It’s not a value judgement on what happened, it’s just an observation that this entry isn’t on-topic for this site.

                      It was also referring to the original github submission, before the Klabnik piece was merged into the discussion.

                      1. -1

                        I understand what you were referring to. Calling something drama is a value judgment. It’s possible your intention wasn’t to judge but your statements are judging by nature and mean in effect.

                        1. 2

                          I have not been mean or judging in this thread, and I try very hard not to be in others. I resent your accusation.

                  1. 5

                    On a raspberry pi in my house:

                    On a cheap VPS:

                    • An imageboard I wrote, for a group of friends
                    • ZNC

                    In the spare time I’m also looking to host my website (currently on gh pages), email, maybe gitea, Syncplay whenever I finish my server implementation, nicotine-plus if I ever get it to run headless…

                    1. 2

                      Playing with Elm for my personal API project. Elm is nice, but I’m still trying to figure out how to do multiple pages in the Elm architecture. If anyone has links I’d be very welcome. My main problem so far is passing an API token down to the models of each page

                      1. 1

                        If the token is global to your application it should not be stored in the specific pages’ models but in a separate field in your global model, like type alias Model = { token : Maybe String, page : Page }. Or maybe if you don’t want to display any page when you’re logged out it should look like type Model = LoggedIn String Page | LoggedOut.

                        1. 1

                          How would I reference the token from the child pages though?

                          1. 2

                            Pass it as a parameter to the update function I guess.

                            1. 2

                              I can’t believe I didn’t think of that

                      1. 5

                        Maybe working a bit on a compiler for a language inspired by Rust and AST which compiles to C in the pauses between getting drunk and playing VR with friends. For now I just want to have like an alternative syntax for C, later I’ll implement a type system. The goal is to have some kind of playground to try out some type system ideas which I find interesting and maybe get a nice low-level language in the progress.

                        1. 1

                          (That’s s/AST/ATS/ and s/progress/process/)

                        1. 1

                          Yes, but with hooks you actually can use useEffect as the foundation for more specific hooks. I agree that when I see useEffect by itself it’s hard to understand what it’s supposed to do, so whenever I start to have readability problems I simply extract that functionality into a hook.

                          With custom hooks you can also group functionality together in a way that is impossible to do with lifecycle methods. When you have to perform several effects at mount or unmount or when props change you have to spread them all over the lifecycle methods together with other unrelated functionality, which becomes really hard to read. And yes, you could put that stuff into separate components, but a lot of times I find I have state that belongs together, and splitting it up would just make it harder to understand the big picture…

                          I don’t know, I really don’t see the point of using class components. I find the syntax very distracting, I don’t find the lifecycle methods very intuitive and I think hooks enable me to write more correct code, because achieving the same things with class components was much more complex and required much more bookkeeping.

                          I don’t think I ever implemented promise cancellation in a class component, because every single time I’d have to add a property to the class, name it appropriately, and remember which lifecycle hooks I’m supposed to use, all of this interspersed with all sorts of other state and logic and spread over no less than four methods, while with hooks I can put that in a custom hook once and use it anywhere I want with no readability cost.

                          1. 2

                            Just watched the final episodes of Mr. Robot with a friend and some pizzas, then I’m caroling with my choir tomorrow, preparing the christmas lunch on the 25th (gonna make bagna cauda) and leaving for Sweden on the 26th to meet some friends and spend new years with them.

                            1. 4

                              Once the PWA is closed, it’s can’t beacon home, it can’t track you, and it can’t drain your battery.

                              Correct me if I’m wrong, but I thought most PWAs ran service workers in the background for stuff like notifications, which do not get shut down when the PWA closes.

                              1. 4

                                On iOS (as of at least iOS 13), the service workers do not run in the background for notifications. The moment you stop looking at the app, its state is saved and it its invisible wrapper app is SIGSTOPped and after a minute SIGKILLed.

                                1. 5

                                  I wish there’d be an example of how is it actually useful. Because the only thing I can think of is mentioned at the end of the post:

                                  With this, we have one of the most important elements of type-level computation: the type-level function. Brace yourselves for type-level Turing-completeness abuses!

                                  And I don’t read it as a joke. “Abuses” seem to me the exact result one could expect from it.

                                  1. 4

                                    This is a good survey of honest-to-god useful things you can do with conditional types. Hell, I’ve even done some of them in my own code.

                                    I have no idea how these techniques compare to what type-level Haskellers do in practice or in theory (and agree the post would be better with some real-life motivating examples), but conditional types do have lots of uses in TS, even if you never use them directly.

                                    1. 2

                                      Thanks! This one set it straight for me.

                                    2. 3

                                      I’ve previously written of somewhat practical applications I found for conditional types. They’re kind of unreadable but at least all of the complexity stays behind the API barries.

                                      1. 1

                                        I was thinking the same thing after I read this article. Thank you for asking this question and thanks to the number of replies that clear up the use case for me.

                                        I have never heard of this concept, but it is interesting.

                                      1. 2

                                        I love abusing Typescript’s turing-completeness. The sad part is that much of the code you’ll write using it will have to be untyped because the compiler can’t verify that it actually works.

                                        1. 4

                                          People have also called this pattern “pushing the type safety back” and “Parse, don’t validate”. I also remember another post that talked about it in terms of constraining the domain or expanding the range but I can’t find it, does anyone have a link?

                                          1. 5

                                            These retrospectives on evolving and ageing languages make good case studies. My personal takeaway: if you could write a piece of syntax as easily as any other library, all of these syntax tweaks and additions would become complete non-issues. It would eliminate reams and reams of bikeshedding in the issue tracker if you could just do import syntax/flipflop.

                                            1. 3

                                              Every Ruby project potentially having slightly different syntax sounds like a nightmare to me.

                                              1. 4

                                                Not trying to be glib, but… DSLs?

                                                1. 2

                                                  DSL’s built on Ruby all follow the same syntax though.

                                                  I suppose there might be a few out there where Ruby is outright parsing some other text, but those are mercifully rare.

                                                  1. 2

                                                    But a DSL has a different syntax to vanilla Ruby, because otherwise it would be a regular library, not a DSL.

                                                    Is syntax sugar like a new sigil or infix operator (which is what most of these are) really that different to a DSL? Fundamentally, I mean, not just in that one of them uses tokens and the other uses characters. You have to learn something new the first time you encounter a new DSL exactly the same as you would for a new character syntax. Having been knee-deep in this kind of stuff for a few months now, I’m seeing less and less of a distinction.

                                                    1. 6

                                                      There aren’t any real Ruby DSLs. Ruby programmers just oddly refer to class methods called at the top level without parentheses as “DSLs” (or, more rarely, instance methods called without parentheses in what other languages would call a “builder pattern”).

                                                      Ruby doesn’t support macros or other syntax-level features that would enable an actual DSL.

                                                      1. 2

                                                        I know, they’re technically only eDSLs, but my point remains. All syntax changes are the same. They could have added real DSLs (edit: you know, “just add this massive feature” :) and never had to decide between @1 and _1.

                                                        1. 1

                                                          They’re DSLs in the sense that any library API is a DSL, and in this respect I think Ruby does DSLs a lot better than other languages with “real” DSLs. APIs can be (almost) as expressive as real DSLs and they’re still using normal language syntax and semantics. Lisp is definitely more expressive and it’s still technically using the same syntax, but the semantics can vary wildly.

                                                  2. 2

                                                    Until you realise that less powerful languages have the same problem - except their abstractions aren’t expressed in a clear DSL courtesy Ruby or Lisp metaprogramming, they’re splattered throughout the application in AbstractFactoryFactories and FooUtility classes.

                                                  3. 2

                                                    In Lisp we trust! ;-)

                                                  1. 2

                                                    I’m attempting a crash course of J by doing some AoC problems with it. So far I managed to do day 1. I’ve never even looked at the language (or any language like it) prior to yesterday so most of the time I have no idea what I’m doing, but I think it’s gonna be fun.

                                                    Other than that, maybe I’ll try to improve receptor or start my own client. I set up synapse on the raspberry pi I bought a few weeks ago and it seems to work well enough, but receptor is its only client and it’s pretty clunky. I’m also looking for ideas on what else to run on the pi.

                                                    1. 4

                                                      He doesn’t really say that “Python makes thinking in code easier”. He says that he thinks in Python, which obviously he does, being the guy who invented the language and all; it doesn’t apply to everybody. I probably think more in OCaml than anything else, so even when I’m writing JS it throws me off if I see a function being used before being defined.

                                                      “You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer.” —Guido van Rossum

                                                      That’s just another way of saying

                                                      “Programs are meant to be read by humans, and only incidentally for computers to execute.” —Donald Knuth

                                                      I don’t know, I didn’t find this post very interesting. It’s just gushing over Python.

                                                      1. 2

                                                        “Programs are meant to be read by humans, and only incidentally for computers to execute.”

                                                        From the preface to the First Edition of SICP: https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book-Z-H-7.html

                                                        1. 1

                                                          In linguistics, there’s this thing called the Sapir-Worf Hypothesis, which occasionally gets abused by programming language people with pet theories… but in very simple terms yes, of course language affects thought. But how and why? That’s when it always gets very speculative and confusing, since it’s hard to do controlled experiments.

                                                          Maybe a bit of a tangent, but… I’ve seen both of those quotes before, and I agree that Guido’s is derivative of Don’s. But there’s something that bothers me about the basic formulation. It is provocative in sort of a cheap way, because it is untrue. It is a deliberate reversal of the plain truth of the matter. Knuth’s value statement wasn’t even a true description of how programming was practiced when Knuth wrote it, which is why he wrote it. It’s been getting less true ever since. Maybe it would be a good thing if we all agreed to act as if it were true… but we’ll never know. It’s just mathematics envy. Nobody outside academia gets paid to write code to be read by humans. Even hard-core theorists who like to imagine that programs are primarily mathematical objects (which ‘only incidentally’ even have implementations at all) have their tidy abstractions ignored by everyone outside their narrow sub-fields when it turns out the implementations aren’t performant.

                                                          1. 4

                                                            Nobody outside academia gets paid to write code to be read by humans.

                                                            Ironically, in my experience code written by academians is often unreadable, while at my job before anybody merges changes to the projects we maintain, we have somebody who was not involved with writing the changes (and thus has no context for whatever feature was added) review them as a sanity check, I’m literally paid to write code to be read by humans.

                                                            1. 1

                                                              Sure, code review is a normal practice for many businesses, and is often done in greater quantity (and sometimes better quality) than academic peer review. But don’t fool yourself – you’re getting paid to write code that will be run on a computer. ‘Incidentally’, your changes will be reviewed by some humans, and no doubt for good reasons. But just for a thought experiment, imagine how many merge requests you could author containing beautiful-but-broken code before you’d be looking for another job.

                                                              Readable code is a very good thing, but it’s no substitute for code that actually runs and gets something done. Ideally we’d always have both at the same time, but the real world priority is pretty clear.

                                                        1. 1
                                                          • Thinkpad x220 for coding, upgraded with 16GB RAM and a 256GB SSD, running NixOS. It’s kinda old and not very fancy, but with the upgrades it boots up in a couple of seconds and never hangs, so it’s more than good enough.
                                                          • Self-built desktop for gaming: i7 9700k, 16GB RAM (I might buy another 16GB stick soon), 1TB m.2 SSD, RTX 2060.
                                                          1. 1

                                                            Just curious. Do you use NixOS because of strictly professional demands or is it more of a personal preference? FYI I don’t have a pressing need to use NixOS but I’m pretty sold on the concept.

                                                            1. 2

                                                              Personal preference. I hate dealing with users and groups, and systemd units, and digging into /etc to edit config files and then forgetting which ones I’ve edited and what I’ve changed, and then moving to a new computer and having to learn to do it all over again. I like how in NixOS that’s all in a single documented config file.

                                                              Also nix-shell is really neat, I like keeping my environment clean so being able to open a shell with a program or library I need in a specific moment (or when I’m developing) and knowing it won’t be there anymore when I close it is great.

                                                              Only wart is that if you download a random binary and try to run it chances are it won’t work and you’ll have to mess with patchelf to make it run.

                                                              1. 1

                                                                Okay I may just have to get started sooner than later. Thanks for the caveat about ‘patchelf’.

                                                          1. 5

                                                            Well put. What Elm really lacks is a way to compose smaller pieces of an application at a higher level than plumbing views, models and updates at every boundary.

                                                            1. 3

                                                              Cool! This is the kind of language I hope will be explored more thoroughly in the future. I have an idea for a similar language, built mostly on top of the processor’s instruction set but with a strong type system to support it and features (language constructs, linear (ordered?) types, …) that allow mapping high-level concepts to very low-level code. But it’s going to take a while.

                                                              1. 5

                                                                High-level programming - STATUS: NOT YET

                                                                Interesting. This list is all par for the course for the “I will refuse to program in anything but ANSI C” crowd, but this guy’s a bit more tolerant to consider newer version of C and a high-level programming language at all. Normally this spot would be filled by shell scripting and awk.

                                                                I’m curious to see what such a programming language would look like, and under what criteria it would be judged to be “simple”.

                                                                1. 13

                                                                  What surprises me in all such manifestos is that if you are reimplementing things from scratch and intentionally omit dynamic linking, why use C rather than a language with unambiguous semantics like Modula-2 or Oberon?

                                                                  1. 13

                                                                    I think these manifesti are mostly about paying lip service to an aesthetic of simplicity rather than being driven by any practical concerns. C is just the cool language to use in those circles.

                                                                  2. 5

                                                                    I linked before, but I think a simple modern lisp is a good candidate for high level language.

                                                                    Janet is a good example.

                                                                    1. 5

                                                                      I’m curious to see what such a programming language would look like, and under what criteria it would be judged to be “simple”.

                                                                      Neither C, Shell nor awk seem to go that way. I could imagine a “simple” language could be some subset of SML or RnRS (with n = 4 or 5 maybe?) Scheme, that is, languages often considered to be esoteric by the ANSI C crowd, though they are designed to be simple.

                                                                      I think it would be an interesting blog post, on what “simple” in a language constitutes. I think many people conflate “simple” with “I am proficient in it”, since C is by no means simple and languages like JavaScript are anything but simple, in fact coming from other languages you’re baffled by how complex beasts they are.

                                                                      1. 4

                                                                        Yeah why not Lua? Lua is 100% ANSI C which seems to fit the aesthetic.

                                                                        Personally I like writing code in Python more than Lua, but Lua seems to fit here. Janet too as mentioned.

                                                                      1. 4

                                                                        Thank you. Make might be a simple and elegant tool, but when you start having complex requirements like those your makefile will quickly become bloated, and when you find yourself reaching for recursive make or autotools or configure scripts… I think it’s time to throw it away and use something better. Seriously, please stop using autotools.

                                                                        1. 15

                                                                          I’ve recently started using Makefiles for a lot more stuff; I use them in my notes directories to turn text files into PDFs, as well as whenever I’m programming. The only time I haven’t yet managed to get a decent workflow with make is when working with raw TeX (I try and avoid it where possible) - the workflow is so clunky (repeating commands and so on) that when I tried it still broke on me.

                                                                          Thanks for this!

                                                                          1. 18
                                                                            main.pdf:
                                                                            	latexmk -pdf $(basename $@)
                                                                            
                                                                            1. 3

                                                                              I didn’t know about latexmk, thanks!

                                                                            2. 3

                                                                              My current interesting (to me) Makefile use is, when I update underlying data tables, to automatically update all the dependent summaries and extracts for a public health research project at work.

                                                                              1. 3

                                                                                For commands that don’t have an output or need to be repeated multiple times, I found it useful to touch sentinel files, or use other artifacts outputted by the command that have a different semantic meaning, as checkpoints.