Live data from Hacker News

Mojo 1.0 Beta

mojolang.org

201–210 of 252 posts

Re: Mojo 1.0 Beta

#201
post #199
post #174

Earlier quoted context omitted.

I still don’t understand why we lack a language that will take uncomplicated computation heavy code and turn it into SIMD / multi thread / multiprocessing / GPU code with minimal additional syntax. Surely this is the sort of thing compiler / language design nerds dream about? It doesn’t have to guarantee efficiency or provide cutting edge performance in any context … it should just exist! My understanding is that we…

Still a bit early but I'm working on kiwi, a k-dialect that can lower to Apple MLX. Currently supports CPU and GPU on macOS and CPU on linux. https://kiwilang.com https://github.com/kiwi-array-lang/kiwi Kiwi runs computations on small dense arrays in its own runtime, when they are larger it will lower to MLX CPU and eventually to MLX GPU when it is worth it. As user you don't have to change any code, you just write k…

Thanks for sharing this is neat!

I’ve yet to find a language that does SIMD / multithreading / GPU with minimal tweaks let along multiprocessing.

Re: Mojo 1.0 Beta

#202

Earlier quoted context omitted.

>It’s the new “…on the blockchain”. yes, except it's more ... on the same lines, just to hammer the point home: it's web 2, it's SaaS, it's the latest weekly, er, sorry, daily, hottest JS framework, its the latest rap / punk / hippie / dreadlock / crewcut / swami / grunge/ guru hairstyle, it's agile, it's functional programming, it's OOP, it's OOAD, it's UML, its the Unix philosophy, its Booch notation, it's CASE too…

iow, it's the equivalent of your common or garden variety of teenager proclaiming that this new thing they just found is gr8, all else is shite, only to jump on the next bandwagon next week, month, or more rarely, year.

its what alan kay talks about when he says programming in general isnt a serious discipline and is instead a pop-culture...

  > only to jump on the next bandwagon next week, month
good for marketing as well; there are a no shortage of juniors who are mesmerized by the new shiny

Re: Mojo 1.0 Beta

#203
post #32

Does it have the indentation thing? That would be a no go for a lot of people

Only incredibly inexperienced people think indentation in python is a problem.

How the fuck could you possibly even possibly begin to validate such a claim. Lol. Asshole.

Re: Mojo 1.0 Beta

#204
post #47

Earlier quoted context omitted.

Well... the article made self deprecating fun of the click bait title, showed the code every step of the way, and actually did achieve the claim (albeit with wall clock time, not CPU/GPU time). And it wasn't "equivalent python", whatever that means, they did loop unrolling and SIMD and stuff. That can't be done in pure python at all, so there literally is no equivalent python.

Watch Chris Lattner's interview with Lex Fridman. He talks about mojo as a 36,000x speedup over Python without any indication that you need to think about vectorization to achieve it.

I'm looking at this transcript and I'm getting a different picture than what you describe https://podscripts.co/podcasts/lex-fridman-podcast/381-chris... . Yea, he doesn't specifically say vectorization and multi-threading or whatever but he also doesn't say you don't need some skill to get to huge speedups.

Re: Mojo 1.0 Beta

#205
post #174
post #10

As someone in ML who's interested in performance, I'm keen for Mojo to succeed - especially the prospect of mixing GPU and CPU code in the same language. But I do wonder if the changes they're making will dissuade Python devs. The last time I booted it up, I tried to do some basic string manipulation just to test stuff out, but spent an hour puzzling out why `var x = 'hello'; print(x[3])` didn't work, and neither did…

I still don’t understand why we lack a language that will take uncomplicated computation heavy code and turn it into SIMD / multi thread / multiprocessing / GPU code with minimal additional syntax. Surely this is the sort of thing compiler / language design nerds dream about? It doesn’t have to guarantee efficiency or provide cutting edge performance in any context … it should just exist! My understanding is that we…

Intel Ispc is a compiler for a C superset language that targets CPU SIMD and GPUs.

Re: Mojo 1.0 Beta

#206
post #10

As someone in ML who's interested in performance, I'm keen for Mojo to succeed - especially the prospect of mixing GPU and CPU code in the same language. But I do wonder if the changes they're making will dissuade Python devs. The last time I booted it up, I tried to do some basic string manipulation just to test stuff out, but spent an hour puzzling out why `var x = 'hello'; print(x[3])` didn't work, and neither did…

Mojo is cool but I just don't understand the python backwards compat thing. They're holding themselves back with that. All the flaws I can think of in Kotlin are due to the Java compatibility. They could've made it work here by being more explicit but the way it currently works seems doomed.

> Mojo is cool but I just don't understand the python backwards compat thing. They're holding themselves back with that.

In reality I think they've dropped that pretty hard. Literally you can't even get the length of a string with `len(s)` in the latest release. They also removed negative indexing, which I find baffling and frustrating. The roadmap does say they don't intend to have any "syntax sugar" until later in the implementation, but negative indexing is such a core part of what makes Python so much nicer to work with compared to say C++...

Re: Mojo 1.0 Beta

#207
post #136
post #107

Earlier quoted context omitted.

> All the flaws I can think of in Kotlin are due to the Java compatibility. All the use of Kotlin in industry are due to Java compatibility. Else there would be ~0% marketshare of Kotlin.

Mojo is NOT Python compatible (although they initially wanted it to be). So they got all downsides without the upsides.

"All downsides"? What do you mean?

Re: Mojo 1.0 Beta

#208
post #57

Earlier quoted context omitted.

> As someone in ML who's interested in performance, I'm keen for Mojo to succeed - especially the prospect of mixing GPU and CPU code in the same language. But I do wonder if the changes they're making will dissuade Python devs. Unless it's open sourced, it's a moot point, as most Python devs wont come anyway.

https://mojolang.org/docs/roadmap/#contributing-to-mojo > We're committed to open-sourcing all of Mojo, but the language is still very young and we believe a tight-knit group of engineers with a common vision moves faster than a community-driven effort. So we will continue to plan and prioritize the Mojo roadmap within Modular until more of its internal architecture is fleshed out. I hope they stick to their original…

> but the language is still very young and we believe a tight-knit group of engineers with a common vision moves faster than a community-driven effort.

This is a false dichotomy.

For years Golang was developed in the open but strictly moved on the vision of its creators rather than being "community-driven". Many other venerable open source projects don't involve the community in serious strategy discussions. The community mainly acts as a bug finder/fixer. Mojo could do the same: be open source but choose its own priorities internally.

I'm guessing that Mojo is still looking for a monetization strategy. Keeping important things proprietary in Mojo at this stage helps I'm sure (nothing wrong with that).

But I feel the era of proprietary programming language play is over. Unless you create some hardware (which the Mojo guys don't) it's going to be tough.

Re: Mojo 1.0 Beta

#209
post #172

Earlier quoted context omitted.

I work in bioimaging. What kind of bioinformatics are you doing that requires mojo level power?

"requires" is a strong word, but I implemented an alignment kernel that can do alignments on the GPU. Overall I think there is going to be a lot of "old" gpu compute hanging around, and now that writing kernels is a lot easier than it has been, we might as well try and see what algorithms we can get working there. I originally picked up Mojo for the SIMD, not for the GPU kernels. The SIMD usability in Mojo is outstan…

I might have to look into mojo.

What's "alignment" in your context. In bioimaging it usually refers to aligning something to a reference atlas (like the Allen Reference Mouse Brain Atlas) or aligning two microscope channels (like the red channel and green channel)

Re: Mojo 1.0 Beta

#210
post #205
post #174

Earlier quoted context omitted.

I still don’t understand why we lack a language that will take uncomplicated computation heavy code and turn it into SIMD / multi thread / multiprocessing / GPU code with minimal additional syntax. Surely this is the sort of thing compiler / language design nerds dream about? It doesn’t have to guarantee efficiency or provide cutting edge performance in any context … it should just exist! My understanding is that we…

Intel Ispc is a compiler for a C superset language that targets CPU SIMD and GPUs.

A beautiful find! It’s what 12+ years old at this point?

Definitely the closest thing so far (doesn’t do multiprocessing) but does seem to do SIMD / multithreading and GPU auto parallelizing!

Any idea why it’s so little known?

Post reply on HN