brutuscat's comments

brutuscat | 11 days ago | 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 | 4 months ago | 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 | 9 months ago | on: Cursor 1.0

Ah! You are asking for version control system?

It’s called git!

brutuscat | 10 months ago | 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 | 1 year ago | 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 | 1 year ago | 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 | 2 years ago | 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 | 3 years ago | 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 | 3 years ago | 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!
page 1