Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #4230

D

Dev Blog for things that I find cool

Personal blog · jroweboy.github.ioprogrammingsystems

Dev Blog for things that I find cool is a personal blog at jroweboy.github.io about programming and systems. Since 2015, 18 different Hacker News readers have linked it 18 times, most often “Main is usually a function, so when is it not? (2015)”. The last post was in 2015, but the archive is still widely read.

Visit the blog
18mentions?
18HN people?
2015–2023first – last linked?
Links on Hacker News per year · peak 3 in 2017

Too few sampled comments (7) to say how often HN recommends it.?

Why HN links it

HN readers link a 2015 post asking when main is not a function in C, covering tricks such as defining main as an array and executing an array as code, plus C and assembly quirks.

Summarised by Claude from a sample of 7 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

A blog dedicated to documenting things that I find interesting and things that I'm working on

Most-linked posts?

  1. Main is usually a function, so when is it not? (2015)
    12 people · 12 mentions · first linked 2015-05-22
  2. Main is usually a function – when is it not?
    6 people · 6 mentions · first linked 2015-01-27

What Hacker News says?

  1. I’m disappointed. I expected some obscure edgecase (like “Main is usually a function…” [1]) but instead that’s about scope handling, contract design and responsibility shift. “Hello world” method simply calls an API to a text interface. It uses simple call, to a simple interface that is expected to be ever present. I don’t find any bug there. It won’t work if such interface isn’t available, is blocked or doesn’t exi…

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Bugs in Hello World”
  2. Submitted Main is usually a function – when is it not? as a story · 338 points

    HN discussion
  3. You may be thinking of https://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not...

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “You can't copy code with memcpy”
  4. Submitted Main is usually a function, so when is it not? (2015) as a story · 224 points

    HN discussion
  5. The author says “I tried to define ‘main’ as an array of shorts with a modern compiler and it did not like that one bit”, but without saying which modern C compiler or what it didn’t like about it. This sort of trick should still be possible with modern compilers. GCC has the charming warning warning: ‘main’ is usually a function [-Wmain] if main is declared as something other than a function. Here’s someone who got…

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Exploring mullender.c – A deep dive into the first IOCCC winner”
  6. Submitted Main is usually a function, so when is it not? (2015) as a story · 136 points

    HN discussion
  7. Might have to make code const: http://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not-...

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Exploring mullender.c – A deep dive into the first IOCCC winner”
  8. Submitted Main is usually a function. So then when is it not? as a story · 3 points

    HN discussion
  9. Very similar, here's main() as an array http://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not-...

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Executing an array as a function”
  10. Submitted Main is usually a function. So then when is it not? as a story · 2 points

    HN discussion
  11. Makes me think of the "when is main not a function" article from 2015: http://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not-...

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Show HN: 'Hello, World ' in x86 assembly, but make it gibberish”
  12. Submitted Main is usually a function. So then when is it not? (2015) as a story · 2 points

    HN discussion
  13. signa11 · 2018-09-10Recommends
    on similar lines, i find this http://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not-... quite entertaining !

    Comment linking /c/asm/2015/01/26/when-is-main-not-a-function.html

    on “Quirks of C”
  14. Submitted Main is usually a function. So then when is it not? as a story · 2 points

    HN discussion
  15. Submitted Main is usually a function. So then when is it not? as a story · 2 points

    HN discussion
  16. Submitted Main is usually a function. So then when is it not? as a story · 2 points

    HN discussion
  17. Submitted Main is usually a function. So then when is it not? (2015) as a story · 1 points

    HN discussion
  18. Submitted Main is usually a function. So then when is it not? (2015) as a story · 1 points

    HN discussion

Search all of HN for jroweboy.github.io

Linked by the same people?