HNHacker News
TopNewBestAskShowJobs

bakul

647 karma · joined July 29, 2013

submissionscomments
bakul··on Feb 27 2023 GCP Outage Incident Report
To update a critical file atomically we used to first create an updated copy on the same filesystem and then rename it. Is this not possible on GCP?
bakul··on 20M digits of pi in 1 minute using Julia
I will give it a try, time permitting. The scheme code above is a variation of something I converted from CommonLisp (orignal code by Robert Smith) in 2013. Its speed depends on bignum multiplication speed. I imagine most serious bignum implementations use the Schönhage–Strassen algorithm for very large numbers.
bakul··on 20M digits of pi in 1 minute using Julia
The following implementation of the Chudnovsky algorithm takes about the same time in Gambit-Scheme on M1 Mac for 20M digits (and allocates 16GB):

  (define (pi digits)
    (let* ((A 13591409)
           (B 545140134)
           (C 640320)
           (C^3/24 (quotient (expt 640320 3) 24))
           (D 12))
      (define (-1^n*g n g) (if (odd? n) (- g) g))
      (define (split m n)
        (if (= 1 (- n m))
          (let* ((6n (* 6 n)) (g (* (- 6n 5) (- (+ n n) 1) (- 6n 1))))
            (list g (* C^3/24 (expt n 3)) (* (-1^n*g n g) (+ (* n B) A))))
          (let* ((mid (quotient (+ m n) 2))
                 (gpq1 (split m mid))
                 (gpq2 (split mid n))
                 (g1 (car gpq1)) (p1 (cadr gpq1)) (q1 (caddr gpq1))
                 (g2 (car gpq2)) (p2 (cadr gpq2)) (q2 (caddr gpq2)))
            (list (* g1 g2) (* p1 p2) (+ (* q1 p2) (* q2 g1))))))
      (let* ((num-terms (inexact->exact (floor (+ 2 (/ digits 14.181647462)))))
             (sqrt-C (integer-sqrt (* C (expt 100 digits))))
             (gpq (split 0 num-terms))
             (g (car gpq)) (p (cadr gpq)) (q (caddr gpq)))
        (quotient (* p C sqrt-C) (* D (+ q (* p A)))))))
I am surprised it is much slower in Julia (as per what is noted in the gist).
bakul··on Time to get the Posix elephant off our necks?
May be the author wants multics style segments or memory mapped files?

May be provide “addr = mmap_open(path, flags, &size)” ?

bakul··on Internal review finds falsified data in Stanford President’s Alzheimer research
Why would Stanford do that? Baker’s author page shows this is not his first such investigation. https://stanforddaily.com/author/tabaker/
bakul··on Emotion in music, giving you the chills
Is it any kind of music? There are so many kinds of music in the world, perhaps one of them resonates with you?

For me, it is very different. Almost any genre of music can move me. As for dreams I can even dream when I’m only half asleep. Not sure there is a connection.

bakul··on Mukarram Jah, Heir to an Opulent Throne He Abandoned, Dies at 89
FWIW, I first learned about radio and electronics from an ex-royal! When in the fourth grade I started taking apart radios and breaking them, my father took me, along with the broken radio, to the local radio repair place (that may have been the only one at the time in Ahmedabad, India). The owner was an old man of 70 or so. He taught me the very basic stuff and helped me build a crystal radio and soon I graduated to building fancier stuff! Everyone called him Bapu (father). Later on I learned he was a prince from a small princely state in the Western Gujarat. India forcibly merged all 500+ such principalities in the Union once it became independent. These princes had a "princely purse", a govt allowance, to maintain their status for a while but that ended in 1956. Bapu had a degree in radio and electronics from UK so he set up the repair shop which happened to be within the walking distance from my home. When I met him he had no royal airs; he was more like a kindly grandfather who had infinite patience for a skinny undisciplined but inquisitive kid!
bakul··on Show HN: I'm a doctor and made a responsive breathing app for stress and anxiety
I found the Apple Watch breathe exercise in the meditation app more useful and relaxing. Lungy was rather frustrating.
bakul··on The Body in the Buddha (2017)
This may be of interest: https://sci-hub.se/https://www.jstor.org/stable/1062719

The "body in buddha" x-ray showed an iron band supporting the head. There is an explanation in the above paper.

