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

I once used the phrase 'Enterprise Software' in front of a friend. To explain what I meant I asked "What software do you use at work in the hospital?". They rolled their eyes. Exactly.

If you are looking for an offline solution, one I came across recently as a python one-liner (requires faker)

  python3 -c 'print(__import__("faker").Faker().bs())'

Reading and learning about these is like peering in to a world of mystery. I know I'm looking at something interesting and important but it always sits just out of reach

The big question here is why is the approach so effective. Do random testing on a compiler that has never been subject to it and you will quickly find bugs, unless it's some extreme case like the compiler having been proved correct. Even CompCert, which had correctness guarantees, still had bugs that were outside the scope of those guarantees.

Back before this was realized compilers were a buggy mess and people just lived with it. Now, they're still buggy, but less so. Random testing with billions of inputs is practical now and tends to rapidly "mine out" significant chunks of potential bug space. One could view this as an example of the Bitter Lesson, where dumb search coupled with massive amounts of computing power solves a problem that had seemed to require more knowledge.

Anyone making a production quality compiler these days needs to be using high volume random testing.


A question as a non-American that I hope will be taken in the spirit of enquiry.

I am hearing a lot more about ICE raids, particularly on reddit. Is this an artefact of more attention to raids that have been going on for years, or is there an increase in the number or impact of the raids? I find it hard to tell as I'm in somewhat of a bubble in terms of the US news I come across.


They're being conducted by disguised goons with the explicit purpose of making it harder to identify that an ICE raid is happening. If you haven't seen the video of Rümeysa Öztürk's detention, I think you'll understand the concern fully when you do - they're just doing action movie kidnappings and calling them immigration enforcement.

70% of farm workers are not showing up to work in California. This is unprecedented.

These raids are objectively more frequent and more brazen than they have ever been. The volume of going after people peacefully about their business and picking up people at courthouses is unprecedented.

Ah ok as an outsider it's hard for me to recognise that

Prior to this administration, ICE wouldn't go into schools, churches and courthouses.

This no longer the case.


It has increased massively since the beginning of this administration, and more importantly for the news has become less about targeted raids and more about a show of force.

For a bit of context, the administration decided to use undocumented people (read: Latin migrants) as (one of many) scapegoats and made a to promise to deport a certain number of millions. By most accounts the number of immigrants he promised to deport is well above the number of undocumented immigrants in the country, especially Latin migrant workers, which has been the target of, to put it frankly, persecution.


They have been some in the past but big increase in frequency and scope with the new administration.

More raids because being in USA illegally is being INCORRECTLY treated as a FELONY by ice when, for first occurrences, it's usually a MISDEMEANOR.

So, ICE is incorrectly enforcing the law, under the Trump administration.


Not even a misdemeanor, it's a civil offense.

I know that this is the outcome they're hoping for, but my usual behaviour is:

> Do nothing

It makes me a little bit mad but having $50 'stolen' from me just feels like par for the course these days.


The IOT and embedded space is simultaneously obsessed with IP protection, fuse protecting code etc, and incapable of managing the life cycle of secrets. I worked at one company that actually did it well on-device, but neglected they had to ship their testing setup overseas including certain keys. So even if you couldn't break in to the device you could 'acquire' one of the testing devices and have at it

It really tickles my brain in a lovely way that it avoids all overflow risk as well

There is no overflow risk. The trick works on any Abelian group. N-bit values form an Albanian group with xor where 0 is the identity and every element is its own inverse. But N-bit values also form an Abelian group under addition with overflow, where 0 is the identity and 2s-compliment is the inverse.

If you’re working on an architecture where a single multiplication and a bit shift is cheaper than N xor’s, and where xor, add, and sub are all the same cost, then you can get a performance win by computing the sum as N(N+1)/2; and you don’t need a blog post to understand why it works.


I think they meant that XOR avoids the overflow risk, whereas doing the sum of the array to figure out which number could cause an overflow.

(wrapping) overflow doesn't affect the final result.

Well there you go, I learnt something today. My spidey sense told me to be wary of overflow but I suppose I was wrong

