inveniosoftware / rfcs

RFCs for Invenio.
https://rfcs.readthedocs.io
4 stars 15 forks source link

RFC: Replace Python/JavaScript with bash scripts #25

Closed lnielsen closed 4 years ago

lnielsen commented 4 years ago

We have lately seen several issues with Python/JavaScript as the main language for the Invenio suite of products, this include but is not limited to:

In order to combat this problem, we propose to change the entire Invenio suite of products to use Bash scripts instead, and make Invenio repositories be purely based on the command-line. With this we would achieve:

Regarding the implementation, it would be significantly easier because we can cut out all the security and big data features, and thus reduce the overall number of lines of code. We expect to be ready with the new implementation by April 1st, next year.

zannkukai commented 4 years ago

Why not using Whitespace ? Much more human readable than disgusting BASH ? Think about code review... what a pleasure !!

jbenito3 commented 4 years ago

LGTM πŸš€

cfgamboa commented 4 years ago

@lnielsen @LGTM great! So pure BS (Bash Scripting)

diegodelemos commented 4 years ago

If you want taker part in the decision process, run this bash script to send your answer πŸ‘©β€πŸ’».

./invenio-language-survey.sh

```bash PEOPLES_CHOICE=$1 LARS_CHOICE='bash' LANGUAGE_OPTIONS='bash c++ go java javascript python rust' function run_survey { if [ ! -z "$PEOPLES_CHOICE" ] && echo $LANGUAGE_OPTIONS | grep -q -w "$PEOPLES_CHOICE" then echo "Hello, $USER πŸ‘‹!" echo "" echo "Congratulations, you have chosen $LARS_CHOICE as the future Invenio language!" echo "Wait while we submit your choice to our central poll system ..." # yes sure 🀣 echo "" curl -XPOST http://inveniosoftware.org/new-language-poll \ --silent -q \ -d "{'answer': '$LARS_CHOICE', 'salt': '$(echo `arp -a`+`date` | base64)'}" > /dev/null 2>&1 & SUBMISSION_PROCESS_PID=$! display_loader $SUBMISSION_PROCESS_PID echo "" echo "" echo "Answer $LARS_CHOICE submitted βœ…." echo "" echo "Thank you." else echo "Welcome to the Invenio new language survey. Choose a language 😊:" display_options exit 1 fi } function display_loader { PROCESS_PID=$1 i=1 sp="/-\|" while kill -0 $PROCESS_PID > /dev/null 2>&1 do printf "\b${sp:i++%${#sp}:1}" sleep 0.2 done } function display_options { echo $LANGUAGE_OPTIONS | tr ' ' '\n' | xargs -I {} echo "- {}" echo "" echo "For example: ./invenio-language-survey.sh bash" } run_survey ```

For example, if you would like to choose Rust, you would run the following, it is very easy:

$ ./invenio-language-survey.sh rust
Hello, rodrigdi πŸ‘‹!

Congratulations, you have chosen bash as the future Invenio language!
Wait while we submit your choice to our central poll system ...

-

Answer bash submitted βœ….

Thank you.

Remember, your opinion matters 😌.

dfdan commented 4 years ago

You've sed enough to convince me. I'm in awk of this bold mv.