Markdown Implementations for C/C++ [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is the best implementation of Markdown for C or C++?
I found these via Google, and would appreciate comments about which ones work well and which ones don't (and which ones I may have missed):
peg-markdown
Discount
Cpp-Markdown
libsoldout (formerly libupskirt)

peg-markdown depends on GLib and other 3rd part tools. I've tested it, it works quite well.
Advantages:
Dual-licensed under GPL and MIT.
Uses internally formal grammar, so easy to maintain and extend.
Disadvantages:
Depends on GLib
Provides C API.
Cpp-Markdown, Most C++ code but it is quite slow and little bit bloated. On the other hand it is quite easy to understand and modify, Depends on boost-1.35.
Advantages
Depends only on boost
Written in C++, looks like less dangerous
Licensed under MIT.
Disadvantages
Slow (it is still about 10 times faster then Perl implementation, but about 10 times slower than Discount)
Discount, This is the code I use for my blog http://art-blog.no-ip.info/cppcms/blog and wiki http://art-blog.no-ip.info/wikipp/en/page/main. It is written by hardcore C programmer and quite hardly mantainable (even the developer activly maintains it).
Advantages
Extremely fast
Written in pure C (no 3rd part dependencies).
Actively maintained
Has permissive 3 clause BSD license
Disadvantages
Almost impossible to maintain (even I could remove/add some fatures).
Has only FILE API, so I should tweak the code to make it work with general buffer.
Licensed under 4 clause BSD license that is incompatible with GPL. It is problematic if you want to use it not as part of your GPL-ed software.
Why do I know them so much?
I'm developing CppCMS, so I need a good markdown to HTML convertor. When I picked one (Discount), it was the only solution. Since then I've needed to replace it due to licensing issues. That said, I still quite like it because it is the fastest Markdown solution.
P.S.: If you want C++ wrapper for Discount, take a look on http://cppcms.svn.sourceforge.net/viewvc/cppcms/cms/trunk/cxxmarkdown/, It is not the latest version, but it is already tweaked.
EDIT: I have just visited Discount site and I had found that it had added a non-FILE API as well. So now it is real library.
EDIT 2: If you find better implementation or write your own under FOSS license, let me know ;)
EDIT 3: as cloose commented, discount had changed the license to 3 clause BSD.

Related

