-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add brainfuck2 for Vala #217
Conversation
There have been changes recently in the testing framework, and now all tests are notifying the runner when to start the measurement. Could you please change the code accordingly (it should send "Vala" message to localhost:9001 via TCP socket, and close the socket before running the actual test + fail gracefully in the case the server is not available)? Looks like it shouldn't be too challenging (https://wiki.gnome.org/Projects/Vala/GIONetworkingSample), however if it's a problem, I can deal with it later. Also, do you know how to detect the Vala version programmatically? "valac --version" includes the name, not the version only. We try to avoid parsing the CLI output, and rather use other means to get the version as-is, and if you know the way, I'd be grateful if you share the knowledge. But again, I can research it by myself, no worries here. |
Thanks for the quick response. I have never dealt with networks, so I did something from this example, I think you will not be difficult to convert it into what you need. About obtaining version of Vala without language name, i think this problem will emerge with many languages, itself gcc for example prints 4 lines of text on request version of. I suggest if you don't want to parse the name on the server side, why not do it on the side of the test itself. I added a function which safely outputs the version of the first line of test. Another idea is to implement server-side parsing, but to do it through a package manager version request, then it will be universal for all languages. |
Thanks, I’ll use it as a basis and include you into the final PR with numbers to review. If you don’t mind, we’ll use not the latest version of the Vala compiler, but rather the version included in Debian testing (looks like it’s just one minor version behind). I’d rather avoid installing from sources as Docker may have issues with it, and their PPA is even more behind than Debian. |
Okay great. Of course I do not mind, not the latest version of Vala is unlikely to affect performance due to compile in C. But just for the record, I dont know whether Debian can connect PPA as Ubuntu, but in this PPA vala maintainer puts the latest releases. |
Vala language: https://wiki.gnome.org/Projects/Vala
Other benchmarks: https://github.com/arrufat/vala-benchmarks
Just copied the C# version, changing the name of the timer, output and data structures, Vala has exactly the same syntax.