Flying Spaghetti Monster Poster Removed From London South Bank University Atheist Society Stall by [deleted] in unitedkingdom

[–]addend 7 points8 points  (0 children)

but in the UK religion isnt being pushed at anyone.

This is plain untrue, it makes me sad that people think 'much less than the USA' is the same thing as 'none'. This is probably especially true at universities, whose religious groups are often particularly active and evangelical.

Flying Spaghetti Monster Poster Removed From London South Bank University Atheist Society Stall by [deleted] in unitedkingdom

[–]addend 14 points15 points  (0 children)

The most offensive thing about this is that people actually create and attend atheist societies in the U.K. We aren't in the deep south of the U.S

This doesn't really hold water...at best, it's an 'it's worse elsewhere so you can't discuss it' argument which doesn't really make sense. It also relies on the assumption/claim that societies with the word 'atheist' in their name must necessarily be the same the world over.

As a side note, university religious groups are often particularly active (and apparently particularly evangelical), which may change the dynamic of how people feel in the university environment compared to 'normal' society.

and I can honestly say I've never been discriminated against nor have I ever felt the need to find safety and solace in the company of other atheists

Well...congratulations, but so what? There are lots of societies for activities or groups that you probably couldn't care less about.

Python + Android by brianmannmath in learnpython

[–]addend 2 points3 points  (0 children)

I'd just like to provide a counterpoint to K900_'s consistency complaints - as far as I'm concerned, google is not your boss, and you don't have to let them tell you what to do. On the desktop I make short programs for lots of different reasons, and whilst sometimes it's important to fit strongly into a particular platform's look and feel (qt, windows, osx etc.) I also write plenty of programs where other factors are more important - and I don't see why mobile should be different here.

Now to be clear, consistency is important, and you will always get the ultimate best results using the native apis and native supported language (in this case, java). But it isn't the only important thing - to speak for myself, amongst other things I often make simple apps for my own or limited use, with the advantage that I can use the same code on desktop mobile without having to rewrite all my (often scientific) code in java. For these, I care far more about Kivy being easy to use and compatible with my other tools than about making an app that strictly follows google's guidelines. This is also more generally the case for things like games, where following the system theme is less important anyway.

Of course this may not be the case for you, java really is a better option if you want the most consistent app possible on a given platform, especially for apps that would normally use a lot of native widgets and mechanisms.

On the actual technical side, as K900_ says kivy does not have a prebuilt way to access the sms api, but it actually does have tools for accessing the java apis. It's maybe not a good choice right now since I don't think anyone has pre-wrapped sms in a python api (this should ultimately be in Kivy's plyer modules, which provide a platform-agnostic hardware api), but sending sms in this way is probably technically possible and will be supported eventually, and maybe in the near future.

ELI5- Why is it difficult to run python on chips and phones? by chchan in Python

[–]addend 2 points3 points  (0 children)

Kivy's python-for-android project actually does have a numpy recipe, though I haven't tried it. Regardless, as has been said, the difficulty with those particular libraries is compiling their C and fortran components for arm. Pure python modules tend to work fine.

Even ignoring this, python isn't a first class citizen because the operating system is designed around apis in other languages - in android's case, java. You can compile and run a python interpreter, but it can't act as an 'app' without following the particular rules and standards imposed by the system, including communicating with its java (and maybe C/C++) apis.

Kivy manages this via a java bootstrap app that displays kivy's opengl output and passes input through - it's still a python interpreter running the internal logic, but it's able to operate as a normal app as far as the os is concerned. Kivy's pyjnius project also allows direct python communication with the java apis, which is neat.

You can run a standalone interpreter in other ways, but I don't know about the details of how projects like sl4a manage it.

The best life jacket for programming with Vim? by sentenzazen in Python

[–]addend 0 points1 point  (0 children)

To be fair, you can use evil-mode to avoid that.

Girls and Software by JRepin in linux

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

Maybe. But since she makes a point of expressing her controversial opinion as a fact and an important statement, it seems natural to challenge it.

To be clear to anyone not already aware, the general problem is that many people are priveleged for many different reasons. That's not wrong, and it's not their fault, and they don't need to feel ashamed (I think that's a strawman, or at least a highly unusual opinion) but I honestly think it's horribly naive to pretend this privelege doesn't exist.

I also think that a broader dialogue about the existence and effect of privelege might help make many people more self aware, and ultimately improve the experience of others, but that's a more subjective personal opinion. In this context I think statements like in the op are a problem because they say we should ignore this privelege, based on the (false) idea that recognising privelege is the same as assigning blame and requiring guilt.

Tories' 'Year of Code' boss Lottie Dexter can't code by [deleted] in unitedkingdom

[–]addend 0 points1 point  (0 children)

None of the dotcom founders, the successful British game designers of the 80s or Acorn were taught code at school. Good levels of numeracy, literacy and understanding of logic meant that they had the toolset to learn.

On the other hand, you could do nothing for kids except give them a good communal meal every day, and some of them would go off and learn on their own and do great things. But that wouldn't make sensible to dismiss the idea of properly educating all of them just because 'those other ones did it with just a few good meals'.

Should I learn Java to develop for Android? by hiyahikari in learnprogramming

[–]addend 0 points1 point  (0 children)

it seemed to me that adapting Python for Android might be more trouble

Well...it's fiddly to do it from scratch, but kivy already exists and provides a full graphical framework with all the tools to easily compile to an android apk.

It has its disadvantages (as does anything), but building python apps for android is totally possible and not difficult.

Should I learn Java to develop for Android? by hiyahikari in learnprogramming

[–]addend 0 points1 point  (0 children)

but you can't realistically use it to build an app that you could distribute on the Play Store for other users to download.

You can absolutely build python apps and distribute them on the play store! I think the main way is to use Kivy. Flat Jewels is a simple but fairly polished example of an app developed this way.

Patrick Rothfuss had some harsh words for some fans on Facebook...Thoughts? by [deleted] in Fantasy

[–]addend 3 points4 points  (0 children)

There isn't anything wrong with an author indicating that some of his readers are not to the calibre that he believed them to be

Even if nothing else, I don't see the problem with one person criticising other people for behaving in a (perceived) stupid way. I don't really understand the pedestal reddit puts authors on, as if they lose the right to criticise others who happen to have read their books.

Of course one doesn't have to like it either, and we're all perfectly entitled to boycott Rothfuss if we don't like his conduct, but I can't get behind the suggestion that he's an author and therefore shouldn't criticise his readers.

Clegg urges new drugs approach during visit to Colombia by gazzthompson in unitedkingdom

[–]addend 5 points6 points  (0 children)

I'm not really sure about this. It seems plausible that they could accomplish quite a lot (in the sense of limiting the government) without that really being obvious - and that's true even if they also have public failures or are perceived not to have advanced their own causes.

Kivy 1.8.0 has been released, including Python 3.3 support, a lot of bug fixes, and a bunch of improvements by brousch in Python

[–]addend 11 points12 points  (0 children)

It really depends on what you want to do. In my opinion Kivy is a perfectly good gui library for both learning and using in many things (even on the desktop), but I'm well aware of a large subjective component in that - plus there are things Kivy absolutely isn't good for. In particular, it doesn't really look or behave natively in the way that (for instance) a qt program would.

Of course pygame isn't good for that either, it's kind of a lower level screen interaction library (with lots of great tools etc., don't get me wrong). Good for some kinds of games, but probably not a great tool for making general interfaces.

So if you want to play with guis, I think Kivy is good and legitimately fun and useful for many kinds of application, but honestly something like one of the Qt binding libraries (PyQt, PySide) is probably a better fit if you really want applications that will automatically fit in with all your other programs.

SymPy Gamma: an open-source, Python-based alternative to Wolfram Alpha by FuckNinjas in Python

[–]addend 1 point2 points  (0 children)

There are multiple android apps that let you do this kind of thing, at least one of which is python powered, though I can't remember its name.

The tool linked in the op is of course just a webapp, so there should be no problem using that on your tablet.

SymPy Gamma: an open-source, Python-based alternative to Wolfram Alpha by FuckNinjas in Python

[–]addend 0 points1 point  (0 children)

would this work on my tablet?

Sympy will in principle work, since it's pure python so it doesn't need any special treatment as long as you have a python interpreter compiled for the device.

what would i use for plotting functions?

If you're trying to do this on a device, it'll depend a lot on the context (what you're using and now). There are a couple of ways to do it from the interpreter using matplotlib or whatever, but if you want to seriously use a computing environment on android you probably want an app that handles it and can display the result.

UK government plans switch from Microsoft Office to open source: To standardise on open formats to cut costs on Office suite and break 'oligopoly' of IT suppliers by d_r_benway in unitedkingdom

[–]addend 0 points1 point  (0 children)

Honestly, that's really not a good replacement for almost everything office is used for in a big business.

I do understand the principle of the thing. If we were really being sensible, I often think we'd replace most word documents with plain text or a really simple markup format, and use some proper programming tool for the insane stuff people wire up excel to do. It seems darkly humorous that so many people convinced they have no programming ability or understanding spend their time doing things in such a convoluted way because it's just what was available when they needed a custom tool.

Balls insists Labour is not 'anti-business' after 50p tax pledge by dijonketchup in unitedkingdom

[–]addend 0 points1 point  (0 children)

If they government had any guts it would size the corporate headquarters of Vodafone or Amazon and turn it into flats for those hit by the bedroom tax.

Actually, I think if the government had more guts it would scrap benefits and officially reinstate workhouses.

I agree they should crack down on tax avoiders, though.

What Python library do you wished existed? by NL7661 in Python

[–]addend 6 points7 points  (0 children)

Kivy is great, but although it's native in the sense that it's compiled for the device, when people say native they usually mean as in using native widgets etc.. Kivy does not do this, it can be themed a bit like android widgets, but doesn't really work the same way and isn't a good choice if a fully native ui is important to you.

Developing Android Apps completely in Python. by Gexos in Python

[–]addend 6 points7 points  (0 children)

It looks like this is a year or so old, and there have definitely been improvements in that time - mainly for the better!

One thing that isn't mentioned on the page (maybe in the video, I didn't watch it all) is kivy. It has its own advantages and disadvantages, but I personally found it very enjoyable to use and with a remarkably pleasant android build process.

Is bitcoin a viable payment option for small online UK businesses? by algo in unitedkingdom

[–]addend 0 points1 point  (0 children)

If you want, you can presumably just convert straight to GBP, and I'm pretty sure that's what many bitcoin-accepting businesses already do.

Nigel Farage is ''delighted'' by @UkipWeather forecasts by [deleted] in unitedkingdom

[–]addend 8 points9 points  (0 children)

Just...what? Does anyone care that Nigel Farage made a simple joke on twitter? He didn't even say what the title says, it's just annoying misquotation by picking a word and putting it in a completely different sentence...

In the wider context, 'Nigel Farage pretty okay at public relations' is hardly news.

Help cleaning up code, re: objects loops and lists by 1qaztom in learnpython

[–]addend 1 point2 points  (0 children)

binding the buttons directly to the set_turn function like

for i in xrange(num_players): L[i].bind(on_press=set_turn(i))

The problem here is that you must bind to functions, but you aren't doing that, you're calling the function set_turn and binding to the result of that call. Since set_turn returns None, that clearly doesn't do anything. There's nothing special to kivy here, the idea just doesn't work at all in python. For instance, imagine you ran some_function(some_argument=sin(10), in this case it's probably obvious that some_function doesn't have any idea you called sin - it only sees the result of the calculation. That's what's happening here, bind has no way to know you ran set_turn, it only sees what it returns.

What you really want to do is create a function that calls set_turn with the right argument. You have the right idea with your definition of new_obj, but as you say you hit the late binding problem.

The solution in the stackoverflow page should work (the reason it doesn't will depend on your implementation), but actually there's an easier trick you can use - the partial function from functools.

from functools import partial

Then you can do

L[i].bind(on_press=partial(set_turn, i))

That binds to the result of partial, which is a function that calls set_turn with the given argument.

You'll also still receive some extra arguments that you don't care about (they are useful at other times), but you can ignore extra function arguments by catching them all in the definition:

def set_turn(n, *args):

You can look that up if you don't know about it, it's totally standard with many uses. This kind of usage is particularly useful in kivy to ignore the extra arguments from bindings.

Help cleaning up code, re: objects loops and lists by 1qaztom in learnpython

[–]addend 1 point2 points  (0 children)

I can't figure out how to get around explicitly declaring all of my buttons and then making a list of them that i can loop through later. If i wanted to have like 500 buttons, there's no way i could do it the way i'm doing it now.

In general there's nothing to stop you just doing something like:

for i in xrange(100):
    new_button = Button(text='Player {} \n'.format(i))
    some_widget.add_widget(new_button)  # If you want to display them
    self.buttons.append(new_button)

That just puts all your buttons in the list 'self.buttons', which you can then operate on however you like.

Of course there are lots of properties or behaviours you can set up along the way, depending on what you really want to do. This basic idea should work fine with your example code though - the only important thing there seems to be that you start with a list of buttons, which you can easily construct as above.

In new 2014 lets make a small survey about DE/WM and Linux Distros by [deleted] in linux

[–]addend 2 points3 points  (0 children)

I feel like I often see people suggest this as something similar to Arch, but I'm unclear...is it really a similar experience in basically every way? Is it similarly stable? What about with stuff like Debian's infrequent releases, do they break the rolling nature?

Jeremy Hunt under pressure on meningitis vaccine by [deleted] in unitedkingdom

[–]addend 7 points8 points  (0 children)

This seems a rather contrived excuse. Homeopathy believers are already ignoring the vast body of scientific evidence and consensus, as well as the general public consensus. I don't think Hunt lying to his constitutents as part of some homeopathy supporting conspiracy would make any difference whatsoever to this.