HNHacker News
TopNewBestAskShowJobs

khaledh

2,246 karma · joined May 25, 2013

https://0xc0ffee.netlify.app
submissionscomments
khaledh··on Claude Code for VSCode
Correct. From the extension web page:

    Auto-installation: When you launch Claude Code from within VSCode’s terminal, it automatically detects and installs the extension
khaledh··on I Wrote a Compiler
Indeed. I believe the first use of the word compiler (by Hopper and her team) was to describe "compiling" a bunch of existing machine code subroutines into a whole program, rather than translating one language into another.
khaledh··on I Wrote a Compiler
The original term for "compiler" was not restricted to compiling down to machine code. From Grace Hopper's paper "The Education of a Computer" (1952)[1]:

   Specifications for computer information, a catalogue, compiling routines, and subroutines will be given after adding another level to the block diagram. As Fig. 5 stands the mathematician must still perform all mathematical operations, relegating to the UNIVAC programming and computational operations. However, the computer information delivered by the mathematician no longer deals with numerical quantities as such. It treats of variables and constants in symbolic form together with operations upon them. The insertion of a fourth level of operation is now possible, Fig. 6. Suppose, for example, the mathematician wishes to evaluate a function and its first n derivatives. He sends the information defining the function itself to the UNIVAC. Under control of a "compiling routine of type B", in this case a differentiator, using task routines, the UNIVAC delivers the information necessary to program the computation of the function and its derivatives. From the formula for the function, the UNIVAC derives the formulas of the successive derivatives. This information processed under a compiling routine of Type A yields a program to direct the computation.
Notice the case for two "compilers": Compiler B (differentiator) compiles symbolic notation to another program, that is fed to Compiler A, which produces an executable that does the actual computation.

IMO, a better term for a compiler would have been a "translator."

[1] https://dl.acm.org/doi/pdf/10.1145/609784.609818

khaledh··on What is systems programming, really? (2018)
I tend to agree, but not quite fully. To me, it's not about low-level vs. high-level or distributed programming. Systems programming tend to fall into these categories:

- Running and managing a single system: kernels, drivers, programming tools (compilers, interpreters, assemblers, libraries, linkers, loaders, etc), admin tools, package managers, graphics servers, etc.

- Connecting multiple components/systems: protocol implementations (tcp/ip, rpc, etc), message brokers, servers/daemons (database, web, cache, etc), proxies, middleware, etc.

- Virtualization: emulation, sandboxing (docker, wasm), hypervisors, etc.

khaledh··on Israel launches strikes against Iran, Defense Minister says
Testing your theory: Israel is a pariah state.
khaledh··on [dead]
And the US is equally responsible. If the US wanted to end this genocide, it can do it with a single phone call. But it won't.
khaledh··on Ask HN: Memory-safe low level languages?
Check out Nim. I'm using it to build an x86-64 kernel¹ (Fusion OS), and it satisfies a lot of the low-level system programming requirements with an elegant and expressive syntax. For memory management you can choose between ARC/ORC and/or manual. It has two downsides though: small community, and the BDFL can sometimes be rough to interact with.

¹https://0xc0ffee.netlify.app/osdev

