HN user

rep_movsd

228 karma
Posts5
Comments127
View on HN

Copy and paste are handled by applications and the OS shell Any program is free to define the formats it is willing to copy or paste - like mime types.

Software sucks, not because its bad, but because people wont implement things

China Can't Win 9 months ago

This article (and entire book) actually posits that US will remain the primary producer and consumer of copium worldwide and thus the #1

This is why Stallman is so vehement on GPLv3

Commercial entities will always exploit your work - you need to force them to give back, they will never do the positive sum game by default

Disagree totally....

The whole point is to be able to convert JS data structures (or often plain JSON) into HTML via JSX

Data and representation are different. I may be using the same array to display different components

Remember "The Zen of Code Optimization" by Michael Abrash in the 90s?

This word count challenge was the first one he described. The table driven approach was discussed, but was not necessarily the fastest due to the large cache overflowing (on 90s processors) table needed.

I used the same example in a chapter I wrote for a C++ book

Look at the US military budget

https://cdn.cfr.org/sites/default/files/image/2020/12/002_mi...

versus education

https://i0.wp.com/cef.org/wp-content/uploads/slide2-1.jpg

As a human I think you should arrest Elon Musk immediately for misleading advertising and fraudulent claims.

As a human I think the US should open its borders for immigrants from Asia.

As a human I think the US should scrap the petrodollar and licence as much nuclear tech as possible.

Anyone who does any basic algorithmic CS stuff would have been exposed to sorting algorithms, their variations, sorting networks and so on.

There are already superoptimizers who use genetic algorithms to find the most optimal code sequence for small easily verifiable tasks. That is also a form of reinforcement learning in a way

We lived on only solar power for 7 years. For the last 2 years if I hadn't had my precious Honda GK200 petrol/kerosene generator, it would have made it quite impossible to use a desktop computer effectively. My whole successful career of 20 years as a software dev might have got upset,

Betting on solar is a silly idea. Its just a way for oil companies to keep shipping baseload

A better way to do it would be to maintain canvas Path2d objects to define the enclosed regions, which can be instantly filled with context.fill()

No need for complex pixel manipulation stuff

This also lets you do things like let the user move things around.

But climate change measures are all hypocritical and unscientific

1) The Carbon credits system

2) Forcing developing countries to reduce their energy usage, while still maintaining the Petrodollar. Sucking up to oil states and keeping the dollar strong at all costs

3) Controlling nuclear tech and restricting it from those who need it most

4) Blaming India and China for overall energy use while using 2x to 10x per capita energy

5) Pushing the foolish adoption of wind and solar which are just going to help oil companies always sell you base load

6) Shutting down existing nuclear reactors, not building new ones (looking at Germany here especially and the US)

7) Making stupid laws like rationing power

8) Blaming cryptocurrency as a bogeyman

So IMHO - if you're worried about climate change, it's legit, but whatever the US and EUs reactions to this has been a complete farce. So if you want to be heard as a scientist, maybe some criticism of the way in which its being handled is due

I asked ChatGPT about a very subtle python bug - it had to do with how python default params are actually mutable and will retain their mutated values across invocations.

I'd forgotten about this weirdness, but ChatGPT explained it.

I also managed to get ChatGPT to write two pieces of fairly complex C++ boilerplate - one was a std:vector that used mmap() and mremap() to grow linearly rather than by a fixed factor (also avoiding memory copy on resize)

Then I made it write a vector whose iterator was an integer index rather than a pointer.

I made it write all the unit tests and benchmarks for these and it did everything correctly except not knowing that munmap() needs the size parameter rounded to the nearest page.

Obviously I hardly managed to get everything correct on a single prompt. It took an iterative conversation and successive refinement