5 ms·
Mojo 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 und
by nerpderp82 3y ago
Mojo 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.
- nerpderp82 3y agoI didn't mention C++ at all. Was that my argument? This thread is about Python, the GIL. Mojo was brought up as a way to speed up Python code. C++ predates on C in a similar way to how Mojo predates on Python. At least C++ has extern C. https://docs.modular.com/mojo/manual/python/#call-mojo-from-python https://docs.modular.com/mojo/manual/python/#call-mojo-from-... > 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. One way street. Classic commons harvesting.
- kelnos 3y agoI think the person you're replying to is just trying to use an analogous example; you didn't need to bring it up. Regardless, I think it's a bit alarmist and overly aggressive to assume nefarious intent. Have the developers acted in ways such that this reputation is deserved? Also, little OT, but it took me unreasonably long to understand that you meant "predates" as the verb form of "predator", not as in "comes before chronologically". The phrase "preys on" may be more clear.
- nerpderp82 3y agoThey aren't just trying to bring up an analogous example. It derails the discussion, it is a rhetorical device that has no bearing on the conversation at hand. > Regardless, I think it's a bit alarmist and overly aggressive to assume nefarious intent. You can think those things. You can try and color my points using whatever language you want. That doesn't make it true, you are putting words in my mouth about "nefarious intent". Mojo is taking Python programmers and their programs out of the Python ecosystem and bring them into their ecosystem. Thanks for the splaining about predates, I'll continue to use it. Mojo is definitely 'taking booty' from Python.
- android42 3y agoI wasn't sure whether to agree with this or not, so I finally took a slightly closer look at Mojo just now. This depends on how they license it going forward, and whether they make it open, or use being a superset as a way to capture then trap python users in their ecosystem, and I don't think we have a certain answer which path they'll take yet. The way they let you mix python compatible code with their similar but more performant code [1] looks interesting and provides a nice path for gradual migration and performance improvements. It looks like one of the ways they do this is by letting you define functions that only use typed variables which is something I would like to see make its way back to CPython someday (that is optionally enforcing typing in modules and getting some performance gains out of it). [1] https://en.wikipedia.org/wiki/Mojo_(programming_language)#Programming_examples https://en.wikipedia.org/wiki/Mojo_(programming_language)#Pr...
- Intralexical 3y ago> It looks like one of the ways they do this is by letting you define functions that only use typed variables which is something I would like to see make its way back to CPython someday (that is optionally enforcing typing in modules and getting some performance gains out of it). This is already how Cython and MYPYC work. You add standard PEP-484 type annotations, and they use that to infer where code can be compiled to native instructions. https://cython.readthedocs.io/en/latest/src/tutorial/pure.html https://cython.readthedocs.io/en/latest/src/tutorial/pure.ht...
- oivey 3y agoThe typing thing is really unnecessary and a step backwards, IMO. Added typing is maybe great for managing a code base, but it isn’t necessary for performance with a compiler that can do type inference.
- 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.