I, too, have been looking for a unicorn systems programming language, but it doesn't exit yet. Here's what I looked at so far (only languages that don't rely on a GC):

- C: lots of UB, less safe (memory- and type-wise)

- C++: too complex, not a big fan of OO

- Rust: too complex, gets in the way when writing mostly unsafe kernel code

- Zig: Good, but syntax is too noisy; lacks interfaces/dynamic dispatch

- Swift: Doesn't have a good bare metal story

- D: Seems interesting, I may be looking at it (although need to use betterC mode, i.e. not all language features)

- Odin: Game programming focused, small but growing community

- Ada: Strong candidate, but it has too much ceremony

- Pony: I like the capabilities model, but tiny community

- Hare: Also tiny community, lacks polymorphism

- Hylo (Val): Experimental (mutable value semantics), too immature

- Vale: Experimental (regional memory management), seems stalled

- V: Good candidate, but mixed reviews on its claims vs. reality

- Austral: Experimental (linear types), tiny community, not much progress

- Jakt: Built for Serenity OS, not sure if it's getting enough attention

- Jai: Focused on game programming, good reviews, but currently closed source (beta)

- Mojo: (Python-like) Seems very interesting and I'd give it a try, but too focused on GPU/parallel programming; also too early for adoption

khaledh··on Show HN: My from-scratch OS kernel that runs DOOM
I wrote a kernel as well (not complete yet), and I documented all the steps I'm taking. A lot of people found it useful: https://0xc0ffee.netlify.app/osdev
khaledh··on Making Software
Static.
khaledh··on Making Software
No, not that one either. The page was static and full of high quality images dissecting the format structures.
khaledh··on Making Software
No, that's not it unfortunately. It was a single page with a style of diagrams that shows a high-level format of something, with arrows to a zoomed-in version that details the structure of the fields. I remember its colour scheme being dominated by light blue and green, IIRC.
khaledh··on Making Software
Very nice. The design reminds me of a website that I forgot to bookmark a long while ago, it was about explaining network protocols at the wire level, and it had some of the most amazing visuals that I ever saw. It's a shame that I forgot what it was, and googling doesn't help. If anyone knows what I'm talking about please share the link.
khaledh··on JetBrains IDEs Go AI: Coding Agent, Smarter Assistance, Free Tier
Good catch. I updated my comment.
khaledh··on JetBrains IDEs Go AI: Coding Agent, Smarter Assistance, Free Tier
Summary:

- JetBrains AI tools (AI Assistant and Junie coding agent) are now available under a single subscription starting with version 2025.1.

- There are three tiers: AI Free, AI Pro, and AI Ultimate.

- The free tier offers unlimited code completion, local AI models, and credit-based access to cloud AI assistance and Junie.

- AI Assistant supports Claude 3.7 Sonnet and Google Gemini 2.5 Pro.

- Junie is powered by Anthropic's Claude and OpenAI models.

It's not clear whether AI Free will be available in Community Edition IDEs or not.

Update: From the AI Plans & Pricing page, there's a tooltip that says: "The free tier is not available in the Community Editions of PyCharm and IntelliJ IDEA."

khaledh··on Tariff: A Python package that imposes tariffs on Python imports
There's a PR to fix that: https://github.com/hxu296/tariff/pull/11/files
khaledh··on Show HN: memEx, a personal knowledge base inspired by zettlekasten and org-mode
I assume the name is based on Vannevar Bush's Memex¹?

¹https://en.wikipedia.org/wiki/Memex

khaledh··on Leaked data reveals Israeli govt campaign to remove pro-Palestine posts on Meta
The posts are not calling for Israel's annihilation. They call for stopping the genocide. The posts merely document what Israel is doing in Gaza, since Israel doesn't allow independent journalists to verify and show the world the carnage it's causing to the people of Gaza.
khaledh··on Leaked data reveals Israeli govt campaign to remove pro-Palestine posts on Meta
They do all the time, but Israel sabotages any attempt to reach a two-state solution. Take for example the so-called Great March of Return (2018), where thousands of Palestinians in Gaza, who lived under Israeli blockade (land, sea, and air) for over a decade, marched peacefully towards the border with Israel to protest the blockade. What did Israel do?

- Israeli snipers shot a large number of protestors

- 214 Palestinians, including 46 children, were killed, and over 36,000, including nearly 8,800 children have been injured

- 81% of the gunshots were to the legs

- 122 people had one or both their legs amputated (including 20 children)

https://www.ohchr.org/en/hr-bodies/hrc/co-iopt/report2018-op...

Also, what kind of peace Israel wants when they let their settlers attack Palestinians in the West Bank, aided by the Israeli military, and without consequences? All Israeli settlements are illegal under international law. Maybe they should start dismantling those settlements first?

If Israel wants peace, they should accept the two-state solution and let the Palestinians have self-determination, instead of making their life hell on earth with their apartheid regime.

khaledh··on Leaked data reveals Israeli govt campaign to remove pro-Palestine posts on Meta
Noted. I edited it out.
khaledh··on IBM Announces the Z17 Mainframe Powered by Telum II Processors
One where banks, credit card networks, insurance companies, government, etc. need to process millions of transactions per second on a single mission critical box with unmatched redundancy, resilience, and security, and with a support army backing it.
khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
> it's better to go to the table and take what you can get rather than let your whole population die while staving off the inevitable.

They did. Israel broke the ceasefire agreement for no reason.

khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
Thanks for explaining. I think the answer to your question lies in the fact that Hamas is not a regular army. They're fighting an army that has the most advanced weapons and tech on the planet, and they can't put a target on their back while moving around. This has been the case throughout history when the indigenous resistance fights a mighty colonial army.

Israel has the intelligence and capability to pin point their targets and deploy high precision targeting, as demonstrated in Lebanon and Iran. After seeing so many war crimes committed by the IDF, I'm convinced that while they can assess and eliminate targets in a precise fashion, thus minimizing civilan casualties, they deliberately _choose_ not to do so.

khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
This is the UN report (the one you linked to is the UK report). You'll find the quotes there.

https://www.un.org/sexualviolenceinconflict/wp-content/uploa...

khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
> the main way to tell if they are innocent is whether or not they had a gun in their hands when killed?

I'm not sure I understand your point. Are you saying that it's ok for the IDF to kill anyone they see because they cannot assess if they're a threat or not? Was it hard to see that this grandmother¹ with her grandson is not a militant trying to attack the IDF?

¹https://www.cnn.com/videos/world/2024/01/25/palestinians-gaz...

khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
> Hamas uses ambulances to carry out missions

Not trying to defend Hamas, but is there any actual proof of this? Or is it just based on Israel's statements (which has been found to lie repeatedly)?

khaledh··on Video footage appears to contradict Israeli account of Gaza medic killings
This is just one of an endless string of lies from Israel. Hind Rajab? World Central Kitchen? and many others that we don't know about. They even shot their own hostages waving white flags. Their first reaction is to lie, and if they get caught they say they will investigate. How can anyone believe them anymore, and how can anyone expect their investigation to lead to full accountability and prevention of future incidents? It just baffles me.
khaledh··on Ask HN: What are you working on? (March 2025)
A single address space operating system called Fusion¹ implemented in Nim. It currently has the basic building blocks for the kernel. The rest is being built incrementally as time permits. I've also taken the time to document everything I'm doing², which some people found useful.

¹https://github.com/khaledh/fusion

²https://0xc0ffee.netlify.app/osdev

khaledh··on Hacker Laws
Hoare's Law of Large Programs: Inside every large program is a small program struggling to get out.
khaledh··on Hacker Laws
I'd add Wirth's Law: Software gets slower faster than hardware gets faster.
khaledh··on Upcoming Windows 11 builds cannot install without internet and Microsoft Account
Thanks. The subscription model is now almost the default for everything. Investors like the steady stream, which makes sense financially. But unfortunately it has resulted in much lower software quality, because software shops now don't have to make a high quality, solid version that they sell once; they can just ship MVPs with bugs or missing features and tell you that we'll work on fixing/adding those features, just keep your subscription and you'll get it.

I miss the days when you bought a high quality version of something that you kept using for years.

← PreviousPage 4 of 13Next →