gnatstudio
doctest
gnatstudio | doctest | |
---|---|---|
12 | 19 | |
379 | 5,594 | |
2.1% | 1.3% | |
9.7 | 0.0 | |
5 days ago | about 2 months ago | |
Ada | C++ | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gnatstudio
- GNAT Studio Continuous Release 20230501
-
Porting old firmware written in Ada to modern program
As for compilers, there really is only GNAT if you don’t want to spend extra money (note: It’s GCC based so you have a C and C++ compiler that comes with it). I definitely recommend getting a copy of Alire( https://alire.ada.dev/ ) to help get you started. If you want to use Visual Studio Code, there is Ada support for it (https://marketplace.visualstudio.com/items?itemName=AdaCore.ada). There is also GNAT Programming Studio (https://github.com/AdaCore/gnatstudio/releases). Once you have those then you can compile the C and Ada code and throw in extra C++ if you would like.
-
Which one do you use?
"https://github.com/AdaCore/gnatstudio/releases"
-
GNAT 2023 (Beta) Seems Available!
This is not a GNAT (the compiler) release, it is a continuous release of GNATstudio (the IDE).
- gnatstudio: GNAT Studio is a powerful and lightweight IDE for Ada and SPARK
-
Where to get latest stable GNAT Studio?
As of today Alire doesn’t install GNAT Studio automatically, but you can get a release for Windows x64-64 or Linux x86-64 from the repository: https://github.com/AdaCore/gnatstudio/releases Once GNAT Studio is installed and in the PATH, you only have to use the command $ alr edit in your crate to start it.
-
Memory Safety in the D Programming Language (Part 2 of N)
https://alire.ada.dev https://github.com/Adacore/gnatstudio
- Got this error while running Alire... not sure how to proceed
-
How to install GNAT 3.14b on FreeDOS 1.3
Today in the year 2022 the way to install the GNAT compiler on a Debian/Ubuntu system is to execute "sudo apt install gnat gprbuild" in the terminal, followed by downloading and installing the GNAT Studio IDE from https://github.com/AdaCore/gnatstudio/releases. This is described at https://alire.ada.dev/transition_from_gnat_community.html and also how to install the GNAT compiler on other platforms. In the era of the GNAT Community Edition 2007-2021 (https://www.adacore.com/download), the process for installing the compiler and tools was simplified from the 2007 version of the compiler and ended in 2021 with simply executing a script called doinstall where the installation directory for example /usr/gnat was pointed out and then the path /usr/gnat/bin directory was put on the PATH environment variable. In previous versions of the GNAT compiler there was a need to specify more environment variables in order to be good to go which I recently learned when installing the GNAT 3.14b compiler (https://sourceforge.net/projects/gnuada/files/GNAT_P%20MS-Dos%20i386/3.14/) from 2002 on FreeDOS 1.3 (https://freedos.org/). Let's say the GNAT 3.14b compiler has been unzipped in the directory C:\GNAT\. There are then three directories which need to be put on the PATH environment variable:
-
What's New in Ada 2022
There is an Ada specific IDE with a nice memory footprint here.
https://github.com/AdaCore/gnatstudio
doctest
-
Unit testing tool suggestions
I have never used "tools" for unit-tests, only web sites that show the results of the tests or code coverage. For C++ I prefer https://github.com/doctest/doctest but most companies I worked for use Catch2.
-
Question about Doctest.h
Do the README and tutorial not explain it well enough? It's a framework for automated unit testing.
- Doctest – C++ Testing Framework
-
Memory Safety in the D Programming Language (Part 2 of N)
This is, honestly, super easy to get going. Nowadays you have a ton of libraries and more-than-decent build systems. With Meson/CMake and Conan/Vcpkg I can set up a project with testing in 3 minutes. Also, I think that at the end of the day you want your tests to live somewhere else. But if you want to embed them, you also have https://github.com/doctest/doctest.
-
how can I improve my connect4 board class?
Write some tests. They can find bugs early and give you confidence that your code works so far. That doesn't have to be anything fancy, e.g. with doctest:
-
Testing framework Catch2 3.0 final released
Keep in mind https://github.com/doctest/doctest/issues/554. Also, doctest lacks: - Matchers - Data generators - Benchmarking - ...
-
Check if my code meets the requirements?
Your requirements can easily simulated on paper (like increase the speed once, twice, ...), then translated to unit-tests with a framework like https://github.com/doctest/doctest.
-
The Lisp Curse
I like working in C++, after a decade of working in Java, Python, Javascript and Clojure, I find working in C++ (which I learned before these other languages) to be quite fun and pleasant, at least with relatively modern C++.
I've been, on and off, working on a little toy game engine, for a few years. Its a mix of keeping up with C++ advancements, learning various concepts like physically based rendering, and just the fun of crafting a big project, with no constraints other than my time and ability, no deadlines, no expectation of releasing anything. Its cathartic and enjoyable. I really do enjoy it.
Last September, I got frustrated with something I was working on in a more serious capacity. It was some server software, it responded to HTTP requests, it accessed third party services over HTTP and Websockets, it talked to a Postgres database. Overall it was an event driven system that transformed data and generated actions that would be applied by talking to third party services. The "real" version was written in Clojure and it worked pretty well. I really like Clojure, so all good.
But because I was frustrated with some things about how it ran and the resources it took up, I wondered what it would be like if I developed a little lean-and-mean version in C++. So I gave it a try as a side project for a few weeks. I used doctest[1] for testing, immer[2] for Clojure-like immutable data structures, [3] lager for Elm-like application state and logic management, Crow[4] for my HTTP server, ASIO[5] and websocketpp[6] for Websockets, cpp-httplib[7] as a HTTP client and PGFE[8] for Postgres, amongst some other little utility libraries. I also wrote it in a Literate Programming style using Entangled[9], which helped me keep everything well documented and explained.
For the most part, it worked pretty well. Using immer and lager helped keep the logic safe and to the point. The application started and ran very quickly and used very little cpu or memory. However, as the complexity grew, especially when using template heavy libraries like lager, or dealing with complex things like ASIO, it became very frustrating to deal with errors. Template errors even on clang became incomprehensible and segmentation faults when something wasn't quite right became pretty hard to diagnose. I had neither of these problems working on my game engine, but both became issues on this experiment. After a few weeks, I gave up on it. I do think I could have made it work and definitely could go back and simplify some of the decisions I made to make it more manageable, but ultimately, it was more work than I had free time to dedicate to it.
So my experience was that, yes, you can write high level application logic for HTTP web backends in C++. You can even use tools like immer or lager to make it feel very functional-programming in style and make the application logic really clean. Its not hard to make it run efficiently both in terms of running time and memory usage, certainly when comparing to Clojure or Python. However, I found that over all, it just wasn't as easy or productive as either of those languages and I spent more time fighting the language deficiencies, even with modern C++, than I do when using Clojure or Python.
I think I would think very long and hard before seriously considering writing a web backend in C++. If I had the time, I'd love to retry the experiment but using Rust, to see how it compares.
[1] https://github.com/doctest/doctest
[2] https://github.com/arximboldi/immer
[3] https://github.com/arximboldi/lager
[4] https://github.com/CrowCpp/crow
[5] https://think-async.com/Asio/
[6] https://www.zaphoyd.com/projects/websocketpp/
[7] https://github.com/yhirose/cpp-httplib
[8] https://github.com/dmitigr/pgfe
[9] https://entangled.github.io/
-
C++17 python like print function
For stuff like this which is very easy to test (very predefined input vs output), I highly suggest using some testing framework. Catch2 is great, but there is also doctest and good ole googletest. If you do this, it would also be a great intro to CI, where you do some plumbing on github or gitlab where every commit causes a build to happen on their servers and run through the unit tests, and if it passes it gets merged into master.
-
How to unit test
doctest is my favorite framework. Really simple to use, header only, supports compile-time tests, lots of features and it works well with cmake.