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

We get that Zig doesn't have memory safe features. How much of a big deal is that anyway - what proportion of issues are caused by memory safety errors? And as an aside - how many Rust codebases use unsafe code?

(I don't know the answers to these - I'm a humble C programmer who intends to look at Zig soon).


> The Chromium project finds that around 70% of our serious security bugs are memory safety problems.

https://www.chromium.org/Home/chromium-security/memory-safet...


Similar observation at MS: https://msrc-blog.microsoft.com/2019/07/16/a-proactive-appro...

> ~70% of the vulnerabilities Microsoft assigns a CVE each year continue to be memory safety issues

That’s actually an understatement, on the graph with this caption 70% is closer to the low ebb / minimum in a given year (2012, 2018). During “bad” years (2009, 2014) it climbs as high as 80.


It's worth noting when talking about how Zig isn't "memory safe" that comparisons to C aren't very illustrative because C almost goes out of its way to let the programmer shoot themselves in the foot. Zig was designed with a lot of features to prevent the kinds of errors C damn near encourages.


The US has significantly more cultural and economic cohesion than the EU, and there's a good chance it won't last my lifetime either.


Yes, the main issue in Europe is that we don’t have a shared language. From that stems less exposure to other countries politicians, press, politics, tv… which makes most cross-frontier social organizations impossible, slows cross pollination of cultures, etc.


We just got a common enemy in the EU the US only real enemy is itself.


That's an excellent point. The US is a prime example of a nation-state that is too good to last. Humans just can't take it.


>The least efficient part of any ship is turning mechanical energy into electrical

I think you meant "most".

The least efficient step is converting chemical energy into mechanical energy.

Given the cheapness of fuel oil and geneator sets, and the expense of batteries, what possible financial argument is there for doing this?


Fuel oil is an expensive way of generating electricity, which is why few on-land power plants use it.

This is all about utilizing efficient grid power (hydro, nuclear, gas, whatever) on a ship. By grid-intertie at the ship level, re-fit costs are minimized. Kinda like rooftop solar.


Fuel oil is a very cheap way of generating power, when you have several thousand tons of it already on your ship :)

The possible few percantage difference in efficiency between ship-based oil-powered generation, and land-based power generation, is more than wiped out by the storage and conversion losses of a battery-based system. It's also very expensive (and heavy). Why pay to fill a container with batteries, and then pay more to charge them, when you can be paid to carry a container of other stuff as cargo?


Crude oil is about 3% of global electricity production and continues falling. And the efficiency is particularly bad when you’re using it in a reciprocating engine (as on a ship) instead of a turbine (as on land). Natgas and coal are cheaper hydrocarbons.

https://data.worldbank.org/indicator/EG.ELC.PETR.ZS

Oil’s benefit is its density, storability and pumpability.

All I know is that a giant ship is the most cost-effective way to transport anything heavy by vehicle.

A few percent improved efficiency in exchange for losing a handful of container capacity on a ship carrying several thousand is a net positive. And cargo shipping is a tight business.

Battery storage and conversion losses are far less than the conversion losses from generating electricity from an ICE.


The primary issue with ships is you don’t get to recharge the batteries every night - so you need way more capacity than an equivalent application on land (even if ships are very efficient)


>Battery storage and conversion losses are far less than the conversion losses from generating electricity from an ICE.

No, they are not. Here's some research for large-scale battery storage systems:

https://www.osti.gov/servlets/purl/1409737 Rround-trip energy storage efficiency is reported as 70% - 80%. Any crappy genset will match that.

I really don't understand this idea for a "hybrid" ship. What size battery would you need, to power the electricals of a ship for a sea voyage? What is the payback period to the shipping company?


VED (Vehicle Exercise Duty), as it is currently known, is now based on emissions. It would be a hard sell to undo that, and base it on something else (like vehicle weight/size/etc). The most acceptable way to tax EVs at this point is probably taxing at the charging point.


Add an additional VED component for road damage, which is vehicle miles times the fourth power of axle load.


There isn't a way to do that without HGVs (heavy goods vehicles) paying practically all of the annual VED.

It's pretty clear that "smart chargers" will become "smart tax revenue generators" in the near future.


If this is typical sentiment from crypto users, then the maintainer has done the right thing. I too would not like to spend my spare time and energy supporting people who can't distinguish between "oppressing minorities" and "giving away my time to demanding internet strangers".

