Hacker Newsnew | past | comments | ask | show | jobs | submit | teo_zero's commentslogin

You shouldn't take a sci-fi writer's words as a prophecy. Especially when he's using an ingenious gimmick to justify his job. I mean, we know that it's impossible for anyone to tell how the world will be like after the singularity, by the very definition of singularity. Therefore Herbert had to devise a ploy to plausibly explain why the singularity hadn't happened in his universe.

I agree with the fact that fiction isn't prophetic, but it can definitely be a societal-wide warning shot. On a personal level, it's not that far-fetched to read a piece of fiction that challenges one's perception on many levels, and as a result changes the behavior of the person itself.

Fiction should not be trivialized and shun because it's fiction, and should be judged by its contents and message. To paraphrase a video game quote from Metaphor; Re-Fantazio: "Fantasy is not just fiction".


I like the idea that Frank Herbert’s job was at risk and that’s why he had to write about the Butlerian Jihad because it kind of sounds like on the other side you have Ray Kurzweil, who does not have to justify his job for some reason.

Does seem funny to think of sci fi writers as being particularly concerned about justifying their jobs.

If only we could look into the future to see who is right and which future is better so we could stop wasting our time on pointless doomerism debate. Though I guess that would come with its own problems.

Hey, wait...


I agree on the former two (std::string and smart pointers) because they can't be nicely implemented without some help from the language itself.

The latter two (hash maps and vectors), though, are just compound data types that can be built on top of standard C. All it would need is to agree on a new common library, more modern than the one designed in the 70s.


I think a vec is important for the same reason a string is… because being able to properly get the length, and standardized ways to push/pop from them that don’t require manual bounds checking and calls to realloc.

Hash maps are mostly only important because everyone ought to standardize on a way of hashing keys.

But I suppose they can both be “bring your own”… to me it’s more that these types are so fundamental and so “table stakes” that having one base implementation of them guaranteed by the language’s standard lib is important.


why not std::string?

You can surely create a std::string-like type in C, call it "newstring", and write functions that accept and return newstrings, and re-implement the whole standard library to work with newstrings, from printf() onwards. But you'll never have the comfort of newstring literals. The nice syntax with quotes is tied to zero-terminated strings. Of course you can litter your code with preprocessor macros, but it's inelegant and brittle.