LEDA graph v/s Boost Graph library [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want efficiency and I am willing to write code by myself if efficiency (=0.9*speed + 0.1*others) is high. If I were to choose between LEDA graph or Boost graph, which one should I choose?
My algorithms are time-consuming (some are even non-polynomial in time) which works on large graphs.
Boost is generally a good library but I would not suggest Boost graph for a number of reasons.
The BGL documentation is execrable, with no easy to follow user guide. I have found that trying to define graphs with properties that are relevant to my own problems is very difficult.
You frequently end up with huge compiler errors that show templates within templates within templates ... nigh on impossible to see what is going on.
The only solution I found was to start with a trivial example that comes with Boost Graph, and adapt it until it does what I want.
I know of many bright and capable people that have ditched Boost Graph because of these reasons. Sad since there are very efficient algorithms underneath it all. For me BGL is the textbook example of template overuse. Boost Graph is a great idea that fails by missing the point entirely: code is worthless if it can't be read, maintained, extended, or debugged.
There are alternatives to LEDA/Boost implementation. You could do worse than to investigate this similar-sounding posting:
https://stackoverflow.com/questions/510758/can-you-suggest-a-good-book-on-graphs-and-graph-algorithms (link is no longer valid)
The Boost is continually refactored so parts of it get moved into the standard, after which vendor's continue to optimize it for the target systems they support. On rare usage scenarios, using inheritance the developer may tweak some part for specific case.
If the work is confined to C++, then as the parts of Boost are aiming to get integrated into the standard, it does have these advantages. There maybe specific reason to use proprietary LEDA, such as being guaranteed error free by testing, then as the decision maker only you have to observe such criteria.
Boost graph algorithms can be made to work on LEDA and even stanford graph base graphs, but not the other way around.
http://www.boost.org/doc/libs/1_46_1/libs/graph/doc/leda_conversion.html
I would suggest to use boost graph, it is the state of the art.
mike

What counts towards demo scene size restrictions? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
So I wanna make a small (64k) demo--nothing super impressive, just for the coding experience. I've been wondering, what exactly counts towards a byte count? For example, I could embed Lua as a scripting language once I have a simple demo engine running, but since python comes on pretty much every *nix computer, can I use its interpreter at no cost?
Some might argue that it's not in the spirit of the demo scene, but I do think it counts as milking every last byte. Plus, Lua is 50k and I don't want to write a smaller, custom interpreter (which will be buggy).
The general spirit of the thing is that, as a piece of art, any random person ought to be able to download and view your demo. So it's the base default install of the platform that you're concerned with. This is why most of the best demos target Windows; DirectX is universally available, and the ability to use those libraries dramatically reduces the amount of code in the demo executable.
The same is true of OSX, but other Linux/UNIX variants are really problematic, because there's often no such thing as a standard install. And good luck as far as drivers for hardware-accelerated 3D go.
That said, it's really up to the individual group or competition that you plan to submit your demo to. You'd be best off contacting one of the members or organizers to see what their rules are. If you're just doing this for yourself, to post on the web, then you get to decide what seems fair. The more restrictions you place on yourself, the more impressive the demo ends up being.
If you're really serious about a 64k demo, though, you'll use assembly, not an interpreted language. You only benefit from something like Python if you can get short text to expand into a very complicated function in the stdlib. Most of the places where that matters for a demo are related to graphics and sound, and Python's stdlib doesn't provide much (nor should it) in either regard.

C++/Objective-C - how to analyse a big project (Unix way)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Normally, to analyse big C projects, I prefer grep/GNU command line tools, lint, simple Python scripts. Saying "to analyse" C project I mean to collect code statistics, to understand project's structure, its data structures and flow of execution - what function calls what, entry points in different modules, static members, threads, etc. But it works not so good with an object-oriented code.
Whenever I have a big C++ (or Objective-C) project, containing large number of source files and several directories, I would like to see it's class diagram, data fields, methods, messages, instances, etc.
I am looking for a most Unix way solution. Can you help me?
Doxygen is the closest i could find, when i was searching last time. It is not unix way, but it is available free for linux/windows/mac. It generated descent graphs for me. Hope it helps.
http://www.doxygen.nl/
http://en.wikipedia.org/wiki/Doxygen
With message passing and dynamic dispatch going around you are pretty much screwed. It doesn't even depend on language, message is as well used in C++ world. There is no tool that can analyze the code and tell what the application flow will look like. In those cases, the whole data/execution flow may depend on configuration files, how you hook up producers/consumers together etc.. and change significantly. If you are lucky, there would be some high-level documentation, maybe with pictures and description of overall ideas etc. Otherwise, the only option here is to run it under debugger for any given configuration and see what is going on in there, step by step. Isn't that a true UNIX way?
Your request is for a variety of views, some text-based, some structure based.
You might consider Understand for C++ which does a mixture of these. Don't know if it does ObjectiveC.
Our Source Code Search Engine (SCSE) is rather more limited, but provides a much faster way to "grep" than grep does. For large code bases this matters. It will handle multiple languages and dialects. We don't have an Objective C dialect, but I think our C or C++ front ends would actually work pretty well for this, since Objective C uses pretty much the same lexical syntax.

C++ Adobe source libraries impressions? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I just stumbled upon Adobe source libraries, ASL. It is set of templates and functions similar to boost, under MIT license.
Some of the utilities in the library I found quite useful and now I consider using it.
the library seems pretty straightforward, however.
Have you used ASL yourself? if so, what were your impressions? do you recommend it?
does it work well with a range of compilers and platforms e.g. IBM C++, ICC, g++?
have you encountered quirks/unexpected things?
thanks
ASL uses Boost heavily, so it's not such similar to Boost, as (in some cases) a relatively thin wrapper around Boost.
The "big" pieces of ASL are Adam and Eve. Most of the rest appears to be (and if memory serves, really is) little more than support for those.
ASL hasn't been updated in a while, and if I'm not mistaken some of what it provides in wrappers around Boost has now been incorporated into the Boost libraries themselves (most Boost authors have been aware of ASL at least since they featured in Sean Parent's keynote presentation at Boostcon 1).
My own experience with them has been somewhat mixed. At one time, I used a couple of their Boost-wrapper classes a bit, but IIRC, within the next release or two, the bits I cared about were available in Boost without any wrappers (though offhand, I don't remember exactly what those pieces were...)
Adam and Eve are kind of cool for playing around with different UI layouts and such -- but I've never used them for a finished version of a program. At least to me, it appears that they're useful primarily with a relatively complex UI. My impression was that if you find them very useful, your UI probably needs work. If you need Adam and Eve to help understand what's going on, chances are your users can't figure out either.
OTOH, there are probably at least a few cases where a dialog is clear to a user, but the code much less so to a developer. If you do a lot of disabling some controls until values have been entered in other controls, and such, it can make it a lot easier to ensure controls are disabled until all values they depend upon have been entered.
As already noted, thew whole point of ASL is Adam and Eve, the rest are just handy tools.
Adam & Eve work together to describe UI with auto-layout in a cross-platform way.
If this is not what you need, then you should probably not spend much time on ASL.
Eve has the typical collection of vertical/horizontal/other containers for auto-layout.
And scripting with Adam allows you to achieve things difficult (if not impossible) to achieve just with layout containers (things like keeping separate groups of controls the same size, for instance).
True, you implement some of the rules in your C++ code. But it makes sense to store the UI description rules related to UI behavior in the same place where you store the UI to begin with.

Does there exist a "wiki" for editing doxygen comments? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm working on a fairly big open source RTS game engine (Spring). I recently added a bunch of new C++ functions callable by Lua, and am wondering how to best document them, and at the same time also stimulate people to write/update documentation for a lot of existing Lua call-outs.
So I figured it may be nice if I could write the documentation initially as doxygen comments near the C++ functions - this is easy because the function body obviously defines exactly what the function does. However, I would like the documentation to be improved by game developers using the engine, who generally have little understanding of git (the VCS we use) or C++.
Hence, it would be ideal if there was a way to automatically generate apidocs from the C++ file, but also to have a wiki-like web interface to allow a much wider audience to update the comments, add examples, etc.
So I'm wondering, does there exist a web tool which integrates doxygen style formatting, wiki-like editing for those comments (preferably without allowing editing any other parts of the source file) and git? (to commit the comments changed through the web interface to a special branch)
We developers could then merge this branch every now and then to add the improvements to the master branch, and at the same time any improvements by developers to the documentation would end up on this web tool with just a merge of the master branch into this special branch.
I haven't found anything yet, doubt something this specific exists yet, so any suggestions are welcome!
This is a very cool idea indeed, and a couple of years ago I also had a very strong need for something like that. Unfortunately, at least back then, I wasn't able to find something like that. Doing a quick search on sourceforge and freshmeat also doesn't bring up anything related today.
But I agree that such a wiki frontend to user-contributed documentation would be very useful, I know for a fact that something like this was recently being discussed also within the Lua community (see this).
So, maybe we can determine the requirements in order to come up with a basic working draft/prototype?
Hopefully, this would get us going to initiate such a project with a minimum set of features and then simply release it into the wild as an open source project (e.g. on sourceforge), so that other users can contribute to it.
Ideally, one could use unified patches to apply changes that were contributed in such a fashion. Also, it would probably make sense to restrict modifications only to adding/editing comments, instead of allowing arbitrary modifications of text, this could probably be implemented by using a simple regex.
Maybe, one could implement something like that by modifying an existing (established) wiki software such as mediawiki. Or preferably something that's already using git as a backend for storage purposes. Then, one would mainly need to cater for those Doxygen-style comments, and provide a simple interface on top of it.
Thinking about it some more, DoxyGen itself already provides support for generating HTML documentation, so from that perspective it might actually be interesting to see, how DoxyGen could possibly be extended, so that it is well integrated with such a scripted backend that allows for easy customization of embedded source code documentation.
This would probably mainly boil down to providing a standalone script with doxygen (e.g. in python, php or perl) and then optionally embed forms in the automatically created HTML documentation, so that documentation fixes/augmentations can be sent to the corresponding script via a browser, which in turn would write any modifications back to a corresponding branch.
In the long term, it would be cool if such a script would support different types of backends (CVS, SVN or git), or at least be implemented generically enough, so that it is easily extendible.
So, if we can come up with a good design, it might even be possible that such a modification would be generally accepted as a contribution to doxygen itself, which would also give the whole thing much more exposure and momentum.
Even if the idea doesn't directly materialize into a real project, it would be interesting to see how many other users actually like the idea, so that it could possibly be mentioned in the doxygen issue tracker (https://github.com/doxygen/doxygen/issues/new).
EDIT: You may also want to check out this article titled "Documentation, Git and MediaWiki".