7 ms·
Linux x86 Program Start Up
- aroman 12y agoThis looks like a fantastic resource, but I was off put by the (albeit tongue-in-cheek) 'RMUVI - Real Men Use VI' line in the article.
- anon4 12y agoBecause of the "men", because of the "vi", because of the "real", or because it's a jab at the readership? Some time ago, I would have just assumed you were an emacs user, but these days there's a much larger diversity of people on the internet, who get offended by very many things.
- glhaynes 12y agoI'm not the OP and I wouldn't necessarily say I'm "offended" by it, but it's kinda gross and I dislike it, especially in a context of wanting more diversity in my field. Would the world be a tiny bit better without that line? I think so.
- sp332 12y agoIt's an old riff on a book called "Real Men don't Eat Quiche" https://en.wikipedia.org/wiki/Real_Men_Don%27t_Eat_Quiche#Cultural_impact https://en.wikipedia.org/wiki/Real_Men_Don%27t_Eat_Quiche#Cu... which is a 1982 book that poked fun at hyperbolically conservative masculinity.
- scott_s 12y agoThat's not my reading of this use. The title of the 1982 book is using a silly statement to poke fun at the concept of masculinity. The jab in this article reads to me as accepting the concept of masculinity at face-value, and using it to poke fun at something in technology.
- sp332 12y agoWent down the rabbit hole a bit (thanks Google) and found this thread from 2003 where someone said "real men use vi". https://www.redhat.com/archives/redhat-install-list/2003-July/msg01383.html https://www.redhat.com/archives/redhat-install-list/2003-Jul... I take it to mean real men do difficult things for no reason, which is not really a positive thing. A 2008 article updated the phrase to "real men and women use vi", still as hyperbole. http://www.terminally-incoherent.com/blog/2008/10/01/vim-tips/ http://www.terminally-incoherent.com/blog/2008/10/01/vim-tip... I guess the posted article didn't get the memo and still used the men-only version in 2011. But I guess you're right about this particular article, it's too easy to read it "straight".
- Alupis 12y agoIt's a wonderful article about how low level assembly and C programs work on linux, and somehow HN gets caught up on a single intended-to-be-funny hyperbole, effectively turning it into a gender debate...
- semi-extrinsic 12y agoFor the people who prefer to bikeshed around gender issues and don't know their history of programming languages: this is not just a pun on that book, but also on the essay "Real Programmers Don't Use Pascal" published in Datamation magazine in 1983. Which is by the way correct in pointing out that Real Men use neither Vi nor Emacs, but TECO. Oh yeah, and Real Man is a gender-neutral title in this context, like "fireman".
- Retra 12y agoThere's not one context here.
- firescience 12y agoCall me a fireman and I’ll sock you in the nose. :) We prefer “firefighter.”
- 10098 12y agoI think you're reading way too deep into this.
- a1a 12y agoIt might as well say "Real hackers use vi", "Real programmers use vi", or whatever. I do not see why it needs to be gender related. The author should write whatever he pleases. But I believe it would be proper to use a language directed to a broader audience when writing a public blog post. I also believe that the author was trying to be funny and had no bad intents what so ever, but either way these tiny things matter if we ever want to see diversity in our field. I would also like to add that your argumentation is quite unpleasant to me. I read it as you believe that diversity is this annoying thing that destroys the good ol' "all dude internet". Would you care to clarify what you meant?
- anon4 12y agoI meant that the diversity makes it annoying because things that were good jokes suddenly turn ugly. So I do have to ask what is it that is not ok now. Because alright - not everything is ok, but I'm also sure that not everything is not-ok neither. Because if everything is not-ok, then nothing is ok and the only thing left for me to do is write in pure logic, probably in some language like lojban. Tomorrow I'll write "real hackers use vi" and someone who has never programmed and has no interest in it will correct me that they're offended - they like the article, but don't self-identify as a hacker, so my usage would offend them. That's fine, I can use other words and people can only get offended at a finite set of them, but I do need to be told where my mistake is.
- Dewie 12y ago> I would also like to add that your argumentation is quite unpleasant to me. I read it as you believe that diversity is this annoying thing that destroys the good ol' "all dude internet". So you're saying that men (read: dudes) can't be offended by this, also? That insults me. Seriously though: "real men" phrases are often used in a serious way to try to police men's behaviour (you probably know this already, but anyway). So I, as a man, often feel queasy about "real men" quips. But real men aren't supposed to feel uneasy about such things, so I don't know.. ;) I don't personally feel uneasy about this: it feels like satire that plays on the old trope of "real men do <thing that is hard, often unnecessarily so>", and all over "trivial" things like text editors. I can see how some people might be offended by the phrase, though. I'm just talking for myself here. (I hope no vi users were offended by this post.)
- dgquintas 12y agoA different take on the same matter: http://www.bottomupcs.com/starting_a_process.html http://www.bottomupcs.com/starting_a_process.html
- umanwizard 12y agoThis appears to only be about userland stuff. Would be nice to explain what "execve" does.
- Alupis 12y ago> executes the program pointed to by filename[1] [1] http://linux.die.net/man/2/execve http://linux.die.net/man/2/execve man pages are your friend ;P (I think they assume if you are doing this level of debugging, you are familiar with the typical linux sys calls, and/or know where to look-up more information about them)
- umanwizard 12y agoI know what execve does. Hypothetically, someone may be able to find out the programmer-visible interface (through this man page) without actually knowing what is going on in the kernel when it happens (allocating memory to the process, paging in the necessary parts of it, adding it to the scheduler's queue, ...).
- Animats 12y agoIt's a hack left over from the early days when AT&T UNIX became BSD. Under pre-BSD UNIX systems, a program was started by forking a new process, which meant sharing the code and copying the data. Then the new process did an exec, which loaded a new code segment and wiped the data segment that had just been copied. Copying the data segment and immediately overwriting it was inefficient, so several new flavors of "exec" were developed to get around that. There probably should have just been a "run" call, which started a subprocess given the indicated executable. Some UNIX-like operating systems have that. It has the nice property that it scales to clusters; there's no reason a subprocess can't run on another machine. QNX, for example, supports that.
- yuubi 12y ago> Copying the data segment and immediately overwriting it was inefficient, so several new flavors of "exec" were developed to get around that. The several different flavors of exec are just convenience functions that lead to an execve syscall (execl* makes the vector out of some of its args; exec*p searches the path first, etc). Maybe you're thinking of vfork (a restricted fork), which seems to have gone away about when copy-on-write came in.
- tibiapejagala 12y agoAnyone got similar article for windows?
- userbinator 12y agoComing from DOS/Windows the amount of... extra cruft that gets linked into a Linux binary by default seems rather excessive. The equivalent startup code in Windows for a C program doesn't involve constructors or destructors, for one thing. From the entry point, there's a total of ~7 functions called in the default stub - most of them for parsing the environment variables and creating argc/argv, and for programs that don't need that it's quite easy to eliminate those too. (The whole ELF/dynamic linking system is another thing that has always seemed overly complex to me, compared to PE/DLLs.)
- jjoonathan 12y agoBut Windows still supports constructors and destructors, right? I don't understand how it eliminate the complexity. Do you mean that the windows equivalent of _start is nested less deeply and with more reasonable naming conventions?
- dexen 12y agoOn the other side of the spectrum, a tiny ELF executable is possible at 45 bytes: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... Previous discussion: https://news.ycombinator.com/item?id=5016434 https://news.ycombinator.com/item?id=5016434
- planckscnst 12y agoI posted this the last time a similar article came up and a couple people seemed interested. I'm still trying to gauge whether anyone would be interested in a podcast about this kind of stuff. I've started putting together notes for this podcast here: https://docs.google.com/document/d/1Nn01yDS5PkiegHq4Oxz43xUQRLHqbc5l5GCRjTEzRw8/edit?usp=sharing https://docs.google.com/document/d/1Nn01yDS5PkiegHq4Oxz43xUQ...