News for hackers. Stuff that matters.
Re:Why Unix's lseek() has that name instead of seek() by jiveturkey on Thursday January 04, 2024 @11:30AM (#38868943)
spoiler: the `l` is for long. the previous `seek()` took an int.

i rather enjoy the exposition of the article. he weaved the story nicely rather than just blurt out the answer. the utoronto unix blog in general is enjoyable.

Re:Why Unix's lseek() has that name instead of seek() by n6h6 on Thursday January 04, 2024 @02:05PM (#38870911)
I am curious why you yourself have "blurted out the answer" if you enjoyed the opposite from the article? This isn't a callout or anything, I'm just genuinely curious.
Re:Why Unix's lseek() has that name instead of seek() by jiveturkey on Thursday January 04, 2024 @02:47PM (#38871360)
well i prefaced it with "spoiler". i probably could have made a stronger warning.

it's useful in general in a forum like this, for people that just want the answer. like when a news or blog article has a question in the headline to make you wade through the ads to get to the main point. not too different to how it's useful when people post a paywall bypass link. sure, anyone can just figure that on their own, but it's useful to simply have a link right here on HN, or a summary or abstract of an article.

so that was my thinking. that the very large majority don't care and would benefit from just having the answer.

i tried to encourage reading the blog anyway, even after knowing the answer. you know what, let me edit the answer out. i think you're right. if you don't care you don't care so why ruin the article. damn. too late to edit.

Re:Why Unix's lseek() has that name instead of seek() by pjmlp on Thursday January 04, 2024 @04:23PM (#38872456)
And then it became lseek64(), when longs weren't no longer big enough.
Re:Why Unix's lseek() has that name instead of seek() by usr1106 on Thursday January 04, 2024 @10:14PM (#38875294)
So llseek would have been logical. But maybe being informative and portable is better.

Edit: actually llseek exists internally: https://www.man7.org/linux/man-pages/man3/lseek64.3.html

Re:Why Unix's lseek() has that name instead of seek() by pjmlp on Friday January 05, 2024 @02:05AM (#38876544)
On Linux.
Re:Why Unix's lseek() has that name instead of seek() by maxparay on Thursday January 04, 2024 @05:18PM (#38873089)
"the utoronto unix blog in general is enjoyable"

Didn't know it was called the utoronto unix blog. I've always called it CSpace like the author calls it here: https://utcc.utoronto.ca/~cks/space/FrontPage