As you feel so strongly, I look forward to seeing what replacement for websockets you are able to create.


I am not a crypto user nor investor.

You certainly are dividing the world into us vs them and trying to fit me into a box because I dared disagree. That's exactly the intolerance I was talking about.


If by "us vs them" you mean, "those of us who support the right of crypto users to demand support and software for free vs those who support people's right to choose where they invest their efforts", then I'm in the latter category.

Would you have the same opinion if the maintainer announced they were going to stop working on requests originating from FB/Google/big bad mining corp/big bad animal testing corp/etc?


Ok, but you're still the one who said

> There is no difference to me between one that doesn't want to support crypto-related issues and one that doesn't want to support issues coming from a minority.

So whether you're a crypto user/investor is quite irrelevant to the point being made.

Also I didn't read it as telling you that you're a crypto user/investor, but more as a "crypto users/investors have this kind of mentality too".


How are those statements possibly true?

https://www.google.com/search?q=bitcoin+annual+energy+usage https://www.statista.com/statistics/580087/energy-use-of-fac...

Facebook uses 6% the amount of power, as all bitcoin miners.

The amount of power consumed by all of the cloud services we unknowingly use almost 24/7 is a hugely underappreciated problem, I will agree there.

>Education is failing a big time

Indeed.


If one is deep into the Bitcoin echo chamber, one could end up believing all sorts of things about bitcoin energy usage (in very extreme cases, they believe that bitcoin is a system of energy _storage_, though it's never made quite clear _how_). This level of confusion is fairly typical.


>Their existence is threatened by crypto adoption and open source permissionless banking infrastructure.

The only thing threatened by such things is the amount of time and money that devotees pour into them.


While we're picking random data points - Malillia (Sweden), at 57° N, set a record temperature of 38°C in 1947.


They are not random. Those are the two locations being discussed in the thread you replied to :)


Oh wow, that’s really interesting, was it just a freak event or part of a trend?


-> Hard to Say

That’s weird, some cursory searches show a definite upward trend for quite some time, i do find these weird sites where they consistently pick outliers in a dishonest manner. It really wouldn’t be worth engaging with them though


Trend. Check out the latest IPCC report for more info.


What is morally and ethically worse - eating an animal fed and raised domestically, or eating soy-laiden "plant-based" foods that were grown on recently-raized rainforest several thousand miles away?

It's our demand for goods that is causing this.


Most soybeans are used as animal fed. Also, the feeding animal 10KG to get 1KG looks rather wasteful? Lastly, you missed the methane pollution, water usage, ethics etc..

https://en.wikipedia.org/wiki/Feed_conversion_ratio


I'm fully aware of that, which is why I said "domestically FED and raised".

>Also, the feeding animal 10KG to get 1KG looks rather wasteful?

Depends heavily on what animal product you are producing. Obviously we won't be eating beef all the time. It also depends on what kind of farmland you have available, and what uses those crops have.

Where I am (Wales, UK), the combination of the farmer' lobby and the "Welsh culture and heritage" lobby has meant that largely unprofitable sheep farming has been subsidised, and what should be productive wooded hillside makes lamb that no-one wants. I'm not saying that raising animals is always the best use of land.


Domestically fed and raised doesn't work in real world. There are so many people to feed.


Pretty clearly you would have to radically re-think how much animal produce you would get to eat. Also - countries like The Netherlands have a strong tradition of backyard chickens to suppliment a household's diet.


Many of the domestically raised animals still eat imported soybeans.


How many of the animals that are

>"Domestically FED and raised"

??


I have worked very hard to stop my addiction to Youtube. I watched a lot of "lifestyle instructional" videos (ToT, Ave, Fireball Tools, LPL, Tom Lipton, Matt's Recovery, etc), but after you've had your "inspiration moment" with these, you're not learning much and are essentially spending your life watching someone else's.

That brings me on to my second point - video is a HORRIBLE format for most forms of instruction (for me). Practically every time I decide to try watching one to learn something, it could easily have been communicated in text form. Coding is a great example - I really hate having to skip through a 10-minute video that boils down to a single screen's worth of basic code.

Saying that, I've saved myself a bunch of money watching youtubers who very generously give away their time and experience for free to show me how to disassemble and re-assemble electronics and cars.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: