Why do we need Conan profiles? - c++

I'm definitely a beginner with Conan, and I've only used it with very small projects where pretty much everything is under my control. Loved it! However, this simplicity also makes me kind of unable to appreciate the use and interest of conan profiles. Why can't CMake and Conan talk kindly to each other to pass things like compiler versions and C++ standards versions?
I imagine that the (really cool) project cmake-conan wrapper is dedicated to actually formalize the "talk kindly to each other" part I so boldly abstracted away: but even if I entirely trust it's utterly complex, I still feel there is something I'm really missing here?
As I'm trying to migrate to Conan 2.0, the need to precise host and build profiles confuses me even more (I was doing fine without them for my baby libraries, why is it vital I precise them now and what do they do?). I feel actually a bit scared of Conan 2.0 and a part of me wants to stay away from it so I can stick with cmake-conan wrapper.
Is it possible to explain with (very) simple words why what seems to complexify my (very small) project management is worth the effort? Thank you!

Related

how to make apps fast as c++ and as crossplatform as web apps?

As a personal project I would like to write a large, computationally expensive simulation with some graphics and user inputs at runtime. For that reason it was clear to me that I will be using C++ as my main language. (I also have a personal preference to use C++.)
Then I realized I would like the simulation to be as broadly available (crossplatfrom) as it can be. I guess it might be tedious for potential inexperienced users to use build instructions. For example, as far as I know, a windows user would have to install Make, Git, and a C++ compiler to run all the necessary commands in the terminal.
I have searched for a bit and now I think my only choices are:
assuming the user is skilled enough to follow c++ build instructions
pasting the whole .exe file to OneDrive
compile to .wasm (but that would require me to learn it and probably
set up a server right?)
ignore C++ assume javascript can handle the computation and host it
on github.io
My experience is pretty narrow and (I think) I would like to keep it as close to C++ as I can.
I also plan to make similiar projects in the future (with crossplatform and computationally expensive requirenments.)
Maybe I am missing something? Any input is highly appreciated :)
Your best bet here is to either use WebAssembly (.wasm) as you yourself suggested, or distributing a binary executable for each platform you want it to be available to. This way, users don't have to recompile the code on each platform. Github provides a way to distribute these precompiled binaries, though I personally have not tried it. If you want to go the wasm way, take a look at Emscripten (https://emscripten.org/), I believe that project provides an extensive toolset that will recompile a many apps from C++ to wasm without too much work. I know it's not a complete answer but hope it helps.

IDE versus command line compiling?

I'm pretty new to c++. I have experience on other programming languages so it was way easier now to start studying c++ after learning the philosophy behind programming in general.
This is a bit pointless "question", but after fighting with libraries and includes (to finally understand how they work and what they are) in various IDE softwares (Code::Block, Eclipse, etc..) I realised it was just so much easier for me to build my own g++ building command (.bat) with attributes than to fight with those software menu-hells.
Also I noticed that I actually learned A LOT better how things work when doing things manually.
Has anyone else experienced this?
.bat files are quite limited. Makefiles are much better tool. Especially together with helpers like qmake etc. Yet one needs also a good text editor and a bunch of other tools for more special tasks. Having all these stuff, no IDE is needed. But putting it all altogether, it is some kind of a "home-grown IDE". But one better suites for your needs. So choose wisely.

How can I use Clojure-CLR on Unity3d?

