Readit News logoReadit News
xnoreq commented on Oil is near a price that hurts the economy   wsj.com/business/energy-o... · Posted by u/JumpCrisscross
karakoram · 7 days ago
I find it utterly amazing that a country like the USA does not have nationwide high-speed rail and mass transit in every major city (that works for everyone).

Comparing with Asia (Hong Kong, Singapore, Malaysia) and certain EU countries (Vienna, Netherlands, etc.), it just shocks me how much people need a car for everything. Even a visitor needs to rent a car to properly go about their business.

xnoreq · 6 days ago
Didn't know Vienna was a country.
xnoreq commented on Zig – io_uring and Grand Central Dispatch std.Io implementations landed   ziglang.org/devlog/2026/#... · Posted by u/Retro_Dev
hxtk · a month ago
It’s surprising to me how much people seem to want async in low level languages. Async is very nice in Go, but the reason I reach for a language like Zig is to explicitly control those things. I’m happily writing a Zig project right now using libxev as my io_uring abstraction.
xnoreq · a month ago
Huh? Golang doesn't have async?!
xnoreq commented on The Polyglot NixOS   x86.lol/generic/2025/12/1... · Posted by u/todsacerdoti
rowanG077 · 3 months ago
This has been my experience as well. Before I switched to NixOS I used ubuntu for 2 years. I never grokked the ways of apt and how or why it would "randomly" brick my system in some way. With NixOS this has never happened. `nix-shell` is dead simple, adding packages to environment is dead simple, never has it bricked my system. The hard part of NixOS is if you want to do advanced things with the actual nix language, and of course the horrible error messages.

In terms of all the linux systems I have used, NixOS seemed to least magical to me in terms of what is happening under the hood.

xnoreq · 3 months ago
What?! Insane take. NixOS is where the most "magic" happens, over and under the hood. It brings it's own language!

Simple package based distros like Arch basically just extract archives. Very few packages trigger post-install steps which usually just (re)generate something like initrd.

Afaik, bricking Ubuntu is either due to user error (e.g. mixing incompatible package sources) or the devs released broken/buggy packages...

xnoreq commented on A million ways to die from a data race in Go   gaultier.github.io/blog/a... · Posted by u/ingve
ascendantlogic · 4 months ago
> "Go is often touted for its ease to write highly concurrent programs. However, it is also mind-boggling how many ways Go happily gives us developers to shoot ourselves in the foot."

In my career I've found that if languages don't allow developers to shoot themselves (and everyone else) in the foot they're labelled toy languages or at the very least "too restrictive". But the moment you're given real power someone pulls the metaphorical trigger, blows their metaphorical foot off and then starts writing blog posts about how dangerous it is.

xnoreq · 4 months ago
Though a good language would point out that what the junior (or in some cases even senior) dev is holding in their hand is in fact a gun and not a gun disguised and marketed as this nice and easy to use toy, which is especially true for Go.

One must keep in mind that devs manage to implement even flawed logic that is directly reflected by the code. I'd rather not give them a non-thread safe language that provides a two letter keyword to start a concurrent thread in the same address space. Insane language design.

xnoreq commented on Type 2 diabetes rates in US youth rose 62% after Covid pandemic began   cidrap.umn.edu/covid-19/t... · Posted by u/belltaco
xnoreq · 2 years ago
Huh, I used the extra time I had during Covid to educate myself on health, nutrition, exercise. I lost 15 kg, reached my target BMI and have been replacing fat with muscle since.

I am the healthiest I've ever been in my adult life thanks to Covid.

xnoreq commented on Type 2 diabetes rates in US youth rose 62% after Covid pandemic began   cidrap.umn.edu/covid-19/t... · Posted by u/belltaco
xnoreq · 2 years ago
Sure, we can. You're wrong.
xnoreq commented on Error Handling Patterns   andreabergia.com/blog/202... · Posted by u/andreabergia
gpderetta · 3 years ago
Obviously sum types for errors are vastly superior to exceptions. Compare the following very readable Error variant pseudocode:

    fn doSomethingFallibly() -> SameVal | Error
       SomeVal x = ...;
       if failed:
          return Error
       else 
          return x

    fn doTheThing() -> void
       match doSomethingFallibly():
          SomeVal x: /* use x */ 
          Error: /* log the error */
To the utterly unreadable exception-based implementation:

    fn doSomethingFallibly() -> SameVal, except Error
       SomeVal x = ...;
       if failed:
          raise Error
       else 
          return x

    fn doTheThing() -> void
       try Someval x = doSomethingFallibly()
          /* use x */ 
       except Error: /* log the error */
This is especially egregious if you want to propagate the error. For the error variant case you can use a beautiful monadic solution

    fn doTheThing() -> void|Error
       SomeVal x <- doSomethingFallibly()?
While the exception based variant completely obscures the control flow:

    fn doTheThing() -> void, raises Error
       SomeVal x = try doSomethingFallibly()

xnoreq · 3 years ago
The issue is that in many programming languages that offer exceptions, exceptions are misused to handle common and unexceptional non-success cases. I think that is because it is hard to draw a sharp line between the two.

Java already went in the right direction with distinguishing errors from exceptions and having "checked" (that you cannot ignore) exceptions, but the implementation of those concepts sucks. Also, generics, which allow the implementation of "sum types", came later and so sum types were never established as the way to do error handling.

xnoreq commented on Why thinking hard makes us feel tired   nature.com/articles/d4158... · Posted by u/rntn
Brybry · 4 years ago
Just a note that there are common conditions like postprandial hypotension[1] (or various other types of hypotension) where what you want is more, smaller meals.

The way a doctor explained it to me is blood rushes to the digestive system after we eat and, while normally bodies compensate for that via increased blood pressure (vasoconstriction and heart rate increase), for some people that process doesn't work well and they get a blood pressure drop instead.

[1] https://academic.oup.com/biomedgerontology/article/60/10/126...

xnoreq · 4 years ago
Good point. To me it doesn't really matter if I do 2 large meals or 5 small ones. With the "constant eating" I meant the duration and not the frequency.
xnoreq commented on Why thinking hard makes us feel tired   nature.com/articles/d4158... · Posted by u/rntn
shreyshnaccount · 4 years ago
I get sleepy when I eat
xnoreq · 4 years ago
I once had the same problem. That usually means unhealthy diet and constant eating and lack of exercise that all result in huge insulin spikes and insulin resistance.

Try 16/8 intermittent fasting and a healthier, more balanced diet and walking for a few minutes after meals and you will feel like a new person. After meals you will feel energized and awake.

xnoreq commented on Why does anything exist?   alwaysasking.com/why-does... · Posted by u/ZacnyLos
User23 · 4 years ago
> Statistically, one could make the argument that there are infinite possibilities of A(nything) and just one of N(othing), so the odds are stacked infinitely high against nothingness.

This reminds me of the classic joke that all probabilities are 50/50. Either a thing happens or it doesn't.

xnoreq · 4 years ago
In frequentist statistics it's either 1 or 0 after the experiment (dice roll, card flip or universe creation). Either it happened or it didn't.

u/xnoreq

KarmaCake day21February 24, 2022View Original