HNHacker News
TopNewBestAskShowJobs

chacham15

1,625 karma · joined October 28, 2011

submissionscomments
chacham15··on You cannot have exactly-once delivery (2015)
> So, in essence, you can never have "I will get this exactly once", and at best you can only ever have "I will have a plan for what to do if I get this more than once".

I dont understand this at all. TCP has exactly once message delivery that the application layer is completely unaware of...

chacham15··on On “I don't trust microcode” (2021)
When I read this, I expected there to be some discussion about the chain of custody, verification of the signature of microcode updates, or possible injection attacks, but none of that is mentioned here. I think those are the real reasons that people are afraid of microcode...even in the case that you trust the vendor themselves, you have little to no way of knowing that what you have itself hasnt been modified.
chacham15··on AMD, Intel, and Nvidia Reportedly Slash Orders with TSMC
The problem is that the higher end GPUs are actually the same chip as the lower end GPUs. The lower end GPUs are where the manufacturing process had an error and thus they fuse off a core. All that to say that they cant manufacture a high end GPU without also manufacturing a low end one (or multiple depending on the manufacturing error rate). So, if they cant sell the low end one, it may not make sense to sell the high end one even if there is a buyer.
chacham15··on Abstraction is expensive
It is true. Abstraction means that you dont have to worry about some lower level concerns. With computers, the rabbit hole goes quite deep.

High-level language (C/python) Assembly language (att/intel) Byte code Micro code

