Slashdot Mirror


User: Jonner

Jonner's activity in the archive.

Stories
0
Comments
1,695
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,695

  1. Re:Python VS PHP on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    I do, however, disagree with Guido's statement that "Python is fast enough". Whether it is or not depends entirely on what you're doing. For my purposes I don't think a 12-core computer optimally programmed in assembler would be "fast enough".

    It's faster to write code in Python than in C or C++ or Pascal or Java. But Python isn't "fast enough" unless your program is I/O bound. And it's inability to handle multiple processing uints gracefully is a real problem. (Not that anyone has a decent answer to that except the dataflow people and the pure functional language people.) Multiple core machines are now the rule rather than the exception, so the GIL is no longer acceptable. Even Ruby attempts to address that, though they didn't really follow through after considering their library situation.

    You're absolutely correct that whether a language implementation is "fast enough" depends totally on the problem being solved. If the program is I/O bound, as most are, Python and many other languages are fast enough. Even if part of the problem is CPU bound, there is usually a lot of code that is not, which is why hybrid C/Python solutions are so common. For example, NumPy can take advantage of multiple CPUs when doing matrix calculations, allowing one do heavy, fast number crunching without writing a line of C.

    If you need to do CPU-bound processing in Python code, threads won't help if you're using CPython, but they might if you're using Jython which is JVM implementation that has no GIL. Alternatively, you can use the multiprocessing module which avoids the GIL and a lot of other potential problems with threads at the cost of having to explicitly communicate between processes rather than share data structures directly.

  2. Re:Hardening on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    I wouldn't go back to writing my CGI with C unless there was a no-lawsuits clause.

    Write a small module that provides error checking. Always use it. No I/o, including DB, I mean literally NO I/o, except through it. Parameter length checking, character scrubbing, quote imbalance checking, credit card number validation, date validation, range checking, throttling, email validation, URL controls... whatever you need, and you can write it as you need it. If you find you need to make a call to something and you don't have it covered -- then you need it.

    Not only is this relatively easy to do, it's instructive and enjoyable work. And you get a heck of a lot of bang for your efforts.

    Validation of inputs is always a good idea. It's also a lot easier in a language with real strings and automatic memory management than in C.

  3. Re:Guido is overrated on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    The language works. The libraries work. The programmers like it. And there exist a fairly big set of products and services built from it that are successful as well.

    That, is what matters in the end. By your own logic, languages like C shouldn't have existed at all.

    The language works. The libraries work. The programmers like it. And there exist a fairly big set of products and services built from it that are successful as well.

    That, is what matters in the end. By your own logic, languages like C shouldn't have existed at all.

    While I do use Python every day and like it, the fact that lots of people use it is not a good argument for it being a good language. In particular, PHP and C++ are the best counter-examples I know: they should never have existed but are extremely popular. C is a good language because it does what it was designed to do well, which was to give programmers direct access to hardware in a structured way. It is often misused for things that do not need low level hardware access. C++ was not a good language because it started from C's limitations as a low level, hardware-oriented language and tried to make it into a general purpose application language.

  4. Re:What does it mean? on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    Note to Guido himself: if you want Python to be even more useful then make it a recommendation to publishers such as O'Reilly NOT to have so many Monte Python references and NOT to have so many footnotes.

    Make the language seem like a joke, it will be viewed as a joke of a language. Not everyone is a Monte Python fan.

    I've heard some silly arguments against languages, but complaining about the content of a third-party's books really takes the cake. I suppose you'd rather they used dry, forgettable examples to be considered a "serious" language. BTW, you may be unaware that Guido himself is the origin of the Monty Python references, which include the name itself obviously. I learned Python using the official docs and there are many other alternatives to O'Reilly so if the genius of Monty Python offends you, it will not be forced on you.

  5. Re:Python VS PHP on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    Python has its own set of problems.... The most recent that I had to contend with is the lack of any decent SOAP library and a lack of a decent postgresql library. It seems to have an abundance of half baked libraries/extensions, and the python 3 fiasco has just made it even worse.

    Python is a great language in itself, but getting any real work done with it is an exercise in reinventing the wheel.

    There are certainly plenty of things that could be better about Python, but you're going to need to be a lot more specific with your rants. What is not decent about psycopg2? What libraries are "half-baked" and why? What exactly is a fiasco about Python 3? If you do a lot of reinventing of the wheel, you may not have encountered the extensive standard library or abundance of good libraries at PyPi.

  6. Re:Web hosting providers slow to offer new PHP on Python Creator Guido van Rossum Leaves Google For Dropbox · · Score: 1

    Someone should resurrect mod_python.

    Its successor is mod_wsgi, but what advantage does this have over, say, FastCGI?

    mod_wsgi can be easier to configure than a FastCGI setup. It supports both in-process and out-of-process modes. The former is more like mod_python and the latter is more like FastCGI. That said, the apps I work on run themselves and are accessed via mod_fcgid which is good for the custom control we need.

  7. Re:Not this shit again on Auto-threading Compiler Could Restore Moore's Law Gains · · Score: 1

    Actually part of the problem is probably the dinosaur of x86. Frequency isn't king. Remember Celeron. If more operations or larger operations could be completed in a cycle than performance would grow without increasing frequency since shrink would allow the extra transistors to accomplish this. I think Moore's Law is bollocks anyways cause it wasn't meant to foretell anything it was just noting a trend way back when.

    To be able to take advantage of the additional transistors provided by Moore's "law," either clock speed must increase or more work must be accomplished in a single clock cycle. It is getting very difficult to increase either of those within a single core. Therefore, the gains must come from additional cores.

  8. Re:Not this shit again on Auto-threading Compiler Could Restore Moore's Law Gains · · Score: 1

    Thank you Spiridios for expanding on my post. I thought it was quite clear that the gains referred to result from Moore's "law" rather than being the "law" itself.

  9. Re:Or.. teach devs to use threading as appropriate on Auto-threading Compiler Could Restore Moore's Law Gains · · Score: 5, Insightful

    An interesting development, and much needed I fear, but yet another layer of abstraction to allow lazy developers to not have to really bother about knowing what their code is actually doing (that's for the poor SoB who has to maintain it is for...)

    Developing software is all about managing complexity. Abstractions are the primary tool used to do so. They are neither inherently good or bad. A large part of writing good software is finding the appropriate abstractions and eliminating inappropriate ones. If an abstraction allows a program to be written more easily with an acceptible level of performance and correctness, it is an appropriate abstraction.

    To know what code is "actually doing" is relative. No programmer knows what his code is doing at the level of gates on the chip. It's rarely necessary or even helpful to know what the code is doing at the level of CPU instructions or microinstructions. This is especially true if the code runs on multiple CPUs.

  10. Re:Not this shit again on Auto-threading Compiler Could Restore Moore's Law Gains · · Score: 4, Insightful

    Moore's law has nothing to do with performance, numbnuts. Apparently the real geeks left Slashdot ages ago.

    Try reading the headline again. Usually, clueless posters have to be reminded to read TFA, but this is ridiculous. As Moore's "law" continues to be mostly true, the added transistors are being used for extra more cores rather than to make one core faster. Most of the cores sit idle most of the time because few programs can use more than one of them at once.

  11. Re:Am I the only one? on Israel's Iron Dome Missile Defense Shield Actually Works · · Score: 1

    Reading the comments, it seems I'm the only one here who thinks this is awesome. When it comes to weapons development, this is exactly the sort of weapon we should be cheering for. Whether you agree with the ones using it or not, this is a wonderful thing. A weapon which only works as a shield to block incoming attacks; that is what the weapons used by enlightened countries should have evolved into.

    If it works as well as claimed, it is indeed awesome. However, my enthusiasm is muted by the fact that it's needed in the first place. There is no end in sight to the conflict between Israelis, Palestinians and everyone else in the region and plenty of blame to go around.

  12. Re:both sides on Israel's Iron Dome Missile Defense Shield Actually Works · · Score: 1

    Anyone else thinking they should deploy it on the Gaza side too? Not instead (I know people will misread me). As well.

    No, because there aren't any ballistic missiles being fired at the Gaza strip.

  13. Re:duh on Feds Continue To Consider Linux Users Criminals For Watching DVDs · · Score: 1

    To be fair, it IS illegal to play a dvd on an unlicensed system because, well quite frankly, liddvdcss never paid the license fee and reverse engineered the rather crappy css encryption.

    I know that isn't what slashdot wants to hear, but the FBI is there to enforce these kinds of laws, and this IS illegal.

    Who said anything about the FBI? TFA was about the Library of Congress and United States Copyright office, neither of which makes ultimate decisions about whether anything I do is illegal. I'm certainly glad that the FBI generally has better things to do than knock down my door because I buy DVDs and play them with an unauthorized player. It should be obvious to everyone that not only is the law completely unreasonable on that issue, but that enforcing it is completely impractical. The issue is not that watching a DVD using libdvdcss is illegal (it is illegal because Congress passed a law saying it is) but that it is a bad law which should be invalidated.

  14. Re:It is ~4,000 lines on LG's 84-inch 3840 x 2160 Television Doesn't Come Cheap: $17,000 · · Score: 1

    From wikipedia: "The name 4K is derived from the horizontal resolution, which is approximately 4,000 pixels."

    Since standards have almost always used vertical resolution in naming until now, this is confusing to the point that I suspect it was motivated by the intent to mislead.

  15. The religious are stupid, and worthy of ridicule. A desire to protect them from words is a desire to suppress opposition to stupidity. Any politician who does so should rightly be called out for allowing religion to dictate his/her political views... great fun when your representatives share your own religious outlook; not so fun when you're the one being oppressed. Try to keep that last bit in mind.

    People who can't distinguish between being religious and being unable to react reasonably to criticism are stupid.

  16. Re:CRT's on A Proposal To Fix the Full-Screen X11 Window Mess · · Score: 1

    It's certainly a worthy goal to never need to change the monitor mode. However, I don't think we're quite there yet. Most games that rely on 3D acceleration cannot maintain the maximum frame rate at the maximum resolution supported by the monitor. Therefore, users need to be able to choose resolution to tune the game to their machine and preferences. Once frame rate is truly independent of mode, there should never be a need to reduce resolution.

  17. Re:Or... on 72% of Xbox 360 Gamers Approve of "More Military Drone Strikes" · · Score: 1

    Or, perhaps they feel using a drone to make an attack, rather than risking American soldiers, is the better choice?

    Are you implying it's a viable option to invade Pakistan and Yemen, both supposedly friendly countries, in addition to Afghanistan? Even if the US military had sufficient ground resources to take over two new sovereign nations, there is not the political will to do so. Therefore, the choice is between drone strikes or nothing.

  18. Re:One More Baby Step to Global Sharia Law on Saudi Arabia Calls For Global Internet Censorship Body · · Score: 1

    It's going to happen some day. The world will be dominated by Islamic idiots because the rest of the world will do nothing but appease them.

    One little tragic baby step at a time.

    I doubt the Saudis are deluded enough to think this proposal will go anywhere. In the extremely unlikely event that something were accomplished in the UN, it would be ignored by everyone who isn't already interested in censorship of this kind.

  19. Re:One overriding idea on Linus Torvalds Answers Your Questions · · Score: 1

    If you have "one overriding idea,"

    Like "everything is an object" in Git?

    What you have to keep in mind is that the idea that "one overriding idea" is wrong is a pretty overriding idea itself. Linus doesn't believe in absolutes except when he does.

  20. Re:NAS hater on Linus Torvalds Answers Your Questions · · Score: 1

    Sure, maybe those rotating platters are ok in some NAS box that you keep your big media files on (or in that cloud storage cluster you use, and where the network latencies make the disk latencies be secondary), but in an actual computer? Ugh.

    Hey Linus, guess what's my favorite kernel to run on that NAS computer? Yours. And yes, it is an "actual computer." Sorry if it's not sexy enough for ya.

    Linus made it clear that storage isn't his thing. I'm glad we've had other equally brilliant people contributing to XFS, Btrfs, LVM and other storage technologies in Linux. Linus seems quite content to leave that stuff to people who care about it and have put a great deal of work into it. Now if he could just have the same attitude toward GUIs and those who design them, I'd have a bit more respect for him.

  21. Re:the "Right To Serve"? on Is Mobile Broadband a Luxury Or a Human Right? · · Score: 1

    A luxury or a human right. What there isn't a middle ground here?

    Yes, they asked a leading question based on a false dichotomy and got a stupid answer. Internet access is a utility, like electricity or clean water. Like those things, the more people have access to it, the better off they will be. However, equating utilities with the likes of freedom of speech and freedom from slavery is a slap in the face of anyone who has struggled for those true human rights.

    I respectfully disagree. Without utilities like the information superhighway, or the actual highway, or clean water, things like 'freedom of speech' and 'freedom from slavery' are almost meaningless. I'm reminded of the scene in the movie 'The Matrix' where Neo first encounters 'supernatural' physics. After Neo demands his 'right to a phone call', agent Smith wryly states - "What good is a phone call, if you are unable to speak" (as Neo's lips become sealed shut due to the Matrix's master's control over 'reality'.

    I didn't think I'd have to point this out, but the Internet is not the Matrix. Reality as we know it didn't come into existence in the 1980s. The Internet is a very young tool for people to communicate with each other. It is very important now and will only become more important. However, unless you're playing WoW all day long, it's probably not your primary source of sensory input.

    Something else that should be pretty obvious is that people have been fighting against slavery and for free speech for a lot longer than the Internet has existed. What were the authors of the United States Bill of Rights talking about if they didn't have the Internet to give it meaning?

    As ludicrous as it is to call Internet acces a human right, I do agree that it's very important and the more people that have it, the better. I'd put it a bit behind access to clean water and electricity in importance.

  22. Re:Rights versus someone else's property on Is Mobile Broadband a Luxury Or a Human Right? · · Score: 1

    Rights are only appropriately applied to liberties. You never have the right to someone else's property or labor. Goods and services are not something you can have a "right" to.

    Access may be a compelling social good but it is absurd to call it a right.

    I couldn't agree more. There seems to be a lot of muddled thinking out there these days that assumes that if something is important to society, it is a right. Regardless of how important Internet access or health care are, they will never be rights any more than it is a right to have a steady income.

  23. Re:Binary question on Is Mobile Broadband a Luxury Or a Human Right? · · Score: 1

    A luxury or a human right. What there isn't a middle ground here?

    Yes, they asked a leading question based on a false dichotomy and got a stupid answer. Internet access is a utility, like electricity or clean water. Like those things, the more people have access to it, the better off they will be. However, equating utilities with the likes of freedom of speech and freedom from slavery is a slap in the face of anyone who has struggled for those true human rights.

  24. Re:Nicely misleading headline... on Beer Is Cheaper In the US Than Anywhere Else In the World · · Score: 1

    If I were to sell a house for 500k in San Francisco, it might be called cheap, where if were to try to sell the same house in BFN, California, it would be laughably overpriced... but they're still both 500k. You can't say one is "cheaper" than the other. This might be an interesting fact about the US that was determined, but the fact is definitely -not-, "beer is cheaper in the US than anywhere else in the world".

    Also that first sentence was interesting, as it turns out, it is as a great example of something we call a "runon sentence", a remarkably unreadable one.

    You clearly didnt read TFA, which did not compare price in dollars, but in time. Amount of time in a day is one thing that is truly universal across the Earth.

  25. Re:This study makes a serious mistake on Beer Is Cheaper In the US Than Anywhere Else In the World · · Score: 1

    It considers abominations like Bud Light to be beer.

    There are probably equally terrible local brands in India.