Closed lnielsen closed 4 years ago
Why not using Whitespace ? Much more human readable than disgusting BASH ? Think about code review... what a pleasure !!
LGTM π
@lnielsen @LGTM great! So pure BS (Bash Scripting)
If you want taker part in the decision process, run this bash script to send your answer π©βπ».
```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 π.
You've sed
enough to convince me. I'm in awk
of this bold mv
.
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.