So, with assembly code, you dont care about what the actual bytes that get generated are (they can change and you'd never know if the system was backwards compatible). Similarly, if the microcode that the CPU generates to implement the instruction changes youd also never know.

chacham15··on EU approves legislation to regulate Apple, Google, Meta, and other tech firms
The US already has one which is supposed to be voted upon soon: https://www.congress.gov/bill/117th-congress/senate-bill/271...
chacham15··on TodoMVC App Written in Vanilla JavaScript
It seems like you didnt actually look at the code because thats exactly what its doing: https://github.com/1Marc/todomvc-vanillajs-2022/blob/main/js... it clears innerHTML there and then rerenders the children
chacham15··on A dirty dish by the sink can be a big marriage problem
> I now understand that when I left that glass there, it hurt my wife—literally causing pain—because it felt to her as if I had just said, “Hey. I don’t respect you or value your thoughts and opinions. Not taking four seconds to put my glass in the dishwasher is more important to me than you are.”

I think that here lies the issue. Is this the only way that you show that you value their thoughts / opinions? If so, the problem was never with the cups. If not, then this is how you comfort / reassure your partner and not "lets agree to disagree." From that place you have a conversation where you both figure out how to best make the both of you happy. E.g. "we'll get a special/specific cup which looks like it belongs in this area and you can leave it here as long as its empty and only use that cup." There are always various compromises that can be made as long as you have that conversation and are both looking for the best for each other.

chacham15··on Ask HN: Why can't await be used from non-async functions?
There are a few different nuances to this question.

Can it be done? sure:

   let bar = await foo();
   return bar + 1;
can be converted to:

   let resultPromise = foo();
   while (!resultPromise.isComplete()){
       sleep(10);
   }
   let bar = resultPromise.value();
   return bar + 1;
the issue is that this is terribly inefficient as you are asking every 10ms whether or not the result is ready.

One of the reasons this is so inefficient is that you have to spend time checking (which is wasteful if it isnt ready) and waiting. If you check more frequently, you're wasting CPU. If you spend more time waiting, you can waste up to that much time if the result is ready right after you go to sleep.

The alternative is to have the operating system tell you when its ready. This is done through the event loop. So this would turn the code transformation into something like the following:

  let resultPromise = foo().then(function(bar){
     return bar + 1;
  });
  
but what do you return? you have to return a promise (i.e. a callback). Therefore, all callers of this function have to be ready to handle this.
chacham15··on Landing a new syscall, part 1: What is futex?
Im pretty sure the same construct can be implemented without the compare:

  int lock = 0;

  void AcquireLock(int *lock){
    while (ATOMIC_SWAP(lock, 1)){
      sleep(10); //or futex or w/e
    }
  }

  void ReleaseLock(int *lock){
    ATOMIC_SWAP(lock, 0);
  }
chacham15··on Read “Data and Reality”
> It’s just a simple numbers game: there are more obscure books than popular books, so there are more obscure good books than popular good books, so the more books you read the more likely your favorite is an obscure one. In other words, if someone says they love fantasy novels and also their favorite novel is Harry Potter, odds are they don’t actually read that much fantasy.

I hate these kinds of arguments. It assumes that every book has an equally likely chance of being good. Books being popular and books being good generally have a correlation.

chacham15··on App store bill sails out of Senate Judiciary Committee
Yes it would. "Access to operating system interfaces, development information, and hardware and software features shall be provided to developers on a timely basis and on terms that are equivalent or functionally-equivalent to the terms for access by similar Apps or functions provided by the Covered Company or to its business partners."[0] means that anything a native app can do should be possible to do from a third party app.

[0]https://www.congress.gov/bill/117th-congress/senate-bill/271...

chacham15··on The Internals of PostgreSQL
There are a few reasons for this. Some languages arent Context Free Grammars (the classic example for this is "A * B;" is this multiplication of the A and B variables or is it a declaration of the B variable with the type being a pointer to an A) which make writing the grammar much harder in the first place. Some solutions to this are using a GLR parser instead, but that has the downside of super high execution time in the worst case. Lastly, even if you overcome all of these with the proper structure and hints, you run into pretty bad error cases. I.e. handing an invalid input is hard and giving an error to the user that makes sense is even more difficult. (which of the possible branches in the grammar rules is the one thats wrong? in simpler grammars you can probably give a good error, but a C grammar is going to have a much harder time) This is why gcc moved away from using a grammar to a custom parser IIRC.
chacham15··on Gov Parson pushes to prosecute reporter who found security flaw in state site
> Do you expect people to pretend the trend isn't happening in order to comfort you?

This is a strawman. The parent was saying that in order to have an effect and convince people, you shouldnt alienate them. You can do this without lying or ignoring things that are happening. In fact, the people you're most likely able to convince are people in the middle and by alienating them you're actually causing the trend that you're denouncing.

> What does it say about your own values that they are so loosely held that you'd sacrifice them out of contempt like this?

This is just a straight ad hominem. I thought we were supposed to be above these sorts of things on hn.

chacham15··on Python stands to lose its GIL, and gain a lot of speed
There are certain classes of errors that it prevents. E.g:

Thread1: a = 0xFFFFFFFF00000000

Thread2: a = 0x00000000FFFFFFFF

One might think that the two possible values of a if those are run concurrently are 0xFFFFFFFF00000000 and 0x00000000FFFFFFFF. But actually 0x0000000000000000 and 0xFFFFFFFFFFFFFFFF are also possible because the load itself isnt atomic.

The GIL (AFAICT) will prevent the latter two possibilities.

chacham15··on Facebook Whistleblower Leaks Thousands of Pages of Incriminating Internal Docs
> I often see it as written rules (laws) and unwritten rules (ethics).

I think this is a very dangerous line to walk. A common phrase in law is "the law often allows what honor forbids" and that is because there is a difference between the law and ethics and IMO that is a good thing.

Is it ethical to eat all the cookies in the cookie jar and leave none for anyone else? No. Should it be illegal? No.

chacham15··on Silicon Lottery store closing
So, for those of you that dont know what this is a simplified explanation is: silicon lottery does a few things. 1. You can buy processors which have lower defect rates and are therefore much better at overclocking than others of the same type. 2. You can get extra services like delidding which is normally done to improve thermal transfer making it easier to overclock and keep the system cool. The benefits of these have been decreasing over time and with chip shortages as well, the lottery is closing down.
chacham15··on Building apps in minutes, not months
The components used here seem like theyre very specific to the needs of the application that was built. I have no idea how this type of framework would be used to build anything else.

To be more specific, he has the "Source" and "Detail" elements, but theres no apparent way of what piece of data is being synced across them or how theyre connected. Therefore, if I wanted to change any of that, I'd be completely lost. Did anyone else understand how the data actually flows across these pieces?

chacham15··on Why can’t I go faster than the speed of light?
If you could move in space but not in time, then you would be in two places at the same time which would violate conservation of matter, right?
chacham15··on What Is Server-Driven UI?
Basically React-Native with the html coming from a server. I dont buy the argument that this will fly with Apple+Google. They like to be in control of what your app experience is and this by definition is contrary to that.
chacham15··on Tesla Packs 50B Transistors onto D1 Dojo Chip
I think theyre referencing this: https://www.youtube.com/watch?v=ZJ4GmZflpPI
chacham15··on Strict Tables – Column type constraints in SQLite - Draft
It sounds like you're asking why PRAGMA cant be used to affect the table only during its creation. The main reason for this with SQLite is that SQLite stores the table definition as text. If you run `SELECT sql FROM sqlite_master WHERE type='table'` you can see all the statements that are used to create the tables. Therefore, in order to specify which tables should be strict, you would have to have something in that statement that indicates it. The other option would be to have the flag control all tables (even ones created previously) which prevents incremental adoption.
chacham15··on A man spent a year in jail on murder charge that hinged on disputed AI evidence
This is missing a key crucial insight: the overall number of evaluated cases increases when AI is helping meaning that borderline cases which may have been ignored prior are now being evaluated. Said another way, with AI handling the obvious cases, the number of borderline cases being evaluated by humans increases. With humans having large amounts of inaccuracy, borderline cases before which may have been ignored due to not having manpower to evaluate are now being evaluated. This can and does lead to many more erroneous accusations despite the fact that all the borderline evaluations are being handled by humans.

Another factor here is that simply evaluating more data is also likely to lead to more erroneous evaluations since random chance has a much larger impact.

chacham15··on Strict Tables – Column type constraints in SQLite - Draft
PRAGMA doesnt enable you to incrementally adopt the feature.
chacham15··on I had to give a wrong answer to get the job (2017)
So, amortized complexity is different than actual complexity. The doubling the size of the array whenever you overflow leads to log(n) performance which isnt constant. What they were looking for was an array of arrays such that each consecutive nested array is double the size of the previous. This way, you get the same number of expected allocations, but you dont ever have to copy data (and therefore inserts are actually constant time). It also has the benefit of being able to consolidate the subarrays into a single one at places where there is time to do so. So, you didnt actually give the question asker what they were asking for.
chacham15··on To help gamers on Twitch, Dr. K balances mental health advice and medical ethics
What the parent to your comment means is that video games is serving a purpose such that you cant just "stop." You have to figure out what purpose its serving and find another way of achieving that. A better version of what they're trying to say is telling an alcoholic to "just stop drinking." Yes, if they can do that it would be good advice, but the problem is that they cant stop. So, ultimately that advice doesn't lead to results.
chacham15··on European Parliament approves mass surveillance of private communication
From the article:

> According to police data, in the vast majority of cases, innocent citizens come under suspicion of having committed an offence due to unreliable processes

With this being said, what is the rationale for this?

Its worth noting however, that the current legislation "allow[s] providers of e-mail and messaging services to automatically search all personal messages of each citizen for presumed suspect content and report suspected cases to the police" but does not mandate it yet.

chacham15··on Tesla Makes More Money Trading Bitcoin Than Selling Cars
> Time is more valuable than money and taxes should reflect that.

I understand the sentiment, but it literally isnt true. If it were, then noone would accept a job since they'd rather have the time instead. At the very least, there is more nuance to be observed here.

chacham15··on Type-safe generic data structures in C
OpenSSL does this in its STACK_OF concept: https://github.com/openssl/openssl/blob/a28d06f3e9cbc5594c79...
chacham15··on Apple's 15% Deflection Tactic
This is a strawman argument. To see why, lets compare with Facebook.

How much money does it cost to develop API servers to deal with apps which use Facebook sign in?

How much money does it cost to run those API servers in a performant manner?

How much money does it cost to make sure that those servers are secure?

How much does Facebook charge? 0.

I could keep going (or find many other examples), but the point is that the justification of a price based on the seeming cost to the provider isnt relevant.

The issue for me here is that I should be able to run the apps that I want on hardware that I have purchased. Imagine if you buy a TV and then all of a sudden, the Netflix app is removed from the TV because Netflix didnt pay the tv manufacturer AFTER you've already purchased it.

chacham15··on Police killings more likely in agencies that get military gear, data shows
For justice, outcomes matter. This is why there is a difference between "attempted murder" and actual murder. Yes, both are punished, but the actual outcome does matter. Therefore, the distinction between a flashbang and an incendiary/fragmentation grenade (which what most people think when they read hand grenade) too does matter. When I read the initial statement, I thought that the child was killed and am happy to hear that thats not the case. Even though the child was definitely harmed, I am happy that it is still alive.
← PreviousPage 3 of 20Next →