Live data from Hacker News

Mojo is available for local download

modular.com

31–40 of 193 posts

Re: Mojo is available for local download

#31

Who would risk using a closed-source language? I know some academic groups using Matlab, and I know some engineering companies use tools like Simulink, but these are very established products. I don't think I could even get sign-off for using a new closed language for a work project...

It's just a liability and risk. Imagine you have some mission-critical system written in such language, the vendor goes bankrupt or creates absolutely unacceptable terms. Then you have a problem.

Sure if something similar happened to an open-source project, you would still have to either hire engineers to work on the compiler/tooling/language or to rewrite it in a more supported language, but I would consider it a little less riskier as you aren't dependent on one vendor

Re: Mojo is available for local download

#32
Why are people so enthused about Python syntax?

Some problems off the top of my head:

- The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...`

- The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java

- The ternary operator (... if ... else ...) is needlessly different for other mainstream languages

Re: Mojo is available for local download

#33

Why are people so enthused about Python syntax? Some problems off the top of my head: - The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...` - The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java - The ternary operator (... if ... else ...) is needlessly different for other mainstream l…

I agree (and would add explicit self argument, the fact that all your imports are exported and more) I think the point here is to reuse the Python ecosystem especially in ML.

Re: Mojo is available for local download

#34

Why are people so enthused about Python syntax? Some problems off the top of my head: - The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...` - The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java - The ternary operator (... if ... else ...) is needlessly different for other mainstream l…

Throwing this out there:

- I’ve used nonlocal 0 times ever.

- I get that people miss them, but you can define nested functions if you want. Nameless functions are nifty, but I’ve never lost sleep over putting `def foo` in front of what would’ve been a lambda in other languages.

- I kinda like the Python ternaries.

Preferences are A-OK, and I’m not saying you’re wrong. Just chiming in that the things you mention aren’t universally disliked.

Re: Mojo is available for local download

#35

Why are people so enthused about Python syntax? Some problems off the top of my head: - The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...` - The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java - The ternary operator (... if ... else ...) is needlessly different for other mainstream l…

I concede about multi line lambdas but far too many languages take a “syntax is bikeshedding and unimportant” approach to language design. New languages are still using “&&” and “||” as if it’s 1975 and syntax highlighting doesn’t exist. Looking at C++, Rust and even Zig code is unnecessarily complicated for someone who isn’t intimately familiar with the syntax meanwhile for the most part anyone can understand Python syntax (well, at least Python syntax that doesn’t abuse decorators and obscure dunder overloads)

Re: Mojo is available for local download

#36
post #9

Didn't try downloading the SDK yet, but in the playground, seems like the "Python superset" advertisement does not hold (trying to define a class gives "error: classes not implemented yet"). Great to see progress in this space but I think the real killer feature of Mojo would be to run any existing Python program and allow programmers to incrementally adopt Mojo's syntax for targeted optimizations, and seems like we'…

I don't think it really is a Python superset. They say "one language" but as far as I can tell it's actually Python + a language that integrates well with Python. Kind of like Cython.

Last time this came up I found out they're actually using CPython to execute Python code, so I have no idea how you get a 22kB static binary out of it, unless that example is just pure Mojo and no Python.

Either way it definitely feels like they keep hammering the amazing "Python but good!" line without actually explaining how it works, which makes me a little suss. Like they're scared of explaining it because then they'll have to say the thing they aren't saying.

Re: Mojo is available for local download

#37

Why are people so enthused about Python syntax? Some problems off the top of my head: - The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...` - The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java - The ternary operator (... if ... else ...) is needlessly different for other mainstream l…

Most AI/ML work is done in Python. It’s very compute intensive and there’s value in making it faster. There’s also a lot money sloshing around for doing AI stuff. Therefore there might be money for Modular in making a Python-compatible thing to make AI stuff faster.

In other words, I don’t think this is about the syntax at all

Re: Mojo is available for local download

#38

I've had high hopes for this project since its announcement, but until it's open-source, I'm not investing any time in it. That's the only announcement I care about

Same, and even worse, the playground requires you to be logged in. That's like the initial step of a demo and requiring an account is simply nuts.

Re: Mojo is available for local download

#39

Why are people so enthused about Python syntax? Some problems off the top of my head: - The lack of new variable declaration keyword makes scopes less explicit. nonlocal is not simpler in the large than `let x = ...` - The lack of multi-line lambdas is very limiting for anyone coming from JS, C#, Rust, Kotlin... heck even Java - The ternary operator (... if ... else ...) is needlessly different for other mainstream l…

Yeah it was pretty good in the Python 2 era but definitely not something to copy now.

Another big issue is that it's not expression based. For example you can't do `foo = (yield a).b` you have to do `x = yield a; foo = x.b`.

Having a special syntax for the expression version of if else is another example as you said.

I was disappointed to discover Dart made the same mistake there. There's a totally different syntax for match statements and match expressions. Why?? Ok maybe backwards compatibility.. but still. They fixed nullability properly and it wasn't too bad.

Post reply on HN