Better HN
topnewbestaskshowjobs
Log inSign up

dicroce

967 karma · joined Mar 25, 2011 (15y ago) · 336 submissions

Submissions

comment 1y ago · link · parent

Not even close. Software can now understand human language... this is going to mean computers can be a lot more places than they ever could. Furthermore, software can now understand the content of images... eventually this will have a wild impact on nearly everything.

comment 1y ago · link · parent

Doesn't even matter. The capabilities of the AI that's out NOW will take a decade or more to digest.

comment 1y ago · link · parent

I actually wish that instead of docker & etc we had just gotten a better chroot... Or maybe just a new kernel syscall that is chroot()++.

34.

Show HN: HNSW index for vector embeddings in approx 500 LOC(github.com ↗)

73 points · by dicroce · 1y ago · 12 comments

comment 1y ago · link · parent

I taught all my kids this way. Generally it really only takes a couple of hours.

comment 1y ago · link · parent

I had two floppies: MSDos & QModem. With those two I could use BBS's to get everything else.

comment 2y ago · link · parent

At least in the implementation I wrote the default way to provide the body was a string... which has a length. For binary data I believe the API could accept either a std::vector<uint8_t> (which has a size) or a pointer and a size. If you needed chunked transfer encoding you had to ask for it and then make repeated calls to write chunks (that each have a fixed length).

To me the more interesting question is how web server receive an incoming request. You want to be able to read the whole thing into a single buffer, but you don't know how long its going to be until you actually read some of it. I learned recently that libc has a way to "peek" at some data without removing it from the recv buffer..... I'm curious if this is ever used to optimize the receive process?

comment 2y ago · link · parent

Pet Peeve Time: Suburban neighborhoods these days typically only have a few entrances and exits... The effect of this is that unless you live in that neighborhood you won't enter it... This makes the streets quieter because you don't have any traffic passing through.. but it means that the major arteries have to have higher speeds... which I think isolates those neighborhoods.

comment 2y ago · link · parent

I lived in Fresno for 15 years. I spent north of $400 bucks a month on AC in the summertime (starts in June and goes till early November). I lived in a new home with modern insulation.

I now live in NY and I have a basement. It's generally about 10 degrees cooler. I would have loved that in Fresno.

comment 2y ago · link · parent

I wonder if this guy thinks video GOPs should all be hundreds of frames long because P frames are so much smaller than I frames and since in his world we NEVER use an unreliable network you might as well.

comment 2y ago · link · parent

Damn, I remember finding POVray on BBS's in the pre internet days. So cool that they have kept it going all this time.

comment 2y ago · link · parent

It seems to me that while passing a leetcode question shows that you might know a thing or two, not passing one doesn't really show the opposite. You could be the smartest / greatest coder ever and you just got a really unlucky question... Or it could be that you're not great when you are nervous, etc...

Also, a lot of the time it feels like the answer to most leetcode problem is some sort of trick.... and if you think of it you are golden and if you don't it sucks to be you. Most of the time I'm trying to write code that is NOT tricky... So in some ways I think the job itself will train you to seek simple clean solutions as opposed to tricks.

comment 2y ago · link · parent

Yeah, that's much better.

comment 2y ago · link · parent

It's not even buried in the middle!

comment 2y ago · link · parent

This is fascinating. I had another experience that I think sheds light on some of this. One day I was in my office and the lights were off. I turned around and looked at the dark shape on top of my coworkers desk. For a few seconds I stared blankly and then suddenly I had a thought: PC, it's his PC. Then I started to think about that period of time just before I realized what I was looking at... The only word I can describe what it felt like is: unconscious. Is it possible that consciousness is just a stream of recognition?

comment 2y ago · link · parent

When I was a kid I had a tv where the quality of the picture noticeably improved when you touched the antenna... and I had recently heard that humans were mostly water... So I grabbed a glass of water and set it on top of the tv near the antenna and the picture cleared right up. Unfortunately this event made me the IT support guy for the family from then on...

comment 2y ago · link · parent

I always think discussions like this should start with the following: A database with no indexes is slow. Finding a particular row will require a linear search. Adding an index on a column means that your optimizing finding rows by the values of that column. Hence, an index is really a mapping of a particular column's value to the position in the db OF that row (very likely an 8 byte sized integer that is the offset into the file of the row in question).

This all means we can implement indexes as b-trees where the keys are the values of a particular column and the value is the file offset of the row with that value. You could envision a simple db format where indexes and the main row file are stored in separate files. In such a database you could drop an index simply by deleting the indexes file (or add one by creating it). The main row file actually has all of the data and so indexes can be recreated if necessary (at expense of course).

comment 3y ago · link · parent

I think it's good to be concerned and cautious but I also think you are being a bit extreme here.

comment 3y ago · link · parent

For me, hybrid > remote only > onsite.

comment 3y ago · link · parent

Not that the opinion of some random on the internet means anything, BUT....

I think the neocortex for the most part lets other parts of the brain control themselves... and really only has high level access. I think emotions are one of these lower level semi autonomous subsystems... but so are things like autonomous body control, balance, each of the senses etc, etc... The neocortex is playing the "Human" video game and controlling things from a high level... but cannot directly control every aspect of these subsystems... and honestly, this is how complexity is dealt with (if the neocortex could control it all, the whats the point of the other subsystems)?

comment 3y ago · link · parent

When I am starting a new project I have learned to identify the unknowns.

"I don't know how to do X, Y and Z."

Before I begin working on the real solutions for X, Y & Z I start by making a test program that does X. It's ok if it requires a ton of scaffolding, or canned data... the important thing is to do X. Then I do the same for Y & Z.

Now that I understand the problem I do a software design. I do this on paper and I purposely do it super quick and not caring about how neat it is... and I throw away designs rapidly as I iterate and improve. Eventually the paper crumbling slows down and I approach a real design.

This is finally the point that I can write "real" code. The unknowns are gone and all the software design iteration happened on paper.

comment 3y ago · link · parent

Damn. It's like jpeg for neural networks.

comment 3y ago · link · parent

My wife has Diabetes and recently switched to a CGM. She also saw the insanely inaccurate results.... BUT it improves. After a few hours the numbers get more accurate as it adapts to you. Now she does a thing where she overlaps the old sensor with the new sensor for a couple of hours every couple of weeks. She also still occasionally uses the finger prick method because its results are more indicative of where you are going in the short term.

comment 3y ago · link · parent

Second Reality by Future Crew, Timeless by Tran, so many good ones from this era.

comment 3y ago · link · parent

The way that I have avoided burnout for all these years is working on my own projects, and building them exactly the way I want to. This gives me the strength to grind through the shitty work I am paid to do.

comment 3y ago · link · parent

Never heard such a good argument for why we should all be replaced by AI.

comment 3y ago · link · parent

I have been a paid software engineer for about 30 years. 10 to 15 years in I learned to love computer science, but for the first huge portion of my career what motivated me was making things. Demos, Games, etc... Maybe the key is to start building things immediately? Things the learner is interested in making.

comment 3y ago · link · parent

I bet Alphabet has calculated that of all of the rides a typical ridesharing service offers only a subset is currently serviceable by autonomous vehicles. A deal (or buying) Uber allows them to offer the service on only the rides they are confident they can fulfill.

comment 3y ago · link · parent

The Yuan becoming the world reserve currency would mean the Yuan had significant value outside of China... which would mean Chinese citizens could leave the country with their wealth, and China doesn't want that. What they want is the hurt the US, so propaganda that scares Americans and even causes financial havoc is valuable.

comment 3y ago · link · parent

You know, it was probably super smart not showing Emperor Shaddam IV in the first film. The audience has enough to learn and see that is mandatory it was probably wise leaving out some things that weren't mandatory for the first film.
12345
12