Live data from Hacker News

Mojo 1.0

modular.com

131–140 of 172 posts

Re: Mojo 1.0

#131

Earlier quoted context omitted.

What else are you going to write CUDA kernels in that will be better than Mojo? This doesn't compete with Python. Like if someone wrote a competitor to VHDL that looked like TEMU Python... Python would not be its competitor, VHDL would.

Julia

lol no

Re: Mojo 1.0

#132

Earlier quoted context omitted.

Mojo is much faster than Rust, but slower than Go. I don't have much experience with Zig. Mojo is designed to be very fast to compile, so many decisions were made to keep the core language simple, one example is in `where` clause, the checking there happens entirely in the parser. It can be stupid in situations where other languages are smart, and make you explicitly do checks that could be inferred in other language…

From experience, Zig compile times are at least as fast as Go for debug builds that don't need to do linking with C libraries, etc. It does have to use LLVM for release builds however which is a lot slower.

Mojo compiles with O2 by default, it is similar to Go here. Release build is the default, debug is something you opt into. It is still very fast nonetheless

Re: Mojo 1.0

#133
post #114

Earlier quoted context omitted.

I never understood this. What kind of special whitespace requirements do people have?

I like significant invitation, but I still wouldn’t choose it if I was designing a language today. Functional-style programming has become much more popular since Python was designed in the 1990s, and there doesn’t seem to be a good way to have Python-like significant indentation and also support true anonymous functions.

Haskell has significant indentation and anonymous functions.

Re: Mojo 1.0

#134

Interesting. Heard about Mojo a few years now, never really tried it. My Python brain cannot really write C++ or Rust but still need the performance.

Take a look into numba, you add a decorator to your function and it turns it into compiled code.

It's JIT only, and it needs to be in a particular shape to be effectively compiled. It's mostly for numeric code, but there are many other cases where native code would be better.

Re: Mojo 1.0

#136
post #113

Earlier quoted context omitted.

It's supposed to be (currently) a fully native, Python-like language, but for GPUs primarily. Though I am seeing it as having a future as a fully native Python alternative that might get interesting. I hope with 1.0 (havent fully read the article yet) they stop breaking language features / syntax because they did quite a few different changes over time, their overall goal is to be a fully native superset of Python. I…

> their overall goal is to be a fully native superset of Python Not any more. That was the initial announcement, but I think then somebody actually looked at Python and realised what a complex language it is - so they refocused on being a Python-like language. Python has a reputation for being a simple language, but in reality it isn’t at all.

Honestly that doesn't really feel like a glowing endorsement of the language. "They announced a crazy goal, then rolled it back because they grossly underestimated how hard it was" doesn't give me confidence in either the long-term design or the people making it, and I feel like "a Python-like language" is both a lot less interesting and a lot more subjective. If the discussions in this thread around significant whitespace aren't already an indication, which parts of Python people think are good and which aren't will vary by person, so without saying more it's hard to tell whether it's a a language someone will love or hate.

To preempt all of the inevitable responses: yes, I'm aware that this was started by the same guy who started LLVM and Swift. That doesn't automatically mean anything he comes up with will be great, especially when it's specifically trying to be "like" a language that doesn't really have much on common with either of those; there are plenty of instances of very smart people having an overabundance of confidence when jumping into something they assume they'll excel at and getting humbled. I'd also argue both Swift and LLVM have some common criticisms that very much are in line with the same concern I've expressed here (i.e. long term design suffering due to expanded or pivoted scope; even the name LLVM alludes to some of that history of having a somewhat different goal originally). His name is enough that I'll probably always click to take a first look at anything he comes up with, but I'm not going to ignore things that seem like issues because of that either. Smart people don't need to held to a lower standard because their work should be able to speak for itself.

Re: Mojo 1.0

#137
post #72

Earlier quoted context omitted.

Wow, so Lattner became a billionaire. Pays to be in compilers.

For once. A former colleague once quipped: The only way to make decent money in the business of language runtimes is to get a job at a big company that depends on it.

Yeah, feels kind of odd to phrase it like that when he's already created more than one world famous compiler before this one.

Re: Mojo 1.0

#138
post #116

Earlier quoted context omitted.

The value has already been materialized. They were acquired by Qualcomm for $3.9 billion.

That’s insane, for a language that seems to be Temu-Python. OTOH Python itself is the world’s most popular programming language, yet has only recently had the money to support more than a single full-time developer.

It almost feels like they were paying more in the hopes of owning the next LLVM or Swift based on the name on the tin rather than basing the price on the product itself.

Re: Mojo 1.0

#139
post #114

Earlier quoted context omitted.

I like significant invitation, but I still wouldn’t choose it if I was designing a language today. Functional-style programming has become much more popular since Python was designed in the 1990s, and there doesn’t seem to be a good way to have Python-like significant indentation and also support true anonymous functions.

Haskell has significant indentation and anonymous functions.

Haskell's significant indentation is, in my experience, much worse than Python's at fading into the background by matching what you would have done anyway.

Re: Mojo 1.0

#140
post #94

Earlier quoted context omitted.

So, without significant indentation?

When has it ever been an issue in use? People complained about this in 1999 but then I used it and it's never mattered.

Python's significant indentation does have real costs, but they mostly don't affect experienced programmers working on real codebases in real editors or IDEs. Rather, they are things like, it makes the REPL more cumbersome, and newbies sometimes find that code they copy-paste from the Web mysteriously fails to work.
Post reply on HN