How can I use Clojure-CLR on Unity3d?
The complex answer is "maybe you can", the pragmatic answer is "no, you can't".
Sylwester suggested this is a duplicate of using it with Mono, which isn't really true, because Unity uses its own fork of Mono(one that's very old...2.6?), so something that's compatible with Mono won't necessarily have compatibility with Unity.
ClojureCLR requires the DLR(though they've been moving away from it), which means it's incompatible with Unity, since the DLR requires Mono 2.8+.
That said it's possible to add the DLR as a dependency, and to compile ClojureCLR to .dlls and access it from Unity, this is what I did, however my experience was that I could get a lot of my code to run fine in the development environment, but when I'd build the game, everything would break, it'd just ignore the Clojure stuff.
If Unity moves to a higher version of Mono, or ClojureCLR gets rid of dependence on the DLR, I don't see any reason Unity couldn't support it, and I actively look forward to it. But for the moment, it's not practical.
If a work-around exists(and it probably does), I never managed to figure it out.
People in the Clojure community have gotten something working.
From #swannodette "Looks like #ra and #timsgardner got Clojure running inside Unity last night"
http://f.cl.ly/items/2T2d340o0k0W2d44212G/clj2.gif

CppCMS vs. C++ Server Pages vs. Wt

I know Wt is the most stable of them, but it's a bit uncomfortable to use.
CppCMS sounds good but how stable is it? How secure is it?
I have encountered C++ Server Pages as well but there's nothing about their security in there.
Has anyone had some experience with any of those libraries and can enlight me?
First of all, several differences:
Wt is GUI like framework, it is quite far from traditional web development. So, if you
want to develop a code as if it was GUI it is for you.
CppCMS is traditional MVC framework optimized for performance, it has many features like template engines, forms processing, i18n support, sessions, efficient caching and so on, support of various web server APIs: FastCGI, SCGI and CGI. If you come for Django world, you would find yourself at home.
I'm less familiar with the third project, but it feels more like PHP -- you put the
C++ code inside templates and has no clear separation of View and Controller.
Stability, I can tell only about CppCMS, it is stable, and there are applications running
it 7/24, the authors blog and the Wiki with documentation of CppCMS are written in CppCMS.
So, there shouldn't be major critical bugs.
Disclosure: I'm developer of CppCMS.
I am the developper of libapache2-mod-raii and I am very disappointed we did not recommend this library for production work... Cause I do ! :)
I also like to point out that the project page is also available in English.
On the other hand, I do not agree with Steve about the fact that servlets are not compiled on the fly, as they are !
Otherwise, on the lacks of prefork support is not my point of view, although I was looking on the issue.
On a side note, I used mod_raii a while ago to rapidly port some parts of an existing C++ application on the web.
It takes exactly the same approach than JSP, with the whole compilation part delegated to the Apache module.
I cannot recommend it for production use, since I don't have much experience in it, but it is definitely something worth playing around with, and I didn't have any issue at the time.
It lacks some features like the support of a preforked apache, but has all the needed core features.
Answer from 2018:
I am running on limited hardware resources, so C++ is the first thing I think of. I made a decision by looking at this benchmark of web frameworks. cutelyst (a Qt derivative) and Wt dominate the top spots. They are all non-libre. So, I looked into treefrog. Right after its first and only tutorial, it is apparent that it uses qmake from Qt and thus Qt's LGPL applies.
I reluctantly go with CppCMS at the bottom of the list, as ffead has too many errors and poco is not a fullstack framework.
Diving into the tutorials, CppCMS is way ahead of treefrog when it comes to documentations. The first several tutorials are easy to follow. However when I start encountering problems, help is almost non-existent. I can't imagine how it would be like going with treefrog to get something done. Lack of documentations (and good ones) is the reason why I dumped it in the first place.
I almost dumped CppCMS also due to a serious roadblock. A tiny community cannot offer much help. Got Laravel (a very popular PHP framework) installed and about to test something. Then, the CppCMS issue seemed resolvable and I am back to it. Guess I am about to get stuffs done with CppCMS but its constraints are showing.
The incident got me thinking, and I look back at the benchmark, allowing Java and PHP to be there. I need some alternatives in case things don't work out. Lo and behold, the top three spots are occupied by Java frameworks. Laravel may not be the fastest, but it is really hot right now. Plus, I can call my C++ executables from PHP codes.
According to this discussion: if you use Qt with dynamic linking, it seems that you do not have to disclose your code if you use Qt with dynamic linking. This has to be researched, and Qt cannot be mastered within a single day. I suppose that makes cutelyst a possible choice again, IF AND ONLY IF you can do dynamic linking, and do all your things that way. I am just not a fan Qt's legal minefield and jumping hoops.
Through all this, I have a different look towards Java. Will still do Laravel because of all the rage, and I am now open to things other than C++.

Does anyone have experience with Clipsmm?

I have been looking at using CLIPS as an expert system for a simulator i am working on, and so i had a look at clipsmm. The only problem is that their sourceforge page has broken links and private forums.
I was just curious if anyone has had experience with clipsmm (i have learnt how to use CLIPS as a stand alone already), and i just need a little help getting the c++ wrapper working.
Any help that someone could give me would be great.
Thanks
-Craig
(sorry can't make custom tags for this so had to use generic ones)
mm is "minus minus", the standard trope for a C++ "founding" pkg (as in eg c-- itself). This is on the one hand in cognitive dissonance with its failure to be just standard C++ with no external dependencies and on the other hand consonant with its use of glibmm. It's vacuous and these dependencies are a major hassle, but I don't know of anything better for C++ encapsulation of CLIPS.
Well, I don't have direct experience, but I happen to have been the original author of a very similar set of wrappers for Ada.
I developed what I needed for a school project, and released it to the Public Domain in hopes that somebody else could build on it or find it useful. Some folks have used it, but not enough to support a full-fledged project. It looks like the userbase in the C++ realm isn't a lot better.
My suggestion to you would be to accquaint yourself with how your C++ compiler handles C bindings, download what code you can find, and dive right into it. You aren't likely to find a lot of very experienced help in a small niche like this.
If I'm wrong, I'm happy for you.