HNHacker News
TopNewBestAskShowJobs

hivacruz

274 karma · joined December 22, 2017

submissionscomments
hivacruz··on Rails 8 Guide: Features, Requirements and Upgrade Path (2026)
I recently upgraded an old website[1] stuck on Rails 4.2 / Ruby 2.4 (yeah, I know) to Rails 8.1 / Ruby 4.0 and it's still awesome as it was in the first days of Rails 2.3 back in the days. Such a great framework and language to work with!

railsdiff.org was really helpful to upgrade in addition to the official documentation, especially now with LLMs that can process all these text and assist you in the process.

[1]: https://news.ycombinator.com/item?id=49587692

hivacruz··on Claude Code for Infrastructure
I do the same. I was thinking about creating read-only kubeconfigs for him to make sure it can't do bad stuff but with a good SKILL.md, it works perfectly.
hivacruz··on Ask HN: How did you learn to code?
I “learned” to code in Visual Basic 6 to create programs mainly for AOL chat rooms (games, etc.) when I was a kid. I was more of a script kiddie than anything else, but I got hooked pretty quickly. Good times!
hivacruz··on Kvrocks: Redis-compatible distributed key value NoSQL database
I don't think it is "focused" on the JSON part of Redis, they have added a lot of commands from Redis, not only JSON. They are also working on storing vectors too for instance.

As for the drivers compatible, if you mean "clients", in our case we use the official Python Redis client with Kvrocks and it works perfectly with the commands we use.

hivacruz··on Kvrocks: Redis-compatible distributed key value NoSQL database
We use it for a year now in production and so far so good. We couldn't handle anymore having huge instances with a lot of RAM to hold data in Redis.

It looks like a normal database to me: disk storage for most of the data, and some cache in memory to speed up read queries. Everything is customizable.

I'm still waiting for a nice way to deploy it in a Kubernetes cluster, like a Helm Chart to easily setup a cluster with primaries and replicas. Also, the lack of keys eviction like LRU is problematic for us in some cases, it would be a nice addition.

hivacruz··on I got promoted to staff engineer twice
I guess a senior engineer might be "linked" to a single kind of tasks (backend, frontend etc) while a staff engineer has knowledge in a lot of domains and can be the "bridge" for projects that need people from many different teams
hivacruz··on Reverse Video Search
Instead of taking a image every 5 seconds from the video and embed it, you could detect when there are enough changes between frames to decide to embed or not. One frame, one scene, one vector.

For instance, Ffmpeg can do that with the filter `select=gt(scene,0.3)`. It selects the frames whose scene detection score is greater then 0.3 (the scene change detection score are values between 0 and 1).

https://ffmpeg.org//ffmpeg-filters.html#select_002c-aselect

hivacruz··on Vector indexing all of Wikipedia on a laptop
Did you do use the same method, i.e. split by chunks each article and vectorize each chunk?
hivacruz··on PHP in 2024
PHP is a great language to learn OOP, classes, interfaces, abstract classes, traits, managing dependencies and unit tests. I'm not using it anymore but I learned basically everything with it a decade ago. Thanks PHP!
hivacruz··on SableDb – Fast, persistent database supporting Redis API
How does it compare to Kvrocks, which use RocksDB as the storage backend too?

https://github.com/apache/kvrocks/

hivacruz··on Redis' license change and forking are a mess that everybody can feel bad about
Not affiliated (not my first comment about this) but we are using KVRocks[1] for now at work, which is based on RocksDB by Meta and it works nicely. Developers are nice and reactive and the Redis commands support is large.

We picked this project because of our RAM usage that was exploding with Redis.

The only downside for us right now is the Kubernetes support. There is an operator and a controller being made but no Helm Chart yet to deploy Kvrocks with master and replicas easily. That will be awesome.

[1]: https://github.com/apache/kvrocks

hivacruz··on Guess my RGB
For a few recruitments, we asked the candidates to create a front app like this with React. It was quite nice as we could quickly see how they use the library, what they know etc.

Simple app but funny game.

hivacruz··on How Google fights Invidious (a privacy YouTube Front end)
As an alternative YouTube Front-end, there is also Piped[0][1]

[0]: https://github.com/TeamPiped/Piped

[1]: https://piped.video

hivacruz··on The Swimmer (1964)
Can't agree more. When you read the plot, it looks really strange but the movie is really worth it.
hivacruz··on In-memory database Redis wants to dabble in disk
For those interested in an alternative to Redis on disk, compatible with the Redis protocol, have a look on Kvrocks[1] which was recently accepted in the Apache foundation. It is based on RocksDB and works quite nicely for us.

[1]: https://github.com/apache/kvrocks

hivacruz··on Twitter preventing viewing without logging in
They use the Twitter internal GraphQL endpoints.
hivacruz··on LMDB: The first version of Redis, written in Tcl (2009)
We use Kvrocks[0] at work. It is Redis on disk, powered by "RocksDB" (hence the name) and compatible with most of the Redis clients since it respects the Redis protocol. It was incubated by Apache earlier this year.

It works great and the development is really active.

[0]: https://kvrocks.apache.org

hivacruz··on What does $0=$2 in awk do?
The author made a post about it: https://kau.sh/blog/jekyll-footnote-tufte-sidenote/
hivacruz··on Black, the uncompromising Python code formatter, is stable
I understand that. And this is what I like in Black. But the single quotes thing is really up to debate. When you use it with other tools such as flake8 or pylint, you have to disable a bunch of things to make them work together because no one agrees on this point.
hivacruz··on Black, the uncompromising Python code formatter, is stable
IIRC, the -S only avoid single quotes to get switched to double quotes. What I meant was allowing Black to switch double-quotes to single quotes automatically.
hivacruz··on Black, the uncompromising Python code formatter, is stable
This is a great tool. I wish there was some settings to use single quotes instead of double quotes.
hivacruz··on Typora 1.0
Great software. I have been using it for a few years now (and even made a few themes for it). The WYSIWYG mode is really the best feature for me and what made me picked this editor. I don't like the "Live Preview" mode on most of the editors because it opens a new window or make the main window really large.

Something I like too (not sure if it exists somewhere else) is the ability to copy/paste an article (let's say from medium) directly in the WYSIWYG mode. You basically get your article just like it is being displayed on medium: h1 detected, paragraphs, bold etc. OOTB. Really nice.

hivacruz··on Esbuild – An extremely fast JavaScript bundler
I thought HTTP 2 fixed the problem of multiple downloads of small files/dependencies?

The creator of Rails talks about it here: https://world.hey.com/dhh/modern-web-apps-without-javascript...

hivacruz··on The State of Web Scraping in 2021
I used this library to get familiar with Go. It is indeed very powerful and really easy to create a scraper.

My main concerns though were about testing. What if you want to create tests to check if your scraper still gets the data we want? Colly allows nested scraping and it's easy to implement but you have all your logic into one big function, making it harder to test.

Did you find a solution to this? I'm considering switching to net/http + GoQuery only to have more freedom.

hivacruz··on Don't write bugs
I like writing bugs. You learn a new thing every time you fix one of them.
hivacruz··on GitHub Having Issues
I thought I have started too many workflows in a short time and got temporarily restricted!

By the way, just discovered a nice library to test GitHub Actions locally: https://github.com/nektos/act

hivacruz··on Stack Overflow is currently offline for maintenance
I can't work now. I'm definitely an impostor!
hivacruz··on Ask HN: Has Twitter removed the ability to browse while logged out?
Use teddit.net, it works great
hivacruz··on Asahi Linux for Apple M1 progress report, August 2021
I feel you. Sometimes I browse projects on GitHub and I'm astonished by what people can do and I can't. Example, OpenCore[0], a famous bootloader in the Hackintosh scene. How can people even start to code this.. Awewome work, awesome people.

[0]: https://github.com/acidanthera/OpenCorePkg

hivacruz··on Aspartame and cancer – new evidence for causation
I still need a small glass of Diet Coke every day in the afternoon. I need to cut the habit so I'm drinking right now Diet Coke without Caffeine.. It is like the last step before quitting for good. I like to drink sparkling water (San Pellegrino) when eating, I hope it will help me stop. Fresh sparkling water is good!

My bottle of 1 liter (33 oz I think in the US) lasts 4 or 5 days so I don't know if I'm at risk.

Page 1 of 4Next →