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

The first thing I had in mind was: the final answer needed to be /2. keeping the number before dividing not overflowing needs some tedious work

It's not very tedious. Instead of dividing the product by 2, you can just divide whichever of x or x+1 is even by 2 before multiplying.

BSR = bitwise right-shift

ORD4 = cast as 32bit integer.

BSR(x,1) simply meant x divided by 2. This is very comment coding idom back in those days when Compiler don't do any optimization and bitwise-shift is much faster than division.

The snippet in C would be:

    pt.h = (r.left + (int32_t)r.right) / 2;
    pt.v = (r.top + (int32_t)r.bottom) / 2;

    pt.h -= (width / 2);
    pt.v -= (height / 2);
  
    pt.h = max(0, min(pt.h, fDoc.fCols - width));
    pt.v = max(0, min(pt.v, fDoc.fRows - height));
  
    if (width > fDoc.fCols) {
      pt.h -= (width - fDoc.fCols - 1) / 2;
    }
  
    if (height > fDoc.fRows) {
      pt.v -= (height - fDoc.fRows - 1) / 2;
    }

Reading the full function here https://github.com/amix/photoshop/blob/2baca147594d01cf9d17d...

If I understand it correctly, it was calculating the top-left point of the bounding box.


Removing Trump from Twitter didn't stop people from voting him.

Removing 60 Minutes from CBS doesn't stop people like you from on elsewhere.

Instead, it fuel them to post elsewhere.

Deplatforming didn't work, and deplatforming doesn't work now.


What I'm saying is that this is a survivor effect: there are plenty of cases where deplatforming does work, it's just not 100% effective and so we have this situation like antibiotic resistance where pathologies have evolved around the defenses. It's kind of incredible that viruses have managed to evolve around vaccines to install a pro-virus person at the top of the US department of health to ensure better spread of viruses, but I guess life finds a way.

Also: this is entirely anglocentric. I don't think you'd find anyone claiming that the Chinese government censorship system backfired or is completely ineffective. It's an even stronger system than billionaires over there.


That wasn’t what you were saying but they’re good observations. This behavior of Americans was observed by Tocqueville’s observations about newspapers and the role that discussing them played in our political outcomes in allowing certain types of populist candidates to bubble up. There are analogues in English politics. The article had a continental example but it was just an analogy. That said, it’s reasonable for Americans to want to understand and adjust their strategies for quirks in their culture and political process; they can’t simply transplant Chinese government and culture here to please you, can they?

I read it three time and can't see anything related.

they mention at the end that the destruction of tissue exposes proteins normal and abnormal to the immune system, with the abnormal ones no longer hidden by tumor structures. if you then search (kagi, google, etc) for this there are results where this worked fantastically.

Well.. DJI have on-the-fly no fly zone update, and newer model can communicate via satellite.

That's worse if you believe there are possibility of war...


Attack vector: drone needs to get out of a case, backpack or closet, out of the window and fly somewhere to do something.

Meanwhile IoT devices, internet connected kitchen appliances just need to be able to be remotely activated to create a power surge and overwhelm the electric grid. Those can be sold no problem.


Or even just 'halt and catch fire'.

Heck even a targeted but small percent increase in sporadic behavior for targets of high value might be a worthy harassment tactic.


Yeah, all your HVAC systems and even nuclear power plants are online. Don't give me this BS about kiddy drones.

If your application need that level of control, you probably want to use UDP and have something like QUIC over it.

BTW, Hardware based TCP offloads engine exists... Don't think they are widely used nowadays though


Hardware TCP offloads usually deal with the happy fast path - no gaps or out of order inbound packets - and fallback to software when shit gets messy.

Widely used in low latency fields like trading


> This is why I generally avoid C’s “bottom-up” strategy for organizing code.

I think the author misunderstood something....


Yeah, language choice and the way your organise your code seem orthogonal to me

I inferred that they’re referring to the fact that in typical C the compiler must have seen a function earlier in the file for you to use it. One solution (that the author doesn’t like) is to put the leaf functions first so that they’re defined when the compiler sees their callers. The author seems to be ignoring the alternative approach: declaring functions at the top and then writing the in the top-down order that they like.

AI and Robot can replace public funded road?

