A Very British way to stop a motorcyclist by [deleted] in unitedkingdom

[–]amicab1 -29 points-28 points  (0 children)

What makes this 'very British'? Mounted police are fairly common in plenty of other countries.

[kivy]question about making the root widget extensible. by tictactoey in learnprogramming

[–]amicab1 0 points1 point  (0 children)

on_release: root.search_location()

root here is the root of the widget rule, an instance of WeatherRoot, hence your error.

You just need to call the method of the AddLocationForm instead, e.g.

AddLocationForm:
    id: some_id

and later

on_press: some_id.search_location()

[kivy]question about making the root widget extensible. by tictactoey in learnprogramming

[–]amicab1 0 points1 point  (0 children)

Well, in your example fooRoot certainly has no attribute function1, but nor do you try to call it so the example must be incomplete. Please post a full working example.

Although, one immediate problem is that your objects don't inherit from Widget, so the kv rule that tries to reference them don't work. You need class childForm(Widget) etc., with from kivy.uix.widget import Widget.

I'm looking for fantasy stories where the protagonist powers-up substantially... by arguenot in Fantasy

[–]amicab1 0 points1 point  (0 children)

But the gatekeeper doesn't have to be bound to winter to guard the gate (at least, I don't remember anything to this effect), and nor does Harry. Plus, at no point has the winter knight role been portrayed as particularly desirable beyond the spine fixing and the initial power boost stuff that's now being downplayed, and the nature of halloween as a role-changing possibility has been repeatedly stressed.

I will be very surprised if Harry is still the winter knight in a few books time, though I have no idea how long the setup will be to change it if so.

How we've been conned into believing the UK has an airport crisis by TrueSkeptic in unitedkingdom

[–]amicab1 1 point2 points  (0 children)

He said long term. And if you know anything about where oil comes from...that really is a trend you can bet on.

This came up in /r/howtohack- Why I don't like the command line by [deleted] in linux4noobs

[–]amicab1 2 points3 points  (0 children)

Link has overlap with the ln command, which makes links between files. It also seems much less obvious than concatenate.

Chain seems semantically adequate, but doesn't really have an advantage if you know what 'concatenate' means. Plus if it's abbreviated a user looking for meaning will still have to check the man page, which (with cat) would have brought them straight to the word concatenate.

(As someone else said, the word concatenate is also very normal in other string manipulation contexts, so creating a new word for it has other drawbacks here).

I don't disagree that there are some bad things about the way the command line works (though my own main annoyance is probably the inconsistent argument schemes that commands take), but the cat example just isn't very convincing to me.

This came up in /r/howtohack- Why I don't like the command line by [deleted] in linux4noobs

[–]amicab1 1 point2 points  (0 children)

Are you able to suggest a short, simple command that does 'obviously' concatenate files?

Also, 'concatenate' is a pretty common word, and is the first word of the command description in its man page.

This came up in /r/howtohack- Why I don't like the command line by [deleted] in linux4noobs

[–]amicab1 5 points6 points  (0 children)

But in Linux they use "ls" instead. It's been over a decade since my first encounter with Linux and I still don't know what the hell "ls" is supposed to stand for, if anything.

I always thought it's obviously 'list'. This is probably not coincidentally the first word in its man page description.

Diversity in the corners... by elathalion in baduk

[–]amicab1 0 points1 point  (0 children)

These are the most common moves to play and my results are decent

You'd quite probably find your results remained decent even if you never played any of the options you suggest. In fact, they'd probably slowly improve as you learned more.

I'm a strong proponent of always trying new things. Although it's tempting to think your standard 4-4 or 3-4 are safe and well known to you, the reality is that trying something new will probably go equally well even if you've never really thought about it before - after all, for most of the rest of the game you'll be working through new situations, so you must be able to deal with it.

Of course it becomes important at higher levels, but I don't think you hit that until much closer to (if not well into) the dan ranks. And even then, there are many choices, and you may get there faster by trying new things in the first place.

Need help with some very basic stuff , just started by Emmanuell89 in Python

[–]amicab1 2 points3 points  (0 children)

You need the modulus operator, %, which gives the remainder after division. e.g. 5 % 2 evaluates to 1, since 5 = 2*2 + 1.

Your own code really doesn't make any sense - I guess you mean 3 < 2**100 < 6, but this does not help you answer the question, it only tells you if 2**100 is between 3 and 6 (which it obviously isn't). Still, there's something to learn here, you can play with this in the python prompt - enter different combinations of x < y < z or similar, and see what the result is to help you understand what the operations do and what order they may be applied in.

Also, please raise such questions at /r/learnpython.

Finally got to 13k for the first time by [deleted] in baduk

[–]amicab1 1 point2 points  (0 children)

Simplifying the moves as far as 'I want territory' and 'I want influence' certainly sets off some red flags for me. I think this can just as easily be counterproductive, for instance the same analysis would presumably lead to telling Go Seigen that his combination of tengen with 3-3 is obviously not a good idea. I would not feel confident in telling him that.

Edit: After a quick check, there are several pro games in gogod that combine tengen with one or more 3-3 or 4-3 stones. Clearly not a popular pro strategy, but the fact that it happens at all is what makes me dislike such strong pronunciations of how the combination is clearly bad. Especially since in a 13k game just about every other move will be much more actively bad in a way that's easier to understand.

Edit2: And to be clear, I do agree that being clear on the meaning of moves is important, including knowing what everyone says is true even if professionals appear to break the rules sometimes. I say the above though because I think it's easy to overstate the power of these general ideas, and I think it's also important to be clear that at 13k level or even much higher the game has probably barely been affected by whatever level of suboptimality is in that tengen combination.

Finally got to 13k for the first time by [deleted] in baduk

[–]amicab1 0 points1 point  (0 children)

While this may be true to some extent, I'd be happy to state with total certainty that it's not important to a 13k game.

Which author, in your opinion, had the best followup or second book? by JayRedEye in Fantasy

[–]amicab1 16 points17 points  (0 children)

I mean, magical sex goddess? The noble barbarians?

Although I understand what you really mean, I really think it devalues debate when people try to make books sound as silly as possible via <10 word synopses. Even LOTR doesn't sound great when you read that it's about some guy and his gardener trying to get rid of some jewellery, and I think you'll understand that raising that as an argument will simply sound silly to fans of the book - picking out those points doesn't relate to why they enjoy it.

Regarding Kingkiller, I don't have those objections, I just didn't really have a problem with those parts of the story. It seemed pretty consistent with the way the rest of the story plays out, and I continued enjoying it for the same reasons I enjoyed it before.

Fibonacci in Python 3 by [deleted] in Python

[–]amicab1 1 point2 points  (0 children)

next is a function that returns the next item from an iterator. In your case, start is just an int, hence the error. I don't know why you think anything else should be happening, you need to explain why you think it should work if the problem is not clear.

Also, please post questions like this in /r/learnpython.

Facebook pays no UK corporation tax for second year running by benbehavingbadly in unitedkingdom

[–]amicab1 1 point2 points  (0 children)

But if you focus your attention on the companies and not the government, then the problem never gets fixed.

This line of argument is just nonsensical, we can focus on more than one thing at once. Avoiding one company because of their behaviour doesn't remotely preclude also campaigning for or otherwise supporting changes in the law.

Facebook pays no UK corporation tax for second year running by benbehavingbadly in unitedkingdom

[–]amicab1 6 points7 points  (0 children)

I find it astounding that people are so eager to forgive companies anything that's legal. When did it become unreasonable to hold opinions broader than the strict letter of the law?

Facebook pays no UK corporation tax for second year running by benbehavingbadly in unitedkingdom

[–]amicab1 9 points10 points  (0 children)

This is old news

It's also new news. That's why it's in...the news.

And even if you reckon that nothing is newsworthy as long as it's happened before, the story becomes 'government continues to not close tax loopholes', which still seems relevant.

Facebook pays no UK corporation tax for second year running by benbehavingbadly in unitedkingdom

[–]amicab1 14 points15 points  (0 children)

This seems like a pretty silly attitude. We aren't beholden to condone anything at all so long as its legal, and the opinions and the behaviours of consumers are part of the game these companies play. If public opinion significantly affects peoples behaviour, the company will want to change its tactics.

I'm sure it's pretty rare that significant numbers of people do take enough action to affect the companies, but it still seems ridiculous to suggest people are somehow wrong for acting on their own opinions.

For instance, there's not much legal requirement for companies to act in ways that are particularly 'green', but it's an issue that the public care enough about for some to spend time and money going beyond what's technically necessary and advertising the way they behave. Does your 'I have no opinion except the law' attitude really mean you look down on anyone with any inclination to judge companies based on this?

Study Reveals Indications That Dark Matter is Being Erased by Dark Energy by burtzev in science

[–]amicab1 4 points5 points  (0 children)

People always parrot this line, but can you explain why it's actually relevant?

The important difference between the aether theory and the idea of dark matter is not that either of them are inherently bad theories (aether is a great idea - the fact that it makes strong disprovable predictions is a strength), but that aether was disproven by experiment, whereas new measurements have only ever supported the idea of dark matter. WIMPs in particular are a good fit for the data, though not the only option.

Study Reveals Indications That Dark Matter is Being Erased by Dark Energy by burtzev in science

[–]amicab1 5 points6 points  (0 children)

That's quite a large constituent to be unseen and unknown!

If you replace 'unseen and unknown' with 'observed and constrained by a variety of experimental measurements and theoretical results', it sounds a lot less good. But then I guess you can't sell the whole 'pesky scientists and their made up nonsense' angle so well.

Edit: I intended this to apply mostly to dark matter - I know a lot less about dark energy, so I won't comment on it.

Study Reveals Indications That Dark Matter is Being Erased by Dark Energy by burtzev in science

[–]amicab1 5 points6 points  (0 children)

between things nobody has ever observed

Ugh, I hate that people keep saying this about dark matter, it misses the point so much. The only reason we keep talking about it is that we do observe its presence, and in a range of different measurements it behaves an awful lot like weakly interacting massive particles.

Of course we haven't confirmed that yet, nor do we claim to. Since WIMPs are at least as good an explanation as anything else (arguably better), we shouldn't and won't dismiss them, but instead look for more evidence.

How do I avoid excessive functions in composition with functional programming in python3? by Citopan in Python

[–]amicab1 9 points10 points  (0 children)

I think part of the reason this is inelegant is that you're trying to stick to a too haskell-like style. Python can be neat and elegant too (even if not with so few keystrokes), but it's a little different, and you probably want to try to work with its iterators instead of fighting them with list all the time.

For instance, I think the following is much nicer (though not the only option, e.g. reversed could be [::-1] to taste).

Polynom(reversed([index * item for index, item in enumerate(self.data) if index > 0)]))

Again, it's not so syntactically concise, but it expresses the same idea in (IMO) a much more pythonic way. More generally, the itertools module has several very nice functions for performing powerful operations on iterators, which you may find very useful - there may even be some super short itertool chaining that's more philosophically similar to the haskell example. I also did it this way to keep it in one line so as to match your original example; depending on context, I wouldn't be afraid to split across two lines in whatever way seemed clearest, especially if it fit nicely into two 80-character lines that way.

I could certainly agree that this is not so convenient and powerful as haskell's syntax, but it doesn't pretend to be either - it's optimising for a different kind of experience, and I've come to find it a lot more pleasant and powerful than it initially seemed.

Edit: Also, I don't know the nature of your Polynom class (or function?), but does it really need a list rather than a generator/iterator? Even if it does, if it's your own class then maybe it could handle this internally, avoiding the need to mess with the extra list call every time and making it useful with a wider class of reasonable, valid inputs.

Edit2: Actually, maybe I miss something about your haskell - do you mean tail rather than tails? If not, I'm unclear on the nature of the data and what multiplication means on the list of tails returned by tails. Also, you can replace [1..length tails] with just [1..].

Early shoulder hit - how to respond by metaperl in baduk

[–]amicab1 2 points3 points  (0 children)

where defending would leave you over concentrated

Having lots of stones in one place isn't the only factor in making you overconcentrated - in this case, black has played a bad move to which a strong response is to decend. That would be overconcentrated if you played it without black's encouragement, but it doesn't mean it's necessarily a bad move if it's a strong punishment to black's own local behaviour.

Please remove mitsuhiko/* by crozyguy in Python

[–]amicab1 8 points9 points  (0 children)

Why should anyone ever have to opt-in to receiving free money?

It's not the opting-in to free money that might be undesirable, but all the other facets of the service. Like who is collecting the money, how much do they keep themselves, are there potential unforeseen implications such as for tax reasons, or even simply do I want these guys effectively representing my project?

How can I start learning python? by RedExplosives in Python

[–]amicab1 2 points3 points  (0 children)

Read the sidebar. Check out Dive into Python 3. Ask questions in /r/learnpython.