> It is also the battle cry against big government. Just enough to be effective without being a burden to freedom or prosperity.
Except that this is an absolutely impossible goal. You can't make government smaller. It is a guaranteed disaster. Whenever you try - you just create a power-vaccuum which is readily filled by somebody else. Initially, this is mostly corporations. As you reduce government size towards your mythic level (which is always described but never defined because those who say it will NEVER reach a level they consider "right") the power of those stepping into the resulting vaccuum grows and corporate executives get replaced by warlords (often the same person).
Now you either end up with a bunch of competing warlords in an endless civil war and your "official government" too small and helpless to actually do anything about it (ala Somalia), or one warlord actually manages to amass enough to quell all the others and you end up with a dictatorship.
The power you fear in big government is GOING to be wielded, there is NOTHING that ANYBODY could do to stop that. The only choice you DO have, is whether it will be wielded by a representative government accountable to you as a voter, or any of the everything else's which are all MUCH worse.
This is one reason I am an anarchist. As such I support the biggest government of them all. A government so large that EVERY SINGLE CITIZEN is an equal member of that government. 100% of the population large. And therefore, much less able to oppress anybody - while having both the will and the power to quell oppression from others.
>we would have developed tech to have radio broadcast in non interfering ways
And when we were done with that, we'd have developed anti-gravity devices and eternal motion machines to generate power with.
You can't get around the laws of physics. We live in a quantum universe and there is a finite number of frequencies that can exist and absolutely zero way for two things broadcasting on the same frequency not to interfere. Maybe we may have developed wifi likes ways of telling sources appart - but that was only possible AFTER we developed networking protocols and digital electronics, both of which depended hugely on tech for early radio to get their start - there is no reasonable way to claim the opposite would have been possible. Digital broadcasting does allow you to put more signals in a smaller band, but we couldn't get there until digital devices got small - which took a long time. Radio was already prominent in homes in the 1940s - when computers took up entire basements.
Not all public resources can be privatized effectively. And many never should. So how do you then avoid the tragedy of the commons ? The only solution is to regulate access so that nobody can abuse it.
By the way - you know what would happen if you build an early Marconi/Tesla style morse-transmitter and operated it right now ? You would fill every TV and radio in 3-block radius with static - on *every* channel. It took time to develop tuners.
Are you seriously suggesting we would have been better off if nobody could operate commercial radio devices until AFTER we developed fine-tuning abilities ? Or if the airwaves, all of them on all channels, simply belonged to whoever bought the strongest transmitter and antenna ? Why would anybody have bothered at all ? You go invest thousands in the equipment to get a station online, and somebody else decides he would rather have your listeners and spends a little more and your entire investment is down the drain - unless you invest even more and build bigger, but then they can too. Every market would either have had no broadcasts at all, or only the broadcasts from whichever broadcaster had the richest investor.
>As a side note, is "Nigerian prince" the world's most hazardous job? They're constantly dying off!
To be fair: national borders in Africa were drawn by colonial powers with little or no regard for where the locals had drawn their borders. So many African monarchies span regions into multiple countries and most countries contain several different monarchies. You could have about 7 South African princes die this year for example, and without any of them being related to any of the others. If you allow for sibling deaths - 30 or 40 would be possible.
The death rate isn't that high, and these dying Nigerian princes are made up of course - but there's certainly quite a lot of them. Nigeria is a massive country (one of the largest on the continent) and has a great many different royal familes.
As an aside: actual African monarchies are not actually very wealthy (often not at all). The only remaining ruling monarchy on the continent is in Swaziland. Laws vary across the many countries on the continent but in most the authority of the old royal families today is held as regional common-law, and the chiefs are exactly on par with local magistrates in the urban areas. That is to say their word is court-judgements which establish precedent (rather than legislative law), and thus cannot contradict legislation (which includes constitutions) and can be overruled by higher courts. But those are not roles which produce a great deal of weatlh. The only rich ones are either extremely corrupt (and they tend to end up in jail - here in South Africa a local chief was recently convicted for arson after burning down somebody's house. His defence was that he was acting as a judicial officer punishing somebody for disobedience. The appeals court held that he had not followed proper procedure as the council was not convened and neither evidence nor witness statements considered - ergo his actions were personal and not judicial duties and qualified as arson) or the leftovers of the very largest monarchies which had vast land-ownership and other hereditary wealth (like the Zulu kingdom).
So if the corner cafe comes and paints a logo on my outside wall without my permission I can't bill them for advertising ? I promise you they would pay the bill without a purchase order because the alternative is me charging them criminally for vandalism and suing them for lost income from the possibility of selling that advertising space to a legitimate buyer.
You think CBS's can't afford sufficient lawyers to make Microsoft consider at least paying the advertising bill to avoid much more expensive litigation and criminal charges ?
You even believe the bullshit about Trump's fortune ? In actual fact it's unlikely he even has 250-thousand dollars, more likely he is about 10-million in debt. He's been bankrupt more times than you can count (most people can count that high by age 6 but Trump supporters I assume cannot). The man is an atrocious failure as a businessman. And even if what he said was true - we're talking about 40 years. If he had putty Daddy's inheritance into an index-tied investment fund, he would have about 4 times as much as he LIES about having ! 100-million in an index-tied fund over the past 4 decades would have been worth about 40 billion today. So his best bullshit about his fortune, is only a quarter as good as the AVERAGE of the market in a period that involved the 2 worst recessions in US history after the great depression ! At it's worst, the market is on average 4 times better at making money than Trump claims to be - and in reality he is nowhere near that claim.
As for Sanders not working a day - he has spent his life working for his fellow citizens. I know you think politicians don't work, republicans always do because your politicians have spent decades convincing you that you should make absolutely sure they never do the job you hired them to do (hell Ron Paul spent his entire career doing absolutely NOTHING but making speeches about how important it is not to make him work for his salary as a congressman). But Sanders has been an incredibly hardworking and extremely effective politician. In fact he is considered one of the most efficient legislators in Washington, despite his legal wishes being things the republicans hate and the democrats in their post-Bill-Clinton centre-right incarnation are nervous about, he has gotten more of his laws passed than anybody else on the hill.
If the scenario you are claiming comes to pass, you will find that the fact that Sanders has a far higher lead over Trump in national polls than Clinton does (and both beat him handily by the way) will prove to hugely underestimate him. In the general - you can't stop independents from voting for him.
Wake up and smell the coffee - the republicans are about to get the greatest trouncing of the last 50 years. It's going to be a slaughterhouse, and not just in the presidential election. I'm prepared to bet the democrats will take a minimum of 4 and most likely more than 10 senate seats in November as well. The forces that got the republicans their majority don't apply in the general - they can't gerrymander themselves into victory there. Republicans have been weak in generals for a while, and have only gotten MUCH weaker since 2012. The Delusion that they can win was strong then - look at that youtube Video of Karl Rove ranting that Mit Romney can't possibly be losing and refusing to believe the poll results as they came in. Bush II never won the popular vote. Romney couldn't get close... and those were viable candidates. Today ? Nobody the republicans have fielded can be remotely described as viable except perhaps Kassich and he has no chance in hell of being the nominee. You run Trump in a year where you were already, barring a major upset of alien-invasion proportions, going to have the greatest loss since the Goldwater fiasco - and then run Goldwater without the tact ? Mark my words, your party is led by idiots, and you're an idiot for voting for them and you should feel bad.
Data type selection is critical in python. Lists are immutable for example so should used with care. Every change has to copy the entire list. This is one reason pythonistas love dicts. Dict lookups are atomic operations: bleedingly fast.
>Here's one problem: we -- individuals -- have limited time. The more efficiently it is used, which is to say, the less time we spend waiting on things to complete, the better off we are. Here's another problem: Some tasks are not fast enough. Here's another problem: computers are no longer getting faster at the same rate.
Interesting story on this: I attended a talk by the lead programmer for the Square Kilometer Array. Those guys have tons and tons of code to do numerical analysis on signals and keep all those dishes in sync and all that stuff - heavy lifting code where the n is massive and the O's are not pretty and runtimes are very, very long.
Here's an interesting tidbit: it's all done in python. During the talk he proved that the time saved on development by using python exceeds the time that would have been saved on running experiments by writing them in C.
Now that is a bit of a special case - the SKA environment means that code is constantly being refactored and modified and rewritten to handle new experiments or search for some new pattern, so there is no long term use in the software and no external customers running it, but at least in that environment python is far more efficient than C (which was the norm for radio-telescopy before SKA) simply because you can implement the code so much faster. The C code may have finished a few seconds earlier, but it would have taken hours more to get it written, tested and compiled.
Oh yes, I absolutely LOVE multiprocess.Pool.map ! It is, by far, the easiest parallel execution setup I've ever done.
Python itself seems to be seriously embracing concurrent processing, which is very powerful and very useful for a lot of jobs - though not the ones where parallelism really shines (or anything that's embarrassingly parallel) , the async/await model is a really clean and pythonic way to do powerful concurrent generators - it's still very new, but I think it will replace multithreading almost entirely. For everything MT does well, await/async can do it better and with less code, for the rest MP will generally work better.
Python's file management is actually seriously primitive, in fact it's almost identical to C - but with longer commands. One of the big debates ongoing in the python development community right now is about that issue in fact. Notable parts include making pathlib support more integrated (pathlib - by not treating paths as strings is much better able ot deal with the nuances of OS requirements - but also unusable by most file management tools, even the ones in the standard library, without a cast), and about whether or not to create a string.write_to_file style mechanism as is found in many other more specialized languages.
Looks like the consensus was to not do the latter but to provide some equally simple approaches to file access, storage and safe pickling of data - but these are not yet in python.
It's kind of odd that you would make this claim in an area where, right now, the python mailing lists are busy debating how to improve the fact that python's file management is essentially identical to that of C.
> or else you'd just have proved that it's not a particular kind of simulation.
And is that not progress ? A lot of cosmologists think that black holes are the other side of big bangs. That is - that what was the big bang that gave birth to our universe, was a black hole in a different universe, and that there are other universes on the other side of every black hole in ours. They will all, readily, concede that they cannot prove this - that it's utterly untestable, which is why it's not even at the level of hypotheses and merely conjecture. It's not an invalid conjecture for a scientist to hold though - provided they don't claim it's more than that. The most attractive thing about it is that it reduces the number of known singularities in physics from two to one (by making one of them just another side of the other).
At least with the universe-is-a-simulation idea, we can do *some* tests and theorectically we can eventually test for every simulation type we can imagine. If we do that, and the tests are *all* negative - then it becomes an extremely unlikely hypotheses. Perhaps not completely disproven but it certainly to be filed in the "no scientist takes it seriously" category where it shall remain until and unless some new evidence emerges. Kind of like what happened with the idea of moving continents. The idea must have occurred to people for centuries - but scientists considered it little more than a joke. It wasn't until 1905 that an actual scientist took it seriously, but his ideas about how it may happen were laughed at. It didn't get more serious traction until the 1950s when computer modeling started suggesting it was more likely than not. We didn't get physical proof of it until a few decades after that. Today it's the consensus theory because we are watching it happen.
Thats actually a good point I had not considered. But I do think at the level of something as close to the metal as file management that pythons verbose names and syntax would make it bigger than C. At application level the higher level of abstraction should win for python.
% interpolator is still there and still works - it is not recommended since the.format method is much more powerful and well worth the transition, but the old way should keep working (at least in part to make porting code like yours easier and allow a piece-by-piece port).
Probably the single incompatibility that causes by far the most problems is actually the deprecation of the print statement, but one could argue it should never have existed. Print has always behaved like a function, it should have been one all along.
The second biggest incompatibility is that most sub-indexing methods (like Dict.keys()) are now iterators. This is a hugely useful change since the vast majority of calls to them are in for loops and using iterators are far more memory efficient in that event. But it can cause some issues if you have code like this:
x = {'a': 'b'} y = x.keys()
In python 2 y would have the value ['a'] but in python3 it would be a function object because x.keys was an iterator. The quick fix is: y = list(x.keys()) which will convert the iterator to a list correctly.
Fix those and almost every other change is transparent and you are unlikely to encounter them (I speak having ported a number of python2 projects to python3). Unless you're doing something like encryption which is full of work-arounds for python2's terrible string/bytes model, you probably won't even see the rest.
That alone makes it worth-while, at least if you give a damn about securite. Go look at any encryption library for python2 - it's a horrible ugly mess of trying to work around the limitations of python2 strings. Python3 provides the bytes type as part of the string overhaul - which makes encryption code massively cleaner and run a *lot* faster.
On the other hand - have you seen the extreme hackyness of encryption libraries in python2 - and how clean their code is in the python3 versions ? The 2.x versions are filled with horrible work-arounds to deal with python 2's lack of a proper byte-type - trying to mash things into the string type without having overflow errors. More than a few resort to rewriting every character using hex-codes on-read and then storing the hex-codes as strings - which needs (expensive) back-and-forth conversion on every access.
In python3 - they just used the Byte type out of the box and require no hacks to make it work.
Sure python3 broke compatibility, that's what happens with a major version number. It's worth it though because the vast majority of changes actually fixed long-running serious issues, like the ones that plagued encryption libraries.
Considering that it was a purely emotional expression with no attempt at rationalization it may have no rationally explainable reason at all. He could literally just be a guy who found Monty Python terribly unfunny and annoying (it's theoretically possible for such a person to exist) and thus got pissed off by all the MP references in the sample code and tutorials.
I suspect a lot of that code lies in redundancy and load-sharing systems. Python is notoriously bad at multithreading (so much so that most python coders prefer a library called multiprocess that fakes multithreading by spawning new python processses entirely) - so load-balancing, load-sharing and redundancy under heavy use are problems python is particularly bad at (not the language so much as the architecture of the implementation to be fair).
So it's likely a great deal of the code is dedicated to solutions to those difficult problems. It also rather depends on how you count it. Other things that could contribute large amounts of code: - They likely use a custom application server (in order to implement all that redundancy and load-sharing) - There's likely a significant amount of debug logs in there, and extensive logging throughout (you need that if you're going to keep something like this maintained and find/fix problems quickly).
Finally - the comparison is not actually very fair. The Kernel is written in C - a language designed for brevity, while python is much more verbose. Python is not a language that encourages lots of one-liners, except where they can be used to avoid deep nesting (which is actively discouraged) or in purely functional calls (which are available but only encouraged for specific use-case determined algorithms where the non-functional version would actually be harder to read).
So the exact same algorithm is likely to use more lines in python than in C - and be a lot easier to read. I was not surprised to learn from this interview that a lot of his own early work was in Pascal and Algol - you can see a lot of the Wirth philosophy in Python. Python in a very real sense struck a perfect balance between readable verbosity and cruft. Java is too far to the other side, you need about 100 lines just to show a simple "exit on click" button on the screen and almost none of them have anything to do with the task at hand. The same thing in TCL/TK will take one line, in python it's about 3 lines (depending what GUI library you use). I recently developed a fairly comprehensive GUI library in python. I was building an RPG in Pygame (need to pick that up again sometime) and pygame has no gui elements and none of the libraries are maintained, so I wrote my own. Python made this ridiculously easy for the most part. Hell at one point I actually wrote a recursive object (that is to say - an class in which one of the methods would instantiate another instance of the same class it's a method off). The class was a box containing a list of items you can select (used for things like the inventory) but when you need to add something to a box like that (say in the game editor - adding treaures into a chest) it instantiates another instance of itself, with different parameters to show you the list of possible things you can add. That took no clever trickery whatsoever, the method just instantiated the class and operated on the object, python handled all the recursion magic entirely transparently.
That gave me (as a long time python developer) an entirely new respect for just how powerful the language really is. I also strongly suspect that in most languages that activity would have been far more complex, many languages don't even allow recursive classes after all.
I can easily see half that change coming just from gaining access to Jinja2. I've worked extensively with a huge array of templating languages in recent years, and while they all have basically the same syntax none of them are anywhere near the sheer unadulterated power that Jinja2 offers. It took me a while to figure out just what it was that Jinja2 had that they all lacked and which made such a massive difference. I finally nailed it down. All of them have, right in the beginning of the manual guides on how to write helper functions to extend the language. Jinja2 barely mentions that. The reason is simple: it hardly ever needs them. This is because Jinja2 exposes any data you pass to it as the original python object - with all that object's methods available inside the template. That's extremely useful. The problem with the "helper methods" approach is that you're screwed whenever the thing running the template is not code you have access to (or can afford to alter). In a corporate environment you may be using a tool like consul-template which you really don't want to maintain a local derivative off, so you can't use any functions in your templates that their derivative of golang-template did not already include. With Jinja2 even with somebody else's code you still have access to every method the data type object exposes. So if you have to get the overlap of two lists in your template from two disparate upstream data sources you don't have to hope the template language includes the right list operators, you just use the built-in methods of the list objects directly.
Have you seen what a list-overlap seeker written in pure golang-template looks like ? It's a hellish maze of deeply nested loops and if statements and the output enmeshed inside all that gunk because golang lacks a sufficient set method to create new variables that can let you pre-construct your new list before looping over it.
I had to do just that recently, the golang template was well over 500 lines of unreadable and barely navigatable junk - I did the same thing in less than 5 lines of Jinja2.
So I can easily imagine that for a web app that's highly template driven you could end up with a huge amount of code that exists within the templates (or as helper-functions to the template library) which you can throw away if you redo it in python.
Sanders has already won. He has forced the demcratic party leadership to realize that their base is liberal voters not center-right like they have been ever since Reagan. The first Clinton relied on Southern whites to win. Sanders proved that they are no longer needed, or possible to get.
In so doing he changed the tone of the Clinton campaign and dictated the tone of the upcoming congressionnal campaigns. America has had a signifant liberal majority for many years. Sanders has ended the defeatist culture that left that majority with no party that represented their views. That is a victory far greater than the prezidency. Dont be surprized if Warren ends up being Hillary's running mate now.
At this stage winning the nomination is highly unlikely but dropping out is insane. He must stay in until the convention to prevent political inertia from erasing those gains before the general (and handing the white house to the republicans). Clinton could not have had a chance in the general without the policies Sanders has forced her to adopt.
> It is also the battle cry against big government. Just enough to be effective without being a burden to freedom or prosperity.
Except that this is an absolutely impossible goal. You can't make government smaller. It is a guaranteed disaster. Whenever you try - you just create a power-vaccuum which is readily filled by somebody else. Initially, this is mostly corporations. As you reduce government size towards your mythic level (which is always described but never defined because those who say it will NEVER reach a level they consider "right") the power of those stepping into the resulting vaccuum grows and corporate executives get replaced by warlords (often the same person).
Now you either end up with a bunch of competing warlords in an endless civil war and your "official government" too small and helpless to actually do anything about it (ala Somalia), or one warlord actually manages to amass enough to quell all the others and you end up with a dictatorship.
The power you fear in big government is GOING to be wielded, there is NOTHING that ANYBODY could do to stop that. The only choice you DO have, is whether it will be wielded by a representative government accountable to you as a voter, or any of the everything else's which are all MUCH worse.
This is one reason I am an anarchist. As such I support the biggest government of them all. A government so large that EVERY SINGLE CITIZEN is an equal member of that government. 100% of the population large. And therefore, much less able to oppress anybody - while having both the will and the power to quell oppression from others.
>we would have developed tech to have radio broadcast in non interfering ways
And when we were done with that, we'd have developed anti-gravity devices and eternal motion machines to generate power with.
You can't get around the laws of physics. We live in a quantum universe and there is a finite number of frequencies that can exist and absolutely zero way for two things broadcasting on the same frequency not to interfere.
Maybe we may have developed wifi likes ways of telling sources appart - but that was only possible AFTER we developed networking protocols and digital electronics, both of which depended hugely on tech for early radio to get their start - there is no reasonable way to claim the opposite would have been possible. Digital broadcasting does allow you to put more signals in a smaller band, but we couldn't get there until digital devices got small - which took a long time. Radio was already prominent in homes in the 1940s - when computers took up entire basements.
Not all public resources can be privatized effectively. And many never should. So how do you then avoid the tragedy of the commons ? The only solution is to regulate access so that nobody can abuse it.
By the way - you know what would happen if you build an early Marconi/Tesla style morse-transmitter and operated it right now ? You would fill every TV and radio in 3-block radius with static - on *every* channel. It took time to develop tuners.
Are you seriously suggesting we would have been better off if nobody could operate commercial radio devices until AFTER we developed fine-tuning abilities ? Or if the airwaves, all of them on all channels, simply belonged to whoever bought the strongest transmitter and antenna ? Why would anybody have bothered at all ? You go invest thousands in the equipment to get a station online, and somebody else decides he would rather have your listeners and spends a little more and your entire investment is down the drain - unless you invest even more and build bigger, but then they can too. Every market would either have had no broadcasts at all, or only the broadcasts from whichever broadcaster had the richest investor.
>As a side note, is "Nigerian prince" the world's most hazardous job? They're constantly dying off!
To be fair: national borders in Africa were drawn by colonial powers with little or no regard for where the locals had drawn their borders. So many African monarchies span regions into multiple countries and most countries contain several different monarchies. You could have about 7 South African princes die this year for example, and without any of them being related to any of the others. If you allow for sibling deaths - 30 or 40 would be possible.
The death rate isn't that high, and these dying Nigerian princes are made up of course - but there's certainly quite a lot of them. Nigeria is a massive country (one of the largest on the continent) and has a great many different royal familes.
As an aside: actual African monarchies are not actually very wealthy (often not at all). The only remaining ruling monarchy on the continent is in Swaziland. Laws vary across the many countries on the continent but in most the authority of the old royal families today is held as regional common-law, and the chiefs are exactly on par with local magistrates in the urban areas. That is to say their word is court-judgements which establish precedent (rather than legislative law), and thus cannot contradict legislation (which includes constitutions) and can be overruled by higher courts. But those are not roles which produce a great deal of weatlh. The only rich ones are either extremely corrupt (and they tend to end up in jail - here in South Africa a local chief was recently convicted for arson after burning down somebody's house. His defence was that he was acting as a judicial officer punishing somebody for disobedience. The appeals court held that he had not followed proper procedure as the council was not convened and neither evidence nor witness statements considered - ergo his actions were personal and not judicial duties and qualified as arson) or the leftovers of the very largest monarchies which had vast land-ownership and other hereditary wealth (like the Zulu kingdom).
So if the corner cafe comes and paints a logo on my outside wall without my permission I can't bill them for advertising ? I promise you they would pay the bill without a purchase order because the alternative is me charging them criminally for vandalism and suing them for lost income from the possibility of selling that advertising space to a legitimate buyer.
You think CBS's can't afford sufficient lawyers to make Microsoft consider at least paying the advertising bill to avoid much more expensive litigation and criminal charges ?
You even believe the bullshit about Trump's fortune ? In actual fact it's unlikely he even has 250-thousand dollars, more likely he is about 10-million in debt. He's been bankrupt more times than you can count (most people can count that high by age 6 but Trump supporters I assume cannot). The man is an atrocious failure as a businessman.
And even if what he said was true - we're talking about 40 years. If he had putty Daddy's inheritance into an index-tied investment fund, he would have about 4 times as much as he LIES about having ! 100-million in an index-tied fund over the past 4 decades would have been worth about 40 billion today. So his best bullshit about his fortune, is only a quarter as good as the AVERAGE of the market in a period that involved the 2 worst recessions in US history after the great depression ! At it's worst, the market is on average 4 times better at making money than Trump claims to be - and in reality he is nowhere near that claim.
As for Sanders not working a day - he has spent his life working for his fellow citizens. I know you think politicians don't work, republicans always do because your politicians have spent decades convincing you that you should make absolutely sure they never do the job you hired them to do (hell Ron Paul spent his entire career doing absolutely NOTHING but making speeches about how important it is not to make him work for his salary as a congressman). But Sanders has been an incredibly hardworking and extremely effective politician. In fact he is considered one of the most efficient legislators in Washington, despite his legal wishes being things the republicans hate and the democrats in their post-Bill-Clinton centre-right incarnation are nervous about, he has gotten more of his laws passed than anybody else on the hill.
If the scenario you are claiming comes to pass, you will find that the fact that Sanders has a far higher lead over Trump in national polls than Clinton does (and both beat him handily by the way) will prove to hugely underestimate him. In the general - you can't stop independents from voting for him.
Wake up and smell the coffee - the republicans are about to get the greatest trouncing of the last 50 years. It's going to be a slaughterhouse, and not just in the presidential election. I'm prepared to bet the democrats will take a minimum of 4 and most likely more than 10 senate seats in November as well. The forces that got the republicans their majority don't apply in the general - they can't gerrymander themselves into victory there. Republicans have been weak in generals for a while, and have only gotten MUCH weaker since 2012. The Delusion that they can win was strong then - look at that youtube Video of Karl Rove ranting that Mit Romney can't possibly be losing and refusing to believe the poll results as they came in. Bush II never won the popular vote. Romney couldn't get close... and those were viable candidates.
Today ? Nobody the republicans have fielded can be remotely described as viable except perhaps Kassich and he has no chance in hell of being the nominee. You run Trump in a year where you were already, barring a major upset of alien-invasion proportions, going to have the greatest loss since the Goldwater fiasco - and then run Goldwater without the tact ?
Mark my words, your party is led by idiots, and you're an idiot for voting for them and you should feel bad.
Miami is flooded right now.
Data type selection is critical in python. Lists are immutable for example so should used with care. Every change has to copy the entire list. This is one reason pythonistas love dicts. Dict lookups are atomic operations: bleedingly fast.
Thats an inheritance from C.
The difference should never be that big. I suspect you had a major piece of badly optimized code somewhere.
>Here's one problem: we -- individuals -- have limited time. The more efficiently it is used, which is to say, the less time we spend waiting on things to complete, the better off we are. Here's another problem: Some tasks are not fast enough. Here's another problem: computers are no longer getting faster at the same rate.
Interesting story on this: I attended a talk by the lead programmer for the Square Kilometer Array. Those guys have tons and tons of code to do numerical analysis on signals and keep all those dishes in sync and all that stuff - heavy lifting code where the n is massive and the O's are not pretty and runtimes are very, very long.
Here's an interesting tidbit: it's all done in python. During the talk he proved that the time saved on development by using python exceeds the time that would have been saved on running experiments by writing them in C.
Now that is a bit of a special case - the SKA environment means that code is constantly being refactored and modified and rewritten to handle new experiments or search for some new pattern, so there is no long term use in the software and no external customers running it, but at least in that environment python is far more efficient than C (which was the norm for radio-telescopy before SKA) simply because you can implement the code so much faster. The C code may have finished a few seconds earlier, but it would have taken hours more to get it written, tested and compiled.
@property only works for class methods, not all functions.
In which case it creates a dynamic class property that can be treated like a variable (you can even create variants that can be assigned values).
But it does not apply to pure functions. The class method type is a descendant of the function type, but it's not the same type.
>The multiprocessing library is pretty nifty
Oh yes, I absolutely LOVE multiprocess.Pool.map ! It is, by far, the easiest parallel execution setup I've ever done.
Python itself seems to be seriously embracing concurrent processing, which is very powerful and very useful for a lot of jobs - though not the ones where parallelism really shines (or anything that's embarrassingly parallel) , the async/await model is a really clean and pythonic way to do powerful concurrent generators - it's still very new, but I think it will replace multithreading almost entirely. For everything MT does well, await/async can do it better and with less code, for the rest MP will generally work better.
Python's file management is actually seriously primitive, in fact it's almost identical to C - but with longer commands.
One of the big debates ongoing in the python development community right now is about that issue in fact. Notable parts include making pathlib support more integrated (pathlib - by not treating paths as strings is much better able ot deal with the nuances of OS requirements - but also unusable by most file management tools, even the ones in the standard library, without a cast), and about whether or not to create a string.write_to_file style mechanism as is found in many other more specialized languages.
Looks like the consensus was to not do the latter but to provide some equally simple approaches to file access, storage and safe pickling of data - but these are not yet in python.
It's kind of odd that you would make this claim in an area where, right now, the python mailing lists are busy debating how to improve the fact that python's file management is essentially identical to that of C.
> or else you'd just have proved that it's not a particular kind of simulation.
And is that not progress ? A lot of cosmologists think that black holes are the other side of big bangs. That is - that what was the big bang that gave birth to our universe, was a black hole in a different universe, and that there are other universes on the other side of every black hole in ours. They will all, readily, concede that they cannot prove this - that it's utterly untestable, which is why it's not even at the level of hypotheses and merely conjecture. It's not an invalid conjecture for a scientist to hold though - provided they don't claim it's more than that. The most attractive thing about it is that it reduces the number of known singularities in physics from two to one (by making one of them just another side of the other).
At least with the universe-is-a-simulation idea, we can do *some* tests and theorectically we can eventually test for every simulation type we can imagine. If we do that, and the tests are *all* negative - then it becomes an extremely unlikely hypotheses. Perhaps not completely disproven but it certainly to be filed in the "no scientist takes it seriously" category where it shall remain until and unless some new evidence emerges. Kind of like what happened with the idea of moving continents. The idea must have occurred to people for centuries - but scientists considered it little more than a joke. It wasn't until 1905 that an actual scientist took it seriously, but his ideas about how it may happen were laughed at. It didn't get more serious traction until the 1950s when computer modeling started suggesting it was more likely than not. We didn't get physical proof of it until a few decades after that. Today it's the consensus theory because we are watching it happen.
I really didn't read "at the moment" as being an accumulated number.
Thats actually a good point I had not considered. But I do think at the level of something as close to the metal as file management that pythons verbose names and syntax would make it bigger than C. At application level the higher level of abstraction should win for python.
% interpolator is still there and still works - it is not recommended since the .format method is much more powerful and well worth the transition, but the old way should keep working (at least in part to make porting code like yours easier and allow a piece-by-piece port).
Probably the single incompatibility that causes by far the most problems is actually the deprecation of the print statement, but one could argue it should never have existed. Print has always behaved like a function, it should have been one all along.
The second biggest incompatibility is that most sub-indexing methods (like Dict.keys()) are now iterators. This is a hugely useful change since the vast majority of calls to them are in for loops and using iterators are far more memory efficient in that event. But it can cause some issues if you have code like this:
x = {'a': 'b'}
y = x.keys()
In python 2 y would have the value ['a'] but in python3 it would be a function object because x.keys was an iterator. The quick fix is:
y = list(x.keys()) which will convert the iterator to a list correctly.
Fix those and almost every other change is transparent and you are unlikely to encounter them (I speak having ported a number of python2 projects to python3). Unless you're doing something like encryption which is full of work-arounds for python2's terrible string/bytes model, you probably won't even see the rest.
http://www.diveintopython3.net...
That alone makes it worth-while, at least if you give a damn about securite. Go look at any encryption library for python2 - it's a horrible ugly mess of trying to work around the limitations of python2 strings. Python3 provides the bytes type as part of the string overhaul - which makes encryption code massively cleaner and run a *lot* faster.
On the other hand - have you seen the extreme hackyness of encryption libraries in python2 - and how clean their code is in the python3 versions ? The 2.x versions are filled with horrible work-arounds to deal with python 2's lack of a proper byte-type - trying to mash things into the string type without having overflow errors. More than a few resort to rewriting every character using hex-codes on-read and then storing the hex-codes as strings - which needs (expensive) back-and-forth conversion on every access.
In python3 - they just used the Byte type out of the box and require no hacks to make it work.
Sure python3 broke compatibility, that's what happens with a major version number. It's worth it though because the vast majority of changes actually fixed long-running serious issues, like the ones that plagued encryption libraries.
Considering that it was a purely emotional expression with no attempt at rationalization it may have no rationally explainable reason at all. He could literally just be a guy who found Monty Python terribly unfunny and annoying (it's theoretically possible for such a person to exist) and thus got pissed off by all the MP references in the sample code and tutorials.
I suspect a lot of that code lies in redundancy and load-sharing systems. Python is notoriously bad at multithreading (so much so that most python coders prefer a library called multiprocess that fakes multithreading by spawning new python processses entirely) - so load-balancing, load-sharing and redundancy under heavy use are problems python is particularly bad at (not the language so much as the architecture of the implementation to be fair).
So it's likely a great deal of the code is dedicated to solutions to those difficult problems. It also rather depends on how you count it. Other things that could contribute large amounts of code:
- They likely use a custom application server (in order to implement all that redundancy and load-sharing)
- There's likely a significant amount of debug logs in there, and extensive logging throughout (you need that if you're going to keep something like this maintained and find/fix problems quickly).
Finally - the comparison is not actually very fair. The Kernel is written in C - a language designed for brevity, while python is much more verbose. Python is not a language that encourages lots of one-liners, except where they can be used to avoid deep nesting (which is actively discouraged) or in purely functional calls (which are available but only encouraged for specific use-case determined algorithms where the non-functional version would actually be harder to read).
So the exact same algorithm is likely to use more lines in python than in C - and be a lot easier to read. I was not surprised to learn from this interview that a lot of his own early work was in Pascal and Algol - you can see a lot of the Wirth philosophy in Python. Python in a very real sense struck a perfect balance between readable verbosity and cruft. Java is too far to the other side, you need about 100 lines just to show a simple "exit on click" button on the screen and almost none of them have anything to do with the task at hand. The same thing in TCL/TK will take one line, in python it's about 3 lines (depending what GUI library you use).
I recently developed a fairly comprehensive GUI library in python. I was building an RPG in Pygame (need to pick that up again sometime) and pygame has no gui elements and none of the libraries are maintained, so I wrote my own. Python made this ridiculously easy for the most part. Hell at one point I actually wrote a recursive object (that is to say - an class in which one of the methods would instantiate another instance of the same class it's a method off). The class was a box containing a list of items you can select (used for things like the inventory) but when you need to add something to a box like that (say in the game editor - adding treaures into a chest) it instantiates another instance of itself, with different parameters to show you the list of possible things you can add.
That took no clever trickery whatsoever, the method just instantiated the class and operated on the object, python handled all the recursion magic entirely transparently.
That gave me (as a long time python developer) an entirely new respect for just how powerful the language really is. I also strongly suspect that in most languages that activity would have been far more complex, many languages don't even allow recursive classes after all.
I can easily see half that change coming just from gaining access to Jinja2. I've worked extensively with a huge array of templating languages in recent years, and while they all have basically the same syntax none of them are anywhere near the sheer unadulterated power that Jinja2 offers.
It took me a while to figure out just what it was that Jinja2 had that they all lacked and which made such a massive difference. I finally nailed it down. All of them have, right in the beginning of the manual guides on how to write helper functions to extend the language. Jinja2 barely mentions that. The reason is simple: it hardly ever needs them. This is because Jinja2 exposes any data you pass to it as the original python object - with all that object's methods available inside the template.
That's extremely useful. The problem with the "helper methods" approach is that you're screwed whenever the thing running the template is not code you have access to (or can afford to alter). In a corporate environment you may be using a tool like consul-template which you really don't want to maintain a local derivative off, so you can't use any functions in your templates that their derivative of golang-template did not already include. With Jinja2 even with somebody else's code you still have access to every method the data type object exposes.
So if you have to get the overlap of two lists in your template from two disparate upstream data sources you don't have to hope the template language includes the right list operators, you just use the built-in methods of the list objects directly.
Have you seen what a list-overlap seeker written in pure golang-template looks like ? It's a hellish maze of deeply nested loops and if statements and the output enmeshed inside all that gunk because golang lacks a sufficient set method to create new variables that can let you pre-construct your new list before looping over it.
I had to do just that recently, the golang template was well over 500 lines of unreadable and barely navigatable junk - I did the same thing in less than 5 lines of Jinja2.
So I can easily imagine that for a web app that's highly template driven you could end up with a huge amount of code that exists within the templates (or as helper-functions to the template library) which you can throw away if you redo it in python.
His dayjob is as a senior engineer at dropbox - he did in fact build quite a lot of dropbox.
I think you're wrong. I think most people would prefer a case of the clap over giving Drumpf the nuclear launch codes...
Sanders has already won. He has forced the demcratic party leadership to realize that their base is liberal voters not center-right like they have been ever since Reagan. The first Clinton relied on Southern whites to win. Sanders proved that they are no longer needed, or possible to get.
In so doing he changed the tone of the Clinton campaign and dictated the tone of the upcoming congressionnal campaigns. America has had a signifant liberal majority for many years. Sanders has ended the defeatist culture that left that majority with no party that represented their views. That is a victory far greater than the prezidency. Dont be surprized if Warren ends up being Hillary's running mate now.
At this stage winning the nomination is highly unlikely but dropping out is insane. He must stay in until the convention to prevent political inertia from erasing those gains before the general (and handing the white house to the republicans). Clinton could not have had a chance in the general without the policies Sanders has forced her to adopt.