HN user

nimrody

610 karma

nimrody at gmail

Posts1
Comments340
View on HN

No. String.hashCode() was already memoized. So after the first call to hashCode(), future calls just retrieved the data from the hash field of the string object.

This optimization is about avoiding even calling the method because the jvm knows that the value returned will be the same.

No. The string hash is stored as part of the String object. It is initialized to 0 but gets set to the real hash of the string on first call to hashCode()

(which is why it will be computed over and over again if your special string happens to hash to 0)

The biggest problem Intel had was that their process was optimized for their high end processors. Everything else (within the company) suffered.

For Intel to succeed as a foundry it needs customers that target the same "high end, power hungry" market segment. I don't see how Qualcomm (low power) fits that niche. More likely big AI accelerators (like, perhaps, Microsoft is planning).

As long as Intel depends on its high end processors for most of its profits, it will be difficult to develop a low power process for other, less profitable, customers.

How can it tie requests arriving at a service and generating additional downstream requests?

Distributed tracing needs some common token all requests share to identify all RPCs that should be associated with a specific incoming request.

Unrelated: anything similar for increasing photo resolution? I frequently encounter cases where users upload low resolution images (transferred using Whatsapp or similar) and need to increase the resolution to get something suitable for printing.

My take: have a few database instances (machines) each holding the data for a group of customers. With postgres you can even put different customers on the same database instances but in different schemas.

This way you get all the benefits of the relational model (you can use foreign keys, transactions consisting of multiple tables, etc.) and the performance benefits of additional machines that are not just read-replicas.

Centralized shared tables can be in a separate database which can also hold the mapping between customer-ids and database instances.

Only drawback is that management is more difficult -- backup, migrations, etc. Specifically, you need to handle the case where some customers have migrated their database and others had not yet.

May I suggest joining some sort of sports activity where you can meet and train with others? For example, an amateur running team or cycling. Search for a mixed group - not an elite team full of testosterone loaded men.

That had helped me improve self confidence (and I'm _terrible_ at sports), find friends and ultimately find my wife.

People doing sports are typically in good mood and the activity naturally gives one something to talk about.

Python One-Liners 3 years ago

Everything that requires a loop and is not expressible using list comprehensions.

Really for one liners, Ruby (or even Perl) are much better. Python with its significant whitespace is a lot less convenient.

The only advantage of Python is that it exists in the default installation usually - unlike Ruby.

Is there a way to place the BPF filter after IP packet reassembly?

Otherwise, matching for TCP port, etc. fails to capture fragments which do not have the TCP header and the resulting file is missing some data.

I think companies don't like these. Businesses prefer when users download their app. They now have some real-estate on the user's phone.

For instant-apps you invest all the effort but they don't remain on the device (and are limited in size to begin with)

Also - it doesn't take long to download apps today (games - now that's a different thing)

Does that mean they also trade _memory_ for low pause times? Because, in our application, the memory required for avoiding significant GC pauses is at least 4x the amount of memory we actually need at any given time.

This can be significant too.

I agree. It's easier to build TUI apps (and more portable usually) then fully native GUI applications.

Another point for TUI apps is that they are usually keyboard focused unlike GUI and webapps which require using the mouse (and are therefore less efficient)

Jd 4 years ago

Can you give some tips on what do you mean by "less than rudimentary analysis"? Considering adopting Clickhouse and wondering whether we will encounter problems down the road.

Well.. that's exactly what happened to Solarwinds last year, didn't it?

Actually smarter than that - they got into the build system and added the malicious code in the build process so you couldn't see it in the repository.

Do you think it's that difficult for a state sponsored body to infiltrate into a commercial company?

If you think of Ruby as a more readable / maintainable Perl -- it's much better suited to these text processing tasks.

Ruby even supports Perl regular expressions which are more powerful and convenient than Awk's.

Some version of Ruby is usually in the base system of every Linux system (perl5 is more ubiquitous but much more cryptic)

It's amazing that this library is used by so many large enterprises yet none of them made an effort to thoroughly audit the code (actually, it looks like Alibaba reported the first one. But the point stands that the code was used for so long and by so many.)