HNHacker News
TopNewBestAskShowJobs

dilawar

1,986 karma · joined January 21, 2017

Rust | C++ | Python | PHP | Systems Engineer

https://github.com/dilawar

submissionscomments
dilawar··on Codemaps: Understand Code, Before You Vibe It
Love what you are trying to do here.

Will evaluate it on a couple of PHP codebases I maintain at work.

Is there a way to contribute to the project?

dilawar··on Studio Ghibli, Bandai Namco, Square Enix Demand OpenAI to Stop Using Their IP
The podcast 'in our time' (bbc) has an episode on 'copyright': https://pca.st/episode/928a7b98-18c0-4c70-8558-8ef982ce08de

From its title

"In 1710, the British Parliament passed a piece of legislation entitled An Act for the Encouragement of Learning. It became known as the Statute of Anne, and it was the world’s first copyright law. Copyright protects and regulates a piece of work - whether that's a book, a painting, a piece of music or a software programme. It emerged as a way of balancing the interests of authors, artists, publishers, and the public in the context of evolving technologies and the rise of mechanical reproduction. Writers and artists such as Alexander Pope, William Hogarth and Charles Dickens became involved in heated debates about ownership and originality that continue to this day - especially with the emergence of artificial intelligence. With:

Lionel Bently, Herchel Smith Professor of Intellectual Property Law at the University of Cambridge

Will Slauter, Professor of History at Sorbonne University, Paris

Katie McGettigan, Senior Lecturer in American Literature at Royal Holloway, University of London.

dilawar··on Async/Await is finally back in Zig
Someone has historical insights into why async/await seems to have taken over the world?

