Forum:Yet Another Programming Language
2
2
Entering edit mode
6.8 years ago
Medhat 9.7k

Lately I was reading about two languages that looks of high value:

Julia

Julia is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.

Syntax is some how easy similar to Python, and performance comparable to C.

Rust

systems programming language. won first place for "most loved programming language" in the Stack Overflow. It is designed to be a "safe, concurrent, practical language". Rust is syntactically similar to C++, but is designed for better memory safety while maintaining performance.

Based on that I could see that Julia could be of much value in developing Bioinformatics tools supporting both high performance and short developing time. also Rust could support better memory usage.

Do anyone have experience in either of these language?

Is it encouraged for beginners to learn Julia instead of Python?

Is there a possibility for bioinformaticians to migrate from Python to Julia?!

Rust Julia • 4.9k views
ADD COMMENT
4
Entering edit mode

The problem with new languages is the lack of libraries. Julia wasn't mature enough for my needs when I wanted to use it. However, Julia seems an improvement over the mess that R is but then it doesn't have the convenient Bioconductor packages. In the end, programming languages are just tools so you just need to use what fits the requirements of the task at hand.

ADD REPLY
1
Entering edit mode

Julia has been buzzing around for a few years now. At some point, I remember Douglas Bates (developer of lme4, among many other packages) saying he was dropping R (mainly due to having to support Solaris, but also for performance and difficulty of integrating C or C++ and R) in favour of Julia - I didn't follow the issue and don't know if he ever really dropped R.

There is an apparently active BioJulia project, and I have seen some developers starting (but not finishing yet) ports of their old code to Julia.

Anyway, I am really terrible at making predictions, so I will spare you on mine.

ADD REPLY
0
Entering edit mode

as you said there is some activities in developing mature BioJulia and It is really promising, but the issue will it continue?!

ADD REPLY
0
Entering edit mode

If I would have a few more hours per day I would learn Julia - but days appear limited at 24h. It definitely looks interesting.

ADD REPLY
0
Entering edit mode
  • Is there something which could be done only with Julia and NOT with Python?

  • Is Julia considerably faster than Python?

  • Is Julia/ Rust really easy to learn or whether the transition from Python to something other is smooth?

    If answers are "YES" then it should be considered.

PS: Even I don't know much about Julia or RUST and I am as curious as you. May be the experts will shed some light.

ADD REPLY
1
Entering edit mode

AFAIK: No-Yes-Yes

But nicely written Python code will always beat shitty Julia code, obviously.

ADD REPLY
1
Entering edit mode

actually Julia code is not that hard, and the idea behind Julia to avoid writing prototype code then rewrite it in more efficient language (that would be the case with Python, with respect to Cython and PyPy)

ADD REPLY
0
Entering edit mode

Coming from R or Python Julia looks quite similar to... both. So there are probably quite some gotcha's to keep in mind too!

ADD REPLY
0
Entering edit mode

+1 , I strongly agree, WouterDeCoster

ADD REPLY
2
Entering edit mode
6.8 years ago

At some point I got interested in Nim. I thought it might have a lot of potential as it seemed to share advantages of high-level languages yet compiled to static binaries. Sounded really good.

https://nim-lang.org/

Then I tried to write a program in it. Right away I could not figure out how to format a string. All examples were echo this echo that. But I wanted to use something similar to how printf works (C or Python) 2.1%f. Scoured the manual, there was nothing there. Hours passed by, then finally it turned out that I would need to install a third-party library that supposedly did that... really? You need a third party module to format a float?

Perhaps this has been fixed since - though the lesson that I learned there was that we take a lot for granted when we use a language that was polished over many decades and the lack of some of these features make for awkward and unpleasant experiences.

ADD COMMENT
0
Entering edit mode

For a reasonably high-level language that compiles to static binaries I can recommend Go

Upsides:
- can compile once and move binary around, all libraries included (makes the binary a bit big, a few MB even for simple scripts - no annoying GLIBC_2.14 errors)
- very simple language, not many pitfalls like for example C++
- amazing and intuitive support for concurrency baked into the language (goroutines) with great debugging software
- the compiler won't compile if you write messy code (unused variables etc.)
- blazing fast
- inbuilt GitHub support (you can import libraries via username/package, but very annoying versioning)
- reads Pythonic since the language is so simple, I've gone back to old tools written in golang and I can immediately see what's going on
- a tiny bit of pointer handling means that it's more explicit (unlike Python's implicit pointers that sometimes lead to unexpected behaviour)

Downsides:
- very simple language, you'll end up writing a lot of boilerplate (examples: all errors have to be handled, no generics so for example your function will have to check which type comes in)
- the compiler won't compile if you write messy code (i want to use that variable later you annoying thing!)
- still a little bit of pointer handling, more than e.g. Python - but no pointer arithmetic possible (luckily)
- package ecosystem isn't as amazing as Python/R, this is the biggest killer for me (but biogo looks nice)

ADD REPLY
2
Entering edit mode

Writing a lot of boilerplate code is a big downside. Programmer time is more costly than computer time and I value my time more than computer time so if it takes me two hours to write a program in a language like Go when the same can take me 20 minutes in perl or R just so that the code runs in 10 minutes instead of 1 hour, this is not worth it.

ADD REPLY
0
Entering edit mode

Definitely, but also depends obviously on often you'll need that code.

ADD REPLY
0
Entering edit mode

Exactly - my run-once throwaway scripts are all Python/bash/R, 'bigger' more complex algorithms go into Go (but I haven't had to do that in a while, no need)

ADD REPLY
1
Entering edit mode
6.8 years ago

For Rust, I'd like to highlight RustBio, which is a project to support you use-cases. They applied for a grant for further development, but I don't know where that went.

https://rust-bio.github.io/

ADD COMMENT
0
Entering edit mode

After releasing the Rust-Bio paper in 2016 I did not see any thing more.

ADD REPLY

Login before adding your answer.

Traffic: 2706 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6