it should have been called chlorine for "Cl" is the cryptography library in "NaCL"


> The N900 that lays next to me right now still works as a phone.

It soon won't be. 3G and 2G network are being depreciated quickly around the world


I apologize for being that guy, but they are being deprecated. To depreciate is to decrease in value.


but then, deprecation causes depreciation in this case, for extra fun.


Can I broadcast my own 3G cell inside my house with some magic radio device?


Not legally. Where I'm from they sold off the old 3G spectrum and frequencies, mostly (all?) to established telcos to use in 4G or 5G mobile services. They will not be happy if you start interfering with their customers there (especially not after the money they spent at the auction for those licenses).

There are some weird bits of the 900MHz band that cross into the fairly free-to-use ISM bands in some countries, and I recall a CCC talk where someone demonstrated a SDR setup doing mobile phone base station stuff by sneaking into what were ISM bands in Germany where he was that handsets would talk to because they were allocated as cellular phone spectrum in other parts of the world. Here in Australia we are limited and can't use the upper end of the 920MHz ISM band with LoRa devices, because Optus bought that spectrum for their phone network.

(Here in Aust4ralia we have other cellular spectrum and phone network problems, where a lot of older devices that support some 4 and/or 5G cannot reliably call 000 (our equivalent emergency number to the US 911), because the fall back to 3G when roaming onto other networks... A few people have died recently, and all the telcos are busy blocking a growing list of phones, mostly older Samsung ones if the noise in mainstream media here is accurate. I know my old but still otherwise functional Galaxy S6 Edge is not on the banned list.)


The last paragraph definitely sums up how much of a bureaucratic and dystopian joke Australia is. Should have kept 2G up!


Europe can use 433 and 866 MHZ for ISM.



Yes, there was such a thing called Vodafone SureSignal and similar devices:

https://www.amazon.co.uk/Vodafone-075375-Sure-Signal-V3/dp/B...


Not sure about 3G, but here's an example of 2G: https://www.youtube.com/watch?v=CMWvA4Ty1Wk

Edit: same as already posted hackaday, oop!


Should still be fine for at least a few years here.


Depends on the country and provider but is sooner than later in Europe and I hate it that 2G is going away since all my old devices are not going to work again…

https://onomondo.com/blog/2g-3g-sunset-2/


That article is full of made up slop - at least in terms of Europe.

Most of the dates stated are just plain wrong.

The UK dates are completely wrong - by 5 years in most cases.

All of the UK's 2G networks are still running, and the last won't be switched off until at least 2030.


The article is from 2022 and is good enough summary. Specifics for sure can vary in between but that is why you are more than able to do an individual search.

Here in Australia 3G is totally gone already. 2G went years ago.


In Europe we keep 2G as a failsafe, deprecating only 3G.


Not true, see https://en.wikipedia.org/wiki/2G#Phase-out

Many countries/carriers in europe have already shut down 2G, many will shut it down in 2027. A few will keep it a few years more.


A bit of a shame. I had a Nokia 6090 with 8 watt of transmit power on 900Mhz. Combined with a 33 centimeter antenna that phone had reception in nearly all of the European continent. And with a 70Ah 12v battery you had a battery life of weeks. Even with the phone consuming up to 25 watts during calls.

My fancy new 5G smartphone doesn’t work in rural parts of the country. We are going backwards.


It's a hot mess too. When you have an American carrier / phone number on an international plan and they shut down all radios in the case of an emergency in the EU, you still get 2G/3G service abroad while everyone's phones around you is dead.


What do you mean? They are shutting down the radio transceivers for 2G/3G, how would an American number/carrier get a signal in countries that have shut down their 2G/3G networks? Or are you talking about plans to do direct-to-cell satellite service, cause none of those are 2G/3G as far as I can tell?

The whole point is to free up spectrum, how would that work if that spectrum is still in use for the American carriers in countries that shut down the service for domestic use? Why would service be maintained for such a niche usecase?



nope, check the link I posted in another comment: https://onomondo.com/blog/2g-3g-sunset-2/#europe

please note that the list is not fully up to date, eg. in Germany Voda and Telekom have said that they will sunset 2G in summer 2028.


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

Search: