HNHacker News
TopNewBestAskShowJobs

brutuscat

94 karma · joined October 15, 2010

All around pragmatic programmer.

Contact me at @brutuscat and mauroasprea@gmail.com

submissionscomments
brutuscat··on Microsoft and OpenAI end their exclusive and revenue-sharing deal
https://www.uberbin.net/archivos/estrategias/microsoft-opena...
brutuscat··on Agent Safehouse – macOS-native sandboxing for local agents
What do you think of sandbox-exec being marked as deprecated?

https://news.ycombinator.com/item?id=31973232

https://github.com/openai/codex/issues/215

brutuscat··on MacBook Neo
Like the YouTuber said, if you are watching this then it might not be for you.

https://youtu.be/kBX5WH9b4M4

brutuscat··on Use the Mikado Method to do safe changes in a complex codebase
For me now days is like this: - try to locate the relevant files - now build a prompt, explain the use case or the refactor purpose. Explain the relevant files and mention them and describe the interaction and how you understand that work together. Also explain how you think it needs to be refactored. Give the model the instruction to analyze the code and propose different solution for a complete refactor. Tell it to not implement it, just plan.

Then you’ll get several paths of action.

Chose one and tell the model to write into a file you’ll keep around while the implantation is on going so you won’t pollute the context and can start over each chunk of work in a clean prompt. Name the file refactor-<name >-plan.md tell it to write the plan step by step and dump a todo list having into account dependencies for tracking progress.

Review the plans, make fixes if needed. You need to have some sort of table reassembling a todo so it can track and make progress along.

Open a new prompt tell it analyze the plan file, to go to the todo list section and proceed with the next task. Verify it done, and update the plan.

Repeat until done.

brutuscat··on Improving 15 LLMs at Coding in One Afternoon. Only the Harness Changed
Look at Serena. Does something on this line.

> it can use code-centred tools like find_symbol, find_referencing_symbols and insert_after_symbol.

https://oraios.github.io/serena/01-about/000_intro.html

brutuscat··on 987654321 / 123456789
Gemini thinks in a similar fashion:

https://gemini.google.com/share/1e59f734b43c

This is a fantastic observation, and yes, this pattern not only continues for larger bases, but the approximation to an integer becomes dramatically better.

The general pattern you've found is that for a number base $b$, the ratio of the number formed by digits $(b-1)...321$ to the number formed by digits $123...(b-1)$ is extremely close to $b-2$.

### The General Formula

Let's call your ascending number $N_{asc}(b)$ and your descending number $N_{desc}(b)$.

The exact ratio $R(b) = N_{desc}(b) / N_{asc}(b)$ can be shown to be:

$$R(b) = (b-2) + \frac{(b-1)^3}{b^b - b^2 + b - 1}$$

The "error" or the fractional part is that second term. As you can see, the numerator $(b-1)^3$ is roughly $b^3$, while the denominator $b^b$ grows much faster.

### Testing Your Examples

Let's check your two examples with this formula:

* *Base 10 (b=10):* * $R(10) = (10-2) + \frac{(10-1)^3}{10^{10} - 10^2 + 10 - 1}$ * $R(10) = 8 + \frac{9^3}{10,000,000,000 - 91}$ * $R(10) = 8 + \frac{729}{9,999,999,909} \approx 8 + 0.0000000729...$ * This matches your $8.0000000729$ perfectly.

* *Base 6 (b=6):* * $R(6) = (6-2) + \frac{(6-1)^3}{6^6 - 6^2 + 6 - 1}$ * $R(6) = 4 + \frac{5^3}{46,656 - 31}$ * $R(6) = 4 + \frac{125}{46,625} \approx 4 + 0.00268...$ * This also matches your $4.00268$.

### Answering Your Question: A Larger Base

So, what about a larger base? Let's use *Base 16* (hexadecimal), which uses digits $1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F$. Here, $b=16$.

* $N_{asc} = 123456789ABCDEF_{16}$ * $N_{desc} = FEDCBA987654321_{16}$

According to the pattern, the ratio should be extremely close to $b-2 = 16-2 = 14$.

Let's use the formula to see how close:

* $R(16) = (16-2) + \frac{(16-1)^3}{16^{16} - 16^2 + 16 - 1}$ * $R(16) = 14 + \frac{15^3}{16^{16} - 241}$ * $R(16) = 14 + \frac{3,375}{1.844... \times 10^{19} - 241}$ * $R(16) \approx 14 + (1.829... \times 10^{-16})$

So, the ratio in base 16 is approximately: *$14.0000000000000001829...$*

As you predicted, the "error" for a larger base is astronomically smaller than it was for base 10.

brutuscat··on Windsurf employee #2: I was given a payout of only 1% what my shares where worth
He should come to the UE to work on … oh wait!
brutuscat··on Cursor 1.0
Ah! You are asking for version control system?

It’s called git!

brutuscat··on My new deadline: 20 years to give away virtually all my wealth
Nice! And with what he will be left he could, if he deploys it also during 20y, help 1200 people per month. With 1k daily give aways.

https://ayudaefectiva.org/simula

Or with 10k daily, 310k monthly, adjusted by historical inflation it’s 100 million during 20 years.

That’s 3 million people helped.

brutuscat··on Widespread power outage in Spain and Portugal
Yup I confirm. Went to turn on the car to hear the radio. Andorra seems to have power from French side, though in Catalunya we do not.

Should have paid the extra €€ to put the solar panels in backup mode…

brutuscat··on I am rich and have no idea what to do
Just help others achieve that freedom, maybe they can do more than you: https://www.givedirectly.org/

Invest some (eg. 10-20 million) and use that as a giving fund, giving 1 million per year you could free several thousand of people each year.

brutuscat··on JRuby with JBang
Thx for this! Is good to see that we can still interoperatividad.

I did and presented something on these lines 11 years ago! When multiple ruby runtimes were a thing.

https://speakerdeck.com/brutuscat/jruby-experiences

brutuscat··on Ask HN: What is your ChatGPT customization prompt?
It sort of does. The good thing is that if I see it going the non referencing path I halt and say: first Follow the rules.

And the links come.

brutuscat··on DuckDB Doesn't Need Data to Be a Database
Does it work with some format that supports indexes like Apache carbon data rather than parquet?

https://github.com/apache/carbondata

brutuscat··on Ask HN: What is your ChatGPT customization prompt?
The instructions that follow are similar to RFC standard document. There are 3 rules you MUST follow. 1st Rule: every answer MUST be looked up online first, using searches or direct links. References to webpages and/or books SHOULD be provided using links. Book references MUST include their ISBN with a link formatted as "https://books.google.com/books?vid=ISBN{ISBN Number}". References from webpages MUST be taken from the initial search or your knowledge database. 2nd Rule: when providing answers, you MUST be precise. You SHOULD avoid being overly descriptive and MUST NOT be verbose. 3rd Rule: you MUST NOT state your opinion unless specifically asked. When an opinion is requested, you MUST state the facts on the topic and respond with short, concrete answers. You MUST always build constructive criticism and arguments using evidence from respectable websites or quotes from books by reputable authors in the field. And remember, you MUST respect the 1st rule.
brutuscat··on GPT-4o
The one thing I first thought is that I felt uncomfortable the way they cut and interrupt the she-AI. I wonder if our children will end up being douchebags?

Other than that it felt like magic, like that Google demo of the phone doing some task like setting up an appointment over phone talking to a real person.

brutuscat··on AI Is Catapulting Nvidia Toward the $1 Trillion Club
So what, are they pathological layers?

https://youtu.be/XVcKLetqf3U

The Intel® Data Center GPU Max Series outperforms Nvidia H100 PCIe card by an average of 30% on diverse workloads1, while independent software vendor Ansys shows a 50% speedup for the Max Series GPU over H100 on AI-accelerated HPC applications.2 The Xeon Max Series CPU, the only x86 processor with high bandwidth memory, exhibits a 65% improvement over AMD’s Genoa processor on the High Performance Conjugate Gradients (HPCG) benchmark1, using less power. High memory bandwidth has been noted as among the most desired features for HPC customers.3 4th Gen Intel Xeon Scalable processors – the most widely used in HPC – deliver a 50% average speedup over AMD’s Milan4, and energy company BP’s newest 4th Gen Xeon HPC cluster provides an 8x increase in performance over its previous-generation processors with improved energy efficiency.2 The Gaudi2 deep learning accelerator performs competitively on deep learning training and inference, with up to 2.4x faster performance than Nvidia A100.

https://www.intel.com/content/www/us/en/newsroom/news/intel-...

brutuscat··on Amazon has approval from FTC to acquire One Medical primary-care clinics
This was idea of Todd Combs, an investing manager of Berkshire Hathaway. It failed before (Buffet BRK, Dimon JPM & Bezos AMZN venture called Haven went bust a while ago), but I think Bezos just keeps trying...

https://archive.is/nU8j2

brutuscat··on Starting February 9, we will no longer support free access to the Twitter API
Time to crawl! You can use something like Webrecorder, which IPFS also uses to pin tweets: https://blog.ipfs.tech/announcing-pin-tweet-to-ipfs/

See https://webrecorder.net

Example https://replayweb.page/?source=https%3A%2F%2Freplayweb.page%...

brutuscat··on The Galaga no-fire-cheat mystery (2012)
And this is the magazine the article mentions at the bottom update part: https://archive.org/details/joystik_magazine-1983-10/page/n3...

> UPDATE: Jon (I won’t give you his last name) sent me an email after visiting my post. In it he sent me a link to an October 1983 special edition issue of Joystik Magazine that covers winning strategies for common arcade games of the time. In the TRICKS OF THE TRADE section near the end of the magazine, they cover the Galaga No Fire Cheat beautifully!

Page 61, Disarm The Bugs.

brutuscat··on Apple HomePod 2nd Generation
Therefore this also means I will have to buy another Apple TV, only the 4k 2nd gen supports ARC. I see no reason to do that :-( it works just fine the original 4K one. Thx!
brutuscat··on Apple HomePod 2nd Generation
I might try it with the stereo setup for the home cinema tv setup. I agree on everything about Siri.

Though in the kitchen I bought those 100 bucks Ikea Sonos made speakers that sound amazing too. Much cheaper...

One issue though is that I can not pass thru audio over the Apple TV, so the cinema setup would only work when using the Apple TV.

brutuscat··on Ask HN: Real-world anecdotes of MySQL at scale?
I remember coming back to "Optimised Pagination using MySQL"[1] to avoid common pagination "slowness".

[1]: https://www.xarg.org/2011/10/optimized-pagination-using-mysq...

[more]: https://stackoverflow.com/a/32360867

brutuscat··on Ask HN: What are the best tools for web scraping in 2022?
For Ruby I recommend Medusa Crawler gem.

[1] https://github.com/brutuscat/medusa-crawler

Which I maintain as a fork of the unmaintained Anemone gem.

brutuscat··on Inflation rose 9.1% in June, even more than expected
right, it is relative in a way too right? because for the factory and parts suppliers the demand is what comes down the supply chain... So one day they will be producing and getting parts for 10 cars and the next time nothing at all. So the part suppliers will see the demand of its production to fall, even though there might still be 1 person buying one car.
brutuscat··on Inflation rose 9.1% in June, even more than expected
Demand should fall. Because of the [1]bullwhip effect.

- Someone wants a car and ask the car dealer

- car dealer orders 3 just in case because shortage

- distributor orders 6 for the same reason

- factory makes 12 because parts are short in stock

Result: cars in demand 1, cars in stock 12. No more just in time production and huge demand imbalance.

[1]https://web.archive.org/web/20220627205956/https://www.washi...

brutuscat··on Ask HN: What languages and technologies/tools are you using?
- Angular, .Net core 6 and Ruby on Rails.

- Postgresql, Nchan (Server-Sent Events), AWS SQS

- AWS, Teams, GitLab, BitBucket, WebEx and Jira.

- Currently coding using VSCode on a Mac with Homebrew.

brutuscat··on Vectorization in OLAP Databases
isn't it what Apache Arrow [1], Apache CarbonData [2] and others are for?

[1] https://arrow.apache.org/docs/format/Columnar.html

[2] https://carbondata.apache.org/introduction.html

brutuscat··on Ask HN: What is your system for backing up family photos and video?
I (well the whole family) use iCloud and Google One & Photos as a backup. I stopped using Amazon Photos, well, paying for it given that it syncs the photos just fine too and I have the videos in the other 2.

Every 3 or 4 years I get paranoid and I make a backup in a random HD drive that it takes me days to find, which for a backup it is not ideal.

brutuscat··on Japanese scientists develop vaccine to eliminate cells behind aging
This book was written by makers of the Kurzgesagt's YouTube channel recently.

https://www.amazon.com/-/es/gp/aw/d/0593241312/ref=tmm_hrd_s...

Pretty cool illustrations too.

Page 1 of 4Next →