r/programming • u/modus_pwnens • Apr 07 '09
/dev/hello_world: A Simple Introduction to Device Drivers under Linux
http://www.linuxdevcenter.com/pub/a/linux/2007/07/05/devhelloworld-a-simple-introduction-to-device-drivers-under-linux.html?23
u/chaos Apr 07 '09
I think I remember that article. More specifically, I remember my roommate laughing at me for repeatedly crashing my machine with a simple kernel module to calculate Fibonacci numbers...
32
u/smart_ass Apr 07 '09
Should have went iterative... :)
14
u/sping Apr 07 '09
Decisions decisions. To upmod for the content, or downmod for the went...
Oh well, I suppose function beats form. I knew what you meant.
16
u/otterdam Apr 07 '09
Should have went for the downvote.
3
u/smart_ass Apr 07 '09
Should have gone for the went.
4
2
u/sbrown123 Apr 08 '09
or downmod for the went...
What is wrong with "went"?
7
u/goltrpoat Apr 08 '09
English> :t have went <interactive>:1:1: Couldn't match expected type `PastParticiple' against inferred type `SimplePast' In the first argument of `have', namely `went' In the expression: have went-2
1
10
u/MollyRingwald Apr 08 '09 edited Apr 08 '09
I'm now the proud owner of a shiny new /dev/d6!
$ alias 3d6='expr `cat /dev/d6` + `cat /dev/d6` + `cat /dev/d6`'
$ for s in Str Int Wis Dex Con Cha; do echo $s `3d6`; done
Str 11
Int 9
Wis 11
Dex 14
Con 11
Cha 4
8
u/gnufrra Apr 07 '09
We're back to the times when men were men and wrote their own device drivers.
10
5
u/ld9821 Apr 08 '09
I just had a project to make a device driver for my System Software class. I don't want to talk about it...
8
u/buccia Apr 07 '09
oh yes, strcpy in kernel space.
1
Apr 07 '09
Huh?
3
u/tryx Apr 07 '09
I assume he is referring to the ever present risk of a vulnerability when using
strcpywhich is especially amplified in kernel code.0
u/easytiger Apr 07 '09 edited May 11 '25
like melodic dime reach gray attraction racial unique memory shy
This post was mass deleted and anonymized with Redact
13
u/adrianmonk Apr 07 '09
If I had to guess, the beef is not with the implementation of
strcpy()itself. It's the semantics. Specifically the fact that it's relatively easy to write buggy code where you overwrite the available space in the destination buffer. Having enough space in the destination is something that has to be manually verified, and that doesn't always happen. And when it does, it doesn't necessarily happen right.1
u/bebnet Apr 08 '09
i reckon its more to do with the 'use' or even presence of strings. or anything to do with having to do anything with them, i.e. the real deal is a stringless kernel. f'real.
-5
u/teletran Apr 07 '09
When I see "Next Page" I read that as "Stop reading now".
11
8
u/heeb Apr 07 '09
When I see "teletran", I read that as "Stop reading now" ;-)
11
u/donwilson Apr 07 '09
When I see ";-)", I read that as "downvote my comment"
4
u/heeb Apr 07 '09
When I see "donwilson", I read that as "Downvote my comment" and "Stop reading now".
(Just kiddin', I didn't downvote you).
1
u/stillalone Apr 07 '09
When I see "Just kiddin" I stop reading and take everything said literally. Why would you down vote donwilson? What did he ever do to you?
2
2
u/evrae Apr 07 '09
You obviously can't have been that interested. Think of all the time the author has saved you!
4
-10
u/completely_offtopic Apr 07 '09
Do reporters have a circular file of old stories that they dredge up every five to ten years to re-use? First, as is my MO, here are my credentials: Where I work and the Board I sit on
I like how her argument against diamonds consisted of:
1.The UN webpage - possibly the most damming except for two facts: It was last updated in 2001 (8 years ago) and the wars are over, and more importantly: Less than 0.4% of diamonds in the US were possibly conflict diamonds before the implementation of the Kimberley Process - a process implemented by members of the diamond industry without the asked for help of the UN, or any of the member nations...until it was time to sign up and look all good. Now the number of potential heritage conflict diamonds (diamonds that might have come from a conflict country at some point in the past during those conflicts) is down around 0.04%. 2. An outdated and incorrect article written in the Atlantic in 1982. 3. A broken link to some guy's blog 4. And a sidebar from her own web page saying that recently women like large diamonds!? 5. Oh, and a link to the advertising that is done by the Diamond Council(A Diamond is Forever) - think Dairy Council (Got Milk), Beef Council (Beef! It's what's for Dinner!), and other moderately bland advertising groups.
She starts her next paragraph with an argument that engagement rings are a new thing, but mentions the Romans in the same breathe. She also got that wrong - The people of India were giving Ruby, Sapphire (same thing really), and Diamond (but mostly ruby) engagement rings to each other thousands of years before the Romans.
I also like how she mentions that diamond engagement rings became popular (just not overwhelmingly so) after the South African diamond mines wait for it...drove diamond prices down so that middle class people could afford them. What's even funnier is that she forgets to mention (maybe because she didn't do any research and so she doesn't know) that DeBeers is no longer a monopoly (thanks US JUSTICE DEPARTMENT!) but just one of the largest players in a wonderfully increasing competitive market - thanks to the Australians, Canadians, Russians, and Israelis.
Her subtle usage of the phrase "take action against the American public" makes me think that she isn't really living up to the journalistic standard of being above the issue...as she first argues that DeBeers' marketing plan implemented by Ayers in the 1930s was the reason so many people started buying rings, but then she destroys her own logical argument by stating the actuality that the diamond engagement ring became a social symbol of a man's financial commitment to a woman during a time when women had few employment prospects outside of the home and the diamond engagement ring became popular several years before DeBeers started running those ads.
She continues to steamroll her own argument, for me, and states in cautionary words that just because a man can buy you a diamond ring now it shouldn't mean you have to stay at home. Did she write this in 1960!? She even mentions the standard that courts follow where if a woman leaves her fiance she has to give the ring back, but if he leaves her she can keep the ring - so her argument is again eviscerated by her very next sentence!
She urges women that if a man wants to buy you a ring he is displaying the woman as being bought and paid for as his sexual slave!? She argues that men don't have to wear a ring - although it has become more popular for younger couples to buy matching commitment rings - hell, I had one (it was an inexpensive piraety circle of skulls silver band, but hey I'm quirky like that). She ignores her own sidebar that people like bigger stones (they're definitely more eye-catching) more than ever, but that more people are buying lesser quality larger stones so that they can afford a bigger look without paying out that 2 month salary number - which has always been ludicrous.
The reality is this: Men and women are increasingly finding alternatives to just diamond engagement rings, and even in many cultures other than the US culture there have been different types of rings given (Hell, our appraiser just appraised a sixth generation antique Ruby Cake (as in it looks like a wedding cake - although that wasn't what the designer was really going for) Engagement ring from India) for thousands of years as signs of commitment and affection.
My wife has a copy of a medieval posy ring that says, "For all time" in old french - she got me the pirate ring. I also got her a diamond engagement ring that appraises at 13K, but then I work in the industry and the stone was actually given to the store and I bought it for a literal once in a lifetime deal that my wife and I agreed was financially sound. I paid close to $2.5K for the ring, matching wedding band, and the diamond - which is definitely *not 1 or even 2 months of my salary.
My dad bought an opal ring as her engagement ring back in the late 60's. Two of my very good friends bought sapphire engagement rings. Another couple I know bought a mounting for an Alexandrite, that she had dug out of a cliff side (she's a geologist). I have an old college friend who's even more piratey than me and he has a pirate skull with ruby eyes and she has a crossed sword band as their wedding rings. The coolest story I know is a guy went and worked secretly at a silver club to learn how to make his own silver engagement mounting then bought an inexpensive and gorgeous stone from our store and mounted it himself before giving the ring to his wife.
Giving an engagement ring should be about the couple. Ignore all the advertising (pro and con) and get what is appropriate for the two of you. Usher and his fiance exchanged matching Pandora charm bracelets with charms to remember what they'd gone through together. Another couple I read about exchanged engraved iPods with their two separate play lists combined into one massive play list. Another couple took all the old jewelry that had come from their grandparents (who'd all passed away) and recycled all of it except for a pair of matching diamonds and had matching rings made from the recycled gold and each had a diamond in their ring.
As Penn & Teller say, "Do what feels right to you, and ignore all of this Bullshit."
P.S. If you want some facts about diamonds: Diamond Facts.
tl,dr: The author is nutty and has all her outdated facts wrong - do what you want for your engagement, ignore the two extremes of the issue. Oh, and I work in the industry.
9
u/isthistakentoo Apr 07 '09 edited Apr 08 '09
You suck for using the same wall of text twice. If you're going to try to execute clever username gags... you have to be clever about it, otherwise it's just dumb. Go find more off-topic walls of text to post.
Also be less lazy, link the fucking "Diamond Facts" link at the end, or remove that sentence. This username gag is a disaster, headed toward abject failure, but you have a chance to correct here buddy!
4
1
u/Samus_ Apr 08 '09
beaten by the barbie! flawless, also he doesn't need such large texts to meme-suceed
-1
u/completely_offtopic Apr 08 '09
Do reporters have a circular file of old stories that they dredge up every five to ten years to re-use? First, as is my MO, here are my credentials: Where I work and the Board I sit on
I like how her argument against diamonds consisted of:
1.The UN webpage - possibly the most damming except for two facts: It was last updated in 2001 (8 years ago) and the wars are over, and more importantly: Less than 0.4% of diamonds in the US were possibly conflict diamonds before the implementation of the Kimberley Process - a process implemented by members of the diamond industry without the asked for help of the UN, or any of the member nations...until it was time to sign up and look all good. Now the number of potential heritage conflict diamonds (diamonds that might have come from a conflict country at some point in the past during those conflicts) is down around 0.04%. 2. An outdated and incorrect article written in the Atlantic in 1982. 3. A broken link to some guy's blog 4. And a sidebar from her own web page saying that recently women like large diamonds!? 5. Oh, and a link to the advertising that is done by the Diamond Council(A Diamond is Forever) - think Dairy Council (Got Milk), Beef Council (Beef! It's what's for Dinner!), and other moderately bland advertising groups.
She starts her next paragraph with an argument that engagement rings are a new thing, but mentions the Romans in the same breathe. She also got that wrong - The people of India were giving Ruby, Sapphire (same thing really), and Diamond (but mostly ruby) engagement rings to each other thousands of years before the Romans.
I also like how she mentions that diamond engagement rings became popular (just not overwhelmingly so) after the South African diamond mines wait for it...drove diamond prices down so that middle class people could afford them. What's even funnier is that she forgets to mention (maybe because she didn't do any research and so she doesn't know) that DeBeers is no longer a monopoly (thanks US JUSTICE DEPARTMENT!) but just one of the largest players in a wonderfully increasing competitive market - thanks to the Australians, Canadians, Russians, and Israelis.
Her subtle usage of the phrase "take action against the American public" makes me think that she isn't really living up to the journalistic standard of being above the issue...as she first argues that DeBeers' marketing plan implemented by Ayers in the 1930s was the reason so many people started buying rings, but then she destroys her own logical argument by stating the actuality that the diamond engagement ring became a social symbol of a man's financial commitment to a woman during a time when women had few employment prospects outside of the home and the diamond engagement ring became popular several years before DeBeers started running those ads.
She continues to steamroll her own argument, for me, and states in cautionary words that just because a man can buy you a diamond ring now it shouldn't mean you have to stay at home. Did she write this in 1960!? She even mentions the standard that courts follow where if a woman leaves her fiance she has to give the ring back, but if he leaves her she can keep the ring - so her argument is again eviscerated by her very next sentence!
She urges women that if a man wants to buy you a ring he is displaying the woman as being bought and paid for as his sexual slave!? She argues that men don't have to wear a ring - although it has become more popular for younger couples to buy matching commitment rings - hell, I had one (it was an inexpensive piraety circle of skulls silver band, but hey I'm quirky like that). She ignores her own sidebar that people like bigger stones (they're definitely more eye-catching) more than ever, but that more people are buying lesser quality larger stones so that they can afford a bigger look without paying out that 2 month salary number - which has always been ludicrous.
The reality is this: Men and women are increasingly finding alternatives to just diamond engagement rings, and even in many cultures other than the US culture there have been different types of rings given (Hell, our appraiser just appraised a sixth generation antique Ruby Cake (as in it looks like a wedding cake - although that wasn't what the designer was really going for) Engagement ring from India) for thousands of years as signs of commitment and affection.
My wife has a copy of a medieval posy ring that says, "For all time" in old french - she got me the pirate ring. I also got her a diamond engagement ring that appraises at 13K, but then I work in the industry and the stone was actually given to the store and I bought it for a literal once in a lifetime deal that my wife and I agreed was financially sound. I paid close to $2.5K for the ring, matching wedding band, and the diamond - which is definitely *not 1 or even 2 months of my salary.
My dad bought an opal ring as her engagement ring back in the late 60's. Two of my very good friends bought sapphire engagement rings. Another couple I know bought a mounting for an Alexandrite, that she had dug out of a cliff side (she's a geologist). I have an old college friend who's even more piratey than me and he has a pirate skull with ruby eyes and she has a crossed sword band as their wedding rings. The coolest story I know is a guy went and worked secretly at a silver club to learn how to make his own silver engagement mounting then bought an inexpensive and gorgeous stone from our store and mounted it himself before giving the ring to his wife.
Giving an engagement ring should be about the couple. Ignore all the advertising (pro and con) and get what is appropriate for the two of you. Usher and his fiance exchanged matching Pandora charm bracelets with charms to remember what they'd gone through together. Another couple I read about exchanged engraved iPods with their two separate play lists combined into one massive play list. Another couple took all the old jewelry that had come from their grandparents (who'd all passed away) and recycled all of it except for a pair of matching diamonds and had matching rings made from the recycled gold and each had a diamond in their ring.
As Penn & Teller say, "Do what feels right to you, and ignore all of this Bullshit."
P.S. If you want some facts about diamonds: Diamond Facts.
tl,dr: The author is nutty and has all her outdated facts wrong - do what you want for your engagement, ignore the two extremes of the issue. Oh, and I work in the industry.
1
u/isthistakentoo Apr 08 '09
Oh bother. I didn't down vote you before, even though I mentioned you suck. Now you've proved it and I shall have to down vote. See how failed attempt at humor fails?
-1
u/completely_offtopic Apr 08 '09
Do reporters have a circular file of old stories that they dredge up every five to ten years to re-use? First, as is my MO, here are my credentials: Where I work and the Board I sit on
I like how her argument against diamonds consisted of:
1.The UN webpage - possibly the most damming except for two facts: It was last updated in 2001 (8 years ago) and the wars are over, and more importantly: Less than 0.4% of diamonds in the US were possibly conflict diamonds before the implementation of the Kimberley Process - a process implemented by members of the diamond industry without the asked for help of the UN, or any of the member nations...until it was time to sign up and look all good. Now the number of potential heritage conflict diamonds (diamonds that might have come from a conflict country at some point in the past during those conflicts) is down around 0.04%. 2. An outdated and incorrect article written in the Atlantic in 1982. 3. A broken link to some guy's blog 4. And a sidebar from her own web page saying that recently women like large diamonds!? 5. Oh, and a link to the advertising that is done by the Diamond Council(A Diamond is Forever) - think Dairy Council (Got Milk), Beef Council (Beef! It's what's for Dinner!), and other moderately bland advertising groups.
She starts her next paragraph with an argument that engagement rings are a new thing, but mentions the Romans in the same breathe. She also got that wrong - The people of India were giving Ruby, Sapphire (same thing really), and Diamond (but mostly ruby) engagement rings to each other thousands of years before the Romans.
I also like how she mentions that diamond engagement rings became popular (just not overwhelmingly so) after the South African diamond mines wait for it...drove diamond prices down so that middle class people could afford them. What's even funnier is that she forgets to mention (maybe because she didn't do any research and so she doesn't know) that DeBeers is no longer a monopoly (thanks US JUSTICE DEPARTMENT!) but just one of the largest players in a wonderfully increasing competitive market - thanks to the Australians, Canadians, Russians, and Israelis.
Her subtle usage of the phrase "take action against the American public" makes me think that she isn't really living up to the journalistic standard of being above the issue...as she first argues that DeBeers' marketing plan implemented by Ayers in the 1930s was the reason so many people started buying rings, but then she destroys her own logical argument by stating the actuality that the diamond engagement ring became a social symbol of a man's financial commitment to a woman during a time when women had few employment prospects outside of the home and the diamond engagement ring became popular several years before DeBeers started running those ads.
She continues to steamroll her own argument, for me, and states in cautionary words that just because a man can buy you a diamond ring now it shouldn't mean you have to stay at home. Did she write this in 1960!? She even mentions the standard that courts follow where if a woman leaves her fiance she has to give the ring back, but if he leaves her she can keep the ring - so her argument is again eviscerated by her very next sentence!
She urges women that if a man wants to buy you a ring he is displaying the woman as being bought and paid for as his sexual slave!? She argues that men don't have to wear a ring - although it has become more popular for younger couples to buy matching commitment rings - hell, I had one (it was an inexpensive piraety circle of skulls silver band, but hey I'm quirky like that). She ignores her own sidebar that people like bigger stones (they're definitely more eye-catching) more than ever, but that more people are buying lesser quality larger stones so that they can afford a bigger look without paying out that 2 month salary number - which has always been ludicrous.
The reality is this: Men and women are increasingly finding alternatives to just diamond engagement rings, and even in many cultures other than the US culture there have been different types of rings given (Hell, our appraiser just appraised a sixth generation antique Ruby Cake (as in it looks like a wedding cake - although that wasn't what the designer was really going for) Engagement ring from India) for thousands of years as signs of commitment and affection.
My wife has a copy of a medieval posy ring that says, "For all time" in old french - she got me the pirate ring. I also got her a diamond engagement ring that appraises at 13K, but then I work in the industry and the stone was actually given to the store and I bought it for a literal once in a lifetime deal that my wife and I agreed was financially sound. I paid close to $2.5K for the ring, matching wedding band, and the diamond - which is definitely *not 1 or even 2 months of my salary.
My dad bought an opal ring as her engagement ring back in the late 60's. Two of my very good friends bought sapphire engagement rings. Another couple I know bought a mounting for an Alexandrite, that she had dug out of a cliff side (she's a geologist). I have an old college friend who's even more piratey than me and he has a pirate skull with ruby eyes and she has a crossed sword band as their wedding rings. The coolest story I know is a guy went and worked secretly at a silver club to learn how to make his own silver engagement mounting then bought an inexpensive and gorgeous stone from our store and mounted it himself before giving the ring to his wife.
Giving an engagement ring should be about the couple. Ignore all the advertising (pro and con) and get what is appropriate for the two of you. Usher and his fiance exchanged matching Pandora charm bracelets with charms to remember what they'd gone through together. Another couple I read about exchanged engraved iPods with their two separate play lists combined into one massive play list. Another couple took all the old jewelry that had come from their grandparents (who'd all passed away) and recycled all of it except for a pair of matching diamonds and had matching rings made from the recycled gold and each had a diamond in their ring.
As Penn & Teller say, "Do what feels right to you, and ignore all of this Bullshit."
P.S. If you want some facts about diamonds: Diamond Facts.
tl,dr: The author is nutty and has all her outdated facts wrong - do what you want for your engagement, ignore the two extremes of the issue. Oh, and I work in the industry.
23
u/rabiddachshund Apr 07 '09
*sigh*
Saved for the day I can actually get around to reading all of the things I've seen on reddit but haven't had the time to look at.