introduce-yourself

Yoshihiro Hasegawa 2025-08-29T14:30:09.931259Z

Hi. I'm Yoshihiro. I was born and raised on a small farm and am essentially a farmer by nature, though I study mathematics and algorithms as a hobby. The field I'm particularly engrossed in at present is p-adic theory. After reading this recently discussed https://arxiv.org/pdf/2504.17033, I felt it had a strong affinity with the mathematics that interests me, so I wrote a https://dev.to/p_pumulo/building-an-ultra-metric-tree-in-clojure-from-radix-filters-to-p-adic-distance-2k1e post about it.

👍 1
🎉 2
👋 8
👋🏼 1
Yoshihiro Hasegawa 2025-09-02T07:23:59.942139Z

@p-himik Thank you.

p-himik 2025-09-03T03:21:04.232069Z

Just got to reading the article. Why are the distances in this code block different?

;; Find the 3 nearest neighbors to the key "app".
;; The search is highly optimized and prunes large parts of the tree.
(umt/um-k-nearest populated-tree "app" 3)

;; => [;; [value original-key distance]
;;     [{:category "verb"} "apply" 0.0000152587890625]
;;     [{:category "fruit", :color "red"} "apple" 0.0000152587890625]
;;     [{:category "software"} "application" 5.9604644775390625E-8]
;;    ]
I tried reproducing it and on my end the distances are all the same:
user=> (p-adic-distance "app" "application")
5.960464477539063E-8
user=> (p-adic-distance "app" "apple")
5.960464477539063E-8
user=> (p-adic-distance "app" "apply")
5.960464477539063E-8

Yoshihiro Hasegawa 2025-09-12T13:42:03.134959Z

Thanks for the heads-up. That was just a simple copy-paste error. It's better to round the numbers to highlight the difference. In a non-Archimedean setting, the speed of digit propagation is key, which is why rounding plays such a vital role.

👍 1
p-himik 2025-08-29T14:40:04.678459Z

Nice! Consider also sharing it in #news-and-articles.