Live data from Hacker News

Mojo is available for local download

modular.com

61–70 of 193 posts

Re: Mojo is available for local download

#61
Hmm, a bit of a rough experience.

I had a few lines of python code, to count the fraction of A:s and C:s in a DNA (fasta) file adapted from [1]:

    with open("chry_multiplied.fa") as infile:
        a: int = 0
        t: int = 0
        g: int = 0
        c: int = 0
        for line in infile:
            if line[0] != '>' and len(line) != line.count("N") + 1:
                g += line.count("G")
                c += line.count("C")
                a += line.count("A")
                t += line.count("T")
        total_base_count = a + t + c + g
        gc_count = g + c
        gc_fraction = float(gc_count) / total_base_count
        print( gc_fraction * 100 )
Result:

    $ mojo run gc.mojo 
    gc.mojo:1:6: error: use of unknown declaration 'open'
    with open("chry_multiplied.fa") as infile:
    ...
"open" must be one of the most used Python functions ... :/

[1] https://github.com/samuell/gccontent-benchmark

Re: Mojo is available for local download

#62

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’…

> I’ve used nonlocal 0 times ever.

Same here, but I got bitten by weird scoping rules quite a few times.

Separating variable definition from assignment (e.g. with 'let') would probably help a lot in this case.

Re: Mojo is available for local download

#63
A rant. I apologize. I try to avoid on HN and in general.

Faster, yes, but at what cost?

I'm so impressed by the Python community, but I'll never quite understand why they gravitated to... Python itself. It's unbelievable to me that in Mojo's case some of the brightest, most famous engineers have gathered to do incredible computer science work to improve the compute performance of a language that is fundamentally flawed in its performance characteristics for those very applications. It just seems like such a waste.

How on earth did we arrive at this moment?

Chris Lattner is right in his Lex interview: he had to accept that the community was already committed to Python and given that reality, that in turn pre-filtered his available paths. But my god, what if the community had gravitated to a better language [for these purposes] in the first place? How much further along would we be in our tooling and capabilities to deliver value?

Chris, who I admire, loves to talk about language design decisions; loves to talk about how thoughtful they were in the decision-making around Swift; and then in the next breath says, hey whitespace-based scoping doesn't matter, don't worry about these things. Chris all you do is worry about these things, and worry about them for Mojo. He clearly has opinions that he masks about design choices Python has made; otherwise, after all, why the need to make Mojo?

It just seems like at the end of the day, Mojo may be the most technologically advanced lipstick ever to be placed on a pig.

(Edit for grammar, but clearly not for brevity or conciseness. XD)

Re: Mojo is available for local download

#66

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…

The issues I raised were pretty concrete, and not merely "this symbol is better than that symbol"

Re: Mojo is available for local download

#67
post #63

A rant. I apologize. I try to avoid on HN and in general. Faster, yes, but at what cost? I'm so impressed by the Python community, but I'll never quite understand why they gravitated to... Python itself. It's unbelievable to me that in Mojo's case some of the brightest, most famous engineers have gathered to do incredible computer science work to improve the compute performance of a language that is fundamentally fla…

The curly brace community already has tons of great choices. Let indent people have their mojo.

Re: Mojo is available for local download

#68
post #51
post #38

Earlier quoted context omitted.

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.

The same is true of GPT. Just sayin. Actually GPT is worse because they demand both a phone number and an email. Still haven't signed up because of that nonsense.

LLM inference takes up some scarce GPU time and many people are trying to use free entrypoints to build services instead of the intended paid APIs, so I understand why those services want to put limits on usage.

Programming playgrounds however are freely available for pretty much every mildly popular language, and these days many toolchains can even be compiled and run with JS or WASM so one could just serve some static files to host it. This is definitely more suspicious than what OpenAI and other ML companies are doing.

Re: Mojo is available for local download

#69
post #61

Hmm, a bit of a rough experience. I had a few lines of python code, to count the fraction of A:s and C:s in a DNA (fasta) file adapted from [1]: with open("chry_multiplied.fa") as infile: a: int = 0 t: int = 0 g: int = 0 c: int = 0 for line in infile: if line[0] != '>' and len(line) != line.count("N") + 1: g += line.count("G") c += line.count("C") a += line.count("A") t += line.count("T") total_base_count = a + t + c…

Ok, well, found some disclaimers in the docs now:

https://docs.modular.com/mojo/manual/basics/#python-integrat...

https://docs.modular.com/mojo/roadmap.html

Re: Mojo is available for local download

#70
post #51
post #38

Earlier quoted context omitted.

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.

The same is true of GPT. Just sayin. Actually GPT is worse because they demand both a phone number and an email. Still haven't signed up because of that nonsense.

I can understand why openai requires phone number. With how much resources they spend on each prompt, they want to limit abuse of their systems. Also ChatGpt is not available in many countries and a phone number is reliable enough test of location. I am myself in one of these countries, but I also care about my privacy, so I use services that use chatGPT indirectly instead: https://you.com with disposable email and https://phind.com
Post reply on HN