Live data from Hacker News

Mojo – a new programming language for AI developers

modular.com

231–240 of 272 posts

Re: Mojo – a new programming language for AI developers

#231

There are a bunch of questions about Julia, so I'll do my best to give a short answer to a very long and complicated topic. Up front, Julia is a wonderful language and a wonderful community, I am a super fan. That said, Mojo is a completely different thing. It is aligned with the Python community to solve specific problems outlined here: https://docs.modular.com/mojo/why-mojo.html Mojo also has a bunch of technical a…

Very strange to have no GC as a innovative feature for a modern programming language. Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. As a comparison, auto industry is moving toward fully automatic transmission especially for the EV but software industry is still undicided and seems cannot even come up with a robust GC mechanism that is on par with no GC in te…

> Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature.

I vehemently disagree. D's GC is the #1 reason for its fade into obscurity, instead of becoming a viable C++ competitor. Now it's completely overshadowed by Rust's success.

Re: Mojo – a new programming language for AI developers

#232

There are a bunch of questions about Julia, so I'll do my best to give a short answer to a very long and complicated topic. Up front, Julia is a wonderful language and a wonderful community, I am a super fan. That said, Mojo is a completely different thing. It is aligned with the Python community to solve specific problems outlined here: https://docs.modular.com/mojo/why-mojo.html Mojo also has a bunch of technical a…

Very strange to have no GC as a innovative feature for a modern programming language. Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. As a comparison, auto industry is moving toward fully automatic transmission especially for the EV but software industry is still undicided and seems cannot even come up with a robust GC mechanism that is on par with no GC in te…

> Very strange to have no GC as a innovative feature for a modern programming language.

It's because, first, there was manual memory management, which was error-prone.

Then came garbage collection, which was safe but slow.

Most recently came borrowing and move semantics, which offers the best of both worlds -- safety and speed -- at the cost of some (arguably justified) cognitive overhead and code flexibility.

Re: Mojo – a new programming language for AI developers

#233

Earlier quoted context omitted.

Very strange to have no GC as a innovative feature for a modern programming language. Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. As a comparison, auto industry is moving toward fully automatic transmission especially for the EV but software industry is still undicided and seems cannot even come up with a robust GC mechanism that is on par with no GC in te…

> Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. I vehemently disagree. D's GC is the #1 reason for its fade into obscurity, instead of becoming a viable C++ competitor. Now it's completely overshadowed by Rust's success.

Same. To me, it seems like a step backwards (towards Java) to Rust's step forward with borrow checking and move semantics.

Re: Mojo – a new programming language for AI developers

#234

Earlier quoted context omitted.

Agreed. I think this effort is completely missing the real pain points that ML suffers from. While python the language is easy, and in many ways great for its original purpose as a teaching language, I'll take note of the few ways that Python ML suffers: - pip hell. Really, having globally installed dependencies was great for the 90s and is terrible now that disk space is more or less a non-issue relative to dependen…

I guess their argument is the reason those things suck is because they are hooking in some c++ monstrosity (tensorflow) or making rpcs to an external daemon (redis, horovod). So rather than writing another Python wrapper over c++ they are making a new performant language that can call Python. To me it makes sense as torch is great and hard to compete with, but everything feeding into it is a mess today (Data loading,…

> a new performant language that can call Python

don't forget the control layer/data layer separation principle. Performance mostly only matters at the data layer, and I don't believe that python ML really has a substantial problem with this, aside from not having a real distribution story. So "having a more performant python" doesn't really solve that much.

I'll tell you what could make the control layer better.

- no gil

- better async primitives

- immutability of passed parameters

- better testing story

- better documentation story (python is quite good at documentation, well, when python devs actually do it, which they usually don't).

- project-local dependencies with no shenanigans

Re: Mojo – a new programming language for AI developers

#235

Earlier quoted context omitted.

Agreed. I think this effort is completely missing the real pain points that ML suffers from. While python the language is easy, and in many ways great for its original purpose as a teaching language, I'll take note of the few ways that Python ML suffers: - pip hell. Really, having globally installed dependencies was great for the 90s and is terrible now that disk space is more or less a non-issue relative to dependen…

> original purpose as a teaching language The original purpose was to act as a glue language for C++.

fair. I confused its origin story for "what it was actually used for in its first decade"/why it became popular. Apologies.

Re: Mojo – a new programming language for AI developers

#236
I've only skimmed through the docs so far, and it sounds interesting, but..

> The Mojo standard library, compiler, and runtime are not available for local development yet, so we created a hosted development environment where you can try it out. We call it the Mojo Playground!

Is this going to be a SaaS-style programming language, or will it be open source and local later? I'm not sure I understand why a new programming language wouldn't start off as open source, or at least able to be used locally?

Re: Mojo – a new programming language for AI developers

#237

Is this usable as a general purpose language, or is it too tailored to AI/ML tasks and thus missing a lot of 'general' libraries and such? How does performance compare to Python in the general case, when not dropping into tricks? Either way, kudos, exciting stuff, just questions I had after reading about it.

I would like to know this as well. Not just “can you write general purpose programs” but is that one of the fundamental design goals. For example, in my personal opinion Julia does not meet the bar.

One of Python’s powerful features outside of being a great glue language for AI is rich runtime reflection and introspection. This is what allows things like FastAPI/Pydantic to work. Will Mojo support this level of runtime introspection?

I’m also curious about the type system. Will it be Python level or TypeScript level?

Re: Mojo – a new programming language for AI developers

#238

Earlier quoted context omitted.

Very strange to have no GC as a innovative feature for a modern programming language. Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. As a comparison, auto industry is moving toward fully automatic transmission especially for the EV but software industry is still undicided and seems cannot even come up with a robust GC mechanism that is on par with no GC in te…

> Personally I think Dlang get it right by making GC as a default and provide no GC as an optional feature. I vehemently disagree. D's GC is the #1 reason for its fade into obscurity, instead of becoming a viable C++ competitor. Now it's completely overshadowed by Rust's success.

The truth is we can only speculate whether the main reason D is less popular now due to its GC or D can be more popular now if it never had GC. Most of the D standard libraries are written in no GC thus performance is not an issue there and D with GC is not a sloth either. Based on programming language (PL) popularity evidence, generally for the similar age language for example Python (1991) vs C++ (1985), and Go (2009) vs Rust (2015), the PL with GC are way more popular than those without GC [1].

Regarding Rust vs D popularity, time will tell. When at the same age of D now, circa 2000s Perl was notably more popular than Python but then Perl lose its steam and fade into obscurity.

Regarding the sibling's comment on borrow checker, D now can support borrow checker and it's just a feature like its many capable features and Rust actually took it from Cyclone [3].

[1]TIOBE Index for April 2023:

https://www.tiobe.com/tiobe-index/

[2]Ownership and Borrowing in D:

https://dlang.org/blog/2019/07/15/ownership-and-borrowing-in...

[3]Cyclone (programming language):

https://en.wikipedia.org/wiki/Cyclone_(programming_language)

Re: Mojo – a new programming language for AI developers

#239
post #146

Hi Jeremy Howard here. I pop up in the launch video to demo super-fast matmul and mandelbrot in mojo. I'm pretty excited about this language, to say the least - not just for AI/ML, but for pretty much everything! Lemme know if you have any questions and I'll answer as best as I can. (I'm an advisor to Modulo.)

Where is the video?

https://www.youtube.com/watch?v=6GvB5lZJqcE

Re: Mojo – a new programming language for AI developers

#240
post #166
post #2

Well, I'm blown away. If this succeeds, it will allow you to use Python for the entire AI stack: high-level model composition (as usual), fast compiled CPU code (instead of, say, libs written with C++), and on-device operations (instead of, say, libs that use CUDA). Oh, and it will make your Python code parallel (i.e., there's no GIL). Obviously, we'll have to wait until Mojo is production-ready, but I'm excited afte…

> Jeremy, who sometimes hangs out on HN, must have been dying to tell the world about this for a long while Oh yes!

I can’t wait to see fast.ai-next in mojo :-)
Post reply on HN