node.js powered by C libxml & libxslt - c

Unfortunately I'm neither able to write C-code nor to implement available (and proven) libraries like the common libxml and libxslt used by PHP. I wonder if it is so hart to implement them in node.js? As far as I know C libraries could (easily) be implemented for a usage in node.js.
I'm looking forward to see something like this http://www.w3schools.com/xsl/xsl_client.asp on the server's JS.
I'd love to contribute and migrate / implement these two libs into node. Does anyone know how to do this or is there a quick link explaining this? Remember I've never worked with C, but I'm a PHP-, Java- and JS-developer for about 8 years now.
Maybe someone wants to join me and realize this.

If you take a look at the node_xslt source code. You can see it's already interacting with libxslt.
So either use that module, or draw inspiration from it and improve it.
For future reference I used the npm search registry and searched for "xslt"

Related

Use commitizen on a code-agnostic project

I would like to start incorporating commitizen in my repository; however, implementation seems to revolve around adding a js dependency on the repository, and calling it independently (and enforcing it with a hook).
My project currently is python, but that's besides the point - it seems to me that commitizen should be able to be orthogonal to the underlying repository.
However, I don't understand how would that be possible. Maybe the instructions don't exist, or I have not yet separated them from the "main usage path".
Good question #Stavros. I have recently been playing with it and started to have the same question. I tried to find an answer from its documentation https://commitizen-tools.github.io/commitizen/ but could not find it. Based on my testing, it seems to me that it only supports Python projects. However by the way it works, it should be able to support all Git projects.

Tizen Docs give C headers but not Lib names?

Trying to implement some Unity3D C# plugin code but am finding the Tizen docs to be rather lacking.
I need to know what Lib names are used for specific headers. Such as the message box api: https://developer.tizen.org/dev-guide/2.3.0/org.tizen.native.mobile.apireference/group__CAPI__MESSAGING__MESSAGES__MODULE.html#ga32013c0d16b46a60be3f837c6474e4be
It tells me the header required but not the lib its used in. BlackBerry, MS and Apple all list this in there docs and is part of normal doc gen. Why Tizen doesn't give you this is beyond me. Is there an easy quick way to find this info? Thought someone might know.
Here is the location to lib: C:\tizen-sdk\platforms\mobile-2.3\rootstraps\mobile-2.3-device.core
Would be nice to know what lib goes with what header.
Looks like it might be: libcapi-messaging-messages.so
Yes, someone seems to think it's a good idea for those libraries to be opaque to the reader, not sure why. The set of "open source" libraries, including the EFL ones, are normally identified by name, but the Tizen-specific part is not. Will try to find out the motivation. It has caused me some problems as well (yes I know in the stackoverflow parlance this is not an "answer")

Automatic C/C++ mock generation for XCTest - CMock/OCMock?

I want to develop using C & C++ using XCode 5. I particularly like the integration of XCTest and Xcode and the CI capability that you get by using OSX Server. I want to have a mocking framework, and ideally one where the mocks are automatically generated, as this seems most likely to ensure that the mocks follow a standard format (and themselves are not going to have errors).
Q1. I can't see how OCMock can work for mocking C & C++: is this possible?
Q2. CMock seems to be great, but it relies on Unity. Is it possible to integrate CMock into XCTest?
Q3. Does anyone have any other suggestions please?
Q1. OCMock can only mock methods on Objective-C classes, objects, and protocols.
Q2. What is Unity? (And I'm asking this as the maintainer of OCMock...)
Q3. There are several options for C and C++, I don't have much experience, never mind a strong recommendation.

Template based C / C++ code generation

Any suggestion for template base code generator for C / C++ specifically to generate repetitive code generation? (Not UML / MATLAB model based or other advanced stuff). For a newbie in this field any good generic tutorial (not tool based)?
I came across GNU Autogen looks good but looks like it needs a steep learning curve. I would prefer some plug-in for eclipse like IDE, easy to use and most importantly good tutorials.
The basic concept of code generation is simple enough - and people's needs are varied enough - that there are quite a few options out there.
Boost.Preprocessor is a library of functions built on top of the standard C / C++ preprocessor that makes it much easier to use the preprocessor to do code generation. It's not as flexible as other options, and figuring out preprocessor errors can be tricky, but the fact that it uses only standard language features greatly simplifies using it and integrating it into your builds.
If you know Python, there's Cog.
Some of Google's projects use Pump.
There are many general-purpose templating solutions (Python's Genshi, eRuby, etc.). These are often designed for generating HTML and XML but also work for code.
It's also easy enough to hack something together in the scripting language of your choice.
Without knowing more about what your needs are and what tools you're comfortable with, I can't give a more specific recommendation.
I'm not familiar with anything that provides an Eclipse plugin.
If you know Python, then Cog could be considered as light-weight solution: http://www.python.org/about/success/cog/
Look at my answer for a similar question for Java classes using M2T-JET, an eclipse based, lightweight templating generator. JET is language agnostic and you can see from the example that it's fairly easy to use.
I appreciate using Lua for this task, with something like Templet or one of another myriad of Lua-based preprocessors. The benefit of using Lua over something like Python is that you can, if necessary, include the source code to your template processor and a basic Lua installation along with whatever it is you are shipping. You may then add the compilation of Lua and subsequent template files to the build process as usual.
I would advise not using Python-based solutions for one reason: juggling various pythons to satisfy every developer's use of a completely different yet incompatible version is annoying. If you choose to use a language which you can't embed in your trees, you'll want to make sure pre-computed versions are available.
Late to the party but I would recommend Codeworker Its the only tool I found that does everything the above tools do and more. It has the Python Cog like functionality for embedded generation, it has the template based generation like Templet or Pump. And it has the rather useful feature of protected areas so you can customise your code as needed and re-generate.
I have used it for generating all the boiler plate c++ code as well as configuration for projects like SQL, config, javascript etc.

Is there a repository of C libraries? [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Why there is not a comprehensive c archive network?
Like Python has a Cheeseshop and Perl has CPAN?
Google results have a lot of C++ results and I am looking for purely C libraries.
PS: Looking for *nix libraries
Yep. SourceForge, Codeplex, Github, and Google. Also, your distro's packages, if you are on Linux.
Not really, no. Google is really your best friend. Since C doesn't have a standardized body running the language in the same way as, say, Python, there is no central place for packages and marketing material.
Your best bet really is your local Linux distribution - Linux applications generally make heavy use of many layers of libraries, which you can use as a reference.
Well, there's CCAN (although I'm not sure how good it is - never really used it).

Resources