7 ms·
It will be very exciting to see how much faster they'll be able to make vanilla python. The value proposition is being challenged by the plethora of tools aimin
by Hugsun 3y ago
It will be very exciting to see how much faster they'll be able to make vanilla python. The value proposition is being challenged by the plethora of tools aiming to alleviate those issues. Speed improvers like Mojo, pytorch, triton, numba, taichi come to mind.
There are so many different attempts at solving this problem that that the last time I wanted to try one of them, I found myself overwhelmed with options. I chose taichi which is pretty fun and easy to use, although somewhat limited in scope.
- nerpderp82 3y agoMojo should be viewed as an attack on the Python ecosystem due to it being a superset. It can consume Python, but it itself is not Python. Taichi is really underrated, it works across all platforms (including Metal), has tons of examples and the code is easy to write. And lastly, it integrates with the ecosystem and doesn't displace it. https://github.com/taichi-dev https://github.com/taichi-dev great demo reel of what Taichi can do, https://www.youtube.com/watch?v=oXRJoQGCYFg https://www.youtube.com/watch?v=oXRJoQGCYFg https://www.youtube.com/watch?v=WNh4Q7-OSJs https://www.youtube.com/watch?v=WNh4Q7-OSJs https://www.taichi-lang.org/ https://www.taichi-lang.org/
- objektif 3y agoNever heard of taichi before looks promising. Do you know any shop that uses it for prod code?
- fragmede 3y agoETH Zurich is using it for their physics sim courses, University of Utah is using it for simulations (SIGGRAPH 2022), OPPO (they make smart devices running Android), Kuaishou uses it for liquid and gas simulation on GPUs. Lots of GPU accelerated sim stuff. https://www.taichi-lang.org/ https://www.taichi-lang.org/ https://www.researchgate.net/publication/337118128_Taichi_a_language_for_high-performance_computation_on_spatially_sparse_data_structures https://www.researchgate.net/publication/337118128_Taichi_a_... https://github.com/taichi-dev/taichi https://github.com/taichi-dev/taichi
- KerrAvon 3y agoI think "attack" is a bit much; C++ isn't an attack on C.
- Kranar 3y agoWhile Ken Thompson never used the word attack, he certainly didn't have a positive opinion of the language or of Bjarne Stroustrup either in terms of his technical contributions or his handling of C++ adoption: https://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-plus/ https://gigamonkeys.wordpress.com/2009/10/16/coders-c-plus-p...
- hn_throwaway_99 3y agoThanks for posting that, I thought it was a great read (as someone who last used C++ probably about 25 years ago...) Given that so many of the criticisms were about C++ being over-complicated, I do worry about languages just becoming more and more difficult over time as everyone wants their pet feature added, but due to backwards-compatibility concerns old/obsolete features are rarely removed. For example, take Java. I think that a ton of goodness has been added to Java over the decades, and for people who have been working with it throughout, it's great. But it feels like the learning curve for someone just getting involved with Java would be really steep, not just because there is just a ton of stuff, but because without having the context of the history and how things were added over time (usually with an eye towards backwards-compatibility) it feels like it would be hard to wrap your head around everything. If you're writing your own new program that's not really a problem as you can just stick to what you know, but if you're getting into an existing codebase that could use lots of different features it feels like it could be daunting. It's been quite a while since I've programmed in Java, so I'm just speculating, but would be curious how other folks relatively new to the language in production environments find the learning curve.
- dimitrios1 3y agoI was doing primarily go development since it was first released up until a few years ago when the pandemic allowed me the opportunity to move into a full time remote gig doing primarily Java development, so I can answer this as I hadn't done Java at that point for over 10 years, so I felt completely new (what Java I did before that, I was mostly trying to not use Java by using play framework or jruby on rails) As someone in the boat you mentioned (sort of) the short answer is modern Java development for 90% of tasks is not complicated at all: it's very much like any programming language used in a bizdev/corp environment -- you are mostly using a framework and a bunch of DSLs. Almost everyone uses Intellij and Gradle for IDE and build, and Junit5 or Spock for unit testing. I passed a technical interview mostly on Spring Framework concepts knowing almost nothing about it, nor having ever used it in production by simply just having the documentation open while I was being interviewed so I could look up the answers. Any language that is popular is going to have frameworks with decent documentation that help you be productive quickly, so I just jumped in doing Spring. The java stuff came as needed, or I referenced something like Effective Java (great book), or a Baeldung article. Java world has made some great strides since the 2000's and early 2010s of XML chaos. It took a while, but I feel like it's in a really good spot and getting better. As an aside, if it hasn't been mentioned to you before, if you like simplicity in a language, but still incredibly productive, you might enjoy Go.
- its-summertime 3y agoCython is also a superset, is Cython also guilty of such crimes?
- Intralexical 3y agoCython is dependent on CPython. Cython outputs Python extension modules, which can only be used when imported into a standard CPython environment, and which interoperate cleanly with the rest of the Python ecosystem. Mojo explicitly does the opposite, allowing Mojo to use Python but requiring Mojo to be in control, while making it hard/impossible for code written in Mojo to benefit code written in Python: > Our long-term goal is to make Mojo a superset of Python (that is, to make Mojo compatible with existing Python programs). […] Mojo lets you import Python modules, call Python functions and interact with Python objects from Mojo code. […] > As shown above, you can call out to Python modules from Mojo. However, there's currently no way to do the reverse—import Mojo modules from Python or call Mojo functions from Python. […] > This pattern doesn't work because you can't pass Mojo callbacks to a Python module. > Since Python can't call back into Mojo, one alternative is to have the Mojo application drive the event loop and poll for updates. No comment on whether this should be viewed as an attack. https://docs.modular.com/mojo/manual/python/ https://docs.modular.com/mojo/manual/python/
- its-summertime 3y agoCython can also compile to executables which are not to be used with python. Same for Nuitka, and a bunch of transpilers
- boxed 3y agoMojo is not a superset. Not even close. They say they are AIMING for it to be a superset OF THE SYNTAX. This is a subtle yet enormous difference to being a superset of the language itself.
- est 3y ago> Mojo should be viewed as an attack on the Python ecosystem due to it being a superset A superset of pure .py code, not the numpy, cython, ctypes and stuff. But once you get "superset" of CPython's C bindings, congratulations, you get GIL.
- deleted 3y ago[deleted]