HNHacker News
TopNewBestAskShowJobs

alain94040

7,811 karma · joined August 11, 2007

Author of the co-founder equity calculator http://foundrs.com

Organizer of the Startup Conference http://thestartupconference.com

submissionscomments
alain94040··on Fastest branchless binary search
I don't get it. The problem with binary search and branches is not the branches themselves, it's the fact that until you have done the comparison, you don't know which memory location in the array to fetch next. It doesn't matter if you use branches or anything else, the question is what do you want the processor to do?

There is a data dependency: until I read the middle index, I can't tell if I want to search the data in the upper section or the lower section. I can speculate and issue reads to both. That would fix the dependency, but create more memory traffic. Is this the right trade-off?

What do you want? Removing branches is not it.

alain94040··on A Single-Cycle 64-Bit RISC-V Register File
Also, the read ports are asynchronous, which is bad:

    assign rv1 = registers[rs1];
    assign rv2 = registers[rs2];
alain94040··on A Single-Cycle 64-Bit RISC-V Register File
It goes beyond being inefficient. It's the wrong mental model.

Chip designers intuitively visualize interconnected blocks of logic. They draw rectangles with wires between them.

To learn this intuition, writing spaghetti Verilog code that runs in a simulator is counter-productive. It's a common mistake that people coming from a software background make all the time, and that has been discussed to death. So with some appeal to authority, trust us and learn proper hardware design, hopefully it will be more rewarding and will "click" faster.

alain94040··on A Single-Cycle 64-Bit RISC-V Register File
Correct. The code shown is only good enough for RTL simulation. It won't help actually generate a chip with multiple read and write ports to a register file.
alain94040··on It doesn’t take much public creativity to stand out as a job candidate
I’ve spent nearly twenty years blogging, giving talks and releasing open source code. [...] I’ve interviewed hundreds of people [...] The vast majority of candidates have little to no evidence of creativity in public at all

Are we sure the author is not showing some unconscious bias by looking in others for traits he has (public creativity)?

There is no particular reason why public creativity is linked to good engineers. It's one way to show good engineering, sure. But far from the only way. I could see some other hiring managers arguing the opposite: if you have time to write lightweight tech posts on your blogs, maybe you are not a great engineer who will solve my company's most difficult problems.

That being said, especially for new grads, I strongly recommend showing something, anything beyond "I graduated from this university and here are the classes I took".

alain94040··on Going beyond ‘do you know of any open positions?’
Correct. Here’s a pro-tip that also applies at work, when you email your manager: make it as easy as possible for the person to help you. If you ask for an intro to someone, write an email that is ready to be forwarded, as is, and already has all the context that the person you are trying to reach would need. So manager or relation just has to hit forward, type a little note to their contact at the beginning of the email, and they are done.
alain94040··on Chiplet ASIC supercomputers for LLMs like GPT-4
The key point:

A key architectural feature to achieve this is the ability to fit all model parameters inside the on-chip SRAMs of the chiplets to eliminate bandwidth limitations. Doing so is non-trivial as the amount of memory required is very large and growing for modern LLMs

...

On-chip memories such as SRAM have better read latency and read/write energy than external memories such as DDR or HBM but require more silicon per bit. We show this design choice wins in the competition of TCO per performance for serving large generative language models but requires careful consideration with respect to the chiplet die size, chiplet memory capacity and total number of chiplets to balance the fabrication cost and model performance (Sec.3.2.2) We observe that the inter-chiplet communication issues can be effectively mitigated through proper software-hardware co- design leveraging mapping strategies such as tensor and pipeline model parallelism

alain94040··on Hot Pixel' Attack Steals Data from Apple, Intel, Nvidia, and AMD Chips
I found the paper didn't live up to its claims. It said: the ever-changing behavior of these SoCs is also visible via internal measurement sensors, allowing us to distinguish between executed instructions, and even different operands of the same instruction

But when you read further and see what they tried:

We then selected one Arm instruction from each data-processing bucket,testingstores(str),AESinstructions(aese, aesmc), rotate right (ror), bitwise and (and), and both integer and floating-point addition (add, fadd) and multiplication (mul, fmul). We run each instruction in a loop on all available P-cores on each test device

What they did is define a handful of known workloads, with very different power profiles. And then they find that they can tell them apart by looking at the power of the chip. Well, duh.

alain94040··on Don Knuth plays with ChatGPT
I'm quite disappointed in Knuth's dismissal. As the "king of algorithms", he of all people, should appreciate the leap. To put it another way, imagine if one of his students came to him with this question: I want to write an algorithm that given any of those 20 sample questions and others similar to them, gives this kind of answer. I couldn't find such algorithm in your books. What am I missing?
alain94040··on Why Lisp?
This thread may be as good as any to ask: the code I write has to deal with a huge amount of state. To summarize, my code receives millions of "change commands", which update state in memory. Data structures are hash tables, lists, etc. And some commands, once in a while, are queries like "how many of these are there now, of what does this element now point to?".

I guess I'm describing some kind of custom in-memory database engine.

Anyway, I'm confused as to how the purity of Lisp functions would or would not prevent me from writing this code? Is this a use case that is bad for Lisp, or am missing something?

alain94040··on The grid isn’t ready for 300M EVs by 2030
There are 3 places where people can charge their car: at home, at work, and at the store. If you can't charge at home because you park on the street, that still leaves two opportunities to charge.

Another way to think about it is where does your car spend its time, 24 hours a day? Is there any time where you car is somewhere for an hour or more, sitting idle? That's where chargers should be.

alain94040··on What it feels like to work in AI right now
I don't see ads as a big problem with ChatGPT. You could put a side-bar on the right and on the fly recommend products relevant to the on-going conversation.

The cost of computing these ads would be a lot more than today's keyword-based approach, that's certainly a problem. But think of hyper-relevant ads, based on the chat itself. There's a lot of information there, that beats tracking people's behavior online all day.

alain94040··on Tell HN: The ratio of wants-to-be-hired to is-hiring is at a record high 0.94
Yes. I think of 5 people I contacted over 3 years, one got hired. (and it was a very successful hire)
alain94040··on Demystifying bitwise operations, a gentle C tutorial
This long article is a great example of why I believe GPT has a strong future.

The article spends several pages to explain hexadecimal, bases, etc. Probably some fraction of the audience already knows that. In that case, the article should automatically adapt and skip that section. Some people will react negatively to the mathematical formulation, preferring the intuitive section that follows instead.

But this is a static blog post, so it doesn't know how to adapt. Imagine the same post, but with some toggles/sliders (you can come up with even more sophisticated mechanisms): I indicate my level of competency, and the article re-writes itself to match my knowledge. Skip the boring math, show a lot of examples, etc. Or the opposite. The point is that it adapts to you. GPT (or some future variant) is really good at doing this.

alain94040··on We Found an Neuron in GPT-2
Another interesting case is possessive in French:

  une hache   - ma hache
  une horloge - mon horloge
alain94040··on Bard and new AI features in Search
Those new language models are "Google killers" because they reset all the assumptions that people have made about search for several decades. Imagine that people start using those chat bots massively as a replacement for Google search. Then the notion of keyword disappears. Google AdSense becomes mostly irrelevant.

Of course, Google is a giant today with a history of machine learning innovation. So they have a good chance of being successful in that new world. But the point is that many other companies get a chance again, which hadn't happened in 20 years. You couldn't displace Google in the old search/keyword/click business model. Now everyone gets a fresh start.

Who knows what the economics will be. Just like page rank early on, it was expensive to compute. But the money in advertising made it worth it, and Google scaled rapidly. Which language model do you run? The expensive one, or the light one (notice how Google in this announcement mentions they will only offer the significantly smaller model to the public). Can you make this profitable?

Other fun questions to answer if the industry moves to chat vs. search, in a 5-10 year horizon. What is the motivation to write a blog post by then? Imagine no one actually reads web sites. Instead a blog post to share an opinion, I'll probably want to make sure my opinion gets picked up by the language model. How do I do that? Computed knowledge may render many websites and blogs obsolete.

alain94040··on CPU branch prediction evolution over years (2017)
Some back of the envelope math:

- there is a branch instruction every 10 instructions or so

- if you can't predict, assume you guess wrong half of the time

So every 20 instructions or so, you take the wrong branch. Sounds like it could be a significant overhead, from 10% - 50% depending on what the code inside the loop is doing.

For instance, if your code is doing only arithmetic operations, no load/store, such as computing factorial or other silly integer math, 20 instructions would probably take 20 cycles or less to execute, but the branch failure would cause a similar delay. So that's 50% overhead. In the other case, assume the 20 instructions are fairly slow (lots of memory accesses), then your branch penalty won't feel so bad.

alain94040··on AI Homework
Sure. But if you combine the understanding that this chatbot has with a Wolfram Alpha backend, you could build an even more amazing system. I'm sure someone is working on hooking up language models to math backends (anywhere from a simple calculator to Wolfram Alpha).
alain94040··on AI Homework
I was quite impressed by its capability to correct itself.

My test went like this:

Q: Do not use the imperial system

Q: [some question which involves distances]

A: blah blah 1500 kilometers, which is 1000 miles blah blah

Q: I told you not to use the imperial system

It apologized, and repeated its previous answer, correctly omitting the miles data.

If you asked me to write a program that does that (without using ML), I'd have no idea where to start.

alain94040··on AI Homework
It may help a 10X engineer. The code is not what's hard, it's figuring the correct data structures that matters (also known as architecture). Once you got the data structures correct, the code mostly writes itself, and I can see an AI do that part for you. That could be indeed a productivity multiplier.
alain94040··on Ask HN: How I get a job that uses C?
Where are you located?
alain94040··on SimulaVR Has Been Subpoenaed by Meta Platforms, Inc
I'll chime in to say that I was very happy with @grellas's firm in Silicon Valley. I found them the right mix of startup-friendly and competent in tech issues. (grellas.com).
alain94040··on EU Passes Law to Switch iPhone to USB-C by End of 2024
Yes: GB vs Gbit. So an order of magnitude.
alain94040··on EU Passes Law to Switch iPhone to USB-C by End of 2024
Are you sure? A quick Google shows:

Wifi 6 bandwidth: 9.6 Gbit/s M1 SSD read speed: 6000 MB/s

So the read speed is about 6X faster than the Wifi 6 bandwidth.

alain94040··on EU Passes Law to Switch iPhone to USB-C by End of 2024
Assuming you are correct, it still means that any startup that has an idea for an innovation in the phone cable space will first need to worry about how to convince the European Commission to approve it. That's quite a road block for a startup.
alain94040··on Facts about State Machines
The primer is simple: if you notice that your code is using too many if statements, especially nested ones, and you are starting to wonder if you are covering all alternatives and cases, then using the rigor of a state machine may help.

You know, that kind of code:

  if(start) {
    if(!running) ...
  }
  
  if(stopped & !jumping) {
  } else if(running) ...
Stop and write a proper case statement (aka a state machine). You may discover that combinations of booleans (in my example, stopped & !jumping) deserve to be their own state. The insight is that the resulting code should be one clean case statement, with no nested ifs allowed. Then you know you cover all the states/cases.
alain94040··on The road to Zettalinux
Thanks to Moore's law, you can assume that DRAM capacity will double every 1-3 years. Every time it doubles, you need one more bit. So if we use 48 bits today, we have 16 bits left to grow, which gives us at least 16 years of margin, and maybe 48 years. (and it could be even longer if you believe that Moore's law is going to keep slowing down).
alain94040··on “Secrets” about the consumer audio business you may find interesting
Cost of sales includes marketing expenses. Possibly also operations cost.
alain94040··on On the efficacy of online proctoring using Proctorio (2021) [pdf]
Absolutely. From the article: the software detected 0/6 cheating students, while a human detected 1/6 cheating students.

Frankly, with such low numbers, I would not draw any conclusion at all. Within the margin of error, the human could have detected 0, or maybe 2 cheating students. Who knows. It would change this results dramatically, so you can basically ignore them.

Also, the cherry on the cake is that the human also detected one cheating student who wasn't cheating. So human vs. software, no one wins.

alain94040··on Not Your Grandmother's Textbook Exercise
If someone asks for the median, you supply the median if possible

I wouldn't. I have seen first-hand so many projects that took weeks of efforts, because we assume the person making the requirements used perfect language, when they could have been done in a day instead. One word can be the entire difference.

Maybe it happens to you in a big company: "the VP said '...'", so you must do exactly as the VP said. In practice, it turns out that the VP, just like Mary, could easily agree they didn't care if it's median or mean, they just need some number that summarizes the data.

Understanding the customer is key.

← PreviousPage 4 of 34Next →