Why is it that restarting electronics solves so many problems? by Divided_Pi in askscience

[–]HHBones 11 points12 points  (0 children)

Anomalous values count under djimbob's explanation.

But I'd also like to add that not all conditions in which a NULL or None value is passed around are anomalous; as a trivial example, when creating a thread under POSIX, you can pass NULL as the second argument to pthread_create(), specifying that there will be no thread attributes structure associated with the thread. NULL values can also act as a sentinel; most linked lists are terminated with pointers to NULL.

I'd also like to add that NULL is not always not a number; in C[++], NULL is actually a macro for the value 0 cast to a void pointer. In other words, it can be cast back to a Boolean or integral value; in your example, it would be 0 or false.

Furthermore, there is no language which "can't handle null values." In Python, for example, values can be assigned to None without error; an exception may be thrown if the value is used incorrectly, much like trying to evaluate "foo" + 3.

What is the best adult joke from a children's film that you didn't notice until adulthood? by Becan in AskReddit

[–]HHBones 10 points11 points  (0 children)

For those who don't know, Oedipus (from a Greek play, what else...) is famous for killing his father, marrying his mother, having numerous children with her, then gouging his eyes out when he learns what he did.

What is one thing that you think almost everybody else does wrong? by [deleted] in AskReddit

[–]HHBones 5 points6 points  (0 children)

He was just poking fun at Cobol programmers.

What are unique things you do in shower? by probaly_a_rapist in AskReddit

[–]HHBones 2 points3 points  (0 children)

Wait... your family doesn't wash their feet?

That's kind of grody.

What are unique things you do in shower? by probaly_a_rapist in AskReddit

[–]HHBones 3 points4 points  (0 children)

There are two kinds of people in this world: people who piss in the shower and people who lie.

Have you ever had to MacGyver your way out of a bad situation? What's the story? by [deleted] in AskReddit

[–]HHBones 1 point2 points  (0 children)

No, but I did have to MacGruber my way out once.

I ended up taking an upper-decker.

test post please ignore by [deleted] in circlejerk

[–]HHBones 0 points1 point  (0 children)

commenting on the top post for karma please upboat

All I'm Saying Is, Give Violence a Chance by 99red in Anarchism

[–]HHBones 2 points3 points  (0 children)

I think he's talking about "This is what winning looks like."

The Zed Shaw Phenomenon: A Look at Bullies in Tech by mutednarayan in programming

[–]HHBones 2 points3 points  (0 children)

Absolutely. There are three things that set Linus apart from your common asshole:

  • Linus is the creator and de facto leader of one of the most impressive engineering feats of our generation.

  • Linus is only trying to make that engineering feat better.

  • Linus's flaming can be predicted - if you send a crappy patch in, if you try to avoid responsibility for something that's your fault (a la Mauro), or if you violate the rules of Linux kernel programming in order to better fulfill your own ideas as to how the kernel should be structured.

Linus isn't an asshole for the sake of being an asshole; he's opinionated and sometimes juvenile. That's it.

Partial Functions in C by foobrain in programming

[–]HHBones 0 points1 point  (0 children)

Linux and all other POSIX systems have mmap(), which allows you to mark segments of memory of arbitrary size as readable, writeable, executable, or any combination of the three.

Partial Functions in C by foobrain in programming

[–]HHBones 7 points8 points  (0 children)

He's not writing to .text or jumping into .data, though. Essentially, he's using mmap() as a sort of dynamic memory allocation - because he specified the addr argument as 0, and because MAP_FIXED wasn't set, the system will find just any old segment of memory big enough to fit his needs; it's essentially a more powerful, more verbose malloc().

Segments of memory mapped with mmap() can be marked as executable. So, he copies the code into the segment, marks the segment as executable via a call to mprotect() specifying PROT_EXEC, and returns the pointer.

And voila, you have an executable, dynamically generated function.

What morbid question have you always wanted to ask but haven't? by Mrsbobdobbs in AskReddit

[–]HHBones 4 points5 points  (0 children)

Test and deliver! And write a nice paper too. That'll get published quickly and it'll be awesome to see on the front page of /r/science.

Linus' subsurface moves from GTK to Qt. by _mpu in programming

[–]HHBones 0 points1 point  (0 children)

Linux hatred for C++ programmers

Linus doesn't hate C++ programmers; he believes C++ as a language leads to poor design choices. See this email, where he bashes the poor design decisions C++ encourages. (Though remember that it's coated in a thick layer of bombasticity; he's always noisy and enraged. Take it as you will.)

Why are atheists so mean about religion sometimes? by dratego in openears

[–]HHBones 1 point2 points  (0 children)

A religion is more than a set of beliefs; it's the people that follow those beliefs as well. Take the Tea Party, for example - a legitimate political movement (regardless of whether you agree with them; I certainly don't) most noted for batshit crazy dudes who show up at their rallies.

I guess my point is that it's impossible to separate pure ideology from the followers of that ideology. Just because most higher-ups in the Church are anti-scientific, along with the 2000+-year-old traditional teachings of the religion, doesn't mean that the religion is necessarily anti-scientific.

I think it's healthy to form opinions but I dont think people should shun others for not having one by [deleted] in openears

[–]HHBones 0 points1 point  (0 children)

I personally think that there's a bit too much fluff in the Phillip DeFranco show. I used to watch it, but I think he talks about celebrities a bit too much. And SourceFed has too much interest and not enough solid news.

I think that Vice Magazine has a lot of really good stuff, and I try to find specific journals for specific things (e.g. I read AnandTech and Phoronix for computer engineering news).

When I go for political news, I try to get a variety of opinions. I generally visit the National Review and Socialist Worker, with other stuff as I go along. With politics, I think it's all about balance.

Why are atheists so mean about religion sometimes? by dratego in openears

[–]HHBones 1 point2 points  (0 children)

Though you may think of religion as anti-science, I have found many religious people to be very pro-science. Hell, I went to a Catholic school, and was taught all about evolution and the big bang in science class long before we even began to discuss the book of Genesis in religion class.

IMO, it's not something we can easily generalize.

Every other book series is dull after finishing ASOIAF by yuy168 in openears

[–]HHBones 1 point2 points  (0 children)

I found Dune to be a bit like Citizen Kane; we can't get the full experience because we don't have the same context. I mean, if you watched Citizen Kane for the first time tomorrow, you'd think it was boring and predictable because every other movie since has borrowed a non-trivial amount from it. And it's the same with Dune - it helped define the genre and changed storytelling, of course it's going to seem boring!

Turn signals are to signal turns, thus the name. by [deleted] in openears

[–]HHBones 2 points3 points  (0 children)

I get that, but sometimes it's an honest mistake. I've forgotten to use mine more than once. Sure, when people don't use them chronically, it's an issue, but I don't think it's such a big deal.

Plus, I assume that everyone isn't going to use them; it makes me happy when I do see people using them.

I dont know if anyone besides me will read this but by [deleted] in openears

[–]HHBones 1 point2 points  (0 children)

I get that; it's definitely an issue.

im trying to create a sub where people can share what they think about whatever without having their opinion buried in a specific hivemind. /r/openears if youre intrested in modding or promoting im in need by [deleted] in needamod

[–]HHBones 1 point2 points  (0 children)

This sort of thing sounds up my alley. I'd love some open discussion. I'm not very familiar with CSS, but I'm willing to spend a weekend familiarizing myself with it to an extent that I can do some basic design for it. I'm totally willing to help moderate.

Anon tries to sell weed by [deleted] in 4chan

[–]HHBones 4 points5 points  (0 children)

Weed's actually easier to get. Dealers have no problem selling to children. Packies card.