scimma / scimma-server-container

Container with zookeeper, Kafka and SCIMMA server software for SCIMMA development.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Transition from Perl to bash or Python #36

Closed mjuric closed 4 years ago

mjuric commented 4 years ago

Per discussion on Slack -- to minimize dependencies and make the code more maintainable in the long run, we should transition internal scripts away from Perl.

@adambrazier @rdt12 -- I know we've standardized on Python, but for shell scripting (such as that in https://github.com/scimma/scimma-server-container/tree/master/scripts) that essentially strings together a number of cmdline calls, Python is not a great choice. Should we standardize on bash there?

Thoughts/pros/cons?

rdt12 commented 4 years ago

@mjuric, @adambrazier As long as the project depends on git, it depends on Perl, so it doesn't really add a dependency.

I agree that a project is easier to maintain if it is written in fewer languages. However, I'm confused by the suggestion that bash might be a replacement for anything but the most minimal Perl script. Python can certainly be used in place of Perl, but I would argue that bash can't or at least shouldn't be.

Perl runs commands just like bash, but it adds data types, operators, and functions that make it perfect for parsing options and manipulating strings (which are then run as commands). To do anything significant in bash, a script usually becomes a difficult to maintain mess of sed, awk, cut, and tr commands.

I understand the desire to only have one language. However, if you want a programming/scripting pair I don't see any advantage to Python/bash over Python/Perl. In fact, I see a lot of disadvantages.

mjuric commented 4 years ago

Right, didn't mean to suggest bash is an equally capable replacement for perl -- sorry if it came out that way. It's just that sometimes a solution to a problem may be a very simple 10-line bash script & if it is we shouldn't force it into Python where just the cmdline boilerplate may be more than 10 lines.

PS: perl5 were my scissors of choice to run with some years ago, but very few people these days speak it :(.

rdt12 commented 4 years ago

I think that this can be considered done.