News for hackers. Stuff that matters.

spaethnl

Re:Effect 4.0 on Friday October 02, 2026 @07:15PM (#49939752)
The type soft-enforces₁ it immediately for everyone though.

Without the type there are a few possibilities: 1. I could forget the assertion and have buggy code without realizing. 2. I could ensure that all uses do the assertion. Even if we can statically know that it is empty. This costs us the check for every call of the function, and ends up being more code.

Alternatively I could statically know in advance. The code won't let me `Array.pop` because that is invalid, so:

  1. I *cannot* make that mistake
  2. It cost no runtime performance
  3. It cost no extra code in a function
1: I say soft-enforce because if someone were to pass a value incorrectly cast as NonEmpty, it would still have a runtime error, but that is a bug elsewhere, not here.
Re:Effect 4.0 on Friday October 02, 2026 @04:53PM (#49938489)
That 2nd one being a bug is exactly what the type system and NonEmpty types is designed to help prevent.
Re:Effect 4.0 on Friday October 02, 2026 @04:46PM (#49938411)
It isn't a case of wanting to implement the world to do this though.

Instead, it is a case of the active users of the library saying, "Wow, the Effect way of doing this is so much nicer, can we have everything this way please?"

Re:Effect 4.0 on Thursday October 01, 2026 @08:14PM (#49928492)
The types allow you to very narrowly define functions so that you can, for example, require that a NonEmptyArray be passed. This helps to fulfill that requirement without casts.
Re:Effect 4.0 on Thursday October 01, 2026 @08:13PM (#49928485)
This is super useful though. It allows you to swap out implementations for things like logging and monitoring. Not sure what the confusion is here.
How is that LVT "rent" different from any other traditional property tax being "rent"?

As near as I can tell, it is just a different way of deciding how the property tax burden is levied.

Downtown property gets taxed much more. Un-developed speculation property that doesn't contribute to the community (and derives value from other people's contributions) get taxed at the same rate as nearby developed property.

Re:U.S. Pauses All Military Aid to Ukraine on Wednesday March 05, 2025 @12:28AM (#43263199)
What you are saying is Russian propaganda.

Nearly every country that has been attacked has forced conscription. The US did during WW1, WW2, Korea, Vietnam, and we weren't even attacked in 3 of those.

Were we authoritarian then?

Re:US pauses all Federal aid and grants on Tuesday January 28, 2025 @04:07PM (#42858021)
Out of curiosity, what cost do you believe that you currently personally bear for this?
Before the node-size race we also had the clock-speed race. Eventually it was common for processors reach 2-4ghz, and after that the clock speed gains stopped being practical because as you increase clock speed you also increase energy requirements and heat.

I think the implication is that clock-speed could start increasing again. It would probably require a completely new manufacturing process, but if we assume this superconductor is legit, perhaps an older process could manufacture it.

If so, maybe we could have (just spitballing here, I have no idea) 28nm super conducting CPUs that run at a 1thz instead of 4ghz. That would be quite an improvement over today's CPUs, even with fewer transistors, I think.

There are other losses and limitation in increasing clock-speeds aside from just resistive losses, but I think they are a significant part of the current bottleneck. Other losses involve transistor switching losses, and inductive losses but I don't really know the details, and I think those details change with superconductors.

Re:Cerebras-GPT vs. LLaMA AI Model Performance Comparison on Wednesday March 29, 2023 @09:02PM (#35366298)
I suspect it does matter because the inability to understand arithmetic likely effects higher level learning. For example, If you want it to learn statistics, it likely needs a good understanding of arithmetic.

All tasks that rely on it will perform worse than expected.

Re:Character.ai on Thursday September 29, 2022 @02:16PM (#33024932)
I tried making a couple characters, and this whole thing is extremely impressive.

First I made a rabbit that lives in my backyard. It was able to talk about the neighborhood animals and its activities. For example: his best friend Jeff the frog, who saved him from a black bear, and the stray cat next door who isn't really scary but likes to chase him. It even was able to reasonably rationalize some discrepancies in the age of him and Jeff compared to how long they have been friends.

Those are details I discovered through a normal conversation.

Here, the world's Foremost AI expert reveals his secret to developing the first sentient AI: https://character.ai/p/OI21APtluUwUzYZHhTluzXUqtO8IvtQM56I_h...

(Hint: It was curiosity and motivation)

Re:The End of Snow Threatens to Upend 76M American Lives on Wednesday August 03, 2022 @04:20PM (#32336261)
Who is "they"?

You dismiss the "strongtowns" argument as if there is some consensus that it has been debunked, but I don't think there is such a consensus, so you'd need to support that claim.

Further, the worst case is not that property taxes increase, it is that other people, usually less fortunate, end up subsidizing them further through federal, state, and county funds, rather than their own local taxes.

Sure, but that isn't what we're talking about.

The comment that this thread branched off of is about the relative difference in danger of 10mph with a modern vehicle, not 20, 30, or 40mph. I don't think I agree with that user's overall point, but I also didn't think your response to it was particularly on point either.

I think our transportation infrastructure needs a massive overhaul to be more pedestrian, bike, and even motor-vehicle friendly, but I think speeds limits are such a poor answer to that problem that arguing about +10mph is merely a distraction.

There are typically two kinds of roads these speeds are reached in the US:

1. Expressways, where pedestrians and cyclists are not allowed. They are walled off with specific entrances and exits.

2. Country highways, where pedestrians and cyclists are nearly unheard of, and are typically very easy to spot from a distance and adjust accordingly.

There is a third area where these speeds are sometimes reached in urban areas that Strong Towns calls "stroads", and these have a whole host of problems. Going 10mph over the speed limit in these areas probably doesn't make a huge difference, because the are already so pedestrian and cyclist unfriendly to begin with. Not Just Bikes has a great video about them here: https://www.youtube.com/watch?v=ORzNZUeUHAM

Re:We can do better than “same, but electric” on Tuesday March 29, 2022 @07:06PM (#30849474)
I don't see the rhetoric you are talking about used by mainstream climate change activists; I see reasonable changes:

1) Power most things with electricity instead of fossil fuels.

2) Generate electricity with sustainable technologies like solar, wind, geothermal. (There is division on nuclear power, but many still support that, too).

3) Reduce the amount of power wasted overall. Most people don't need huge trucks. Fewer people don't even need personal vehicles. Very few people are saying "Take away your choice", most people are saying, "stop subsidizing the bad choice, and make the public transport option at least an actual option by fixing the way we build cities".

This also extends to "stop subsidizing rural lifestyles" where people waste energy on driving 20 miles to the grocery store and back and every trip they make, and deliveries, and all of their infrastructure which has a much higher per-capita cost, while cities subsidize them. If people want to live there fine, but make them pay for it, or at least make those costs more transparent.

In other words, subsidize for the public good (environmentally sustainable things) instead of the externalized costs (environmentally disastrous things), and let the market drive consumer choice.

In most cases, really, it comes down to: STOP subsidizing bad behavior and things will probably get a lot better. That is what I think most experts expect.

Re:We can do better than “same, but electric” on Tuesday March 29, 2022 @06:46PM (#30849312)
I think you are right: A city government or business wouldn't do this because they would have to take on the entire cost themselves because they don't have any control over the other end of the more global balance sheet: the rural and suburban areas.

A state-level entity could mandate it as part of construction code for 2 reasons:

1) Even the higher construction-cost apartments would be more financially solvent over the long-run than continuing to subsidize the alternative rural or suburban lifestyles.

2) Having nicer attractive apartment lifestyles would entice more people to move to more sustainable urban areas rather than the environmentally and economically unsustainable rural and suburban areas.

Re:We can do better than “same, but electric” on Tuesday March 29, 2022 @06:30PM (#30849190)
I think it would be great if that subsidization came in the form a universal FoodStamps only spendable on nationally produced strategic goods.

This would make subsidization more transparent to the general public, while also enabling free-market competition and innovation rather than free-money stagnation.

This project is actually on my near-term TODO list. I've been planning on implementing it as a recipe site where every ingredient is a recipe itself.
Re:New WebKit features in Safari 15.4 on Monday March 14, 2022 @08:39PM (#30680394)
Apple could implement this with a default of "automatically decline all", allowing users to only manually opt-in when they feel the need without ever seeing a prompt.

If you mean html/css prompts rather than actual browser prompts: they already do that.

Re:The Unreasonable Math of Type 1 Diabetes on Thursday February 17, 2022 @06:53PM (#30380423)
Yeah, I have been looking forward to that for a while. I'm hoping that if their app isn't flexible enough to do menu-based dosing that it will be possible to side-load my own app to do that dosing.

As an aside, the OmniPod 5 was just released and already has App control[1]. The tubeless aspect of that is very attractive.

[1] https://www.healthline.com/diabetesmine/omnipod-5-tubeless-s...

Re:The Unreasonable Math of Type 1 Diabetes on Thursday February 17, 2022 @04:00PM (#30378603)
I think this article does a great job covering many of the difficulties of T1D.

One component I think was under-emphasized is the fact that correction insulin doses are not based on what your current blood glucose(BG) levels are, but on where you predict they will be when the dose really starts taking effect.

Take for example a current best case scenario of having a Loop system via a continuous glucose monitor (CGM) and pump:

If you took a reasonable guess dose for a meal then check your BG levels after the meal, you may find that you have a steeply inclining graph. Here are two possible cases:

  A. You took a correct dose and the timings are slightly out of sync, but BG will eventually turn around.

  B. You under-dosed and will need to either take a correction dose, or wait a long time for the basal dose to fix it.
It can at times be very difficult to distinguish between A and B, and guessing wrong has consequences. Futhermore, you won't really know which is the case until sometime later.

If you are wrong about A then you did nothing, but really you needed to take an correction dose. You won't find out you were wrong for a while, in the meantime your BG is sky-rocketing.

If you are wrong about B: then you over-dosed and are running low. How much did you over-dose? How many carbs should you consume to correct?

Because your CGM only updates every 5 minutes, and typical rapid acting insulin takes about 20 minutes to really get going, this cycle can play out every 25 minutes or so until you have stabilized your BG. all while you may have unhealthy BG levels, and you may be Yo-yo-ing.

This is very slightly mitigated by using an ultra-rapid insulin like Lyumjev, or Fiasp, which can get going in 15 minutes, giving you a tighter loop.

It would be very helpful if:

  1. ... CGM devices had options for more frequent updates during highs and lows. Tighter feedback loops could go a long way.

  2. ... pumps could dose insulin and glucagon automatically.

  3. ... there were even faster acting insulins. This is tough because most insulins are injected interstitially, which takes time for your body to absorb. Maybe an out-patient implantable pump that could inject intravenously would help?

  4. ... there were BETTER INSULIN PUMP SOFTWARE for calculating doses. I have a Tandem T:Slim x2. I  can tell it how many carbs I am eating. Only that. It doesn't count or learn from: proteins, fats, what kinds of carbs, or what specific ingredients are there, or their ratios. All of this can dramatically effect how quickly your BG rises, bringing you back to the original problem of guessing. It should be possible to select from a database of commercially available food and manually provided recipes.
Re:Math Problems for children from 5 to 15 (2004) [pdf] on Monday July 19, 2021 @04:09PM (#27886761)
I (genuinely) wonder how much that is attributable to having no actual use for other math, vs

1. not having been taught math early enough for it to be second nature

2. not having been taught useful every day applications of the math so as to keep practicing it

I've also forgotten quite a bit of math, but I also frequently encounter scenarios where I acknowledge that having a better handle on it would be advantageous to myself or others. For example, a better understanding of statistics and probability would certainly help political discourse in our society.

Re:AMD Van Gogh Ultra-Low Power Processors on Friday April 30, 2021 @10:25AM (#26993873)
Yes, I've been looking for something like that. I think there are two great under-explored use-cases for this:

1. Laptop ergonomics are really poor for taller people who need to hunch over to see a screen. Decoupling the screen from the compute unit would help here, while also enabling users to mix-and-match compute and display technologies, and upgrade them independently.

2. That same compute unit could also be paired with a VR headset, creating mobile VR not unlike what MagicLeap was doing with their compute units: https://www.roadtovr.com/wp-content/uploads/2018/07/magic-le...

When compared to something like the Quest 2, this would allow for a much more comfortable headset due to reduced weight and size, while providing a much more performant system.

Re:OpenStreetMap charts a controversial new direction on Saturday February 20, 2021 @11:02AM (#26205097)
I think the issue was that Pokemon Go used certain types of map elements as their Pokemon capture points, e.g., Landmarks, or something. People weren't adding "Pokemon capture points", they were adding non-existent Landmarks so that they could be imported to the game for their own advantage.
I think it would be easier, more reliable, and more energy efficient to wait for microled displays, which seem to be right around the corner.

I get the impression that they might be available by the end of the year or next year, and might be something Apple has access to?

Re:Rust is a hard way to make a web API on Friday January 15, 2021 @10:05PM (#25799633)
For a point of reference, which other languages have you learned?
None of us like the crazy number of prompts.

Most (all?) of us like to be the one who controls what we can do with our own devices.

These standards return some control to the user, rather than the corporation.

But then we get more prompts! Well, not necessarily. The user could choose to have all prompts automatically rejected, and only opt-in when they desired. This would not create more information for trackers to track, because Apple could make it the default for all of their devices.

This seems to solve the problem: People who want the features can have them, and the people who don't want them can ignore them without interruption.

This is where our problem with Apple is: there are solutions to be found but rather than solve them, Apple hides behind lies in order to protect their bottom line while harming many users and the internet as a whole.

When I was looking into this months ago I had the same concern. I've read about how common lisp packages tend to become "finished" and not updated after a while, but that doesn't intuitively make sense to me for a package like this that has an external moving target.

How much has JavaScript changed since the last update of ParenScript? How many new language features, that might add real benefit, are not accounted for?

Maybe the answer is that the new features are unnecessary to parenscript, I genuinely don't know, but it would be nice to at least see discussion/acknowledgment of this featured somewhere prominently.

Re:Simula: A VR window manager for Linux on Thursday April 09, 2020 @09:52PM (#22829161)
I'm not sure I agree with the parent, but to give an example for a non-rectangular UI for manipulating (programming) text: Combine structural editing[1] overlaid on some kind of 3d graph that shows how your entire codebase fits together.

[1] https://www.youtube.com/watch?v=CnbVCNIh1NA

Re:The 'folly' of buying a fixer-upper yacht on Friday December 27, 2019 @03:22PM (#21894245)
There is this, though expensive, and not in production: http://www.energy-observer.org/en/

Older »