Better HN
topnewbestaskshowjobs
Log inSign up

silvestrov

5,796 karma · joined Jan 4, 2009 (17y ago) · 1,153 submissions

silvestrov...at...fastmail.fm
Submissions

comment 1d ago · link · parent

A char is not the same as the basic type that is used for encoding strings.

E.g. in Java a char is 16 bit while strings are encoded as 8 bit or 16 bit. (If the string only contains Latin1 chars, it will use 8 bit encoding to save memory).

The char type should be what you use while looking at a single decoded character (e.g. when parsing text files), not how you encode it in a string.

comment 2d ago · link · parent

I think C and C++ always have suffered from wanting to support all kinds of weird architectures like 9 bit bytes and 80286 style segmented memory. So many people see this as a virtue rather than restricting the usefulness of C.

So char always means "byte" and never a real character. I don't think many C programs will work well if char is a 32 bit type so it supports full unicode.

int8_t came way too late and has a way too long name. It should be i8 or int8. There is a problem when C is more verbose than Java. Also: why did it take so long to get a boolean type and fix the "bools are ints" design mistake.

Lack of standard libraries and module system is just another layer of not wanting to standardize things.

comment 6d ago · link · parent

No, as other commenters has pointed out: if building takes many years to pay off and the companies expect that high demand will only exist for a couple of years, then it makes no economic sense to build more factories.

comment 6d ago · link · parent

No. From wikipedia: "A cartel is a group of independent market participants who collaborate with each other [...] by creating artificial shortages"

The total market demand of harddrives (and RAM) is higher than supply. So the companies do not need to create artificial shortages and they do not need to coordinate prices. Everybody can completely independently increase prices because they will still sell all their stock no matter that their prices are higher than the competition.

comment 1w ago · link · parent

The page does not link to the bug report.

It only links to a test page.

The test page has an <img> which use the x-xbitmap format.

This is what an x-xbitmap looks like (it really is a text format):

    #define not_width 9
    #define not_height 5
    static char not_bits[] = {
     0xff,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xfe};

I think it would be perfectly fine for Chrome to remove all support for such an image format.

And from this the poster concludes "bug report bankruptcy".

comment 1w ago · link · parent

I (for one) would definitely NOT want to see the faces of my colleagues in 4K.

lowres, please.

only 4K if the feed is from a full room with +10 people in it.

comment 2w ago · link · parent

Why?

Do they lose any significant number of customers? Do anybody in leadership get fired?

Do reading the twitter status updates give you the impression of an organization that takes responsibility seriously?

Or do it sound more like an organization that is optimized for evaporating responsibility?

I think this will change nothing.

comment 3w ago · link · parent

> The primary was being inspected

So in reality you didn't have two systems.

otherwise you would have shut down operations until you had another connection live, so you had 2 online connections.

comment 3w ago · link · parent

> Journalists should be akin to scientists and researcher: specialized in their field

That would require them to actually have studied that field in university in a masters degree (or PhD) like researchers have.

Very few journalists have. Some journalists are good, many are talking heads.

comment 1mo ago · link · parent

> on some 50K lines of code

also some 3rd party libraries are overdesigned/overcomplicated because everybody wants the library to do everything for everybody.

This overcomplication can easily introduce security problems that is not present in the 1K solution.

comment 1mo ago · link · parent

But eMudhra wanted to (was required to) export the keys.

So using an HSM in the first place is a security theater. Or that this HSM isn't really an HSM since it allows for export of the private key.

The trusted enclave in a MacBook is more secure than this HSM.

comment 1mo ago · link · parent

Even just a human glancing at the private key should do it.

Don't they even test script changes on a staging server? How could there be such a script error in production that was not caught in testing/staging?

This sounds very like a fundamental organization error, not an innocent whoopsie. It should lead to a permanent ban of the organization.

comment 1mo ago · link · parent

date pickers are something that quickly gets overly complex and site specific.

They are only simple when you have no restrictions on which dates that can be selected.

But a date picker for a hotel, airplane travel, restaurant, ... might have to show some days as disabled or some days that are "cheap offer" dates.

To this add anything that needs to select an interval, like an airplane return ticket.

comment 1mo ago · link · parent

An interesting fact is that China has passed "peak coal" in 2024 while still growing with about 5% in a year.

Denmark had peak coal early (2003) due to early investments in wind power. Coal is now practically gone.

We might see China get the same shift in electricity source as Denmark had over the past 20 years, just much faster.

comment 1mo ago · link · parent

I think the major reason the Nokia engineers didn't jump ship to Apple/Google is that they did not want to move to another country.

The article is written like it assumes the Nokia HQ was next door to Apple/Google.

There is another type of insider trading: If an engineer had stayed at Nokia but bought a lot of shares in Apple after Apple launched the iPhone, would that still be considered insider trading when the engineer did not have any non-public information about Apple, only in which way the general market was moving?

A lot of people laughed at smart phones in 2007-2010, the market majority did not value them and did not predict Apple's stock would grow.

comment 1mo ago · link · parent

> new folder on my Mac, and after appointments I’d dictate what happened and what the doctor said

I cannot recommend this enough, including writing down almost every day about symptoms and progress. I didn't have cancer, something else, but it was very valuable to be able to go back and see exactly how long time a symptom has been present and when it disappeared.

Doctors also seem to react well to being able to be precise in descriptions of what happened when.

comment 2mo ago · link · parent

Personally I don't think this reduction in size is big enough compared to making all css names unreadable and thus very difficult to debug.

It also makes it much more difficult to create personal browser extensions as all css names are now unreadable.

comment 2mo ago · link · parent

Denmark never denied an approval, so it has no meaningful difference.

At one point the US had 17 small bases in Greenland. Almost all have been abandoned by the USA on its own initiative.

Look at this map: https://www.researchgate.net/figure/Former-US-air-bases-in-G...

Today there is only the small Thule/Pituffik base.

The US has closed the bases because they make no sense with modern military and satellites.

comment 3mo ago · link · parent

This is a good live map of how Europe is partitioned into zones and what their prices are. Right now you can see a large price difference between Sweden and Denmark and also with Norway.

Britain is often suffering high prices, likely due to lack of capacity in connections with the mainland EU.

https://app.electricitymaps.com/map/zone/DK-DK2/live/fifteen...

comment 3mo ago · link · parent

Commodore 64 in 1982 cost US$595 ($2,059 today).

ZX Spectrum in 1982 cost $200 ($692 today) for 16 KB model and had a 48K model for 40% more.

It was the difference between affordable and unaffordable for many people.

comment 3mo ago · link · parent

Very limited: as soon as you have cleared a notification it is gone forever and old notifications are also gone rather quickly.

https://www.lifewire.com/iphone-notification-history-1189516...

comment 3mo ago · link · parent

I think this comes from the same problem as notifications on iPhones: if you dismiss them accidentally then it is very difficult to find out what it was.

It is missing the equivalent of the "history" in e.g. browsers and YouTube.

If a user dismisses an alertbox on desktop, why isn't there an history menu item that shows the previous 100 alert messages?

comment 3mo ago · link · parent

I'd really wish I could force ISO format for the date input as the current "platform native" is confusing for some users when the OS use a different language than the web page that is shown.

For some multi-country companies it makes sense to have all admin pages in English no matter the underlying OS language. Imagine sending a screenshot where the OS date format is different from what everybody else expects from an English page.

comment 3mo ago · link · parent

PostGIS is also another very useful addition for storing, indexing, and querying geospatial data.

http://www.postgis.net

comment 3mo ago · link · parent

In the old days 25 years ago, x86 hardware was the main source of unreliability.

Today x86 hardware is super reliable and unneeded complexity in the software stack is the main source of problems.

comment 4mo ago · link · parent

Los Angeles has mountains/water on all sides so it can't grow in size.

It also utilizes the space extremely inefficiently. Single level single family houses everywhere and the rest is parking space. The few parks are difficult to access by kids arriving by foot/bike.

This is what results in the high rent: Can't grow supply and don't use existing land efficiently.

Density: LA = 8,210/sq mi, Lisbon = 17,040/sq mi, Paris = 10,100/sq mi, Amsterdam = 13,670/sq mi, Copenhagen = 19,195/sq mi. (from wikipedia)

Look at Google Street maps: LA is a hellscape of concrete and asfalt. Lisbon and Amsterdam are much nicer and greener and they stil have higer density.

comment 4mo ago · link · parent

precision loss in floating point is often exponential.

If 64 bit isn't enough, then very quickly 128 is also not enough.

If precision is important then you will very often want systems that represent every number as an interval [a, b] meaning that the true value is between those 2 numbers. This makes you able to detect loss of precision due to e.g. d = a / (b - c) where b-c can result in a number close to zero which makes uncertainty grow. If you use this formula iteratively then precision is lost completely no matter how many bits there are in your floating point variables.

comment 4mo ago · link · parent

When looking through all the other commits the user has made: they all lack a good commit message.

This is systematic for that user. Either the user needs to improve or let go.

The organization needs to learn that good commit messages are a requirement for anything to do with crypto and payment systems.

comment 4mo ago · link · parent

One of the most interesting innovations in the Ukraine war is their internal market place for drones, letting each drone group decide which drones they want to procure and use in battle.

It is not a top-down decision, production and supply as other armies use for their weapons logistics.

comment 4mo ago · link · parent

Supermarkets often have so low margin that building for the 98% of customers means that all of the profit has disappeared.

Profit is often at the margin.

12345
39