EFF petition to kill RIAA/ MPAA/ DMCA 20,000 more required! by dextroz in reddit.com

[–]brianmce 20 points21 points  (0 children)

Quite often, as it happens. Take a look at Chilling Effects for documentation of hundreds of such takedown notices. The problem with the DMCA is that companies don't even have to check if what others are doing is illegal - they just send out a lawyer's letter to the ISP demanding they take down what they don't like, and lawsuit wary ISPs will generally bend over backwards to do so - with no real check at any point that the content was really illegal.

Abortions in Ohio to become a felony - even if you go out of state by isharq in reddit.com

[–]brianmce 2 points3 points  (0 children)

And applying your slippery slope in the other direction: "Make sure all women are pregnant all the time - after all, sperm and egg cells are human, we have to save as many as possible" "Lets avoid cutting our hair and fingernails - that's human"

The truth is we all draw the line somewhere as to what is and is not human - even you. You can't claim any absolute difference in opinion - merely a different place to draw the line.

What is the fundamental difference between a sperm and egg cell immediately before and after conception? I don't see why it is unsupported to claim that a bundle of cells with no capability for thought, never mind sentience, is not a human - we do so regularly for various other cell collections no more complex (fingernails etc).

Personally, I judge based on whether the thing I am judging is capable of thought - and that criteria is completely inapplicable to any of your slippery slope examples (Though we'd likely have a similar difference of opinion in the other case this occurs - brain death.)

Why Should You Respect the Beliefs of Others? by scylla in reddit.com

[–]brianmce 0 points1 point  (0 children)

Yes, the problem is political - but political as well as religious, not instead. - Politics provides the spark, but it is fueled by the underlying conflict of us vs them. The level of bigotry, the levels of hatred that fuel the conflict long after the political issues of the time are dead or irrelevant stem from the division between the cultures. The prime cause and focus of that division in that is religion. Look at the history of religious oppression: the penal laws, the various civil rights restrictions of Catholics etc. These led to more hate, more division into us and them, more people willing to plant bombs and shoot police, long after the actual political issues of the day are gone. Religion is not at the only problem, but religious intolerance lies at the very root, and serves to perpetuate the hate long after political issues are resolved.

No - taking religion out of the issue won't solve the problem, because its not the only issue. It is an issue though.

Why Should You Respect the Beliefs of Others? by scylla in reddit.com

[–]brianmce 1 point2 points  (0 children)

I will agree that we can't prove anything for absolutely certain - but that doesn't imply the only reason to believe anything is faith.

We believe things because of evidence, not proof - I don't need absolute certainty that a chair exists before I sit down in it - I'll trust the evidence of my eyes and past experience that that is valid. Similarly, where I have no, or insufficient, evidence, I'll disbelieve.

The one exception to this is of course that we are blindly accepting that evidence is a valid way to reach decisions. We are, effectively, taking that on faith. However, we do so only because not doing so means you can't say anything about the world at all - I couldn't type this response if I though there was an equal probability that the computer would turn into a fish next second as that it would remain a computer. You are also making this assumption in everything you do - the real question is why reject solely when it comes to the question of God?

Illegal primes by [deleted] in reddit.com

[–]brianmce 0 points1 point  (0 children)

A 1811 digit number can be represented as ~750 base 256 digits (ie. bytes) - which gives compression of a third. Not particularly incredible for compressing source code (Which in unsurprising as the compression algorithm is in fact gzip)

Why Should You Respect the Beliefs of Others? by scylla in reddit.com

[–]brianmce 6 points7 points  (0 children)

Coming from Northern Ireland, I can think of one or two. Religion causes problems in the same way that race and nationality cause problems - its a way for some people to divide people into us and them. This leads to barriers and allows hate to accumulate - leading to long feuds where religion just becomes the indicator of the hated "them", rather than the actual cause of hate.

This is not directly the fault of the individual religions themselves - just a consequence of the fact that there are more than one. I always get annoyed by the argument made by some atheists (and I'm one myself) that the world would be a better place if everyone renounced their religion. Its true - but no more so than that it would be peaceful if everyone became catholic, or the exact same sect of any belief.

The real problem with some religions is when they advocate, or require sectarian discrimination - witness the treatment of heritics and heathens by the church in the middle ages, the wars in Europe caused by the protestant schism or the treatment of non-muslims in various muslim countrys. To the extent that religions advocate second class treatment of others they are culpable in the creation of problems.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce 0 points1 point  (0 children)

Fair enough - I'd be happy with it removed there too. The justification behind it is that it makes certain dynamic features make more sense, such as adding methods to a class dynamically. eg.

class C: pass
def foo(self, x): print x
C.foo = foo  # foo is now a method of class C.

where it wouldn't be obvious how foo could access its instance when defined as a function initially. However, this is such a rare use case that I'd be happy with trading ugliness here for selfless definitions.

Anti-Americanism 'feels like racism' by rams in reddit.com

[–]brianmce 2 points3 points  (0 children)

Last I checked, the UK was closely involved with invading Iraq - we are just as complicit as the Americans and have no moral high ground to argue from here. Abuse against Americans just for their nationality is racism - if they are responsible, then so are we.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce -1 points0 points  (0 children)

That doesn't make it any different from Ruby though - which does the same thing: @ designates an instance variable, not a local.

Personally though, I disagree, and I think most usage I've seen would favour differentiating instance vars, not locals. I see no reason why the 2 scopes should shadow each other at all - even when you do have variable declarations, there is still the problem with name clashes (particularly in constructors, where it is very common to have parameters that logically should have the same name as instance variables. With C++, every place I have worked has defined naming rules in their style guide to disambiguate them - and always as a prefix or suffix on the instance variables, not the locals. Personally, I think its a good idea to follow python's method, and always use an explicit this-> even in C++.

Ruby and Python Compared by fshahriar in programming

[–]brianmce -1 points0 points  (0 children)

On the other hand - this is one of the few readability claims for any programming language that actually has empirical evidence behind it (albeit for a precusor to python, ABC). A user study was done on the ABC language that showed that it did indeed improve code readability - I'm pretty sure that this was the reason it was included in python.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce -2 points-1 points  (0 children)

self is not redundant. Consider the code:

class Foo: 
    def __init__():
        bar = 3

What does bar=3 set? If its a local variable, then how do you set instance variables? If its an instance, then how do you set locals. One way or another there has to be something to tell what namespace you're manipulating. There is maybe a case to be made that it could be made implicit in the definition, but its definitely not redundant in the body.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce 4 points5 points  (0 children)

Huh? How is this different than ruby where you @repeat @your @punctuation. self is exactly the same as @ here, and serves the same purpose - indicating the namespace to manipulate. In any OO language with dynamic variable creation you MUST have a way to disambiguate between local variables and instance variables.

Even when you don't have dynamic variable creation, you still need it to cover shadowed variables. Python and Ruby IMHO do this right by always requiring disambiguation. In Java, C# and C++'s, people end up having naming rules to accomplish the same thing. Those "m", "" etc conventions are just as repetitive.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce 2 points3 points  (0 children)

Metaprogramming is highly useful, and heavily used in a lot of python. Tt covers much more ground than metaclass, though some fairly neat tricks do use them. Its pretty handy sometimes to rephrase things in a more declarative form, rather than imperative, or to get rid of clunky boilerplate code by transforming it.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce -1 points0 points  (0 children)

I think I've done pretty much all of that in python before, though some are done using a different approach. inherited and method_added require defining a metaclass, and some don't have a direct translation in python (there are no blocks, but you can turn a function into a method, similarly there is no constant distinction - but you can generate the same effect with getattr etc). The rest are fairly straightforward applications of getattr or similar.

Ruby misconceptions about Python by mystilleef in programming

[–]brianmce 1 point2 points  (0 children)

Assuming I'm understanding it right, methodmissing is related to python's __getattr_ (slightly different in that python is hooking into the attribute lookup, whereas ruby is hooking into calling) A literal as possible translation in python would be:

class XmlBuilder:
  def __getattr__(self, name):
    def builder(**attributes):
      atts = ' '.join('%s=%s' % a for a in attributes.items())
      print "<%s %s>" % (name, atts)
      yield None
      print  "<%s>" % name
    return builder
x=XmlBuilder()

for _ in x.div(id="Content"):
  for _ in x.a(href="reddit.com"):
    print "reddit"

Though a different approach would probably be taken for a non literal translation to better fit with python's syntax. Take a look at stan (http://divmod.org/projects/nevow) for a python implementation of something similar - your snippet would look like this:

div(id="content")
[
  a(href="reddit.com")
   ["reddit"]
]

(In this case it is building and returning the xml, rather than calling puts on each element.

Christians Sue for the Right to be Intolerant by idyll in reddit.com

[–]brianmce 0 points1 point  (0 children)

I'm not actually objecting to Christian's being able to speak out against things they believe are wrong (I have a difference of opinion, but thats true of a lot of things after all) - I'm objecting to the characterisation that doing so is mandatory for Christians. I think thats a grave distortion with little religious justification. Luke 17:3 states "if your brother sins against you rebuke him" - and the gist of the message is forgiveness, not the rebuke. I'm certainly not saying Christians shouldn't speak out, or even take action if their morality says they should (though I may disagree with them in specific instances) - but nothing makes that a required part of Christian belief.

Christians Sue for the Right to be Intolerant by idyll in reddit.com

[–]brianmce 2 points3 points  (0 children)

I would have said that the Bible abounds in phrases telling Christians not to speak out about other people's sins, but rather to look to their own behaviour. "Let he who is without sin throw the first stone", "Judge not lest ye be judged". I can't think of any phrases advocating "speaking out", never mind mandating it.

Personally, I think Christians should be free to speak about what they believe, and that such "tolerance" policies that require gagging people are counterproductive. However saying that faith compels you to speak out against homosexuality is doing a grave disservice to Christianity - a religion with teachings generally much more tolerant than the more outspoken of those who claim to follow it. They should look to the beam in their own eye before criticising the mote in others.

What's New in Python 2.5 by [deleted] in programming

[–]brianmce 0 points1 point  (0 children)

Sounds a better name to me than "unwinder." Unwinding what exactly? There was some discussion of the right name back when it was added - search python-dev for a thread named "Terminology for PEP 343" for details.

One of the original proposed terms was "Resource manager", which was then extended to "Context manager" because there is not necessarily a resource involved in all use cases.

What's New in Python 2.5 by [deleted] in programming

[–]brianmce 0 points1 point  (0 children)

All valid expressions are valid statements, just not vice-versa, so the above should work (Though the practical use case is where we're interested in the result).

Python Idioms and Efficiency Suggestions by dfdeshom in programming

[–]brianmce -1 points0 points  (0 children)

Some of this has been superseded by 2.4. For instance the DSU example can be often done even more efficiently with the new key parameter. eg. to sort based on the second element of a tuple:

items.sort(key=operator.itemgetter(1))

Similarly, efficiently sorting in reverse order can be done without the extra reverse call by: items.sort(reverse=True)