bakul··on My grandfather was almost shot down at the White House (2018)
She might have escaped her fate if she had replaced her Sikh bodyguards with non Sikhs after Operation Blue Star that removed a militant Sikh religious leader and his followers from the Golden Temple in Amritsar.
bakul··on A mistake that killed Japan’s software industry?
My favorite is the lathe type apple parer (peeler corer slicer). Probably an overkill for eating an apple, but perfect for cooking a few. Invented by David Goodall in 1864! Not because Americans are bad at peeling but because people made all sorts of things with apples and because of “yankee ingenuity”. The first apple parer patent was granted in 1803! https://shop.kingarthurbaking.com//items/apple-peeler-corer-...
bakul··on Golang disables Nagle's Algorithm by default
What has this to do with the Go language? Runtime defaults don't always work for every possible situation, particularly when the runtime provides much more over a kernel interface. Investigate performance issues and if some default doesn't work for you, you can always change it.
bakul··on Ancient grammatical puzzle solved after 2,500 years
Seems modern scholars apply this rule (1.4.2) in a much narrower scope. The researcher argues that 1.4.2 is actually a metarule that applies to all of Aṣtādhyāyī. Covered near the end of the 1st chapter in his thesis.
bakul··on Ancient grammatical puzzle solved after 2,500 years
As I understand it, this rule allows one to have an unambiguous parse of a sanskrit sentence into its constituent parts (it feels a bit like "the longest prefix match" rule used in packet forwarding!). My question is, did Pāṇini not specify this rule in his 3959 sūtras or was it somehow missed?

[Edit: covered in Rajpopat's thesis...]

bakul··on The Plan-9 Effect or why you should not fix it if it ain't broken (2016)
No access to the sources was the difference.
bakul··on The Plan-9 Effect or why you should not fix it if it ain't broken (2016)
Even Minix, which was (IMHO) worse than Unix Version 7, was popular at one point! What Torvalds started from. With the advent of i386, many people definitely wanted something better than MSDOS or early Windows. If plan9 had been released as open source by 1992 things might’ve been very different.
bakul··on Using Rust at a startup: A cautionary tale
> But in a world where speed of delivery and delivery itself (just deliver and deal with it later), Rust will definitively not shine.

True for most startups.

bakul··on APL deserves its renaissance too (2018)
There was a paper in 1993 about "APROL: a Hybrid Language" that combines an array processing language and a dialect of Lisp (Scheme) in a consistent and useful manner. Seems like April is much further ahead!
bakul··on Pakistan's lost city of 40k people
If you are in the Gujarat state, India, you can go visit Lothal (part of the same Indus Valley Civilization) and look at the fascinating seals in its museum. It is under 100Km from Ahmedabad.

https://en.wikipedia.org/wiki/Lothal

https://www.harappa.com/blog/discovery-lothal

bakul··on In Praise of Plan 9
Even if each connection has the same remote IP address + TCP port, it has a distinct local port. What you get back from opening /net/tcp/clone is essentially a directory name, with the local port as a file name in it, along with a few more files representing various attributes of interest.
bakul··on In Praise of Plan 9
IMHO the kitchensink like approach of adding more features to Linux misses the point of the simplicity of plan9. Representing & accessing resources as file systems was the real insight. If the OS provides N different ways of doing something, it has to continue supporting that which has a real cost. I once compared compiling plan9 & Linux from scratch on the original RaspberryPi. 1 minute versus many hours. Granted that the Linux kernel does a lot more and supported a few more devices on 'pi and plan9 pushes more drivers in the user space but even compiling everything on it took about 4 minutes. That included Ghostscript and two editors and the windowing system and more.
bakul··on In Praise of Plan 9
> Plan 9 failed, in a sense, because Unix was simply too big and too entrenched by the time Plan 9 came around.

The Unix renaissance in the ‘90s had a lot to do with open source source OSes such as (primarily) Linux and the BSDs. Until then we had a bunch of corporate unixes, no two alike but expensive and kernel hacking was basically off limits. With the advent of i386 we had affordable & powerful computers that could run “real” OSes and us hackers were hungry for an open source OS. Computing history might’ve been different if plan9 was made open source before Linux became available. But that was not to be.

bakul··on Clojure from a Schemer's perspective (2021)
Gambit scheme also just works. That's what I use on FreeBSD, MacOS (m1 and x86-64), Ubuntu and Raspbian. Had a version running under plan9 as well but that was a long time ago.
bakul··on FreeBSD optimizations used by Netflix to serve video at 800Gb/s [pdf]
Would netflix benefit if zfs was modified to use a unified cache to make zero-copy possible?
bakul··on The Mystery of 355/113 (2010)
1/pi == 113/355 - this is why I have remembered it since age 10 or so!
bakul··on FlightRadar24 crashes due to surge in users tracking SPAR19
after VP Kamala Harris. Pence has been dispensed.
bakul··on Most Billion-Dollar Startups in the U.S. Founded by Immigrants
The full report: https://nfap.com/wp-content/uploads/2022/07/2022-BILLION-DOL...
bakul··on It’s time to leave the leap second in the past
Wouldn't it be less of a disruption if we standardize how smearing is done?
bakul··on Ask HN: What's the biggest problem you face as a parent?
What Andrei is talking about is based on the “nonviolent communication” philosophy and practice. See https://www.nonviolentcommunication.com/learn-nonviolent-com...

A bunch of resources are listed near the end including NVC parenting videos.

bakul··on V 0.3
So you are commenting on something about which you have no direct experience, nor are you planning to change that. Why even “bother” repeating something you may have read or heard; why not just stay silent or learn something new?
← PreviousPage 4 of 12Next →