HNHacker News
TopNewBestAskShowJobs

habibur

2,635 karma · joined August 26, 2008

habib@habibur.com
submissionscomments
habibur··on Double-slit experiment holds up when stripped to its quantum essentials
I am more interested in its explanation, now that the theory has been proven correct again and again.

Especially interested in "delayed choice quantum erasure experiment", where you decide to determine the "which path" after the photon has passed through the slits and hit the detector. And depending on your later decision the photon seems to rewrite history going back in time.

habibur··on Constrained languages are easier to optimize
Brings back nostalgic memories from Java days in the 2000s. "Java will be faster than C" for exactly the same reasons laid out in the article.

And here we are, 20 years later.

habibur··on Do not download the app, use the website
> website forces you to trust your data to the website

Applies to apps too. The point was, you trust you whole disk to apps, in addition to this.

habibur··on Never write your own date parsing library
> or my favorite January 1, 1600 since 1600 is a multiple of 400

You need to deal with 1600 and 2000 being leap year.

While 1700, 1800, 1900 not being a leap year.

I limit dates from 1900 to 2100. All !year%4 = leap year.

Especially when you try to convert int_date to y,m,d things get tricky.

habibur··on Gemini with Deep Think achieves gold-medal standard at the IMO
Solved 5 problems out of 6, scoring 35 out of 42. For comparison OpenAI scored 35/42 too, days back.
habibur··on New battery has life so long you may never have to recharge
These batteries provide milliwatt level power. Enough to power, maybe a clock circuit without display.
habibur··on Facebook ban on discussing Linux?
I get blocked anytime I share my github project.
habibur··on Lua is so underrated
Add, no way to determine size of Array, which is the primary data structure anyway.

No item.length propery.

You might decide to count with foreach(), but that will terminate when it encounters the first value in the array that is NULL.

habibur··on Flappy Bird for Android, only C, under 100KB
Less than 4k loc.

   457 android_native_app_glue.c
   360 audio.c
   802 game.c
   201 init.c
    93 main.c
    39 mouse.c
    38 shaders.c
   229 texture.c
  1377 upng.c
    27 utils.c
  3623 total
habibur··on Using Fibonacci numbers to convert from miles to kilometers and vice versa
"how many kilometers are there in 100 miles?"

Increase by 60%. That's how I do it.

habibur··on Mimalloc Cigarette: Losing one week of my life catching a memory leak (Rust)
RAII <-- best of both worlds.
habibur··on Reverse-Engineering an IP Camera (2019)
Smart camera. Attach a microphone and speaker with the camera. Any movement at odd times and you get a WhatsApp video call on your cell phone. You can watch the other person and can talk to him, "Hay! what are you doing at my home?"

I was wondering if that's already available or not.

habibur··on Producing fuels from 1,500 degrees of solar heat
Reading the article I get a feeling that it's more like proof of concept, than a economically feasible project, as there's no mention of costs.
habibur··on Ask HN: What is the most productive stack or lang for single devs ?
Cheapest solution is still LAMP on DigitalOcean box. But instead of MySQL use SQLite.

Add more performance? No framework, roll your own.

habibur··on Garbage Collectors Are Scary
Get ready to through out your GC as soon as it works and build a better one or different one. And then again, and then again. It's more like art.
habibur··on Rusty.hpp: A Borrow Checker and Memory Ownership System for C++20
For other that are wondering how C++ programmers memory managed till now -- check RAII.
habibur··on Astronomers discover Milky Way’s biggest stellar black hole
Largest "stellar" black hole in Milky Way. Not the "largest black hole" as some media are reporting it in their title.

The largest black hole in Milky Way is million times more massive than our sun. Falls in super massive category.

habibur··on M 4.8 – 2024 Whitehouse Station, New Jersey Earthquake
Shallower than usual. Very shallow quakes happen at 10 km to 20 km depth. This one is at 5 km.
habibur··on M 4.8 – 2024 Whitehouse Station, New Jersey Earthquake
5 km depth. That's of concern. Will shake a small region more violently than what a normal mag 4+ quake would have.
habibur··on Some Reflections on Writing Unix Daemon
> There are use-cases for async/await, particularly for single-threaded languages, or for people writing network servers that have to have to deal with vast numbers of queries. Rust is multi-threaded – indeed, its type system forbids most classic multi-threading errors – and very few of us write servers that deal with vast numbers of queries.

This is the portion that I was seeking his feedback on. Rust originally was designed to work with OS native threads. Later Nginx like software emulated threads were proven far more efficient and fast. Here a single thread jumps from connection to connection, instead of waiting for the other side to respond. In C you can do it but you need the ability for a function to resume from the mid of its body where it left off. That asks for "co-routines" which even though possible makes the code complex.

Rust solution is async/await. But now they have two solutions, the more integrated multi threads and then this newly introduced single threaded async/await. It's better to get feedback from people that have worked on it and their good or bad experience.

habibur··on Ask HN: Did you encounter any leap year bugs today?
I wear Xiaomi's Amazfit Pro 3R. Digital. Wrist band. Hung at midnight of 29th Feb today. Did a bunch of factory reset but didn't recover. And then recovered at the morning of 1st of March.

Date is relatively simple.

    days_in_month(year, month) :
      if(month==2) return days_in_feb(year)
      //all other months have constant number of days, always.

    days_in_feb(year,month) :
      if(!(year % 400)) return 29;
      if(!(year % 100)) return 28;
      if(!(year % 4)) return 29; 
      return 28;
And you are done for all Gregorian years.
habibur··on Phind-70B: Closing the code quality gap with GPT-4 Turbo while running 4x faster
> Fun fact: We melted an H100 during Phind-70B's training!

Don't these cards have internal temperature control, that will shut it down before burning?

habibur··on Show HN: I built a vector database API on Cloudflare
One thing I can confirm from this code is that unlike what I previously thought vector search is not the main point of a vector database, rather it's read, write, update crud, just like normal SQL databases, with the exception that data are vector data instead of text and numbers.
habibur··on The Linux Kernel Prepares for Rust 1.77 Upgrade
The benefit of statically linking becomes moot when it doesn't reduce the number of dynamically linked libraries. That's the point.
habibur··on The Linux Kernel Prepares for Rust 1.77 Upgrade
Hello world deps for C :

    linux-vdso.so.1 (0x00007fff25cb8000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fe5f08d9000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fe5f0ae2000)
And for Rust

    linux-vdso.so.1 (0x00007ffc109f9000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f8eda404000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f8eda222000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f8eda4a8000)
Rather Rust has 1 more dynamically linked library than C.
habibur··on The Linux Kernel Prepares for Rust 1.77 Upgrade
You can strip C compiled binaries too. And that halves the binary size. The point is for example a hello world Rust binaries is 300kb after striping while C compiled one is 15kb. A difference of 20 times.
habibur··on Why is Common Lisp not the most popular programming language?
It's vector and hashmap that you need most, not linked list.
habibur··on CERN aims to build €20B collider
$20 billion might have sounded huge 20 years back. But we are living in an age where someone paid $40bl for Twitter.
habibur··on Google TPU v5p beats Nvidia H100
I was seeking power consumption and price comparison with it, as otherwise only faster doesn't mean much.
habibur··on Command-line Tools can be 235x Faster than your Hadoop Cluster (2014)
That also means using Hadoop makes sense only when cluster size > 235 machines.
← PreviousPage 2 of 23Next →