Live data from Hacker News

A look at the Mojo language for bioinformatics

viralinstruction.com

101–110 of 124 posts

Re: A look at the Mojo language for bioinformatics

#101
post #30

Great post. I think Mojo's claims like the speedup over Rust are a problem, like the 65000x speedup over Python. How can we differentiate between good new tech and Silicon Valley shenanigans when they use claims like that? They do nice titles and slogans but are shady in substance

A little bit of clickbait is what you need to get interest at all. That's just a fact of life.

As for this specific claim, it was coupled with a blog post that actually demonstrated the speedup on a specific problem. Getting several orders of magnitude speedup over plain python is often quite easy. That's why we have numpy and pandas after all!

Re: A look at the Mojo language for bioinformatics

#102

The language is far from stable, but I have had a LOT of fun writing Mojo code. I was surprised by that! The only promising new languages for low-level numerical coding that can dislodge C/C++/Fortran somewhat, in my opinion, have been Julia/Rust. I feel like I can update that last list to be Julia/Rust/Mojo now. But, for my work, C++/Fortran reign supreme. I really wish Julia had easy AOT compilation and no GC, that…

> I really wish Julia had easy AOT compilation and no GC, that would be perfect I pretty strongly disagree with the no gc part of this. A well written GC has the same throughout (or higher) than reference counting for most applications, and the Rust approach is very cool, but a significant usability cliff for users that are domain first, CS second. A GC is a pretty good compromise for 99% of users since it is a minor…

> A well written GC has the same throughout (or higher) than reference counting for most applications

Reference counting has its own problems. The true comparison should be with code that (mostly) doesn’t do reference counting.

Then, the claim still holds, IF you give your process enough memory. https://cse.buffalo.edu/~mhertz/gcmalloc-oopsla-2005.pdf:

“with five times as much memory, an Appel-style generational collector with a non- copying mature space matches the performance of reachability- based explicit memory management. With only three times as much memory, the collector runs on average 17% slower than explicit memory management. However, with only twice as much memory, garbage collection degrades performance by nearly 70%. When physical memory is scarce, paging causes garbage collection to run an order of magnitude slower than explicit memory management.”

That paper is old and garbage collectors have improved, but I think there typically still is a factor of 2 to 3.

Would love to see a comparison between modern recounting and modern GC, though. Static code analysis can avoid a lot of recount updates and creation of garbage.

Re: A look at the Mojo language for bioinformatics

#103
post #30

Great post. I think Mojo's claims like the speedup over Rust are a problem, like the 65000x speedup over Python. How can we differentiate between good new tech and Silicon Valley shenanigans when they use claims like that? They do nice titles and slogans but are shady in substance

Probably reasonable to label as a shenanigan if they try to differentiate with a emoji file extension.

Re: A look at the Mojo language for bioinformatics

#104
post #3

As someone who practices bioinformatics, it doesn’t seem appealing. Bioinformatics is like 0.1% dealing with FASTQ files and the rest is using the ecosystem of libraries for statistics and plotting. Many of them in R, by the way.

As someone who is considering a switch from generic software engineering towards bioinformatics, what would you say the pain points are? If this is not the way to remove workflow friction, what is?

I had an ok career in software engineering (Android/iOS -> backend -> engineering management) before getting MS in Bioinformatics and starting a PhD in Medicine.

For me, the pain points are often the same as in business. Biologists with no data analysis experience want something done without understanding constraints. Requirements are often not understood and there isn’t a good plan.

Some people do indeed suffer from code being slow and this can be solved with better tools. I works with large datasets in single-cell genomics (over a million cells) and the model takes ~12 hrs to train on an entry-level GPU. So, most o my time is spent at trying to understand the results.

Re: A look at the Mojo language for bioinformatics

#105

Earlier quoted context omitted.

As someone who is considering a switch from generic software engineering towards bioinformatics, what would you say the pain points are? If this is not the way to remove workflow friction, what is?

Would like to second this question. I'm very interested in getting into this world, but it feels like there isn't a clear path (especially for someone self-taught like me). Bioinformatics feels pretty inaccessible without a computer science or biology degree, even with substantial R and Python experience.

I think there’s a lot of gate keeping and having some formal degree is a pre-requisite. And be advised that pay isn’t great either.

But bioinformatics is an umbrella term. There’re so many different things people do. I started by identifying field I’m interested in (ageing and immunology) and backtracked from there.

Re: A look at the Mojo language for bioinformatics

#106

Earlier quoted context omitted.

The optimisation passes are expensive (not the largest source of compile time duration though). Debug mode is designed to build as-fast-as-possible while still being correct, so that you can run your binary (with debug symbols) ASAP. Overflow checks are present even in release mode, and some write-ups seem to indicate they have less overhead than you’d think. Rust lets your configure your cargo configs to apply some…

That's not right, Rust only checks for overflow in release mode for numbers where its value is known at compile time. In debug mode all operations are checked for overflow.

Aahh, my bad. TIL.

Re: A look at the Mojo language for bioinformatics

#107

Earlier quoted context omitted.

Am I missing something? In the git repository [0] it says: > needletail_benchmark folder was compiled using the command cargo build --release and ran using the following command ./target/release/ . Or are you talking about something else here? [0] https://github.com/MoSafi2/MojoFastTrim

It was later edited, after it had basically made the rounds.

Ah okay, found the commit that changed the benchmark numbers

https://github.com/MoSafi2/MojoFastTrim/commit/530bffaf21663...

Re: A look at the Mojo language for bioinformatics

#108

Folks using multiple languages, what is your workflow? I do most DS/ML work in Python but move to R for stats, and publication-ready plots and tables (gt is really great). I often switch between them frequently, which is a hassle in the EDA and prototyping stages, especially when using notebooks. I enjoy Quarto in RStudio, but the VS Code version is not that great. How do you make it work? Also, after so many years u…

I've been thinking to learn Rust for these use cases, but always get frustrated with the complexity.

I find Go is a great middle-ground though! And now there starts to be a few more bio-related tools and toolkits out there, including:

- https://github.com/vertgenlab/gonomics

- https://github.com/biogo/biogo

- https://github.com/pbenner/gonetics

- https://github.com/shenwei356/bio

... except from there being some really popular bio tools written in Go, like:

- https://github.com/shenwei356/seqkit

I think Go lost a bit of steam in bio after Rust started to take off, but it seems the field is growing to such an extent, and people are also starting to realize Rust isn't the answer to everything. I.e. it is fantastic for fast tools, but for replacing Python for all of the various ad hoc coding in biology ... nah, not so much. That's where I think Go shines.

Re: A look at the Mojo language for bioinformatics

#109

Earlier quoted context omitted.

The optimisation passes are expensive (not the largest source of compile time duration though). Debug mode is designed to build as-fast-as-possible while still being correct, so that you can run your binary (with debug symbols) ASAP. Overflow checks are present even in release mode, and some write-ups seem to indicate they have less overhead than you’d think. Rust lets your configure your cargo configs to apply some…

That's not right, Rust only checks for overflow in release mode for numbers where its value is known at compile time. In debug mode all operations are checked for overflow.

Integer overflows can be enabled in release mode by modifying your Cargo.toml with

    [profile.release]
    overflow-checks = true
IMO it should have been the default.

Re: A look at the Mojo language for bioinformatics

#110

How does a software engineer transition into bioinformatics or computational biology? I've taken some online courses on bioinformatics and have some experience in large distributed jobs but these jobs seem few and far in between and generally want M.S/PhDs in bioinformatics. Is it really a field that's not viable to enter without an MS?

I think the challenge is learning enough of the biology outside of academia. I think it is fully possible, e.g. from books and videos ... but will take a lot of determination.

For the bioinformatics part, I think something like the "Genomics data science" specialization on Coursera should be a pretty good start.

Post reply on HN