luke5542 / LanguageComparison

A comparison of various programming languages for similar problems to demonstrate the syntactic and run-time differences.
0 stars 3 forks source link

Switched build systems #13

Closed georgevanburgh closed 9 years ago

georgevanburgh commented 9 years ago

The previous Bash-based build system has been replaced with a new Makefile-based one. Benchmarks can be run by switching to the sieve-of-eratosthenes folder, and running make:

make runall
luke5542 commented 9 years ago

This script stops at Python, as it isn't setup to handle the default configuration of python (for python 2.x) versus python3 (for 3.x).

It also simply stops if the commands do not exist. It should instead simply move on if a required command doesn't exist, while spitting out the error message. This was part of the Bash script setup so that you could ignore one of the parts if you really wanted to (i.e. if you hate Javascript, for example, and don't care about having to install node.js just to be certain the parts you DO care about could be sure to run)

dan-c-underwood commented 9 years ago

With regards to the Python issue, I'd suggest switching scripts to use shebangs rather than explicit commands to run each (although I'm not sure how effective that would be on a platform-to-platform basis).

georgevanburgh commented 9 years ago

Using shebangs presents an issue with the python example, as we want to run the same code multiple times under different interpreters (python2, python3 and pypy). Having an python2 alias is best practice - and is something users can easily create if needs be.

I'm working on the 'exists' logic at the moment.

dan-c-underwood commented 9 years ago

Best practice for Python (under PEP 0394) is to have python point to the same target as python2, and then python3 to the Python 3.x version. I would suggest that that might be the best path forward (not using just python without an explicit version number).

dan-c-underwood commented 9 years ago

Seems to work okay, except rust Makefile should check for rustc and not rust. Once those are changed then happy to merge!