Because C wants to run on bare metal, an allocating type like C++ std::string (or Rust's String) isn't affordable for what you mean here.

I think you want the string slice reference type, what C++ called std::string_view and Rust calls &str. This type is just two facts about some text, where it is in memory and how long it is (or equivalently where it ends, storing the length is often in practice slightly faster in real machines so if you're making a new one do that)

In C++ this is maybe non-obvious because it took until 2020 for C++ to get this type - WG21 are crazy, but this is the type you actually want as a fundamental, not an allocating type like std::string.

Alternatively, if you're not yet ready to accept that all text should use UTF-8 encoding, -- and maybe C isn't ready for that yet - you don't want this type you just want byte slice references, Rust's &[u8] or C++ std::span<char>



If only WG14 added something similar to C.

Yes, SDS exists, however vocabulary types are quite relevant for adoption at scale.


It's a class, so it doesn't work in C.

Sure, but you can have a similar string abstraction in C. What would you miss? The overloaded operators?

Automatic memory accounting — construct/copy/destruct. You can't abstract these in C. You always have to call i_copied_the_string(&string) after copying the string and you always have to call the_string_is_out_of_scope_now(&string) just before it goes out of scope

This seems orthogonal to std::string. People who pick C do not want automatic memory management, but might want better strings.

Automatic memory management is literally what makes them better

For many string operations such as appending, inserting, overwriting etc. the memory management can be made automatic as well in C, and I think this is the main advantage. Just automatic free at scope end does not work (without extensions).

You can make strings (or bignums or matrices) more convenient than the C default but you can never make them as convenient as ints, while in C++ you can.

Yes, but I do not think this is a good thing. A programming language has to fulfill many requirements, and convenience for the programmer is not the most important.

Empirically it is. All the most used languages are the most convenient ones.

It would be interesting to understand what non-toy programs can be coded in this subset of C. For example, could tcc be rewritten in this dialect?

> how long is it before you can't print a replacement part for something you bought because it looks too similar to an OEM part and the manufacturer doesn't think you should be able to do that so they throw a little money to the right politician

At least 25 years. That's the time passed since the first introduction of Eurion marks on banknotes. As far as I know, noone has used it to block reproduction of anything other than money.


When I was in college I wrote a computer program (yes, involving yellow text) that couldn't be photocopied because I put the "o"s in the right place to trigger the eurion-finding algorithm. People thought it was neat.

That isn't true though, coupons, boarding passes, and even confidential documents use Eurion marks. It's not everywhere because it isn't worthwhile going through the hassle of getting printers that can print them; while 3D printing OEM parts would be much more valuable.

Who issues Eurion-marked boarding passes?

That strikes me as extremely counterproductive given the actually sensitive part of a BP is an (outside of the US) unsigned, semi-publicly-documented barcode.


It would be extra counterproductive since you can print your own boarding pass.

When flying with easyJet, we can just print boarding passes using any old printer. As long as the number matches up, no security is required.

Lots non-currency of documents around the world with EURion marks. If you're a secure printing shop and your business model primarily revolves around impressing your clients with long lists of document security features, it'd be malpractice to not implement this kind of padding.

EURion marks are a feature you must include on your banknote for it to even be considered real. And it's _one_ feature. It's relatively trivial to make a chip which can detect their presence.

On the other hand, if I need a replacement part for something, it's unlikely I will find the manufacturer giving me models for it. And if a manufacturer is giving me models for it, they probably do so with the explicit expectation that I might end up using them to manufacture a replacement.

In most cases either me or some other volunteer will need to measure the existing part, write down all the critical measurements, and then design a new part from scratch in CAD.

Even if somehow you are able to fingerprint on those critical measurements, that's just _one_ part.

The only way this kind of nonsense law could work is if you mandate that 3D printers must not accept commands from an untrusted source (signature verification) and then you must have software which uses a database to check for such critical measurements, ideally _before_ slicing.

Except that still doesn't work because I can always post-process a part to fit.

And it doesn't work even more because the software will need to contain a signing key. Unless the signing key is on a remote server somewhere to which you must send your model for validation.

This is never going to work, or scale.

There are even more hurdles... I can design and build a 3D printer from scratch and manufacture it using non-CNC machined parts at home. A working, high quality 3D printer.

Where are you going to force me to put the locks? Are you going to require me to show my ID when buying stepper motors and stepper motor drivers?

What about other kinds of manufacturing (that these laws, at least the Washington State ones, also cover)?

Will you ban old hardware?

What about a milling machine? Are you going to ban non-CNC mills?

These are the most ignorant laws made by the most ignorant people. The easiest way to ban people from manufacturing their own guns is to ban manufacture of your own guns. But again, this is a complete non-issue in the US where you can probably get a gun illegally more easily than you can 3D print something half as reliable.


> This is never going to work, or scale

Neither does DRM, really, but it certainly causes a great deal of inconvenience, and is upheld by the legal system.


But that's the point. DRM works at all (in terms of causing inconvenience, not preventing copying, for that it will never work of course) because the people producing the data have an interest in applying the DRM.

But the people producing 3D printable gun parts are _not_ interested in applying the DRM.

If you want to draw an analogy to media, this is more like if the government mandated porn detection software on your computer which would prevent porn from being able to be displayed on your screen. Or mandating HDCP between your monitor and your computer so that your computer could implement restrictions on what you could view on the monitor.

Except that computers are extremely difficult to DIY from basic components (I mean raw chips and metal). Meanwhile I can literally buy aluminium extrusions, or even bits of wood, some stepper motors, some gears, some belts, some pulleys and some stepper drivers, an STM32 devboard and get PCBWay to make me a simple PCB, or just use a prototyping board. And at the end of it, I would have a high quality (maybe a bit slow) 3D printer. I can tell you with absolute certainty that it could print gun parts because I have personally taken a trash-tier prusa i3 mk2 clone and turned it into a machine which could probably rival the mk3 at least.

How exactly are they planning on stopping me from designing a part, slicing it, and then putting it on a DIY 3D printer?

They could maybe achieve this by restricting the sale of certain components such as hot-ends, extruder gears (although you can get away with generic gears), or stepper motors and stepper motor drivers. I just don't see it happening. Maybe they could ban open source slicers and CAD programs?

But I guess I better start stocking up on high quality stepper motors and stepper motor drivers and buy a milling machine and a lathe so I can manufacture the other parts myself. You never know when the UK government will steal another wonderful authoritarian idea from another country.


As an European I'd say any USAnite can almost get a gun with breakfast cereal boxes. But weapons' culture in the US it's obsolete. Militias can't do shit against tyranical govs because once they send drones it's game over.

> But weapons' culture in the US it's obsolete. Militias can't do shit against tyranical govs because once they send drones it's game over.

Pretty sure those 50 thousand or so civilians killed on the street in the recent Iranian protests/riots would have been a lot less, if all those Iranians had easy access to guns, and not just the government.

Drones are not enough, you still need boots on the ground for you to claim control over a territory, and boots on the ground think twice about signing up for service if that includes facing armed mobs with guns on a daily basis.

So no, mobs with guns are not obsolete.


Mob with guns would be useless against the Iranian Guards which are pretty much elite commandos.

Goat herders with guns in Afghanistan kicked the U.S. army out of their country.

This isn't really accurate. The Northern Alliance entered into an agreement with the US to secure the country. An insurgency sprang up and we fought it for 20 years before giving up. Since this is now after the fact, we can safely say the Taliban ran the insurgency the whole time.

The Taliban are a military and political group compromised of an ethnic minority in Afghanistan. It's not even that the US lost to "goat herders with guns". We failed to secure a small country against a well organized, armed minority.


No. Pakistan supported an insurgency group for 20 years.

No insurgency like that can exist without foreign support in some form, usually from governments but it can be from resource export.

And the reality is nobody has ever defeated a foreign sponsored insurgency. Some have ended because the sponsor quit sponsoring them, but that is not the same thing as defeated.


I don't really think it's news that the Taliban are sponsored by Pakistan. We've known that longer than I've been alive.

The point is we were actually fighting Pakistan.

Nobody has ever defeated a foreign-funded insurgency, other than by the funding going away. It's no surprise we didn't accomplish what nobody else has, either.


Afghanistan is a landlocked country on the other side of the planet, the soldiers didn't grow up with knowledge of the terrain, they had no knowledge of the language, culture, customs or social networks, no one locally (with few exceptions) wanted them there, and crucially they only lost once they left, and when they left, there were no penalties for the people who started the war; no US politicians were in any danger whether the war was won or lost, no land was lost, and no truly important geopolitical goals failed.

On the flip side in any domestic insurrection, the soldiers know the terrain, language, customs and culture of the people, the supply lines are nothing (rather than having to airlift materiel and people thousands of miles, you drive them on regular roads), the infrastructure supports espionage, most people support the regime and will collaborate to return to stability (since they voted for it), the regime never leaves (you can leave Afghanistan, you can't leave your own country or it ceases to be a country), and if you lose, you lose territory and/or politicians run the risk of violence. The stakes are why these comparisons are never relevant.


But at the same time a domestic insurrection means your enemies have direct access to all of your most important infrastructure and logistics and supporting economy. It might be expensive to fly or float materials and people over to the middle east, but you don't gotta worry about 1000+ miles of pissed off insurgents potentially around every bend and tree or mixed into your own military or logistic personnel.

First the russians tried. They were not goat herders. They failed.

Then the americans tried. They were not goat herders. They failed.

The pattern is clear.


To be fair, those "goat herders" were previously trained and armed by the US to fight Russian forces, so it's not quite an apples-to-apples comparison

But could they do the same to goat herders with bigger guns, drones, bombs, etc?

Pretty sure Iranians with 3D printed guns would not be able to kick their own army out of Iran.

What's the commando to civilian ratio in Iran?

Let's do some napkin math: Iran has about 94 million people. Iran's IRGC alone has a personnel count of 125.000 [1], of which about 2-5000 are estimated to be the elite of the elite ("Quds Force"). Together with the Basij (anywhere from 100-600k) that alone is a sufficient amount of force. And on top of that come maybe 400-500k of the regular Iranian Armed Forces [2], as well as about 260k active police+100k police reservists.

So, if one sees the whole of IRGC plus Basij as the "commandos", they alone form an active elite of about 0.5%, if one sees the entirety of the military+police we're looking at easily 2-3 million units, so up to 2%.

[1] https://en.wikipedia.org/wiki/Islamic_Revolutionary_Guard_Co...

[2] https://en.wikipedia.org/wiki/Islamic_Republic_of_Iran_Armed...


The Iranian guards, along with most of the armies in the second and third tier powers don't have elite anything. Please see Desert Storm, etc. Most of them ran. The ones that didn't were destroyed.

It’s not obsolete. In a country where your military is farm boys, the important thing is being able to start the war. Eventually chunks of the military will defect. We saw this happen during the Bangladesh independence movement. The revolutionaries got lucky and knocked over a weapons depot early in the conflict. They started fighting and a large number of the Pakistani army that was of Bangladeshi ancestry defected. I am confident the same thing would happen if the government in DC tried to oppress Iowa or Texas.

Drones cut both ways. You’re correct that it allows a small number of people loyal to the regime to asymmetrically oppress a large population. But drone technology is in theory accessible to the populace in an industrialized country.


The 2A crowd has been really quiet this past year. Hell, Trump even said in response to the Pretti shooting that only criminals walk around carrying guns in public. I guess no one cares about government tyranny unless they're asked to respect someone's pronouns.

Why would the 2A people say anything? Conservatives aren’t libertarians. They think government has legitimate functions and draw a distinction between government performing those functions (which isn’t tyranny) and the government exceeding its scope (which is tyranny). Removing foreigners here illegally is a core function of the government. Social engineering is not.

> Why would the 2A people say anything

Because Trump is very anti 2A.


He’s a Clinton Democrat so that tracks.

> Hell, Trump even said in response to the Pretti shooting that only criminals walk around carrying guns in public.

If you were paying any attention at all, you'd see pretty much every 2A community, advocate and lobbying group was outraged by that statement and made statements against it.

Having said that, it is actually illegal to carry a firearm to go commit crimes like destroying government property, assaulting federal officers and obstructing them in carrying out their constitutional duties.


> illegal to carry a firearm to go commit crimes

Of which Pretti did zero of.


There is video of him kicking light the tail light of a federal law enforcement vehicle, which is definitely a crime. And that’s just what we have video of.

We have video from both sides of the door of a stack of ICE agents with AR15s breaking down a door to a daycare without a warrant.

We have video of at least three ICE agents executing people in the street with testimony that contradicts what we see with our eyes.


An illegal immigrant fled a traffic stop and went into a daycare: https://www.dhs.gov/news/2025/11/05/dhs-sets-record-straight...

Pursuit is an exception to the warrant requirement, according to a 1976 Supreme Court case: https://www.law.cornell.edu/wex/hot_pursuit


That same video shows him spitting on an officer.

Drones may be good against foreign adversaries, but you can't bomb your own population and cities into being productive economy. A war between two well funded and supported militaries is far different than an insurgency.

1) That's a mischaracterization of the FFL purchase process if I've ever heard one.

2) The weapons culture of the US is so obsolete that there are government officials parroting lines about it not being legal to carry a concealed weapon during a protest in Minnesota when it is, actually, very much legal. That is to say, it's not obsolete at all. Given the prior public stances of the Trump administration on firearms, this is incredibly telling, and all the more reason why you can't trust people like them.


Those drones lost some wars against guerilla militias

Well, at birth every American is issued Baby's First Glock™

Actually I tried to use it just for fun on some vouchers, but it didn't work on the copy machines I tried. They just happily photocopied the vouchers.

Tried the same, doesn't do anything on my scanner. Interestingly, there are regions of banknotes my scanner refuses to scan. But had no time to investigate further.

Some more tests on this old page: https://murdoch.is/projects/currency/ (2004)

Is this true? Couldn't I put the mark on a page of my book and photocopiers would still detect and refuse to copy that page?

Yes, absolutely. It's a pattern of five rings, well-documented although Omron appears to keep the exact details pretty tightly held.

They don't have to be exact circles, they just have to be some dots in about the right place. In the UK, the Bank of England issued notes with Elgar on them and the EURion constellation picked out in musical notes ;-)


No idea why this comment is getting downvoted so hard. This was exactly what I thought of too, and it provides a concrete answer to the question.

There’s valid concern with these types of laws and scope creep. But there’s also precedent which shows they can work and be applied reasonably.


Suuure buddy, we just need to throw away every gun and introduce new ones with special marks telling software not copy.

Go ahead, try that



> Asking for "no politics" is itself a strong political view

If this is true, I'd like to know what a weak political view is instead!


"I think taxes should be 2% higher"

I have doors between rooms in my house, despite its being inhabited by members of the same family who trust each other.

And when someone violates that trust, do you then tear the house down and build one with only external doors, requiring inhabitants to circle in the yard to move between rooms? The point of the Wayland security model is that the inhabitants of the house do not trust each other, and the architecture of the house must change to accommodate that.

I'm not impressed with the analogy. I am not confused about the goals of Wayland's security model. I am dismayed at the poor judgment elsewhere in computing that has led to its necessity.


And we could represent the addresses with hex numbers separated by : instead of decimal numbers separated by .


That’d be kinda inconvenient with respect to the port number syntax in URLs, though.


I heard there's some people working on a system that allows you to use names, but it seems to be very poorly designed and cause of a lot of outages.


That reminds me of the protagonist of Charles Stross's novel "Accelerando", a prolific inventor who is accused by the IRS to have caused millions of losses because he releases all his ideas in the public domain instead of profiting from them and paying taxes on such profits.


The shell might be POSIX, but sed uses a GNU extension -- namely, the double address "a,b".

EDIT: Sorry, I was wrong, the double address is indeed POSIX. I was thinking of the GNU syntax: a,+n


From the fine article:

Why shell?

Well, not really because it’s portable, as despite being a “POSIX script”, most of the date and sed tricks I do don’t work on the BSD versions of those commands, with comrak, additionally, being a dependency.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: