Slashdot Mirror


Google Boosts Python By Turning It Into Go (infoworld.com)

An anonymous reader quotes InfoWorld: Grumpy, an experimental project from Google, transpiles Python code into Go, allowing Python programs to be compiled and run as static binaries using the Go toolchain... In a blog post announcing the open source release, Google stated the project stemmed from its efforts to speed up the Python-powered front end for YouTube. But Google hit an obstacle that's familiar to folks who've deployed Python in production: It's hard to get CPython -- the default Python interpreter written in C -- to scale efficiently. "We think Grumpy has the potential to scale more gracefully than CPython for many real world workloads," writes Google...

Because it doesn't support C extensions, Grumpy doesn't have CPython's Global Interpreter Lock, which is commonly cited as a roadblock to running Python concurrent workloads smoothly. Grumpy also uses Go's garbage collection mechanisms to manage memory under the hood, instead of CPython's. Grumpy creates close interoperation between Python and Go by allowing Go packages to be imported and used with the same syntax as Go modules.

129 comments

  1. Mozilla doing the same with Rust? by Anonymous Coward · · Score: 0

    Is Mozilla doing something similar, but using Rust instead of Go?

    1. Re: Mozilla doing the same with Rust? by Anonymous Coward · · Score: 0

      I'm doing the same too!

      I improved my Energy levels by turning Beef into Shit!

    2. Re: Mozilla doing the same with Rust? by Anonymous Coward · · Score: 0

      Me too!

      Me Boost Health by turning Water into Pee.

    3. Re: Mozilla doing the same with Rust? by Anonymous Coward · · Score: 0

      It would Boost my Satisfaction by turning your Face into Shit!

    4. Re: Mozilla doing the same with Rust? by Anonymous Coward · · Score: 0

      Jesus? Is that you? Where have you been? We've all been waiting for you.

  2. Except it doesn't work properly by Anonymous Coward · · Score: 0

    Just rewrite the code to Go. Or, even better, don't use Go because Go is a trash fad language that'll be dead in five years.

    1. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      Said the developer who will be unemployable in 5 years.

    2. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      I said the same thing about Python when a little fledgling startup raved about years ago, that startup and the language they loved went on to do pretty well, you may have heard of them, they are called Google...

    3. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      > Just rewrite the code to Go. Or, even better, don't use Go because Go is a trash fad

      That doesn't make sense. Shouldn't it be "rewrite the code to Go and don't use Python anymore"?

      Jesus, if you can't form simple logical expressions, you probably shouldn't be talking about programming languages.

      You're an idiot and part of the problems.

    4. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      A lucky craftsman credits his tools...

    5. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      If facebook launches a web search tomorrow, google will be completely dead by next week, but how it possible? Google used Python!!

    6. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0, Insightful

      Yeah, all those Java developers really got screwed as time went on.

      Go ahead and learn Go and all the other fad languages, and maybe one of them will actually be something a lot of employers are interested in. Or, you could wait and learn the winner, if there ever is one.

      If you know Java, C#, and any interpreted language you're fine. But go ahead, rewrite all your code into a fad language and see who's going to be able to maintain it in five years. Or is job security with a shitty dead language your plan?

    7. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      It's google. Trash or not, everything they ever do will be abandoned in 5 years or less, with the possible exception of the search engine.

    8. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      Reading is hard.

    9. Re:Except it doesn't work properly by Anonymous Coward · · Score: 1

      When Google abandons 8.8.8.8 we can switch to 80.80.80.80.

    10. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      OP was clearly saying to manually rewrite code to Go instead of using the faulty program, or don't convert to Go at all. Which I have to agree. The only reason Google is doing this is because they back this dumb language.

      Go offers nothing that an established language can't already do. It'll die just because Google supports it...because Google has no issues with throwing away stuff as soon as they lose interest, no matter how many people are invested in it.

    11. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      Not sure Go is a fad language, and I can see it outliving the next few years, but I do think it has the attention because of a) Google, b) Docker, and c) hipster devops (no offence to my devops friends) rather than any significant advantages.

      I took a look at it a while back to see what the fuss is, and it's like going back in time: like the last couple of decades of good research in language development never existed. On the one hand, it's trying to compete with languages like Ruby and Python but lacks their expressiveness (IMHO); on the other hand, it's trying to be another C but without feeling as close to the metal as C. I'm surprised it has found a niche in the devops community, although I suspect part of that is because Node is falling out of favour, and Go feels more "serious".

      I've been taking a look at Rust and, while intended to be a systems programming language, it's doing a really good job of being more general purpose: a rich, expressive language that incorporates some pretty cool features for writing safe, robust code. Go offered nothing new to me, but Rust feels like someone has actually thought about whether the world needs yet another programming language, and if so what should it offer that is different/better.

    12. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      c) hipster devops (no offence to my devops friends)

      Devops?? You mean, write directly to production!! (offense intended)

    13. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      not unless facebook also created a device and it got any where looking at you amazon.

    14. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      everything is a fade until it is not time will tell.

    15. Re: Except it doesn't work properly by zaphirplane · · Score: 1

      Of the popular languages used with real purpose perl python go java c# ruby php which ones used language research crap you are talking about.
      Language research is for academic post doc useless stuff. Real languages that are developed by smart ppl solving real problem embraced by ppl whom buy the proposition
      I don't count c and c++ cause they are pioneers

    16. Re: Except it doesn't work properly by Anonymous Coward · · Score: 1, Funny

      Or is job security with a shitty dead language your plan?

      hell no, my current job is programing cgi in perl on apache, using cvs for versioning so i'm all set, thanks.

    17. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      set for a stint in a mental asylum?

    18. Re: Except it doesn't work properly by AxeTheMax · · Score: 1

      Did you write the above post in some kind of programming language? Because it certainly does not seem to be English.

    19. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      Just rewrite the code to Go. Or, even better...

      rewrite it in Nim and get fast, C-like performance. Nim is very similar to Python syntactically, so not much to learn anyway.

    20. Re: Except it doesn't work properly by DrXym · · Score: 4, Insightful

      Go offers nothing that an established language can't already do. It'll die just because Google supports it...because Google has no issues with throwing away stuff as soon as they lose interest, no matter how many people are invested in it.

      Pretty much every established language can do the stuff the new languages do. It doesn't mean they do them well, or that they can't be improved upon or that we should simply live with the flaws in those languages even if they cause untold numbers of errors in production code. A simple example would be C and C++'s never ending supply of bugs related to dangling pointers, memory leaks etc., many of which are caused by inherent default choices in the language.

      While I don't program Go myself it clearly demonstrates a number of advantages for writing multi-threaded, high availability, high performance applications than some other languages. It compiles to a native standalone executable, it's portable, it has garbage collection, it doesn't carry the baggage of a runtime around with it. Performance wise it sits somewhere between C and Java. I've found tools written in Go such as Prometheus to be remarkably stable and reliable.

    21. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      The world will always have asylums.

    22. Re: Except it doesn't work properly by zaphirplane · · Score: 1

      this isn't the special reading group, when you get 3 stars in the special group, the teacher will let you post here.

    23. Re:Except it doesn't work properly by yithar7153 · · Score: 2
      This reminds me of what my compilers professor said about creating a new programming language. He used Javascript as the quintessential example of why you should think twice.

      Even though a bunch of new languages coming out. Thought I want to make a new programming language. Next thought should be “No.” This is how really bad programming languages get out there in the world. Javascript is a good example. Javascript was designed and implemented by this guy who went to the University of Indiana. Made a scheme interpreter. Working at Netscape. Need some language to script webpages in web browser. I know I'll just do it with Scheme. Curly braces lot faster than parentheses. Notation that C programmers will like and call it Java-something for marketing purposes. In a week, came up with first Javascript implementation. No going back. On every computer and phone. Can't make any changes, so many JS programs in the world. Arguably the most widely used programming language.

    24. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      University of Illinois...don't be a flyover ahole.

    25. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      If a developer's competent in a procedural language and an object oriented language (java, c++, and c# would count for both), learning the syntax and libraries of another procedural or OO language is going to take a couple days, maybe a week to be able to work effectively.

    26. Re:Except it doesn't work properly by Anonymous Coward · · Score: 0

      your compiler professor is a tool and a failure. what did he ever make.

    27. Re: Except it doesn't work properly by Wrath0fb0b · · Score: 4, Insightful

      it has garbage collection, it doesn't carry the baggage of a runtime around with it

      Sigh. Of course it has a runtime. Where else would the garbage collection that you just mentioned be implemented? Or GoRoutines. Or reflection.

      I think you're confusing not having a runtime with having the Go compiler statically link the runtime into each executable. That has some benefits that you were alluding to (e.g. "no baggage") but it also has drawbacks such as increased executable size, increased memory usage (with a dynamic runtime, different instances all share the same library in memory), decreased cache usage (since if you have two Go executables, they are constantly evicting each others runtimes from cache, even though they are identical and could be shared) and the maintenance issues having to recompile to take advantage of security/bug/performance improvements in the runtime itself.

      I have no issue if you claim that in some (your) use cases the advantages of a statically compiled runtime are worth the disadvantages. But that's not the same as claiming that either the runtime doesn't exist or that it's always advantageous.

    28. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      Take a fucking writing class. Jesus Christ himself could not decipher what you wrote in your two posts.

    29. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      This is the class teacher. I give your original post a grade of D- for its innumerable punctuation and grammar errors. The only reason that you did not receive an F is because that grade is reserved for those who fail to turn in anything.

    30. Re: Except it doesn't work properly by FatdogHaiku · · Score: 1
      --
      You have the right to remain sentient. If you give up the right to remain sentient, you will be elected to public office
    31. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      Or is job security with a shitty dead language your plan?

      hell no, my current job is programing cgi in perl on apache, using cvs for versioning so i'm all set, thanks.

      Dang, three out of four. I'd better learn this cvs thing.

    32. Re: Except it doesn't work properly by Desler · · Score: 1

      Every language with a standard library has a runtime library. Are you a moron? I'll give you one guess what the RT in MSVCRT means.

    33. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      It's like Subversion with about half of the features removed. Or like git for people who enjoy not cursing at /being befuddled by their VCS's insane syntax or behavior several times a day.

    34. Re: Except it doesn't work properly by Anonymous Coward · · Score: 0

      NCSA *at* the University of Illinois. ;)

    35. Re: Except it doesn't work properly by FlyingGuy · · Score: 1

      I really have to vehemently disagree with you contention of:

      A simple example would be C and C++'s never ending supply of bugs related to dangling pointers, memory leaks etc., many of which are caused by inherent default choices in the language.

      If I were to judge your age based on your user ID number, I would day you have been around long enough to know the old saying, "I malloc, therefor I free"

      C and to a lesser extent, C++ are quite excellent tools, and for that matter most all other tools are written in those two languages by competent software engineers who actually know what they are doing.

      Don,t blame the tool, place the incompetent tool user.

      --
      Hey KID! Yeah you, get the fuck off my lawn!
    36. Re: Except it doesn't work properly by tepples · · Score: 1

      Sharing a framework is fine on servers running *n?x, not so fine on desktop or smartphones.

      On Windows, the most widespread desktop and laptop computer operating system in the Western industrialized world, there exists no system-wide automated way to install and update frameworks separately from an application. So when you try to install an application whose framework comes separately, it won't run because the framework isn't already there.

      And on both macOS and iOS, Apple requires applications sold in the App Store to be "self-contained". A "self-contained" app either is statically linked or has a local copy of any frameworks that aren't shipped with the OS. I imagine that Apple instituted this policy to avoid the "DLL hell" problem on Windows, where an update to a framework would break applications that inadvertently depended on implementation-defined, unspecified, or undefined behaviors of said framework.

      Besides, address space layout randomization (ASLR) is likely to diminish any RAM-sharing benefits of a shared framework.

  3. A Logo Proposal by Anonymous Coward · · Score: 2, Funny

    A Python eating its tail and forming a wheel, making it Go easier.

    1. Re:A Logo Proposal by Anonymous Coward · · Score: 2, Informative

      I think the ouroboros symbols is used by PyPy (JIT compilation):

      https://en.wikipedia.org/wiki/PyPy

  4. It's all just noise to me... by Anonymous Coward · · Score: 1, Insightful

    What are they talking about? Stop inventing new shit all the fucking time, and just fucking stick to what fucking works and is stable. You never let anything settle. You constantly crave change for the sake of change. Fuck off. Slow the fuck down. My Windows 10 hasn't even updated to Anniversary Edition yet, and there are already multiple major updates since. It's insanity. Stop changing everything. Go back to the UI of Windows 95 and start over from there. Stop making new programming languages. Stop doing all this stupid shit.

    1. Re:It's all just noise to me... by Anonymous Coward · · Score: 0

      Old is bad. Why aren't you dead yet.

    2. Re:It's all just noise to me... by Anonymous Coward · · Score: 0

      When things change too fast, people cannot adapt properly and code soon cannot be maintained.

      Old is wise, young is foolish.

    3. Re:It's all just noise to me... by Anonymous Coward · · Score: 0

      When things change too fast, people cannot adapt properly and code soon cannot be maintained.

      How many apps have you coded that have a billion users?

      Old is wise, young is foolish.

      Crawl under your bridge and die now.

    4. Re: It's all just noise to me... by Anonymous Coward · · Score: 0

      your funny i like your sarcasm.

    5. Re: It's all just noise to me... by Anonymous Coward · · Score: 0

      your funny i like you're sarcasm.

      FTFY

    6. Re:It's all just noise to me... by cerberusss · · Score: 1

      Easy, gramps. Forgot to take your medicine again?

      --
      8 of 13 people found this answer helpful. Did you?
    7. Re:It's all just noise to me... by Anonymous Coward · · Score: 0

      Welcome to the modern worl... ooo, shiny!

    8. Re: It's all just noise to me... by Anonymous Coward · · Score: 0

      You're joking, right? A grammar troll that only trolled half the grammar mistakes in another post? WTF are we coming to? It's even the same mistake twice!

  5. Just WOW by Anonymous Coward · · Score: 0

    Four post and no mention of religion, trump, racism, or apers aping apes. Am I in the wrong place.

    You be the judge.

    1. Re:Just WOW by Anonymous Coward · · Score: 0

      Trump will reduce tab width to 3 spaces and use the savings to pay for the wall.

  6. please fix syntax while at it by Anonymous Coward · · Score: 2, Funny

    1. parse python into AST.
    2. reformat with curly braces.
    3. take over the world; there would be no stopping a curly-braces version of python.

    1. Re:please fix syntax while at it by lucm · · Score: 2

      I would settle for a switch statement.

      --
      lucm, indeed.
    2. Re:please fix syntax while at it by tepples · · Score: 1

      Python's switch statement is a dictionary of inner functions.

  7. Just another f***ing kludge to get around by CQDX · · Score: 5, Informative

    Python's GIL. Pythonistas keeping pushing for Python everywhere but don't realize that Python does have its limits and is not the language of choice if you need performance on multiple cores. In my experience, when you try to emulate multithreading in Python using some message passing scheme you end up with something that is more complicated, harder to debug and tune, harder to maintain, than the equivalent written in good C++.

    1. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      It's not just the GIL that's a problem with Python. The language itself is braindead due to stupid cosmetic decisions. For example, you can't have a lambda with more than one expression inside of it, because that would break white space indentation rules.

      Use a real language, you won't regret it.

    2. Re: Just another f***ing kludge to get around by Anonymous Coward · · Score: 1

      "... written is good C++"
      That's funny, I've never seen good C++ code.

    3. Re: Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      A good programmer can write fortran in any language.

    4. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      Things have likely improved since you last looked at it.

    5. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      Spoken like a true slashdotter who's never used the multiprocessing module.

    6. Re:Just another f***ing kludge to get around by CQDX · · Score: 4, Informative

      I'm using it right now. Embedded system, Python 2.7 (many legacy modules not 3.x compatible) on a multicore processor. I'm working on an existing Python based project that is very similar to something I did previously at another company in C++. Python is certainly easier to bootstrap a project but once you start dealing with high loads and trying to squeeze all the processing power out of a CPU I'm finding Python much harder to use over C++.

    7. Re:Just another f***ing kludge to get around by cheekyboy · · Score: 1

      im sick of ./configure scripts that spit out syntax error on bracket )

      Theres nothing wrong with perl, it looks like C, is easy to write, is NOT messy, unless your brain is fucked up.

      Iam sick of coders using 45 meg of modules to save 3 lines of code, as they cannot code anything more than 5 lines of complexity, so just use another lib.

      --
      Liberty freedom are no1, not dicks in suits.
    8. Re: Just another f***ing kludge to get around by CQDX · · Score: 4, Insightful

      A craftsman can write good code in any language.

      Everyone else writes crap in every language.

    9. Re:Just another f***ing kludge to get around by darkHanzz · · Score: 2

      Doesn't python secretly use semicolons to allow multiple statements in lamdba's ? If so, it'd only prove your point..

    10. Re:Just another f***ing kludge to get around by fnj · · Score: 4, Informative

      I think a lot of python users are not even aware of this. It's not a secret, and it's not just for lambdas. Semicolon is a perfectly legal statement separator in python. It's just that newline is ALSO a statement separator.

      if x < 1: print(x); print(y); print(z)

      is the same as

      if x < 1:
              print(x)
              print(y)
              print(z)

    11. Re:Just another f***ing kludge to get around by johannesg · · Score: 2, Insightful

      Gee, scripting languages being good at quick and dirty, but then failing to deal with high loads. Who would have guessed.

    12. Re: Just another f***ing kludge to get around by maxm · · Score: 2

      There is a clever concept in Python where you can have multiple statements inside a lambda. You can even split it easily over one or more lines. It is called a "function".

      --
      Max M - IT's Mad Science
    13. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      is easy to write

      If only it could be read too...

    14. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      I actually did design of 'message passing' paradigm stuff in huge application and this was much simpler than finding out what lock is fucking up with us. I suppose ymmv?

    15. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      What do you think of Perl 6? Is it ready for production use yet?

    16. Re:Just another f***ing kludge to get around by jonr · · Score: 1

      Iam sick of coders using 45 meg of modules to save 3 lines of code, as they cannot code anything more than 5 lines of complexity, so just use another lib.

      When I started looking into node.js.... the amounts of wtfs per minute increased exponentially...

    17. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      Freaking language purists man. I bet you hate .NET, perl, python, php, java, javascript, or anything that's not directly compiled into assembly.

      No one language is good for everything, even C++ has issues with certain types of workloads.

      As for python's ability to expand, there is no such thing as 'emulating' multithreading. You either have multiple threads running or you don't. Python is a true multithreaded language, while it is subject to the GIL, if you're mostly waiting on things to happen from different places and you want non-blocking code, python does work. See: github.com/jmdevince/CIFpy3 . I built that project and it uses multiprocessing / multithreading and is actually far less complicated and has higher reliability because I used a messaging service. I know that any data going into the messaging service will be handled correctly, and if for some reason a thread or process crashes, it will return to the messaging service eventually to be handled again.

    18. Re: Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      Give me your boss's email, so I can tell them to make you write in brainfuck.

    19. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      Good C++? What's that like?

    20. Re:Just another f***ing kludge to get around by Anonymous Coward · · Score: 0

      if x < 1:
                      print(x)
                      print(y)
                      print(z)

      I'm at the edge of singularity, the smallest movement causing a catastrophic fall into the abyss of whitespace. The monitor is barren and empty. The mouth dry.

  8. Google buys innovative from outside by Anonymous Coward · · Score: 4, Informative

    Google didn't invent Python. That was developed by Guido R. at another organization. Years later, Guiodo went to work for Google, well after Python's ascendant popularity.

    Android was also developed by another company that Google later bought. Same thing with Youtube. Do you see a pattern yet?

    1. Re:Google buys innovative from outside by Anonymous Coward · · Score: 0

      Google is the MCP?

      Movie reference too old.

    2. Re: Google buys innovative from outside by Anonymous Coward · · Score: 0

      So?

      Have you worked at a big company before? Innovation is scary and risky. While little companies and venture backed startups are taking moonshots big companies talk a lot about innovation but don't actually do it. They need to purchase little companies doing cool new things or structure their business radically differently.

      I recommend reading The Innovators Dilemma. It's dated, but very interesting.

    3. Re:Google buys innovative from outside by Anonymous Coward · · Score: 0

      Huh? Python went nowhere until Google chose it as their language. In a major way, Google helped Python become popular, THEN Guido went to work for them.
      You need to give credit where it's due.

    4. Re:Google buys innovative from outside by Anonymous Coward · · Score: 0

      popularity and customer base.
      Google bought these little companies before it was used Internationally.
      There is other Mobile phone Operating Systems that cannot make a dent in Mobile.
      Example:
      Windows OS, Tizen, Mozilla OS, etc
      Google grew Android and Youtube like grass when it was still a seedling.
      ** Here is a real pattern. +> Google open sourced their products for the "International" Community.
      ** Google allows U to watch and put things on Youtube at a very minimal fee.

    5. Re:Google buys innovative from outside by Anonymous Coward · · Score: 0

      Google's core engine was originally written in Python though. So Google is arguable the most successful Python product of all time (even though RedHat's RPM was also originally written in Python). Oh, the last I heard Guido left Google to work at Dropbox.

    6. Re:Google buys innovative from outside by Anonymous Coward · · Score: 0

      You have your cause and effect reversed. Google chose it along with a ton of other major and minor web players because python and its ecosystem kept on improving past other solutions, probably because of Guido actually having a vision.

  9. No C Extensions? by Anonymous Coward · · Score: 0

    So it can only support pure Python code? That pretty much rules it out for many applications where speed is an issue, where C extensions are common (and not just for performance reasons). In which case, might as well use PyPy: all the advantages of Python, the JIT can give native performance, and you can use all the existing high performance libraries written in C (or Fortran!). Sure, I grant you that Grumpy does have the advantage of making a self-contained executable, but there are ways to do that with PyPy.

    Is this going to go the way of Google's Unladen Swallow fork of CPython?

    1. Re:No C Extensions? by Anonymous Coward · · Score: 1

      It's really just to transition a few large in house Google services to Go because Python is slow as fuck and that's never going to change. Most new Google projects just use C++, Java, Go or Dart from the start now. Python is mostly being phased out and this is a tool to help with that.

  10. or use react..... whoops by cheekyboy · · Score: 1

    oH whoops, cant use a facebook framework/jsx.

    hahaha

    why cant google use its own technologies, such as Polymer/webcomponents

    But youtube interface sucks , thumbnails have no tooltips, dont show time stamps. When a paused video in full screen goes to window mode, it starts play back again. Also they show ads that are longer than the videos sometimes, (39min ad for 4min video)

    Where is the SBS mode 3D interface for 3dTVs ? I can play back SBS 3d videos, but the interface web page it self is not in 3d mode, or even viewable in 3d mode.

    --
    Liberty freedom are no1, not dicks in suits.
    1. Re: or use react..... whoops by Anonymous Coward · · Score: 0

      If YouTube is giving you 39 minute ads then something is extremely wrong. The longest ad I've seen is 30 seconds.

  11. Re:youtube-dl by Anonymous Coward · · Score: 0

    YouTube downloader services make you "please wait" for conversion because every YouTube downloader uses youtube-dl on the backend and youtube-dl is a giant bloated python script.

  12. COBOL by SpaghettiPattern · · Score: 1

    Well COBOL has both funky syntax rules and scalability. Nearly there guys!

    --

    I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
    1. Re:COBOL by ckatko · · Score: 2

      Real men code in Interpreted COBOL running on top of a Javascript framework.

  13. Try JPython by aberglas · · Score: 4, Insightful

    It should use the Java JIT compiler to run much faster than any byte code interpreter.

    That said, I do not know why anybody would even think of using a programming language without static typing. Not for performance, but rather for sanity when writing and (more importantly) maintaining code. With type inference it costs virtually no extra typing.

    1. Re:Try JPython by Anonymous Coward · · Score: 1

      Good point. I was thinking about the all the discussions of Rust. It seems Rust is just "reinventing" Ada. Used to code in Ada, great language for writing quality robust code. Static typing is a good thing.

    2. Re:Try JPython by DrXym · · Score: 2
      I think Rust does have some similarities to Ada in terms of its design goals and even some of its syntax (match vs case for example). But it is designed to replace C / C++ code and so the syntax is fairly C-like - curly braces, semi-colons etc. The main thing it tries to do is enforce safety upfront at compile time so that only "correct" code gets through and is therefore not vulnerable to the ubiquitous errors of C / C++ - memory leaks, dangling pointers, buffer overruns, data races etc.

      I've played around with it a lot and I like the language. The compiler will kick your ass (with helpful suggestions) if you write something wrong or violate some lifetime / ownership / mutability constraint. Once your code compiles, it should be as performant as C / C++ and more reliable. It's also extremely portable and has a package manager. The downsides right now is the compiler is quite slow compared to a C / C++ compiler and code that puts boxes inside arcs inside results and unwraps it can look pretty messy.

    3. Re:Try JPython by yithar7153 · · Score: 3, Informative

      Yeah, this is why I love OCaml. OCaml has static typing with type inference. You don't have to type the types out if you don't want to, but you still get those strong guarantees at compile time because of mathematical proofs.

      My compilers professor said that he believed that type systems are the most important form of program verification that we have (See notes).

    4. Re:Try JPython by sjames · · Score: 1

      Static typing is a special case of contract capabilities/attributes. It's used because it's easier, but form a theoretical standpoint, you don't want to demand that the object be a "customer", you want to demand that it has a mailing address attribute accessed as .mailing_address. Ideally it should not lose it's "Employee-ness" if it gets passed in, in case a later step needs to special case that or take some extra action if the object is_A or better yet, has_A...

      Python is an experiment in that with Duck Typing. In Python, it happens at the expense of losing the compile time checking. If a language really wants to innovate, it should do an analysis that allows for Python's flexibility but doesn't wait till runtime to do the checking. Yes, I realize that could be a hard problem.

    5. Re:Try JPython by ndykman · · Score: 1

      Type checking is ultimately formal verification (see the Curry-Howard correspondence). Of course, this limits what type systems can specify about a program, and practically, the restrictions placed on languages based on certain more advanced type systems greatly limit their use in general programming.

  14. Re:GIL by Anonymous Coward · · Score: 0

    Even if this was true (and there are some problems with using multiple processes), nothing fixes that processes are utter crap on Windows, anything involving them in slow as molasses on it, so unfortunately process-based parallelism is close to a no-go on Windows. That may well be the one huge reason why we got stuck with threads as basically the only "official" way of doing it.

  15. Re:GIL by andremerzky400 · · Score: 2

    Unfortunately, the GIL does not only inhibit performance scaling with threads, it causes performance to scale *negatively* on multicore systems. Don't believe me? Try to run a threaded code on a single core system, and then on multicore systems (`cpusets` come in handy for this test). That holds for I/O bound threads just as well as for CPU bound ones or mixtures thereof. Singlecore systems are hard to find nowadays, and cpusets are not always available (in terms of permission and kernel support), and it impacts process based scaling obviously. Negative scaling is hard to accept (for my use cases at least).

    Further, the GIL causes some strangeness (to put it mildly) with respect to signals and interrupt handling -- simply put, signals and interrupts can get lost in multithreaded python codes, which makes mix of threading and processing *very* cumbersome and unstable.

    *Only* using multiprocessing is hard, too, for two reasons: not having threads makes async programming difficult (think GUIs). It makes I/O or event driven applications much harder. And, multiprocessing has its own quirks: ever tried to spawn a process in a daemon (hits an `assert`)? Ever tried to pass around a process handle to a central process manager (`wait()` will cease to work)? And some other funny things. Python does not make any serious attempt to provide POSIX level process handling, in my opinion, and that shows for non-trivial use cases.

    In summary: people like me whining about the GIL have more reasons than performance. But, performance is one, too. Threading in Python is in a sorry state, and that is a shame. There is no solution in sight.

    Python is a neat language. I would not ever (again) recommend it for production code.

  16. Re:GIL by andremerzky400 · · Score: 2

    PS.: I should add that, in this context, the GO runtime is interesting, as it puts away several of those limitations. So I do understand the rationale behind this I guess. As others above, I don't really see the advantages of simply using GO directly, or any other mature language. My guess is that there is too much Python code around to simply abandon or re-implement it.

  17. Re:GIL by ooloorie · · Score: 2

    IPCs should be just as fast as cross-thread data travell (because neither requires a context switch -- the biggest slow down).

    Well, and that's what threads are: something like multiple UNIX processes sharing all their memory via shared memory and a few other niceties. Unfortunately, Python doesn't support that kind of fast, consistent IPC. What it supports is either a limited form of shared memory, or slow IPC that involves copying.

    So, you can look at the Python runtime either as lacking thread support or at lacking good IPC support, but it is lacking something that many other runtimes have.

  18. it's the libraries, stupid! by ooloorie · · Score: 2

    There have already been several excellent implementations of Python that compile to native code, either via JIT or directly, including IronPython. But Python's performance problems aren't in Python code, since anything compute intensive is done in native libraries. The real problem with all of those implementations is that, like Grumpy, they don't have native, thread-safe libraries, foremost Numpy and Scipy.

    Grumpy sounds like an attempt to migrate Python users to Go. That's probably the right idea, because Python seems to be going nowhere fast. Go, however, is probably not the right language to migrate to, despite its moderate adoption in some systems applications, mostly because Go just gives the finger to existing programming practice for no other reason than FYTW.

    1. Re:it's the libraries, stupid! by Anonymous Coward · · Score: 0

      That's probably the right idea, because Python seems to be going nowhere fast.

      And that's a bad thing how?
      I don't want to deal with fad languages like ruby/nodejs/go where a debian stable version is considered ancient and it takes 4 iterations of API/libraries to get them on par with other languages.
      At least python's package manager is actually capable of dealing with versions compared to pull-the-latest-master go.

    2. Re:it's the libraries, stupid! by ooloorie · · Score: 1

      And that's a bad thing how?

      Python-the-language is fine. The problem is that the Python-the-CPython-implementation sucks: it's slow, doesn't support threading, and has a lousy native code interface.

  19. STOP USNIG "TRANSPILE" by Anonymous Coward · · Score: 0

    Can we fucking STOP using this abomination? A compiler ALREADY translates between two languages!!!!!! what the fuck is new about "transpiling" STOP IT RETARDS

    1. Re:STOP USNIG "TRANSPILE" by Anonymous Coward · · Score: 0

      It's a play on words "transcode" (converting from one CODEC format to another) and "compile". A CODEC needs to be converted to PCM before it becomes playable (PCM is the essentially the raw sound data). "Compile" usually means translate from a higher level language to a lower level language. "Transpile" means translate in a lateral fashion (from higher-level language to the same-level language or bytecode-to-a-different-bytecode).

    2. Re:STOP USNIG "TRANSPILE" by HeckRuler · · Score: 1

      Yeah, I'd have to agree. But kids like to pretend they made something new.

    3. Re:STOP USNIG "TRANSPILE" by tepples · · Score: 1

      Then what's a better word for "compile" that specifically connotes the target language being higher level than assembly language?

      (Here, I define "assembly language" as a human-readable programming language with a nearly one-to-one correspondence with a CPU's native machine language or a JIT-compiled bytecode.)

    4. Re:STOP USNIG "TRANSPILE" by HeckRuler · · Score: 1

      What's a better word for "execute" that specifically connotes the execution taking place on little-endian powerPC architecture?

      Lillpowcecute! WHEEEE!! New words are FUN!

      But nobody needs it.

      Google compiled some code from Python into Go. Anyone in the industry should know what you're talking about. Anyone that tries to act like a know it all and claim that compiling only refers to the trip to binary deserves to be corrected.

  20. Jython, not JPython by jma05 · · Score: 1

    Nitpicking, buy it was JPython in 1997
    It has been Jython since 1999
    https://wiki.python.org/jython...

    > I do not know why anybody would even think of using a programming language without static typing.

    - Dynamically typed programming languages are more productive when writing smaller quantities of rapidly evolving code.

    - It is mainly a library and an ecosystem issue. Python tends to have all the modules I need, while Haskell, OCaml and Scala often don't... and they often seem to be much easier to pick up and use.

    For example, Pandas equivalents are much less mature in other ecosystems. On language merits alone, I should be using Scala more than Python, but in practice, Python modules win me over.

    I wanted to memoise a function. To look up a module and put in the couple of lines (an import and a decorator) needed to achieve that probably took a couple of minutes in Python, and I was back to the real meat of my code. I would have spent much longer in Java.

  21. ideas by bugs2squash · · Score: 1

    I like that these languages all bring new ideas and are a great learning opportunity; erlang and go have interesting programming models and CSP/actor functionality. But I feel I should be able to enjoy these things in other languages after they have a while to get absorbed, that's not generally the case though, for example I've been reading about using akka in java for a while now and the syntax looks clumsy to my eye compared with erlang and I've totally failed to get my head around scala.

    same thing with improvements in the build/deploy chain. If transpiling to golang is significantly better then I'll take that win, and simply use go as a stepping stone to deploy the python syntax that I like.

    I'm fumbling to say that I think that once several years have passed and a new programming idea has become accepted and proven its worth, them most of the major language syntaxes should grow support for it. There should be a simple CSP syntax for Python, it should be possible to compile erlang for the JVM, to reasonably implement actors in java etc..

    Then I won't have to endure so many eye rolls when I suggest erlang for that highly concurrent system to the diehard python or java devs or to the managers that want nothing to do with anything too shiney

    --
    Nullius in verba
    1. Re:ideas by iggymanz · · Score: 1

      erlang gives you nothing that couldn't be done in many other languages. Bad to start a project using niche language when other languages have rich set of libraries, large talent pool for hiring, and many personnel in house for maintenance. erlang has none of the above. immature to get infatuated with the "shiny", real world doesn't want it.

  22. No SemiColons in Lambdas by GavrielPlotke · · Score: 1

    Both 2.7 and 3.6 documentation clearly state that you can't have multiple statements in a lambda function definition:
    https://docs.python.org/2/refe...
    https://docs.python.org/3/refe...

    In fact the function body part of the lambda is not a statement at all, but a single expression that becomes the function's return value:
    https://docs.python.org/3/refe...

  23. Re:GIL by Anonymous Coward · · Score: 0

    supporting shared memory is a facility which comes from the operating system. And it doesn't involve copying (although it does involve cache invalidation, but that's true for both processes and threads). No gains in performance come from reading/writing to memory shared between threads bound to different cores vs system shared memory accessed by processes running on different cores.

  24. Re:GIL by superwiz · · Score: 1

    Unfortunately, the GIL does not only inhibit performance scaling with threads, it causes performance to scale *negatively* on multicore systems. Don't believe me? Try to run a threaded code on a single core system, and then on multicore systems (`cpusets` come in handy for this test).

    A python process is always using one core at a time (not always the same core because it can block and then get scheduled to run on a different core). If you find a way to bind your Python process to a single core, all your Python threads will be IO bound threads and GIL will not hinder performance. People are just bitching about having to think through the manager/workers pipeline, but any design which wants to take advantage of multiple cores should do that anyway. Multiple cores are best thought of as multiple single-core machines joined by a really, really fast network. And then run multiple Python processes (each bound to a single core). Then each one of them will have its own GIL and when you do want to share data between cores, you'd use system's shared memory. This works both in Windows and in Linux. As long as your process does jump from core to core, there is no cache invalidation, so GIL will not hinder you (because it will work as if it was running on a single-core machine).

    --
    Any guest worker system is indistinguishable from indentured servitude.
  25. Re:GIL by superwiz · · Score: 1

    *Only* using multiprocessing is hard, too, for two reasons: not having threads makes async programming difficult (think GUIs). It makes I/O or event driven applications much harder.

    No one is talking about using only multiprocessing. Threads should always be for IO blocking while processes should be for CPU bound contexts. This is done to avoid the expensive context switch when scheduling waiting on IO while going off to do other work. And each process should be bound (as much as possible) to one core.

    --
    Any guest worker system is indistinguishable from indentured servitude.
  26. Don't tax my syns, please. by fyngyrz · · Score: 1

    Re Python:

    I would settle for a switch statement.

    I would settle for the ability to extend the built-in classes, str in particular. My "settle" went like this:

    1) Inquired politely about same
    2) Python nerds have orgasm telling me why this is terrible. I am, to put it mildly, dubious.
    3) I write 100% compatible pre-processor that gives me the syntax I wanted.
    4) PROFIT. Okay, well, not really, but EXTENDED STRING CLASS METHOD SYNTAX!

    Like...

    myString = 'foo'
    otherString = myString.doHorribleThing('bar')

    ...and...

    print 'good'.grief()

    So...

    You could do the same. What you want, perhaps, might be much easier than what I did. In fact, you could fork my project and add what you want to it. I'm already parsing the language reasonably well, which is arguably one of the difficult parts.

    You don't always have to wait for a language's maintainers to get off their butts to address shortcomings or instantiate new goodies. Or eventually not do anything at all. There are other paths to nerdvana.

    --
    I've fallen off your lawn, and I can't get up.
    1. Re:Don't tax my syns, please. by Anonymous Coward · · Score: 0

      So after using sexually depraved metaphors about the Python community, you go from 100% compatible to "arguably" "reasonable" parsing... sign me up.

  27. Re:GIL by superwiz · · Score: 1
    This statement:

    As long as your process does jump from core to core, there is no cache invalidation, so GIL will not hinder you (because it will work as if it was running on a single-core machine).

    should have been

    " As long as your process does not jump from core to core, there is no cache invalidation, so GIL will not hinder you (because it will work as if it was running on a single-core machine)."

    But, as always, you cannot edit a Slashdot comment after it's published.

    --
    Any guest worker system is indistinguishable from indentured servitude.
  28. Re:GIL by ooloorie · · Score: 1

    supporting shared memory is a facility which comes from the operating system

    Yes, the OS supports shared memory; it's Python's support that is poor.

    No gains in performance come from reading/writing to memory shared between threads bound to different cores vs system shared memory accessed by processes running on different cores.

    That's bullshit. Numerical and AI applications benefit greatly from sharing memory that way, compared to other IPC mechanisms.

  29. Python to Go, C, language machine by manu0601 · · Score: 1

    Instead of translating to Go, why not directly translate to C, or even to language machine?

    1. Re:Python to Go, C, language machine by snadrus · · Score: 1

      Go's (initially) looks quite Python-like in terms of packages and memory concepts. Also message-passing is the main mechanism of concurrency.
      But Python's power (as well as its woes) comes from the C extensions & GIL. So to get rid of the GIL (required for serious Python performance) you've got to have a fast language replacing it that libraries can be written in that cross calls.

      The language for this would also do best to resemble Python to begin with. Go seems like a most logical fit here.

      SciPy & Numpy for example are now unusable (as they are in any Python interpreter that doesn't have C extensions). But GoLang has some very similar libraries already that work much faster. Porting either way will create viable, fast replacements.

      --
      Science & open-source build trust from peer review. Learn systems you can trust.
  30. Kind of like Cython? by SoftwareArtist · · Score: 1

    How is this different from what Cython has been doing for years? There's nothing new about the idea of translating Python to a statically compiled language to improve performance.

    --
    "I'm too busy to research this and form an educated opinion, but I do have time to tell everyone my uninformed opinion."