I often write Rust and I don't find it very attractive, but so many good projects seem to advertise it as a "killer feature". Diesel.rs doesn't have async, and they claim that perf improvement may not be worth it (https://users.rust-lang.org/t/why-use-diesel-when-its-not-as...).

For a single threaded JS program, async makes a lot of sense. I can't imagine any alternative pattern to get concurrency so cleanly.

dilawar··on Unexpected productivity boost of Rust
> One caveat though - using a normal std Mutex within an async environment is an antipattern and should not be done - you can cause all sorts of issues & I believe even deadlock your entire code.

True. I used std::mutex with tokio and after a few days my API would not respond unless I restarted the container. I was under the impression that if it compiles, it's gonna just work (fearless concurrency) which is usually the case.

dilawar··on Hardening mode for the compiler
> So this mode needs to set user expectations appropriately: your code breaking between compiler releases is a feature, not a bug.

Good luck. I feel that the C++ community values backward compatibility way too much for this to succeed. Most package maintainers are not going to like it a bit.

dilawar··on URL-Driven State in HTMX
https://chrlschn.dev/blog/2025/05/beware-the-complexity-merc...
dilawar··on HathiTrust Digital Library
Haathi means elephant in Hindi. I first thought it is to be an Indian site but it is based in the US.

Curious about the connection.

dilawar··on LLM Inevitabilism
Those machines unlocked more work, different work, that led to better paying jobs!

I am all up for AI if it leads to "better" work and jobs but cutting jobs to cut cost sound like a race to bottom!!

Are AI time /cost savings going to help me pursue creative hobbies, open source, help my community without worrying about livelihood then great. If it is a means to make rich people richer by making most of us worse off, maybe we should stop and think for a while?

There may be a risk here that a zero/negative-sum game is advertised as a positive-sum game (e.g war).

dilawar··on Vibe-Coding a PCB – surprisingly good
freerouting plugin is available as a standalone program. It's pretty good. You export DSN from kicad and use freerouting. Not as simple as button click though.
dilawar··on Bad Actors Are Grooming LLMs to Produce Falsehoods
Tobacco, alcohol, and drugs too!
dilawar··on Whole-genome ancestry of an Old Kingdom Egyptian
> Egyptians don't like the notion that "they moved there from somewhere". They claim their own unique, uninterrupted, history and connection to the land as well as their civilizational independence from Mesopotamian, Asia Minor, Europe, and Africa.

Same here in India.

These ideas about civilization and racial purity/superiority are a scientific nonsense but very useful for getting people to hate each other.

dilawar··on IDF officers ordered to fire at unarmed crowds near Gaza food distribution sites
The strong do what they can and the weak suffer what they must. -- Thucydidus
dilawar··on A Lean companion to Analysis I
Same here. I learnt about convergence, Cauchy seq etc. it was published by a local non profit publisher -- Hindustan Book Agency so it was super affordable too.
dilawar··on Rust to C compiler – 95.9% test pass rate, odd platforms
Found the answer in the project readme.

> My representation of .NETs IR maps nicely to C, which means that I was able to add support for compiling Rust to C in 2-3K LOC. Almost all of the codebase is reused, with the C and .NET specific code only present in the very last stage of compilation

dilawar··on Rust to C compiler – 95.9% test pass rate, odd platforms
Is it LLVM IR --> C? Or Rust AST to C?
dilawar··on The best programmers I know
> "Don’t go to Stack Overflow, don’t ask the LLM, don’t guess, just go straight to the source. Oftentimes, it’s surprisingly accessible and well-written."

It's a bit like math books. I dreaded reading formal math during my engineering -- always read accessible text. Got a little better in my master's and could read demse chapters which got to the point quickly. At least now I can appreciate why people write terse references, even Tutte books.

Some references are a pleasure to use. For rust crates, I always go to docs.rs and search there. It's just fantastic. i can search for a function that returns a particular type or accept a particular type etc. hoogle from Haskell was lovely too when I took a functional programming course in college. Cpp reference is also pretty good -- thanks for adding examples.

Today I was reading boto3 python library docs, and I immediately missed docs.rs!

dilawar··on The blissful Zen of a good side project
> somedays I want netflix and chill.

I call them a zero day.

dilawar··on How Kerala got rich
Kerala is also the only state in India where the rural population lives longer (2-3y on average) than the urban population!!
dilawar··on The Pain That Is GitHub Actions
If you are annoyed by gitlab-runner deprecating run command that I used to run pipelines locally, there is https://github.com/firecow/gitlab-ci-local . But it also opened my eyes to benefita of having runner invariant pipelines -- pipelines written in solution agnostic way. Use bash, make, just, doit or whatever.

Nothing beats having a single script to bootstrap and run the whole pipeline e.g. `make ci`.

dilawar··on Switching from Pyenv to Uv
True.

I had to give up on mypy and move to pyright because mypy uses pip to install missing types and they refuse to support uv. In the CI pipeline where I use UV, I don't have a pip installed so mypy complains about missing pip.

Of course I can do it by myself by adding typing pkgs to requirement.txt file then what's the point of devtools! And I don't want requirements.txt when I already got pyproject.toml.

Once you get used to cargo from rust, you just can't tolerate shitty tooling anymore. I used to think pip was great (compared to C++ tooling).

dilawar··on The FFT Strikes Back: An Efficient Alternative to Self-Attention
https://m.youtube.com/watch?v=spUNpyF58BY
dilawar··on Is Ketamine Neurotoxic?
Fucking hell indeed. I couldn't read the whole thing, only the first couple of pages.
dilawar··on I am rich and have no idea what to do
My grandmother lacked vocabulary that can be used to describe 'purpose' -- or mental issues. One word she would very rarely use was 'dharma' i.e. duty. Though I am not sure if she used it in this way.

There were only a few things she really cared about: the health and general well-being of her children and grandchildren and when her grandchildren will have children. It seems to me it was her 'purpose', at least she values these things so much that can be easily confused as purpose.

dilawar··on Developer wrote 25k lines of Neovim plugin code using phone and touchscreen
I am an Indian and somehow I find it a little bit extreme!!
dilawar··on 7 Databases in 7 Weeks for 2025
Duckdb is really great. DX is awesome.

I cloned the CVE repository and ingested it into duckdb without worrying about table structures. Build a fastapi wrapper to query CVEs like SQL. A little bit of caching and it was pretty fast. Was done in a few hours.

Shame that their Rust crate wasn't as performant as the python module.

dilawar··on SQLite’s Use of Tcl (2017)
+100 for his book. TIL he created TCL also. The book is excellent and one of the very resources that talks about architecture independent of language or tech-stack used.
dilawar··on Ask HN: Best non-fiction book you read in 2024?
Culture of Flowers by Jack Goodie. An anthropology book that compares the culture of Flowers across civilizations. "No flowers in Africa" to China being most gifted place in terms of flowers. Variability across Europe and Muslim civilizations etc etc.

As an Indian, I found how civilizations treat luxury (flowers) and necessity fascinating. Apparently Europe had a culture of garlands before the banquet culture. India is still predominantly garlands expect for a few highly westernised places. Muslim treatment or rather rejection of flowers in mosque but giving the world spectacle of flower gardens was very fascinating.

The book is not going to win any prize for prose or even coherence structure.

dilawar··on NetGuard – rootless Android outbound per-app OSS firewall, like LittleSnitch
You cant. It complains that some other VPN is already running.
dilawar··on Scientists Started to Decode Birdsong
Dogs in my street barking at night are totally saying similar things for half an hour.
dilawar··on GLP-1 pills are coming, and they could revolutionize weight-loss treatment
How does it work? Does it reduce the calorie intake by decreasing the appetite? Your body burns more calories because the drug sets the thermostat higher?! Or something else?

I don't know how to feel about the idea that we need treatment for being overweight in general.

← PreviousPage 3 of 13Next →