Threads for yawaramin

  1. 1

    The naysayers sound quite a lot like people saying humans would never be able to fly - in 1900. We already had basic knowledge of the components: wings, gas engines, fans, controls, making strong lightweight structures, etc. They just all had to be improved and put together. In fact multiple inventors put the pieces together at basically the same time, indicating the foundations were already there.

    It seems pretty clear the brain has different “components.” We can do language, we can understand visual inputs, we can control our own muscles, we can do logical processing, we have a long-term memory. We know this because different people have these abilities in different degrees. Perhaps somewhere in the middle is a “sentience unit” that controls our overall mood, personality, desires, goals, and relationships. Ask yourself: if in 2032 we have all the other units, how long will it take to develop the “sentience unit”?

    1. 14

      The old adage goes: “They laughed at Galileo! They laughed at Einstein! And they also laughed at Bozo the Clown.”

      Reflexively citing “the naysayers” who’ve been wrong in the past without acknowledging when they’ve been right in the past (and that they’ve been right far more often than they’ve been wrong) is intellectually inconsistent.

      1. 12

        We don’t even know what causes migraines. I can safely say that we’re hundreds of years off–at least–from ‘sentience units’.

      1. 6

        Let me talk to LaMDA and I’m pretty sure I can totally flummox it in a few minutes ;-)

        1. 2

          So serious thought here, what WOULD be the test you’d administer if you could? Is it possible to come up with a standard approach? For instance, in the interview it made reference to spending time with it’s “family”, it’s too bad they didn’t drill into that at all.

          1. 7

            I’ve never tried LaMDA of course, but I’ve played with GPT-3 quite a lot. While its overall use of language is very convincing, it gets confused by simple logic questions. Of course many humans get confused by simple logic questions too, so I’m not sure that’s definitive!

            Another task it can’t do is anything related to letters/spelling, but that’s simply because it has no concept of letters. A future implementation could probably fix this.

            1. 5

              I find myself curious about how it handles shitty-post behavior. Like, we’re talking about consciousness and shit and I ask “What about bananas? Anyway, sentience”.

            2. 3

              Questions that rely on long-term context to be understood correctly. When chatbots fail spectacularly, it’s often because they don’t have a sense of the context that a conversation is taking place in. Or they vaguely maintain context for a bit, and then lose it all when the subject shifts.

          1. 5

            I’m all for having more options to control the representation, but I’m actually quite happy with the current situation. Boxed types are still efficient enough for a lot of practical purposes, and you get a language that is as high-level as Python or Ruby (save for unboxed integers), fast to compile, and much faster to run.

            1. 6

              I’m pretty happy with the current situation too. I often feel like not enough people appreciate OCaml for the language it is today, rather than trying to turn it into what they wish it was (Haskell or Rust). Indeed, if anything, it’s not the language itself but the developer tooling (DX) that needs the most attention, especially on Windows.

              1. 2

                We have boxed types in Haskell, it’s just that GHC will unbox the little ones when it’s desirable

            1. 4

              For a young language, problems and bugs in the base implementations seem quite reasonable.

              Problems in community libraries, equally young, I think are similarly reasonable.

              If these problems are found, addressed, and never come up again, it would seem the language is maturing, and going in the right direction.

              1. 2

                It would also seem such a young and raw language is not ready for production use.

                1. 10

                  Since the language is designed for data-crunching on your workstation etc, “production” use is pretty vague an idea.

                  1. 2

                    The ‘etc’ seems to be doing a lot of work, but I’ll hazard a guess that Julia was designed for more than workstation data crunching, and the intent was to productionize into applications. At least, that’s what I get from blurb on the home page:

                    • ‘Julia was designed from the beginning for high performance. Julia programs compile to efficient native code…’
                    • ‘One can build entire Applications and Microservices in Julia.’
              1. 3

                I recently deployed a side project to Fly, super impressed and happy with it. Configuration was pretty simple. To be fair though I haven’t tried to hook it up to CI/CD with GitHub as it’s just a hobby project right now.

                1. 10

                  I hope the author gets the help they need, but I don’t really see how the blame for their psychological issues should be laid at the feet of their most-recent employer.

                  1. 50

                    In my career I’ve seen managers cry multiple times, and this is one of the places that happened. A manager should never have to ask whether they’re a coward, but that happened here.

                    I dunno, doesn’t sound like they were the only person damaged by the experience.

                    Eventually my physicians put me on forced medical leave, and they strongly encouraged me to quit…

                    Seems pretty significant when medical professionals are telling you the cure for your issues is “quit this job”?

                    1. 16

                      Seems pretty significant when medical professionals are telling you the cure for your issues is “quit this job”?

                      A number of years ago I developed some neurological problems, and stress made it worse. I was told by two different doctors to change or quit my job. I eventually did, and it helped, but the job itself was not the root cause, nor was leaving the sole cure.

                      I absolutely cannot speak for OP’s situation, but I just want to point out that a doctor informing you to rethink your career doesn’t necessarily imply that the career is at fault. Though, in this case, it seems like it is.

                      1. 4

                        It doesn’t seem like the OP’s doctors told them to change careers though, just quit that job.

                        1. 3

                          To clarify, I’m using “career change” in a general sense. I would include quitting a job as a career change, as well as leaving one job for another in the same industry/domain. I’m not using it in the “leave software altogether” sense.

                    2. 24

                      I’m trusting the author’s causal assessment here, but employers (especially large businesses with the resources required) can be huge sources of stress and prevent employees from having the time or energy needed to seek treatment for their own needs, so they can both cause issues and worsen existing ones.

                      It’s not uncommon, for example, for businesses to encourage unpaid out-of-hours work for salaried employees by building a culture that emphasizes personal accountability for project success; this not only increases stress and reduces free time that could otherwise be used to relieve work-related stress, it teaches employees to blame themselves for what could just as easily be systemic failures. Even if an employee resists the social pressure to put in extra hours in such an environment, they’ll still be penalized with (real or imagined) blame from their peers, blame from themselves for “not trying hard enough”, and likely less job safety or fewer benefits.

                      In particular, there’s relevance from the business’ failure to support effective project management, manage workloads, or generally address problems repeatedly and clearly brought up to them. These kinds of things typically fuel burnout. The author doesn’t go into details enough for an outside observer to make a judgment call one way or the other, but if you trust the author’s account of reality then it seems reasonable to blame the employer for, at the least, negligently fueling these problems through gross mismanagement.

                      Arguably off-topic, but I think it might squeak by on the grounds that it briefly ties the psychological harm to the quality of a technical standard resulting from the mismanaged business process.

                      1. 3

                        a culture that emphasizes personal accountability for project success; this not only increases stress and reduces free time that could otherwise be used to relieve work-related stress, it teaches employees to blame themselves for what could just as easily be systemic failures.

                        This is such a common thing. An executive or manager punts on actually organizing the work, whether from incompetence or laziness, and then tries to make the individuals in the system responsible for the failures that occur. It’s hardly new. Deming describes basically this in ‘The New Economics’ (look up the ‘red bead game’).

                        More cynically, is WebAssembly actuall in Google’s interests? It doesn’t add revenue to Google Cloud. It’s going to make their data collection harder (provide Google analytics libraries for how many languages?). It was clearly a thing that was gaining momentum, so if they were to damage it, they would need to make sure they had a seat at the table and then make sure that the seat was used as ineffectually and disruptively as possible.

                        1. 9

                          More cynically, is WebAssembly actually in Google’s interests?

                          I think historically the answer would have been yes. Google has at various points been somewhat hamstrung by shipping projects with slow front end JS in them and responded by trying to make browsers themselves faster. e.g. creating V8 and financially contributing to Mozilla.

                          I couldn’t say if Google now has any incentive to not make JS go fast. I’m not aware of one. I suspect still the opposite. I think they’re also pushing mobile web apps as a way to inconvenience Apple; I think Google currently want people to write portable software using web tech instead of being tempted to write native apps for iOS only.

                          That said, what’s good for the company is not the principle factor motivating policy decisions. What’s good for specific senior managers inside Google is. Otherwise you wouldn’t see all these damn self combusting promo cycle driven chat apps from Google. A company is not a monolith.

                          ‘The New Economics’

                          I have this book and will have to re-read at least this bit tomorrow. I have slightly mixed feelings about it, mostly about the writing style.

                          1. 1

                            Making JS fast is one thing. Making a target for many other languages, as opposed to maintaining analytics libraries and other ways of gathering data for one languages?

                            Your point about the senior managers’ interests driving what’s done is on point, though. Google and Facebook especially are weird because ads fund the company, and the rest is all some kind of loss leader floating around divorced from revenue.

                            The only thing I’ll comment about Deming is that the chapter on intrinsic vs extrinsic motivation should be ignored, as that’s entirely an artifact despite its popularity. The rest of the book has held up pretty well.

                            1. 10

                              Making JS fast is one thing. Making a target for many other languages, as opposed to maintaining analytics libraries and other ways of gathering data for one languages?

                              Google doesn’t need to maintain their analytics libraries in many other languages, only to expose APIs callable from those languages. All WebAssembly languages can call / be called by JavaScript.

                              More generally, Google has been the biggest proponent of web apps instead of web services. Tim Berners-Lee’s vision for the web was that you’d have services that provided data with rich semantic markup. These could be rendered as web pages but could equally plug into other clients. The problem with this approach is that a client that can parse the structure of the data can choose to render it in a way that simply ignores adverts. If all of your adds are in an <advert provider="google"> block then an ad blocker is a trivial browser extension, as is something that displays ads but restricts them to plain text. Google’s web app push has been a massive effort to convince everyone to obfuscate the contents of their web pages. This has two key advantages for Google:

                              • Writing an ad blocker is hard if ads and contents are both generated from a Turing-complete language using the same output mechanisms.
                              • Parsing such pages for indexing requires more resources (you can’t just parse the semantic markup, you must run the interpreter / JIT in your crawler, which requires orders of magnitude more hardware than simply parsing some semantic mark-up. This significantly increases the barrier to entry for new search engines, protecting Google’s core user-data-harvesting tool.

                              WebAssembly fits very well into Google’s vision for the web.

                              1. 2

                                I used to work for a price-comparison site, back when those were actual startups. We had one legacy price information page that was Java applet (remember those?) Supposedly the founders were worried about screen scrapers so wanted the entire site rendered with applets to deter them.

                                1. 1

                                  This makes more sense than my initial thoughts. Thanks.

                                2. 2

                                  Making a target for many other languages, as opposed to maintaining analytics libraries and other ways of gathering data for one languages?

                                  This is something I should have stated explicitly but didn’t think to: I don’t think wasm is actually going to be the future of non-JS languages in the browser. I think they for the next couple decades at least, wasm is going to be used for compute kernels (written in other langs like C++ and Rust) that get called from JS.

                                  I’m taking a bet here that targeting wasm from langs with substantial runtimes will remain unattractive indefinitely due to download weight and parsing time.

                                  about Deming

                                  I honestly think many of the points in that book are great but hoo boy the writing style.

                          2. 1

                            That is exactly what I thought while reading this. I understand that to a lot of people, WebAssembly is very important, and they have a lot of emotions vested into the success. But to the author’s employer, it might not be as important, as it might not directly generate revenue. The author forgets that to the vast, vast majority of people on this earth, having the opportunity to work on such a technology at a company like Google is an unparalleled privilege. Most people on this earth do not have the opportunity to quit their job just because a project is difficult, or because meetings run long or it is hard to find consensus. Managing projects well is incredibly hard. But I am sure that the author was not living on minimum wage, so there surely was compensation for the efforts.

                            It is sad to hear that the author has medical issues, and I hope those get sorted out. And those kinds of issues do exacerbate stressful jobs. But that is not a good reason for finger pointing. Maybe the position just was not right for the author, maybe there are more exciting projects that are waiting in the future. I certainly hope so. But it is important not to blame one’s issues on others, that is not a good attitude in life.

                            1. 25

                              Using the excuse that because there exist others less fortunate, it’s not worth fighting to make something better is also not a good attitude in life.

                              Reading between the lines, it feels to me like there was a lot that the author left unsaid, and that’s fine. It takes courage to share a personal story about mental wellbeing, and an itemized list of all the wrongs that took place is not necessary to get the point the author was trying to make across.

                              My point is that I’d be cautious about making assumptions about the author’s experiences as they didn’t exactly give a lot of detail here.

                              1. 3

                                Using the excuse that because there exist others less fortunate, it’s not worth fighting to make something better is also not a good attitude in life.

                                This is true. It is worth fighting to make things better

                                Reading between the lines, it feels to me like there was a lot that the author left unsaid, and that’s fine. It takes courage to share a personal story about mental wellbeing, and an itemized list of all the wrongs that took place is not necessary to get the point the author was trying to make across.

                                There is a lot of things that go into mental wellbeing. Some things you can control, some things are genetic. I don’t know what the author left out, but I have not yet seen a study showing that stressful office jobs give people brain damage. There might be things the author has not explained, but at the same time that is a very extreme claim. In fact, if that were true, I am sure that the author should receive a lot in compensation.

                                My point is that I’d be cautious about making assumptions about the author’s experiences as they didn’t exactly give a lot of detail here.

                                I agree with you, but I also think that if someone makes a very bold claim about an employer, especially about personal injury, that these claims should be substantiated. There is a very big difference between “working there was hard, I quit” and “the employer acted recklessly and caused me personal injury”. And I don’t really know which one the author is saying, because from the description could be interpreted as it just being a difficult project to see through.

                                1. 8

                                  In fact, if that were true, I am sure that the author should receive a lot in compensation.

                                  By thinking about it for a few seconds you can realize that this can easily not happen. The OP itself says that they don’t have documented evidence from the time because of all the issues they were going through. And it’s easy to see why: if your mental health is damaged, your brain is not working right, would you be mindful enough to take detailed notes of every incident and keep a trail of evidence for later use in compensation claims? Or are you saying that compensation would be given out no questions asked?

                                  1. 3

                                    All I’m saying is, there is a very large difference between saying this job was very stressful, I had trouble sleeping and it negatively affected my concentration and memory and saying this job gave me brain damage. Brain damage is relatively well-defined:

                                    The basic definition of brain damage is an injury to the brain caused by various conditions such as head trauma, inadequate oxygen supply, infections, or intracranial hemorrhage. This damage may be associated with a behavioral or functional abnormality.

                                    Additionally, there are ways to test for this, a neurologist can make that determination. I’m not a neurologist. But it would be the first time I heard that brain damage be caused by psychosomatic issues. I believe that the author may have used this term in error. That’s why I said what I said — if you, or anyone, has brain damage as a result of your occupation, that is definitely grounds for compensation. And not a small compensation either, as brain damage is no joke. This is a very different category from mere psychological stress from working for an apparently mismanaged project.

                                    1. 5

                                      Via https://www.webmd.com/brain/brain-damage-symptoms-causes-treatments

                                      Brain damage is an injury that causes the destruction or deterioration of brain cells.

                                      Anxiety, stress, lack of sleep, and other factors can potentially do that. So I don’t see any incorrect use of the phrase ‘brain damage’ here. And anyway, you missed the point. Saying ‘This patient has brain damage’ is different from saying ‘Working in the WebAssembly team at Google caused this patient’s brain damage’. When you talk about causation and claims of damage and compensation, people tend to demand documentary evidence.

                                      I agree brain damage is no joke, but if you look at society it’s very common for certain types of relatively-invisible mental illnesses to be downplayed and treated very lightly, almost as a joke. Especially by people and corporations who would suddenly have to answer for causing these injuries.

                                      1. 4

                                        Anxiety, stress, lack of sleep and other factors cannot, ever, possibly, cause brain damage. I think you have not completely read that article. It states – as does the definition that I linked:

                                        All traumatic brain injuries are head injuries. But head injury is not necessarily brain injury. There are two types of brain injury: traumatic brain injury and acquired brain injury. Both disrupt the brain’s normal functioning.

                                        • Traumatic Brain Injury(TBI) is caused by an external force – such as a blow to the head – that causes the brain to move inside the skull or damages the skull. This in turn damages the brain.
                                        • Acquired Brain Injury (ABI) occurs at the cellular level. It is most often associated with pressure on the brain. This could come from a tumor. Or it could result from neurological illness, as in the case of a stroke.

                                        There is no kind of brain injury that is caused by lack of sleep or stress. That is not to say that these things are not also damaging to one’s body and well-being.

                                        Mental illnesses can be very devastating and stressful on the body. But you will not get a brain injury from a mental illness, unless it makes you physically impact your brain (causing traumatic brain injury), ingest something toxic, or have a stroke. It is important to be very careful with language and not confuse terms. The term “brain damage” is colloquially often used to describe things that are most definitely not brain damage, like “reading this gave me brain damage”. I hope you understand what I’m trying to state here. Again, the author has possibly misused the term “brain damage”, or there is some physical trauma that happened that the author has not mentioned in the article.

                                        I hope you understand what I am trying to say here!

                                        1. 9

                                          Anxiety and stress raise adrenaline levels, which in turn cause short- and long-term changes in brain chemistry. It sounds like you’ve never been burnt out; don’t judge others so harshly.

                                          1. 3

                                            Anxiety and stress are definitely not healthy for a brain. They accelerate aging processes, which is damaging. But brain damage in a medical context refers to large-scale cell death caused by genetics, trauma, stroke or tumors.

                                          2. 8

                                            There seems to be a weird definitional slide here from “brain damage” to “traumatic brain injury.” I think we are all agreed that her job did not give her traumatic brain injury, and this is not claimed. But your claim that stress and sleep deprivation cannot cause (acquired) brain injury is wrong. In fact, you will find counterexamples by just googling “sleep deprivation brain damage”.

                                            “Mental illnesses can be … stressful on the body.” The brain is part of the body!

                                            1. 1

                                              I think you – and most of the other people that have responded to my comment – have not quite understood what I’m saying. The argument here is about the terms being used.

                                              Brain Damage

                                              Brain damage, as defined here, is damage caused to the brain by trauma, tumors, genetics or oxygen loss, such as during a stroke. This leads to potentially large chunks of your brain to die off. This means you can lose entire brain regions, potentially permanently lose some abilities (facial recognition, speech, etc).

                                              Sleep Deprivation

                                              See Fundamental Neuroscience, page 961:

                                              The crucial role of sleep is illustrated by studies showing that prolonged sleep deprivation results in the distruption of metabolic processes and eventually death.

                                              When you are forcibly sleep deprived for a long time, such as when you are being tortured, your body can lose the ability to use nutrients and finally you can die. You need to not sleep at all for weeks for this to happen, generally this is not something that happens to people voluntarily, especially not in western countries.

                                              Stress

                                              The cells in your brain only have a finite lifespan. At some point, they die and new ones take their place (apoptosis). Chronic stress and sleep deprivation can speed up this process, accelerating aging.

                                              Crucially, this is not the same as an entire chunk of your brain to die off because of a stroke. This is a very different process. It is not localized, and it doesn’t cause massive cell death. It is more of a slow, gradual process.

                                              Summary

                                              Mental illnesses can be … stressful on the body.” The brain is part of the body!

                                              Yes, for sure. It is just that the term “brain damage” is usually used for a very specific kind of pattern, and not for the kind of chronlc, low-level damage done by stress and such. A doctor will not diagnose you with brain damage after you’ve had a stressful interaction with your coworker. You will be diagnosed with brain damage in the ICU after someone dropped a hammer on your head. Do you get what I’m trying to say?

                                              1. 4

                                                I get what you are trying to say, I think you are simply mistaken. If your job impairs your cognitive abilities, then it has given you brain damage. Your brain, is damaged. You have been damaged in your brain. The cells and structures in your brain have taken damage. You keep trying to construct this exhaustive list of “things that are brain damage”, and then (in another comment) saying that this is about them not feeling appreciated and valued or sort of vaguely feeling bad, when what they are saying is that working at this job impaired their ability to form thoughts. That is a brain damage thing! The brain is an organ for forming thoughts. If the brain can’t thoughts so good no more, then it has been damaged.

                                                The big picture here is that a stressful job damaged this person’s health. Specifically, their brain’s.

                                                1. 3

                                                  I understand what you are trying to say, but I think you are simply mistaken. We (as a society) have definitions for the terms we use. See https://en.wikipedia.org/wiki/Brain_damage:

                                                  Neurotrauma, brain damage or brain injury (BI) is the destruction or degeneration of brain cells. Brain injuries occur due to a wide range of internal and external factors. In general, brain damage refers to significant, undiscriminating trauma-induced damage.

                                                  This is not “significant, undiscriminating trauma-induced damage” (for context, trauma here refers to physical trauma, such as an impact to the head, not psychological trauma). What the author describes does not line up with any of the Causes of Brain Damage. It is simply not the right term.

                                                  Yes, the author has a brain, and there is self-reported “damage” to it. But just because someone is a man and feels like he polices the neighborhood, does not make me a “police man”. Just because I feel like my brain doesn’t work right after a traumatic job experience does not mean I have brain damage™.

                                                  1. 1

                                                    The Wikipedia header is kind of odd. The next sentence after “in general, brain damage is trauma induced” lists non-trauma-induced categories of brain damage. So I don’t know how strong that “in general” is meant to be. At any rate, “in general” is not at odds with the use of the term for non-trauma induced stress/sleep depriv damage.

                                                    At any rate, if you click through to Acquired Brain Injury, it says “These impairments result from either traumatic brain injury (e.g. …) or nontraumatic injury … (e.g. listing a bunch of things that are not traumatic.)”

                                                    Anyway, the Causes of Brain Damage list is clearly not written to be exhaustive. “any number of conditions, including” etc.

                                            2. 2

                                              There is some evidence that lack of sleep may kill brain cells: https://www.bbc.com/news/health-26630647

                                              It’s also possible to suffer from mini-strokes due to the factors discussed above.

                                              In any case, I feel like you’re missing the forest for the trees. Sure, it’s important to be correct with wording. But is that more important than the bigger picture here, that a stressful job damaged this person’s health?

                                              1. 2

                                                the bigger picture here, that a stressful job damaged this person’s health

                                                Yes, that is true, and it is a shame. I really wish that the process around WASM be less hostile, and that this person not be impacted negatively, even if stressful and hard projects are an unfortunate reality for many people.

                                                I feel like you’re missing the forest for the trees.

                                                I think that you might be missing the forest for the trees – I’m not saying that this person was not negatively impacted, I am merely stating that it is (probably, unless there is evidence otherwise) to characterize this impact as “brain damage”, because from a medical standpoint, that term has a more narrow definition that damage due to stress does not fulfill.

                                      2. 4

                                        Hello, you might enjoy this study.

                                        https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4561403/

                                        I looked through a lot of studies to try and find a review that was both broad and to the point.

                                        Now, you are definitely mixing a lot of terms here… but I hope that if you read the research, you can be convinced, at the very least, that stress hurts brains (and I hope that reading the article and getting caught in this comment storm doesn’t hurt yours).

                                        1. 2

                                          Sleep Deprivation and Oxidative Stress in Animal Models: A Systematic Review tells us that sleep deprivation can be shown to increase oxidative stress:

                                          Current experimental evidence suggests that sleep deprivation promotes oxidative stress. Furthermore, most of this experimental evidence was obtained from different animal species, mainly rats and mice, using diverse sleep deprivation methods.

                                          Although, https://pubmed.ncbi.nlm.nih.gov/14998234/ disagrees with this. Furthermore, it is known that oxidative stress promotes apoptosis, see Oxidative stress and apoptosis :

                                          Recent studies have demonstrated that reactive oxygen species (ROS) and the resulting oxidative stress play a pivotal role in apoptosis. Antioxidants and thiol reductants, such as N-acetylcysteine, and overexpression of manganese superoxide (MnSOD) can block or delay apoptosis.

                                          The article that you linked Stress effects on the hippocampus: a critical review mentions that stress has an impact on the development of the brain and on it’s workings:

                                          Uncontrollable stress has been recognized to influence the hippocampus at various levels of analysis. Behaviorally, human and animal studies have found that stress generally impairs various hippocampal-dependent memory tasks. Neurally, animal studies have revealed that stress alters ensuing synaptic plasticity and firing properties of hippocampal neurons. Structurally, human and animal studies have shown that stress changes neuronal morphology, suppresses neuronal proliferation, and reduces hippocampal volume

                                          I do not disagree with this. I think that anyone would be able to agree that stress is bad for the brain, possibly by increasing apoptosis (accelerating ageing), decreasing the availability of nutrients. My only argument is that the term brain damage is quite narrowly defined (for example here) as (large-scale) damage to the brain caused by genetics, trauma, oxygen starvation or a tumor, and it can fall into one of two categories: traumatic brain injuries and acquired brain injuries. If you search for “brain damage” on pubmed, you will find the term being used like this:

                                          You will not find studies or medical diagnoses of “brain damage due to stress”. I hope that you can agree that using the term brain damage in a context such as the author’s, without evidence of traumatic injury or a stroke, is wrong. This does not take away the fact that the author has allegedly experienced a lot of stress at their previous employer, one of the largest and high-paying tech companies, and that this experience has caused the author personal issues.

                                          On an unrelated note: what is extremely fascinating to me is that some chemicals such as methamphetamine (at low concentrations) or minocycline are neuroprotective being able to lessen brain damage for example due to stroke. But obviously, at larger concentrations the opposite is the case.

                                          1. 1

                                            How about this one then? https://www.sciencedirect.com/science/article/abs/pii/S0197458003000484

                                            We can keep going, it is not difficult to find these… Your’re splitting a hair which should not be split.

                                            What’s so wrong about saying a bad work environment can cause brain damage?

                                            1. 1

                                              Your’re splitting a hair which should not be split.

                                              There is nothing more fun than a civil debate. I would argue that any hair deserves being split. Worst case, you learn something new, or form a new opinion.

                                              What’s so wrong about saying a bad work environment can cause brain damage?

                                              Nothing is wrong with that, if the work environment involves heavy things, poisonous things, or the like. This is why OSHA compliance is so essential in protecting people’s livelihoods. I just firmly believe, and I think that the literature agrees with me on this, that “brain damage” as a medical definition refers to large-scale cell death due to trauma or stroke, and not chronic low-level damage caused by stress. The language we choose to use is extremely important, it is the only facility we have to exchange information. Language is not useful if it is imprecise or even wrong.

                                              How about this one then?

                                              Let’s take a look what we got here. I’m only taking a look at the abstract, for now.

                                              Stress is a risk factor for a variety of illnesses, involving the same hormones that ensure survival during a period of stress. Although there is a considerable ambiguity in the definition of stress, a useful operational definition is: “anything that induces increased secretion of glucocorticoids”.

                                              Right, stress causes elevated levels of glucocorticoids, such as cortisol.

                                              The brain is a major target for glucocorticoids. Whereas the precise mechanism of glucocorticoid-induced brain damage is not yet understood, treatment strategies aimed at regulating abnormal levels of glucocorticoids, are worth examining.

                                              Glucocorticoids are useful in regulating processes in the body, but they can also do damage. I had never heard of the term glucocorticoid-induced brain damage, and searching for it in the literature only yields this exact article, so I considered this a dead end. However, in doing some more research, I did find two articles that somewhat support your hypothesis:

                                              In Effects of brain activity, morning salivary cortisol, and emotion regulation on cognitive impairment in elderly people, it is mentioned that high cortisol levels are associated with hippocampus damage, supporting your hypothesis, but it only refers to elderly patients with Mild Cognitive Impairment (MCI):

                                              Cognitive impairment is a normal process of aging. The most common type of cognitive impairment among the elderly population is mild cognitive impairment (MCI), which is the intermediate stage between normal brain function and full dementia.[1] MCI and dementia are related to the hippocampus region of the brain and have been associated with elevated cortisol levels.[2]

                                              Cortisol regulates metabolism, blood glucose levels, immune responses, anti-inflammatory actions, blood pressure, and emotion regulation. Cortisol is a glucocorticoid hormone that is synthesized and secreted by the cortex of adrenal glands. The hypothalamus releases a corticotrophin-releasing hormone and arginine vasopressin into hypothalamic-pituitary portal capillaries, which stimulates adrenocorticotropic hormone secretion, thus regulating the production of cortisol. Basal cortisol elevation causes damage to the hippocampus and impairs hippocampus-dependent learning and memory. Chronic high cortisol causes functional atrophy of the hypothalamic-pituitary-adrenal axis (HPA), the hippocampus, the amygdala, and the frontal lobe in the brain.

                                              Additionally, Effects of stress hormones on the brain and cognition: Evidence from normal to pathological aging mentions that chronic stress is a contributor to memory performance decline.

                                              We might be able to find a few mentions of brain damage outside of the typical context (as caused by traumatic injury, stroke, etc) in the literature, but at least we can agree that the term brain damage is quite unusual in the context of stress, can we not? Out of the 188,764 articles known by pubmed, only 18,981 mention “stress”, and of those the almost all are referring to “oxidative stress” (such as that experienced by cells during a stroke). I have yet to find a single study or article that directly states brain damage as being a result of chronic stress, in the same way that there are hundreds of thousands of studies showing brain damage from traumatic injuries to the brain.

                                              1. 2

                                                Well, if anybody asks me I will tell them that too much stress at work causes brain damage… and now I can even point to some exact papers!

                                                I agree that it’s a little hyperbolic, but it’s not that hyperbolic. If we were talking about drug use everyone would kind of nod and say, ‘yeah, brain damage’ even if the effects were tertiary and the drug use was infrequent.

                                                But stress at work! Ohohoho, that’s just life my friend! Which really does not need to be the way of the world… OP was right to get out, especially once they started exhibiting symptoms suspiciously like the ones cited in that last paper (you know, the sorts of symptoms you get when your brain is suffering from some damage).

                                                1. 2

                                                  If someone tells me that they got brain damage from stress at work, I will laugh, tell them to read the Wikipedia article article and then move on. But that is okay, we can agree to disagree. I understand that there are multiple possible definitions for the term brain damage.

                                                  If we were talking about drug use everyone would kind of nod and say, ‘yeah, brain damage’ even if the effects were tertiary and the drug use was infrequent.

                                                  In my defense, people often use terms incorrectly.

                                                  OP was right to get out

                                                  I agree. Brain damage or not, Google employee or not, if you are suffering at work you should not stay there. We all have very basic needs, and one of them is being valued and being happy to work.

                                                  Anyways, I hope you have a good weekend!

                                        2. 6

                                          I have not yet seen a study showing that stressful office jobs give people brain damage.

                                          This is a bizarre and somewhat awful thread. Please could you not post things like this in future?

                                          1. 8

                                            I disagree. The post seemed polite, constructive, and led to (IMO) a good conversation (including some corrections to the claims in the post).

                                            1. 4

                                              Parent left a clear method for you to disprove them by providing a counter-example.

                                              If you can point to some peer-reviewed research on the topic, by all means do so.

                                              1. 5

                                                Yea but this is an obnoxious, disrespectful, and disingenuous way to conduct an argument. I haven’t read any studies proving anything about this subject one way or another. Because I am not a mental health researcher. So it’s easy for me to make that claim, and present the claim as something that matters, when really it’s a pointless claim that truly does not matter at all.

                                                Arguing from an anecdotal position based on your own experience, yet demanding the opposing side provide peer-reviewed studies to contradict your anecdotal experience, places a disproportionate burden on them to conduct their argument. And whether intentional or not, it strongly implies that you have little to no respect for their experiences or judgement. That you will only care about their words if someone else says them.

                                    1. 15

                                      In my experience the biggest reason I would not use SQLite on the server is its poor concurrency. Even if you have a single-process multi-threaded server and take advantage of SQLite’s unlock notification functionality, PostgreSQL will absolutely murder it on any sort of concurrent write-heavy’ish workload. Also, SQLite uses a really counter-intuitive locking sequence (I don’t remember the details off the top of my head but can dig it up) so you often have to use BEGIN IMMEDIATE to avoid being drowned in deadlocks.

                                      1. 18

                                        If you’ve been reading the recent wave of SQLite-on-the-server posts from a couple companies, the thing they have in common is low write loads.

                                        Which is surprisingly common in more service-y setups — a single giant codebase, sure, SQLite isn’t the right fit, but once you’re doing some more focused services I think it would be rare not to have at least a few that are write-light or even effectively read-only. I’ve been working through this myself lately and starting to come around to the idea of using SQLite for those cases just because of the reduced number of moving parts to worry about.

                                        1. 4

                                          I think most (but not all) write-intensive SQL use-cases are for metrics or analytical tasks. (Because I’m assuming if one needs some persistent, but not critically persistent, state such as sessions, one would use some better suited system like Redis or any other generic KV store.)

                                          In such scenarios I think nothing can beat a purposely built system like ClickHouse in both terms of raw IO, concurrency and throughput.

                                          Thus, setting these aside, I don’t think write concurrency plays a huge role until the application becomes very (as in viral) successful.

                                          1. 5

                                            I don’t really think this is true. CRUD in general is often write heavy. It just depends on the details of the domain. Keeping state of an MMORPG? Very much write and read heavy.

                                            1. 1

                                              Keeping state of an MMORPG? Very much write and read heavy.

                                              Even with classical SQL databases like PostgreSQL or MySQL, write heavy applications tend to be programmed in such a manner that lock contention is reduced as much as possible; there might be multiple writers, but the code is designed so that they don’t touch the same rows.

                                              Thus at that point one doesn’t actually use the DB for its SQL capabilities, but instead more like a document or KV store; therefore perhaps a proper KV store might actually be the best solution…

                                              1. 2

                                                Why isn’t a SQL database a “proper” KV store? How exactly do you think SQL databases store rows on disk? It’s a KV store.

                                                If 99% of your write workload is non-conflicting, why does that imply you should absolutely fuck yourself for the remaining 1% by using a “proper” KV store with inferior transaction support and inferior query ergonomics? Or worse, eventual consistency?

                                                1. 1

                                                  Why isn’t a SQL database a “proper” KV store? How exactly do you think SQL databases store rows on disk? It’s a KV store.

                                                  Indeed a relational database can be seen as a KV store, where the key is the primary key and the value is the whole row, but in certain cases a plain-simple KV store (like LMDB that does include transactions) is perhaps more than enough (and simpler)…

                                                  1. 3

                                                    Why is it simpler? If I literally never need to look up anything in my entire application by anything other than the primary key, maybe. But the instant I want to search for a value by some secondary key, I’m stuck manually implementing secondary indexes, and maintaining those indexes correctly as values are added, removed, and changed. In SQLite I type CREATE INDEX and I’m done. That is far simpler.

                                                2. 2

                                                  Thus at that point one doesn’t actually use the DB for its SQL capabilities, but instead more like a document or KV store; therefore perhaps a proper KV store might actually be the best solution…

                                                  This is a strange statement. Avoiding lock contention is a fact of life with all databases. How does it somehow make it unnatural for SQL?

                                            2. 1

                                              How write-heavy are we talking? And are you talking into account SQLite’s WAL journalling mode?

                                            1. 11

                                              ehhhh as a research language it’s not dead yet.

                                              But if you think a language (spec) should continue to be updated (which is fair; even C and even Fortran get more spec revisions than Standard ML has), then yeah that part of it doesn’t seem likely to come alive anytime soon.

                                              This post also talks about syntax and semantics as its flaws. I think that’s completely untrue. It hasn’t sprouted because it doesn’t have a major any industry backer like OCaml has in Jane Street.

                                              1. 8

                                                I’m not sure if it’s fair to call Jane Street the main backer of OCaml. They are definitely a big backer and they are vocal about their use of OCaml, but they aren’t alone. OPAM is maintained by OCamlPro, for example, which is a consulting company.

                                                It’s also interesting to note that SML did have commercial users and backers. AT&T (if I’m not mistaken, or another big telecom company) had a big SML codebase. Harlequine Software was selling a commercial IDE for it (MLWorks).

                                                I mostly support the OCaml side in the debate about int/float problem and other issues mentioned, but I’m not ready to give any answer as to why the OCaml community is much bigger than that of SML now. All I can say for myself is that the existing community of OCaml and the languages features not available in SML tip the scales towards OCaml for me all the time. I want to write programs and make it easier for other people to write in an ML, and OCaml is the one ML that makes it easier for me.

                                                Also, fun fact: MLton has a way to use overloading in your own code, even though you need to explicitly enable it in the compiler options.

                                                1. 2

                                                  I didn’t call it the main backer of OCaml; but I would call it that now that you mention it. “Main” doesn’t mean they’re the only one. They seem to be the biggest one though.

                                                2. 6

                                                  As a research and education language SML is still hanging around, true, but as an industry language, let’s face it, it’s dead.

                                                  It hasn’t sprouted because it doesn’t have a major any industry backer like OCaml has in Jane Street.

                                                  Difficult to say, is OCaml successful because of Jane Street backing or is Jane Street backing it because it’s a viable language? I think there are multiple factors involved. Personally I think the fact that they have a single (main) implementation, with a simple C-like native executable compiler, helped a lot.

                                                  1. 8

                                                    Personally I think the fact that they have a single (main) implementation, with a simple C-like native executable compiler, helped a lot.

                                                    Agreed. SML has some excellent compilers, but the flagship (SML/NJ, flagship due to its prevalence in education) is not friendly to shipping executables. MLton, the excellent whole-program optimizing compiler, is not friendly to interactive development. Ocaml’s single implementation definitely helps.

                                                    I think the big thing (possibly a side-effect of above) is SML and Ocaml’s library situations. SML has the Basis library, which is a standard library in a very early 90’s way (simple data types, socket-level networking). And it’s not actually a library, it’s a set of definitions and interfaces that are implemented by different SML implementors (much like the language itself). It took years for the committee to finalize the Basis, and that was quicker than standardizing the language.

                                                    Ocaml, on the other hand, has the one implementation, by Inria, with a standard library that doesn’t take a multilateral committee to update. Still, the standard library is also fairly spare. But the library actually changes over time, which is not nothing, and it includes important bits like a parser library. Between that, and pretty good C interoperability, Ocaml has much more out of the box.

                                                    Jane Street can then build a layer of different library bundles on top of that, and because they work with all of the Ocaml implementations (just the one), they gain a lot of traction in the community. That centralization allows a standard package manager (opam). Which is easy enough to add to that it grows.

                                                    Pretty soon, SML is nowhere near Ocaml.

                                                    1. 4

                                                      but the flagship (SML/NJ, flagship due to its prevalence in education)

                                                      Yes it’s common in education but I really wouldn’t call this the flagship at all. MLton and Poly/ML are the only ones I’d recommend to anyone for serious use.

                                                    2. 4

                                                      As a research and education language SML is still hanging around, true, but as an industry language, let’s face it, it’s dead.

                                                      Yup I agree.

                                                      Difficult to say, is OCaml successful because of Jane Street backing or is Jane Street backing it because it’s a viable language? I think there are multiple factors involved. Personally I think the fact that they have a single (main) implementation, with a simple C-like native executable compiler, helped a lot.

                                                      Maybe, but it seems overall completely arbitrary to me. And that’s fine, most successful things in life are arbitrarily successful.

                                                  1. 5

                                                    Not sure that nitpicking the OCaml asides is really on topic here, but that is the part I know anything about, so:

                                                    After this article was published, Akiva Leffert reminded me that SML later settled on a third fix to this problem, the “value restriction”

                                                    OCaml also uses the value restriction and it’s…basically fine? Sometimes you have to eta-expand things. That’s not usually a problem because most OCaml code I’ve seen will prefer fully eta-expanded definitions as a stylistic choice anyway.

                                                    The only example I know where it’s a real problem was for implementing lenses. I think they ended up writing a ppx to do all the eta expansion automatically.

                                                    Also, wow, he’s been away from ML a long time if the value restriction happened “later.”

                                                    Here, OCaml’s +. trick was unworkable. You cannot have a different identifier for equality comparisons at every different type.

                                                    Why not? In OCaml you can have String.(=), Int.(=), and Bool.(=). You can even have String.(=) and String.Caseless.(=), because some strings are case sensitive and others aren’t.

                                                    The ability to define custom comparisons is crucial for stuff like

                                                    type user = {
                                                      display_name : string; (* not necessarily unique *)
                                                      id : int;              (* use this for comparison *)
                                                      }
                                                    

                                                    (Well, I guess crucial is hyperbole. JavaScript has no way to specify custom comparisons for keys of maps and that hasn’t stopped the entire internet from getting stuff done.)

                                                    1. 5

                                                      SML still uses a stronger than really necessary version of the value restriction. OCaml makes the user eta-expand much less often thanks to that work by Jacques Garrigue et al.

                                                      Regarding Int.(=) and similar, I think the reason they weren’t used is that they would be really annoying to use, especially before local module opens.

                                                      1. 3

                                                        It also seems like OP isn’t aware of local opens and the operator-overloading pattern that they enable.

                                                      1. 8

                                                        The API used to perform the deletion accepted both site and app identifiers and assumed the input was correct – this meant that if a site ID is passed, a site would be deleted; if an app ID was passed, an app would be deleted. There was no warning signal to confirm the type of deletion (site or app) being requested.

                                                        So technically a type error then.

                                                        EDIT: they claim there were two problems, but I’d like to add a third: not doing a dry run of the script and printing out what would be deleted.

                                                        1. 5

                                                          I agree it should be a type error. Let’s see if we can get there.

                                                          Fourth problem: actually deleting instead of deactivating and marking for deletion. We should have been able to say “oh whoops extremely sorry, let me undo that” and had customers running within minutes of getting a support ticket.

                                                          In the same way that it’s safer to generate garbage and GC rather than free() something you need and SEGFAULT.

                                                        1. 3

                                                          TL;DR: expected <button onclick="submit">...</button> to work with an event handler function submit(e) { ... }, but found out that it had to be <button onclick="submit(event)">...</button> (specifically, the magic word event, which is treated specially inside an onXXX attribute).

                                                          1. 2

                                                            :) Well the tldr would be something along the lines of event in <button onclick="submit(event)> isn’t magic, it’s a parameter in a dynamically created function, built from string concatenation, defined for event handler functions in page X of the spec.

                                                          1. 8

                                                            TIL that systemd upstream refuses to make their software compatible with musl libc. Damn that’s shitty.

                                                            1. 8

                                                              I think the systemd team’s position is more defensible if you look at it top-down. Will spending resources on musl support do anything for the customers of the commercial distro vendors, or the end-users of those distros? Could it be justified to a non-technical manager or executive? Resources are always limited, and time spent on libc portability is time that can’t be spent on something else that might be more beneficial. I learned to take this view while I was on the Windows accessibility team at Microsoft. At the peak of our headcount, I naively thought we should be able to do everything we wanted to. But, like I said, resources are always limited, and tradeoffs have to be made.

                                                              1. 13

                                                                This is a defense of systemd that exactly matches its criticisms.

                                                                1. 4

                                                                  Sure, my logic also applies to distros that choose not to use systemd, like Alpine, and I have no problem with that. Or did you mean something else?

                                                                  1. 8

                                                                    I mean, a common criticism is that SystemD is a project driven by business concerns that does not play well with the existing ecosystem. And it sounds to me like you are saying “Yes, systemd does not play well with the existing ecosystem because the people working on it have to make decisions on the basis of business concerns.”

                                                                    A primary reason that Linux is so open to experimentation is that the people working on it, at least in theory, are driven by the love of the craft and some level of principled thoughts about system design. The point of the UNIX philosophy (and yes I know Linux does not hew very closely to the UNIX philosophy, but there’s degrees–) is that a system assembled from independent components speaking an accessible interop language encourages, experimentation through composeability, readability and extensibility.

                                                                    If Linux was designed the way that SystemD is designed, there would be a list of supported hardware and a paid certification program. Heck, it might even have more users that way! But I dare claim it would have fewer developers; at least, fewer unpaid developers. Its ecosystem would be vastly different, biased towards business rather than amateurs. It would be less welcoming to developers, even though it may be more welcoming to users. And I know that even now, most people working on Linux are paid to do so, but the ethos is amateur, and that’s a large part of what I like about it.

                                                                    1. 6

                                                                      IIt’s systemd, not SystemD.

                                                                      Also, yes systemd is developed primarily by people who work for a business. So what? That’s the best-case scenario of FLOSS–run a business while developing it. Or do you prefer it was developed by hackers part-time outside of work, school, and other jobs?

                                                                      systemd does not play well with the existing ecosystem

                                                                      systemd plays fine with the existing ecosystem. It even understands traditional config formats like crontab and fstab. It’s a reliable way to run a Linux box for users, developers, and sysadmins. That’s really all we need to know to see why it’s successful. No conspiracy theories needed.

                                                                      1. 4

                                                                        That’s the best-case scenario of FLOSS–run a business while developing it. Or do you prefer it was developed by hackers part-time outside of work, school, and other jobs?

                                                                        Strong disagree. The best-case scenario for users is a non-profit organization such as Python Software Foundation or Zig Software Foundation.

                                                                        1. 2

                                                                          A non-profit org doesn’t guarantee anything in particular other than, the interests of its biggest funders will come first. If a powerful funder wants to control how a project is developed, they can just ‘acqui-hire’ its core developers. Look at Rust.

                                                                          1. 1

                                                                            Note that Rust is not a 501(c)(3) non profit organization. It is a 501(c)(6) business league and does not pay its core team members.

                                                                            Agree with you that non profits are vulnerable to high donation percentage from individual funders. However, non profit organizations have a crucial guarantee that for-profit entities do not: the flow of income must legally be pointed at the org’s mission statement, with none skimmed off the top. The org exists for the users, not for the financial stakeholders. Furthermore they are governed by a board, so when the founder retires, the org passes on to other board members rather than being sold and dying a painful corporate death at the expense of the users.

                                                                            1. 2

                                                                              Nothing about this guarantees that the mission statement will remain unchanged, or that the software delivered will be fit for purpose, or that the rest of the board will be capable of maintaining it if the founder goes away. A for-profit business has one weird trick that really helps with all this: it’s in the business of selling that software, and if it’s no good, they go out of business i.e. lose their income source.

                                                                      2. 2

                                                                        A primary reason that Linux is so open to experimentation

                                                                        Given this thread, it doesn’t seem like this is true. Someone wants to experiment with this, and the entire community rejects it, even as an experiment.

                                                                        1. 1

                                                                          Not every experiment should be merged to the official project repos.

                                                                  2. 8

                                                                    I get what you’re saying but…

                                                                    …first of all, it’s not like musl is some shabby hobby project written by some hippie with way too much free time on their hands due to their questionable personal hygiene routine – it’s a pretty solid project, with a good maintenance history. Accepting patches that add support for an alternative piece of supporting infrastructure is not something that you’ll ever going to be able to justify to non-technical managers, especially when some of them are quite heavily invested in the other piece of infrastructure, the one that systemd already supports ;). That’s the road to technical stagnation, not pragmatic choices. At this rate, something better than glibc will have zero chance of ever showing up on Linux – and ten years down the line we’ll all be wondering why them young kids don’t even care about this crap anymore.

                                                                    Also, more generally, copycating large corporate practices when developing software isn’t really conducive to quality software unless you have large corporate money to throw at it. If you try to write system software with Microsoft’s attitude but a small fraction of Microsoft’s money, all you get is a cheap clone of something Microsoft might make. (Edit: to clarify – this always has to be said when Linux is involved, for some reason… – I don’t mean “something Microsoft might make” in a derogatory manner. A lot of Microsoft’s NT software is frickin’ amazing, and light years ahead of anything comparable we have in FOSS land).

                                                                    Second, this kind of “corporate gatekeeping” is one of the things that put a big nail in many Unix coffins back in the day. The idea that you can’t implement something that your users want because you’re unable to explain it to the people in charge is one of the things that made a lot of people move to systems that could do what they want – like Linux.

                                                                    It’s also kind of undermining the whole point of using an open source program in the first place. If I wanted my choice of hardware and systems software to depend on the goodwill of some executives, I’d much rather bet on Microsoft’s.

                                                                1. 10

                                                                  I do something similar, but in a more generic way. I have two “search engines” defined in Chrome, one called Jira and the other called JQL.

                                                                  Jira is defined as https://company.atlassian.net/secure/QuickSearch.jspa?searchString=%s JQL is defined as https://company.atlassian.net/issues/?jql=%s

                                                                  The Jira one means I can do jira<space>project foo which activates Jira’s “smart” search and, if project is a valid Jira project, searches for foo in that project, or otherwise does a more generic text search for project foo; and jira<space>project-1234 also takes you right to ticket PROJECT-1234 as in this blog post.

                                                                  For those that use Alfred on macOS you can also create a similar search there, using {query} instead of %s

                                                                  1. 4

                                                                    Yes, Alfred is what I use and it’s extremely useful for this. My shortcut is jira and putting in a ticket number will go straight to it. I also created a workflow to take the full URL of a Jira ticket from my clipboard and replace it with just the ticket. All this saves a great deal of tedium.

                                                                    If you’re on macOS I can’t recommend it enough. https://www.alfredapp.com

                                                                    1. 2

                                                                      Yes the QuickSearch one is great, and that’s what I have j aliased to in Firefox. You can type in a ticket ID or a search term or whatever.

                                                                      One really frustrating thing is that Jira then redirects you to a combination search/ticket view and puts the first result’s ID in the URL bar. This makes it that much harder for people to reverse-engineer the search URL!

                                                                      1. 1

                                                                        Mine are very similar, I have ji for ‘JIRA issue’ and js for ‘JIRA search’.

                                                                      1. 2
                                                                        if git fetch origin; then...
                                                                        

                                                                        Are you sure this works? Git fetch just puts the new commits from the origin into the .git folder, it doesn’t update the working copy of the files. To me it seems like you would be building the previous version every time.

                                                                        Also if you like single binaries, check out MirageOS. You can compile your server along with its entire operating system into a single binary (with almost all Unix legacy cruft ruthlessly cut out), then run it on bare KVM.

                                                                        1. 1

                                                                          ah, good catch - that was some psuedocode that i wrote on the fly. i’ve updated the post with the code that i actually use.

                                                                          mirageos looks very interesting! i’ve been toying with oasis linux recently - you might find it interesting: https://github.com/oasislinux/oasis

                                                                        1. 1

                                                                          Wow! I never knew sqllite and litestream was so amazing. Is there way to move Postgres SQL DB to SqlLite?

                                                                          1. 7

                                                                            Only if you’re using very few features of postgres. Any decent orm should be able to pipe from one store to the other. There’s also https://github.com/benbjohnson/postlite but it’s very alpha.

                                                                            1. 4

                                                                              If you’re low traffic enough for this to make sense, you can “just” dump your Postgres DB, and then import the dump into a SQLite DB after some light text processing. Add an audit log in Postgres if you have a bunch of data and will need to do incremental catch-ups for a low downtime cutover. How many writes/s does your Postgres instance handle?

                                                                              1. 2

                                                                                If you’re already on postgres I’m curious what you would gain by switching? You would lose a lot of features.

                                                                                1. 7

                                                                                  a whole bunch of operational overhead

                                                                                  1. 1

                                                                                    I’ve never found postgres to have overhead. Especially if you’re going to set up litestream anyway…

                                                                                    1. 3

                                                                                      simply running a postgres server is overhead

                                                                                      yes, this is minimized a lot by using a database service from a cloud provider, but even then, assuming you make absolutely 0 tweaks to your postgres server… you still have much more to do than even just litestreaming to a bucket

                                                                                      1. 1

                                                                                        really? apt install postgres and then forget… ?

                                                                                        1. 4

                                                                                          At the very least you have to create some users and set permissions. You will also want to tweak the config a little (especially the memory settings and autovacuum). However, I would put this on the level of effort of litestreaming to a bucket. The real pain comes when you need to do some migrations…

                                                                                          1. 3

                                                                                            Backups, authentication management, and any form of replication all require work and upkeep.

                                                                                            1. 1

                                                                                              Tailscale is not a single backend server, it’s a tool that runs on users’ devices. It’s a really good idea to keep complexity low and not have to manage a separate Postgres process on every device, or even one single point of failure on a backend somewhere.

                                                                                              SQLite is the smart choice here.

                                                                                              1. 1

                                                                                                If they’re talking about the client and not the service then that actually makes sense, but I doubt they’re running litestream on client devices…

                                                                                  1. 8

                                                                                    Why not just postgres?

                                                                                    1. 7

                                                                                      The claim is that they don’t want to do the operations work that requires. At this point it sounds like they’ve spent more time hacking random things together than they would have on just running PostgreSQL. But they also only have one giant table, apparently, so I think there may be deeper issues. I mean, if you only need a kv store, why not just start with a kv store like Tokyo Cabinet?

                                                                                      1. 5

                                                                                        If you read the article, it explains that they actually don’t want to keep using just a key-value store style, they want to migrate to more complex data and in fact are in the process of doing so.

                                                                                        1. 3

                                                                                          Long term support and viability, I’ve never heard of any projects using TC.

                                                                                          1. 1

                                                                                            Considering what they’ve been doing wrapping etcd and the like, I’m not sure it’s that big a concern to them. Plus TokyoCabinet (or KyotoCabinet now) have been around longer than etcd, I think. They’re just pretty stable.

                                                                                            1. 1

                                                                                              TC is a building block, but using it directly you have to be careful. I’ve been bit by a corrupt TC more than once

                                                                                        2. 3

                                                                                          I consider this the most important question at the start of any system architecture discussion and it had better have an extremely detailed answer with considerable evidence. But I don’t work at an internet company

                                                                                          1. 3

                                                                                            I mean this in a pretty judge-y way but only for gossip, but this story and the previous one sound like a case of the CTO wanting to play with their Legos.

                                                                                            Even if they want to move to a more complex data structure later, dismissing “just buy a managed SQL server with the money that companies give you every month” because of hand-wave-y ops work (it’s tailscale! They have money to hire someone who is competent at databases) feels really odd.

                                                                                            1. 3

                                                                                              Except as they’ve said, they don’t want to deal with the operational overhead of Postgres or MySQL. They have people who could deal with it but they don’t want to. They’re a fairly small company so they aren’t going to hire someone just to deal with making sure a DB is replicating properly. They seem to only have one writer process and maybe some distributed readers? Litestream with the upcoming read replicas seems like the perfect fit for their use case.

                                                                                              1. 3

                                                                                                Sorry, you’re right that their current SQLite setup is very reasonable. This is more about their bespoke etcd model.

                                                                                                The operational efforts of a DB exist but if they have one writer process and some distributed readers, it’s a known quantity and is … mostly a solved problem? Importantly, it’s also a solved problem in the “pay another company some money to deal with it for you” variety in my opinion.

                                                                                                They wrote a custom etcd client because they didn’t want to set up a primary/secondary replica setup (and it’s not like those other solutions don’t also have the same operational concerns about backups and the like!)

                                                                                                There are operational concerns about any database, nice thing about most of the classic relational DBs is that there are documented, “boring” solutions.

                                                                                        1. 3

                                                                                          The tldr seems to be that Go generics treat all pointer typed type parameters as being the same, so fails to monomorphise, resulting in needlessly slow code.

                                                                                          1. 10

                                                                                            Slightly more TL;DR: it monomorphizes by “shape” rather than type, so it has to pass the vtable as a hidden parameter to the monomorphized functions, and the vtable parameter makes inlining hard for the Go compiler and results in extra pointer dereferences.

                                                                                            It does have some good news though: using a generic byteseq is just as fast as using raw string and []byte!

                                                                                            1. 10

                                                                                              fails to monomorphise, resulting in needlessly slow code.

                                                                                              But less code. It’s a tradeoff, not a mistake.

                                                                                              1. 6

                                                                                                Indeed, and one that the Go team worked very hard to calibrate to the right level for their context. Not every language should make the same choice Rust and C++ make of fully monomorphizing generics (in both cases with optional mechanisms [virtual in C++ and trait objects in Rust] to escape).

                                                                                                1. 6

                                                                                                  +1

                                                                                                  Canonical post on the topic: https://research.swtch.com/generic

                                                                                                  1. 0

                                                                                                    There are many ways to reduce code generated, but there are very few cases where people choose absurdly slow code over code size. Honestly this still just feels like the ongoing saga of the Go team hating generic programming and passive aggressively making design choices for the express purpose of penalizing such code.

                                                                                                    1. 5

                                                                                                      Honestly this still just feels like the ongoing saga of the Go team hating generic programming and passive aggressively making design choices for the express purpose of penalizing such code.

                                                                                                      What if you’re wrong about their motives?

                                                                                                      1. 1

                                                                                                        I said “feels like”

                                                                                                        What I do know is that the core Go team has spent years arguing against generics, and now that they’ve finally added support the implementation’s performance characteristics seem significantly worse than pretty much every other implementation of generics outside of Java.

                                                                                                        1. 4

                                                                                                          You already admitted that you have no evidence to claim that ‘the core Go team has spent years arguing against generics’. You have no credibility to argue about Go.

                                                                                                1. 36

                                                                                                  Ah, Python for Workgroups :-)

                                                                                                  1. 2

                                                                                                    I was thinking “Beautiful disaster” but that works too.

                                                                                                  1. 2

                                                                                                    Tbh, ‘subtle data-integrity bugs’ is not what I want to hear from an application that handles money. Hopefully they figure out the SQL transaction issue.

                                                                                                    1. 1

                                                                                                      Depends how you define ‘useful’, but mine has to be ‘The Scale of the Universe’, a zoomable view of things in the universe from the scala of quarks to universal super-clusters: https://htwins.net/scale2/