11 ms·
Mojo is a much better “Objective-C without the C” than Swift ever was
- freddealmeida 3y agoYet not available to really decided that. Their role out strategy is too slow.
- jeroenvlek 3y agoSame. I'm definitely hyped up about Mojo for a few months, but this will ultimately fade if I don't get to try it...
- sureglymop 3y agoDid you sign up for the playground? I heard about Mojo a few weeks ago and got access the same day.
- anaganisk 3y agoI tried, first the signup page doesn't show the form on 3 separate browsers. Paused my adblockers, nah no luck. I don't remember what I did exactly using dev tools but, noticed the form was there, but just not being rendered. Somehow made it work, and signed up. Never got access, even after a month. Mojo is all talk for now. They could've just paused the marketing until it was atleast in open-beta. Why the hype without allowing access.
- canadianfella 3y ago[dead]
- b3orn 3y agoSo what's the difference between this Mojo and Cython?
- claudiug 3y agobetter marketing :))
- YetAnotherNick 3y agoOr numba.
- rerx 3y agohttps://docs.modular.com/mojo/why-mojo.html#python-supersets-with-c-compatibility https://docs.modular.com/mojo/why-mojo.html#python-supersets...
- akkad33 3y agoCython at least from my use of it, is very difficult to debug. It's a language inside a language and you easily get lost between all the pyx pyd files. it's not very developer friendly. Mojo/Julia promise a good developer experience
- Certhas 3y agoLots of snark here, but from following the development vaguely, and looking beyond the marketing speak: Mojo is aiming to be a state of the art systems language that has Python embedded seemlessly. It's exactly the other way around from numba/Cython which embedd compiled C in performance silos inside Python. I used to do heavy numba work and this has no relationship to that. Just look at what the devs are actually targeting/implementing right now: Better lifetime/ownership semantics and ergonomics. This is not in the same universe as numba (or even Julia). I think it's far too early to tell whether it will be good, but I haven't seen any other approach that resembles it.
- jb1991 3y agoI'm confused about the comparison here. I've never heard of Mojo before, but reading this and all the discussion of the main languages on Apple's platform, you'd think that Mojo was somehow an alternative for development on iOS or macOS, replacing Objective-C and Swift, like the post is making a case that it is better than Objective-C. But it appears to have nothing to do with this, so the juxtaposition feels odd. There are a great many two-language-problem situations in the wild (Clojure/Java, Elm/JS, etc) and each features a solution that is somewhat tailored for the specific use-case or platform. Seems odd to compare one of these use-cases with another when the situations so widely vary.
- akkad33 3y agoI think it's because Mojo like Swift has Chris latter behind it and uses the same llvm backend?
- jb1991 3y agoAh, that could be it. I did not know the history, nothing in the article makes that point, not that it would need to I guess for people who already understand the history of the language.
- jmull 3y agoMaybe because of Chris Latner‘s involvement as a key person in both? I agree, though. I don’t see much basis for comparison.
- tipsytoad 3y agoI think largely because swift and mojo have the same creator, chris lattner. He was a guest on lex fridman last week https://youtu.be/pdJQ8iVTwj8 https://youtu.be/pdJQ8iVTwj8
- eddieh 3y agoYeah, I'm confused as well. Objective-C without C is Smalltalk. This looks like Python with types. Objective-C took a static language and made it dynamic with messages and objects. This takes a dynamic language and makes it more or less "static". So, if anything, it is exactly the opposite of Objective-C. To be clear, I didn't spend too much time examining this, so I might be way off. Grafting types onto a language doesn't interest me.
- pzo 3y agoDidn't learn much from article why Mojo supposed to be better than Swift from a grass root user perspective: 1) Will Mojo provide seamless interop with C like objective-c? 2) Will Mojo provide seamless interop with C++ like objective-c? All I have to do is changing file extension from '.m' to '.mm' and can use all C++ features 3) Will Mojo be available to be compiled for iOS and Android? Swift doesn't have good interop with C but at least have decent interop with Objective-C (works most of the time but if you have some more complex code with Swift using Obj-C and Obj-C using Swift things can be nasty to figure out why it suddenly doesn't automagically work. In upcomming iOS 17 Swift have some interop with C++ but haven't tested the details yet how smooth it is. I would happily use Mojo if: 1) Can be compiled for iOS/Android 2) Has seamless interop with C/C++/Objective-C and maybe even Rust That would be enough killer features for me Dealbreaker for me with Python is not really good support for mobile apps even if you just want to use it for prototyping instead of production code. Most native pip modules are not supporting mobile architectures out of the box and don't have many wheels.
- twobitshifter 3y agoIt is Python with the ability to write high performance code within specified functions, eliminating the need to link in C code. However the interop with C will be the same as Python, which is already very good, Mojo is just going beyond that. It compiles to llvm. This means the python environment headaches will disappear.
- boxed 3y ago> It is Python with the ability to write high performance code within specified functions It might become that (personally I doubt it, but that's the stated goal). It isn't now. Not really close even. No kwargs, no python classes for example. > It compiles to llvm. This means the python environment headaches will disappear. Weeeeell. Not if you want to use any Python library. Because then it just calls into CPython. And that's a huge part of why Mojo is interesting in the first place. So I would say no.
- mr_00ff00 3y agoSo is it a systems language?
- Someone 3y agoI don’t understand the essential claims of this, which I think are “Mojo […] doesn't repeat Objective-C's mistake of using the component language as the base (which, inexplicably, Swift didn't just repeat, but actually doubled down on by largely deprecating objects).” What does “largely deprecating objects” mean, and why would it imply “using the component language as the base”? and “it turns out that the connection language is actually the more general one, the component language is a specialisation of the connection language.” I don’t understand that at all. You have a “blue collar” layer where bytes and bits get shuffled around and hands get dirty and a “white collar” layer where programmers pretend the world is made of legos and there’s no need to get your hands dirty to write programs. A language can decide to only support the white collar layer, but if so, you still need a blue collar one in your interpreter/compiler/runtime (or, potentially, hardware) You can, however, decide to only support the blue collar layer. C without the standard library does that, for example.
- jmull 3y agoI was confused by these things as well and here’s what I came up with: RE objects, I guess they are referring to Smalltalk-style objects. Objective-C has them while Swift has a somewhat different flavor of objects. This author seems to consider that a regression of sorts. RE the connection and component languages — your “white collar” and “blue collar” languages (BTW, I like your terminology, so I’ll use it), I think they are making the point that Objective-C started with a blue collar language, C, and extended it with while collar language features (derived from smalltalk), while Mojo started with a white collar language, Python, and are extending it with blue collar features. The author likes the Mojo approach, though doesn’t really explain that. I think they are claiming Swift is somehow more aligned with the blue collar side than Objective-C and feel that’s bad, but it’s too vague to really mean anything. (I think the idea with Swift and some other newer languages is that you can have a single language that is good at both white collar and blue collar things and “native” to both. I don’t think Swift has quite pulled it off, but it’s still evolving, so we’ll see.)
- deleted 3y ago[deleted]
- ggm 3y agoWait, I read "mojo is the better python" earlier today. Is this just a meme in action?
- jlokier 3y agoIt's marketing in action, though Chris Lattner's reputation from LLVM and Swift has a lot to do with why it quickly gained a high profile in these circles. Maybe it's true, maybe it isn't. But who do you think has a vested interest in that meme being repeated? Mojo is a commercial, closed source language implementation backed by $30M of investor cash looking to turn a profit. I wish them luck and watch with interest. Like a lot of people I've had "write a very fast Python and ??? and profit" on my todo list for a while (it remains below "job to pay the bills" though) because there's been obvious user interest for some years, although it's not clear if that translates to much commercial demand. I think if they are successful and if they remain closed source, an open source clone will appear soon after, and within a year or two will match or outperform them on reported performance, but they will still have a business for the same sorts of reasons Red Hat remains profitable.
- osigurdson 3y agoIt is interesting, I don't think a company based on a language can work. They need to open source the language and make money on something else. The best "something else" would be cloud services that find optimal ways to run the Mojo code (finding the right combinations of C/G/TPUs in some way). A closed source language with a licensing fee is never going to work.
- minetest2048 3y agoMathworks does it with Matlab. With that said Matlab does got annihilated by python in ML because its a closed sourced lang
- osigurdson 3y agoGood point. To clarify: a closed source general purpose language with a licensing fee is never going to work.
- radarsat1 3y agoFrom what I've read about Mojo it sounds really interesting, but as opposed to the main languages and libraries currently used for machine learning it seems to be proprietary, or am I mistaken? At least, clicking on "Get started with Mojo" on their website seems to lead to a form to fill out instead of to an easy download. I haven't filled it out so I don't know if you need to wait for approval or what. But, given how little I've seen about it in terms of availability and source availability, I guess I'm having a hard time understanding why people seem to be so hyped about it. No matter how nice it is, unless it gives some major advantages over Python and some system like PyTorch or Jax, I wouldn't port my entire machine learning pipeline over to a propriety language for which only one implementation exists that I can't even download without filling out a form.
- jabradoodle 3y agoYou can't download it even if you fill the form out. It does make sense to wait until it's open source before betting the farm on it; the intention is that it will be open source.
- radarsat1 3y agoI see. I guess I've never seen an open source project announced and "released" this way, as just an online demo and some blog posts. Indeed, I'll come back to it when it's ready.
- nbittich 3y ago[edited] afaict: 1) Mojo isn't opensource (yet?) 2) I can't test mojo (yet?) 3) Mojo does bold claims like being a better python with performance close to C, like V did, yet no one seems to call them out (yet????) Anyway, never gonna try it, unless I'm absolutely forced. I hate their marketing strategy, it sounds too bad.
- nvartolomei 3y agoYou can get access to the playground (Jupiter notebook with Mojo kernel): https://docs.modular.com/mojo/get-started.html https://docs.modular.com/mojo/get-started.html My access was approved within one hour.
- simias 3y agoI chuckled a bit when I saw that they market themselves as "faster than C". Is it 2005 again? Do modern developers even have any notion of how fast C runs to use as a baseline? It's really minor thing but a pet peeve of mine, I remember how twenty years ago every new language claimed to be as fast or faster than C, and every time the benchmark was some ultra-optimized non-idiomatic program in that new language against a naive C implementation, and the C version was usually still 20% faster and use 10% as much RAM with the right compile flags. Are there even Mojo benchmark in the wild? The FAQ entry[1] just finds excuses for situations where it does not perform well... [1] https://docs.modular.com/mojo/faq.html#performance https://docs.modular.com/mojo/faq.html#performance
- boxed 3y agoI mean.. it does depend on what you mean by "faster than C" of course. Writing the straight forward naive solution in Mojo for some problems can produce code that can run on both CPUs and GPUs and be super fast. Can you get the same performance from C? Probably.. with lots on intrinsics and one code base for GPUs and one for CPUs, where the GPU codebase might even be multiple code bases for different vendors. I would say "faster than C if you want to keep your sanity and don't have infinite time". It doesn't roll off the tongue though :P
- 3y ago
- mplewis 3y agoWhen will Mojo be open so that we can verify its claims?
- ZeroCool2u 3y agoYou fill out this form and they send you a link to make an account in a few minutes. I did it this weekend and it was pretty painless and I haven't gotten any marketing emails from them... yet. That being said, I wouldn't describe it as 'open' at the moment. It's more just that you can verify any claims they make.
- teh_klev 3y agoThis episode of the Lex Fridman podcast, where Chris Lattner talks to Fridman about Mojo and other things, might be of interest to readers: https://www.youtube.com/watch?v=pdJQ8iVTwj8 https://www.youtube.com/watch?v=pdJQ8iVTwj8
- Kon-Peki 3y agoWhen Lattner talks about what Modular is doing, it sounds like they are planning to be almost like an operating system for AI systems, and Mojo is the language you have to use. So it makes sense that it's not open, and you can only use it via their notebook. It probably doesn't work on normal hardware + Linux. That's the monetization strategy. You have to run their system and pay for it.
- sirwhinesalot 3y agoObjective-C without the C is Smalltalk without the IDE. I don't see how that has any relation to Mojo which seems to be a compiled, lowish-level language on the same vein as Rust/C++/Swift? Maybe because it has a Python "fallback"? I don't find Python particularly "smalltalky" beyond its dynamism.
- andrekandre 3y agoi think the idea is, that with objective-c, the substrate was always c with the objects (connection language) being the objective (smalltalkish) part if you took the c out of objective-c you basically have smalltalk but you still might need c-ish level expressions to get better performance the expectation from swift then, was that you'd start out with that high-level paradigm and then provide lower level constructs only when needed for performance or other reasons, but the reality is you start off closer to a really well-designed and clean c++ (structs, classes, enums, generics) that adds higher level features (actors, async, etc) when you need it than something that starts off high-level as smalltalk or python from the get-go the reason the author likes mojo more in that respect then is because it starts with the high-level constructs (python) as the substrate and allows for tuning where needed... the presupposition i think is that will lead to higher productivity and simpler code in the long run (this is my interpretation)
- sirwhinesalot 3y agoMuch as I would have preferred Swift to have been "Objective-C the good parts", my reasons for wanting that are totally unrelated to the idea pushed in the blog post. Python isn't any more expressive than a language like C# once you remove the Java-inspired cruft. C# lets you go all the way down to the metal with pointers and what not if need be and supports fully dynamic types with "dynamic" and the underlying "Dynamic Language Runtime", but at no point does it feel like two separate languages glued together the same way Objective-C did, or now Mojo. People have written a Nintendo Switch emulator in C# ffs. Python's higher productivity is entirely thanks to its libraries (including the standard library). The dynamism isn't really key to it, heck, @dataclasses expect you to annotate the field types even though they aren't used because of a syntax quirk! Mojo is based around Python to piggyback on Python's ecosystem the same way Objective-C and C++ piggybacked on C. It has nothing to do with a "scripting" language vs a "component" language. Lua has a much nicer interface for scripting C than Python does, not requiring manual reference counting for one, to the point the original Torch (before it became PyTorch) used it. It didn't matter in the face of Python's ecosystem.
- PedroBatista 3y agoCool, but.. if Mojo's move is to be closed source until the language is stabilized and the vision is set I can understand that to a point. If it's a marketing/VC move to become some kind of spiritual version of MongoDB but for "AI langs", no thanks I'm good.
- FrustratedMonky 3y agoI wish them all the luck. I'd like a language that delivers on all these promises. But by the time you add all these features, don't they already exist in other languages? What is this one doing that will be enough of a leap to justify 30m investment? Seems more like a Python Transpiler with types.
- cynicalsecurity 3y agoAnother useless hipster language.
- lynx23 3y agoBTW, Chris talks a lot about Mojo here: https://www.youtube.com/watch?v=pdJQ8iVTwj8 https://www.youtube.com/watch?v=pdJQ8iVTwj8
- aerhardt 3y agoI was listening to the Chris Lattner interview by Lex Fridman the other day, very interesting stuff. I use Python for application programming, scripting and basic ML, so I think many of the Mojo features are not for me... On the other hand, I love types and I think they're one of Python's weakest points. I use mypy and native typing but they feel like a weak scaffold compared to a strongly-typed language or even something like TypeScript. Do you guys think there will be a case for Mojo as a general-purpose programming language "for the rest of us"?
- lysecret 3y agoStructs and strict type enforcement for a subset of the code, I really like. Also, a more seamless pipeline from "experimental python" to "reliable production ready python" makes a lot of sense to me. At the end of the day, mojo is very very early, not even open source yet. Furthermore, mojos success will be largely bound to modulars success, which is a VC backed company. A decent looking one but still that means it's more likely to fail fast than succeed slowly.
- modernerd 3y agoChris Lattner replied to a similar question about Mojo as a general purpose language here: > Mojo is a general purpose language and can be used to replace C use cases like Rust does etc, but that isn't where we're focusing initial development. That doesn't mean we're excluding it, just that the libraries etc aren't the focus for us to build. We hope the community will be interested in filling that in and building out the use cases in time though. https://github.com/modularml/mojo/discussions/302#discussioncomment-6065569 https://github.com/modularml/mojo/discussions/302#discussion...
- greenthrow 3y agoThis article does nothing to support the headline, and in fact contains almost no actual information. Just a bunch of assertions without examples to back them up.
- faitswulff 3y agoI feel like Mojo’s interoperability story is going to inevitably stumble on the Python dependency ecosystem, mostly because even Python stumbles on the Python dependency ecosystem.
- nologic01 3y agoI dont think its possible to make intelligent comments about mojo without going first not just through the influencer hyped no3 lex interview but also the earlier no2 interview that precedes the mojo launch by a few years. The main point is that computing in the age of LLM and gpu/tpus and the semi-dead Moore's law is hitting a wall. Climbing over that wall will take bold vision and skillful execution. There may be alternative ways to get to that next phase. The modular/mojo team is basically throwing down the gauntlet.
- michaelcampbell 3y agoI don't have a dog in the fight but I'm a little surprised at the lack of comparisons to nim.
- elcritch 3y agoSame thoughts here. Overall there's no real exploration or discussion of the particulars that make Mojo a scalable language either which makes it a rather empty article. Still I do like the idea of "scalable" languages. Nim accomplishes this largely by making programming the "low level" mostly as simple as programming in the large. To be fair Nim doesn't offer too much special for "component programming" like Obj-C's aside from basic objects. Though one could argue making good DSL's is certainly a superpower and benefits component programming.
- thebigwinning 3y agoSwift is a safer and simpler C++. The only thing it shares with objective C is some compatibility.
- luckymate 3y agoIndentation instead of syntax is still a crime.
- deleted 3y ago[deleted]
- BulgarianIdiot 3y agoI'm a kind fella usually, but this article was criminally stupid.
- KerrAvon 3y agoI don't buy the criticism of Swift. Swift is not "Objective-C without the C". It's a new language with Objective-C runtime bits grafted on because they're necessary for the Apple ecosystem to transition to it. It's incorrect to think it's in any way intended to be a better version of Objective-C.
- eyelidlessness 3y ago> Swift is not "Objective-C without the C". Whether it is or not, that was Apple’s own language when they announced it.