Forum: Yet Another Programming Language
2
gravatar for Medhat
2.2 years ago by
Medhat8.4k
Texas
Medhat8.4k wrote:

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 bioinformations to migrate from Python to Julia?!!

rust forum julia • 2.7k views
ADD COMMENTlink modified 2.2 years ago by florian.gilcher10 • written 2.2 years ago by Medhat8.4k
4

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 REPLYlink written 2.2 years ago by Jean-Karim Heriche20k
1

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 REPLYlink written 2.2 years ago by h.mon27k

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

ADD REPLYlink written 2.2 years ago by Medhat8.4k

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 REPLYlink written 2.2 years ago by WouterDeCoster40k
  • 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 REPLYlink written 2.2 years ago by lakhujanivijay4.4k
1

AFAIK: No-Yes-Yes

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

ADD REPLYlink written 2.2 years ago by WouterDeCoster40k
1

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 REPLYlink modified 2.2 years ago • written 2.2 years ago by Medhat8.4k

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 REPLYlink written 2.2 years ago by WouterDeCoster40k

+1 , I strongly agree, WouterDeCoster

ADD REPLYlink modified 2.2 years ago • written 2.2 years ago by lakhujanivijay4.4k
2
gravatar for Istvan Albert
2.2 years ago by
Istvan Albert ♦♦ 81k
University Park, USA
Istvan Albert ♦♦ 81k wrote:

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 COMMENTlink written 2.2 years ago by Istvan Albert ♦♦ 81k

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 REPLYlink modified 2.2 years ago • written 2.2 years ago by Philipp Bayer6.4k
1

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 REPLYlink written 2.2 years ago by Jean-Karim Heriche20k

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

ADD REPLYlink written 2.2 years ago by WouterDeCoster40k

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 REPLYlink written 2.2 years ago by Philipp Bayer6.4k
1
gravatar for florian.gilcher
2.2 years ago by
florian.gilcher10 wrote:

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 COMMENTlink written 2.2 years ago by florian.gilcher10

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

ADD REPLYlink written 2.2 years ago by Medhat8.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 777 users visited in the last hour