Live data from Hacker News

Mojo – a new programming language for AI developers

modular.com

221–230 of 272 posts

Re: Mojo – a new programming language for AI developers

#221

I have a very naive question. Why does Python have a GIL? Is it because of the language design, or because of its implementation? If it’s due to the language design, how will Mojo avoid a GIL, given its goal is to be a superset of Python?

> Is it because of the language design, or because of its implementation?

Bit of both? The language expects properties that lend themselves to having a GIL (i.e. attempts at removing it from CPython have turned out to make it slower in many cases), but it's not impossible for an implementation that does more advanced analysis to be able to figure out cases where it isn't needed.

Code written to massively parallelize will want to/have to keep accesses inside the thread context anyways, and thus won't hit cases the GIL serves, and if you allow language extensions they can make that explicit where needed.

Re: Mojo – a new programming language for AI developers

#222

This looks exciting, and I'm looking forward to its progress. I have questions about GPU infrastructure in particular. It seems like the GPU backend is primarily through MLIR. Does that target CUDA? Vulkan compute shaders? WebGPU? Metal shaders? I note that IREE has the first three of those listed as targets, but am not clear on exactly where that fits in to the rest of the ecosystem. I have an idea of a dream GPU in…

You can lift to various dialects in MLIR, for example, there is a Metal dialect, but it's not actively maintained. So, while it's possible, the question is whether Modular will add support for it.

Re: Mojo – a new programming language for AI developers

#223

Earlier quoted context omitted.

Yep, they already just work, Check the website or the demo in the launch video from Jeremy Howard. Also potentially interesting: https://docs.modular.com/mojo/programming-manual.html#python... https://docs.modular.com/mojo/notebooks/Mandelbrot.html

If that works with any libraries built on the CPython C API it would be worth calling it out in the docs - it currently reads like pure python or numpy work, but I assumed that was because you'd reimplemented numpy, not managed to dlopen it (and worked around those libraries relying on the GIL).

Found said part of the docs at https://docs.modular.com/mojo/why-mojo.html#how-compatible-i... notably

> We utilize CPython to run all existing Python3 code “out of the box” without modification and use its runtime, unmodified, for full compatibility with the entire ecosystem

Re: Mojo – a new programming language for AI developers

#224
post #214
post #204

Earlier quoted context omitted.

Yes, Python is 32 years old by now, and the first 10 years was largely ignored, I bet most don't even remember Zope.

So what is the cut off? At what age is a language no longer "young"? 15 years? 20?

When I was young, there was a saying, something like "Software is either beta or obsolete… or both"

Re: Mojo – a new programming language for AI developers

#225
post #93

Earlier quoted context omitted.

Yeah funnily enough I think "no GC" would be a much better feature in Julia, which would make it a great language for real time applications.

I have wanted deterministic timing in Julia for years. It's come up periodically in the forums. That, and optimized static binaries, would make Julia truly general purpose. I don't mind Python syntax, I hope Mojo lives up to all these claims...it could easily (and finally!) hit the sweet spot of C performance, elegance, and expressiveness!

What’s your use case for this? Do you mean like a real-time Julia?

Re: Mojo – a new programming language for AI developers

#226
post #185

Earlier quoted context omitted.

This is not true at all! Julia usually being JIT-compiled makes it very unsuitable for real time applications (and there's no reason why it should be great for it). GC is the least issue here, and I say that as a fan and daily user of Julia.

A JIT works perfectly alright for real time applications, PTC and Aicas are still in business. What matters is how it is implemented, naturally a general purpose one won't do it.

Yes, I'm not saying it's not possible, but real time abilities were likely one of the least important aspects of Julia's design... So why shoehorn it into something it's not been designed for

Re: Mojo – a new programming language for AI developers

#227

Earlier quoted context omitted.

I have wanted deterministic timing in Julia for years. It's come up periodically in the forums. That, and optimized static binaries, would make Julia truly general purpose. I don't mind Python syntax, I hope Mojo lives up to all these claims...it could easily (and finally!) hit the sweet spot of C performance, elegance, and expressiveness!

What’s your use case for this? Do you mean like a real-time Julia?

Yes. There are already efforts in that direction, such as Julia Robotics (juliarobotics.org).

With Julia, there is work to be done to get to small, optimized, static binaries - which it sounds like Mojo will provide out of the box, given it’s targeting resource-constrained (and novel) hardware.

The Rust-inspired features are also VERY interesting!

Re: Mojo – a new programming language for AI developers

#228

Earlier quoted context omitted.

I have wanted deterministic timing in Julia for years. It's come up periodically in the forums. That, and optimized static binaries, would make Julia truly general purpose. I don't mind Python syntax, I hope Mojo lives up to all these claims...it could easily (and finally!) hit the sweet spot of C performance, elegance, and expressiveness!

What’s your use case for this? Do you mean like a real-time Julia?

[deleted]

Re: Mojo – a new programming language for AI developers

#229
post #62

Earlier quoted context omitted.

This is too real and any of the great investment of manpower (e.g. Tensorflow for Swift) if happened to Julia would probably be 10x or 100x in terms of ROI -- just look at how few devs and line of code Julia's alternative to pandas/numpy/ML/autodidf/plotting has. If Julia ecosystem can be somewhat competitive while only having part time and researchers' side project contributors, it WILL thrive if properly invested.

Just a thought, but perhaps it's the small community and independent culture of Julia that has led to the high quality of its software. Small groups of highly passionate people can accomplish a lot! If I recall the history correctly, scientific Python (numpy, scipy, etc) developed similarly at first and has mostly supplanted Matlab, Fortran, and other tools. There was a point in time when Python was considered niche…

Hard disagree. I think some people (not necessarily you, but way too many people) weirdly envy too much that "lone/few geniuses" image, and when they see bigger communities and their problem, they fallaciously/unfairly assume it's because of the size of the community (and not say, unnecessary bureaucracy that a small part of that community decided to have/had early on long before they got big).

One of Julia's often complained about issues is that it could use way more developers than it has now. No amount of romanticizing a small community or "independent culture"(which I just can't see going away due to where a lot of people that come to Julia are coming from in the first place) is going to fix that, just more people coming aboard the ship.

Re: Mojo – a new programming language for AI developers

#230

Earlier quoted context omitted.

Just a thought, but perhaps it's the small community and independent culture of Julia that has led to the high quality of its software. Small groups of highly passionate people can accomplish a lot! If I recall the history correctly, scientific Python (numpy, scipy, etc) developed similarly at first and has mostly supplanted Matlab, Fortran, and other tools. There was a point in time when Python was considered niche…

Hard disagree. I think some people (not necessarily you, but way too many people) weirdly envy too much that "lone/few geniuses" image, and when they see bigger communities and their problem, they fallaciously/unfairly assume it's because of the size of the community (and not say, unnecessary bureaucracy that a small part of that community decided to have/had early on long before they got big). One of Julia's often c…

[deleted]
Post reply on HN