You can also calculate the XOR-accumulation of all values between 1 and n in O(1) using a lookup table like this:

    [n, 1, n+1, 0][n%4]

> The trick works on any Abelian group

(https://en.wikipedia.org/wiki/Abelian_group -- I'll use ⋆ as the Abelian group's operation, and ~ for inversion, below.)

I believe you are implying:

(g(1) ⋆ ... ⋆ g(n)) ⋆ ~(g(i(1)) ⋆ g(i(2)) ⋆ ... ⋆ g(i(n-1))) = g(m)

where "m" is the group element index that is not covered by "i".

However, for this to work, it is requried that you can distribute the inversion ~ over the group operation ⋆, like this:

~(g(i(1)) ⋆ g(i(2)) ⋆ ... ⋆ g(i(n-1))) = ~g(i(1)) ⋆ ~g(i(2)) ⋆ ... ⋆ ~g(i(n-1))

because it is only after this step (i.e., after the distribution) that you can exploit the associativity and commutativity of operation ⋆, and reorder the elements in

g(1) ⋆ ... ⋆ g(n) ⋆ ~g(i(1)) ⋆ ~g(i(2)) ⋆ ... ⋆ ~g(i(n-1))

such that they pairwise cancel out, and leave only the "unmatched" (missing) element -- g(m).

However, where is it stated that inversion ~ can be distributed over group operation ⋆? The above wikipedia article does not spell that out as an axiom.

Wikipedia does mention "antidistributivity":

https://en.wikipedia.org/wiki/Distributive_property#Antidist...

(which does imply the distributivity in question here, once we restore commutativity); however, WP says this property is indeed used as an axiom ("in the more general context of a semigroup with involution"). So why is it not spelled out as one for Abelian groups?

... Does distributivity of inversion ~ over operation ⋆ follow from the other Abelian group axioms / properties? If so, how?


> ... Does distributivity of inversion ~ over operation ⋆ follow from the other Abelian group axioms / properties? If so, how?

It does. For all x and y:

  (1) ~x ⋆ x = 0 (definition of the inverse)
  (2) ~y ⋆ y = 0 (definition of the inverse)
  (3) (~x ⋆ x) ⋆ (~y ⋆ y) = 0 ⋆ 0 = 0 (from (1) and (2))
  (4) (~x ⋆ ~y) ⋆ (x ⋆ y) = 0 (via associativity and commutativity)
In (4) we see that (~x ⋆ ~y) is the inverse of (x ⋆ y). That is to say, ~(x ⋆ y) = (~x ⋆ ~y). QED.

Right. Another way to see this is that for a general (possibly non-Abelian) group, the inverse of xy is y⁻¹x⁻¹ (because xyy⁻¹x⁻¹ = x1x⁻¹ = xx⁻¹ = 1 [using "1" for the identity here, as is typical for general groups], or more colloquially, "the inverse operation of putting on your socks and shoes is taking off your shoes and socks"). For an Abelian group, y⁻¹x⁻¹ = x⁻¹y⁻¹, and we're done.

Awesome, thanks! :)

True, I hadn't thought of that. I'm spoiled by Python. ;-)

I think it's just an interesting approach to solving particular limited problems. If I needed to solve this I'd end up either using set arithmetic or sorting the list, both of which use more memory and time. Maybe down low in some compiler loop or JVM loop this could be the difference between a sluggish application and a snappy one

That's not my point. My point is that the exact same code from the original article could be done in a single, traditional for-loop, instead of two for-each loops.

They're also the data collection point for much down stream research which is cutting edge

> Hopefully the low price can attract leads

Honestly, a low price for a product like this makes no sense, and might give the opposite signal. Real, trustworthy businesses know what they're worth and charge accordingly. Businesses know that if this process screws up they could lose or over-charge customers and have to make refunds.

What's the alternative? Pay someone to manually move records over one-by-one. I'd estimate that costs a few dollars per customer. If you can be slightly cheaper than that, they'd be silly not to pay.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: