Wrapping a C code program into R: alternatives to Rcpp? [closed] - mysql

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 have a package written entirely in C, which creates a mySQL table and executes queries.
Given that R is written in C, are there alternatives to using Rcpp to write wrappers around this C code to construct an R package? Or is Rcpp the best method available (or only method available) to do this?

For backward compatibility to S lang, you may find "useful" learn something about:
.C()
.Call()
Rcpp is nowadays the most modern, performant and closest option to reuse your existing code.

There is no need for anything to call C code from R, and this is documented in Writing R Extensions. So if you want to avoid using Rcpp for some reason (and I can think of a few), you can just use the R C api. It typically requires more work and more care.
There are many packages on CRAN that use C or C++ without Rcpp, purrr comes to mind as an example.

Related

DO-WHILE loop in Cython [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
Does anyone know how to represent the do..while in Cython?
Ex:
http://www.tutorialspoint.com/cprogramming/c_do_while_loop.htm
Firstly, and most importantly, Cython supports for and while loops as found in Python without modification.
Secondly, Python does not have a do-while implementation. Hence, given the above, you can not do-while in Cython.
You can, however, achieve the same result, as expressed in this excellent answer.
Finally, remember that there is magic in getting the most out of Cython. For example, if you are looping over a range call, you will probably want to type the range argument as a C int. If you are looping over a Python container, statically typing the loop indexing variable may well introduce additional overhead. Kurt W Smith's excellent Cython is a worthwhile read if you are really going to get under the hood.

Is there a way to measure duplicate code? [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 2 years ago.
Improve this question
I'm looking for a code duplication tool that is language agnostic. It's easy to find language specific code duplication tools (for Java, C, PHP, ...), but I'd like to run some code duplication analysis on a templates in a custom syntax.
I don't care about advanced parsing of the syntax, just straight line based raw string comparison is fine. Whitespace insensitive matching would be a plus, but not required. (It's not that hard to normalize/eliminate whitespace myself.)
Does anybody know a tool that can be (mis)used for something like this?
Have a look Simian, you can use it for Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy source code and even plain text files.
Also, a similar question here.
You can also take a look at Sonar http://www.sonarsource.org/
Take a look at this one https://siderlabs.com/
At this moment it support C, C++, Cuda and others Python, PHP, Java, Javascript coming soon

Open source XQuery projects [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
Do you know about any open source projects written in XQuery? The larger the better. I want to improve my XQuery skills by reading existing code.
xprocxq is/was an implementation of XProc in XQuery, and is the only significant XQuery open source project I know of.
For a less conventional example of XQuery, I would recommend a look at the XQSharp raytracer (caveat: I am a developer for XQSharp).
GIT Hub
Pomengrante ( XQuery deployment project )
MarkLogic CQ ( Browser Based Xquery Query tool )
XQuery-OAuth
Google code
XQMVC -- simple MVC framework for XQuery
http://developer.marklogic.com/
XQRunner
XQDebug ( browser based step by step debugging )
Semantic
and so on.
This is a self answer:
Google Search http://www.google.com/codesearch "for file:.xq$" gives about 1000 matches. Most of them small scripts.
We host and/or link to a good number of XQuery open source projects at http://developer.marklogic.com/code. There is plenty of code to read there for you.
See the XQuery Wikibook for a number of documented example XQuery applications

Looking for a particular Common Lisp implementation [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 8 years ago.
Improve this question
I'm looking for a Common Lisp implementation I ran across once, sometime in the past year or two. I only remember a few things, and I don't know how to search for it based on these facts, so maybe somebody here can help.
it was open-source, but wasn't one of the big ones (SBCL, CMUCL, MCL, etc.)
it was likely incomplete; it looked almost more like an exercise in writing the simplest possible self-hosted Common Lisp
the main webpage was plain black-on-white, and had 2 columns, where the left column was a link to the source file for a particular area of functionality (loop, format, clos, etc.), and the right column was a link to the tests for that functionality
the source files themselves were pretty-printed for the web, with syntax highlighting that looked kind of like an old Redhat Emacs default config: slate-gray background, etc.
Where can I find this Lisp implementation?
Thanks!
I don't know which one you are referring too, but you can find a list of Common Lisp Implementations here.
Is there any particular reason why this Lisp is grabbing your attention now?
Its hard to pin down, but open-source + minimalistic + incomplete sounds vaugely similar to Paul Graham's Arc programming language.

Are there any open source projects in D? [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
I remember looking at D about 2 years ago, and it looked nice, was actually faster than C for some of the typical language benchmarks, and in general seemed ok, but I didn't find any real projects written in D back then, so I just left as a I came.
Now that a few years have passed I was wondering if there have been any projects done in D, hopefully open source to look at the code and see how its going, or is D dead?
Check the projects in DSource.
Give a look also to the DLinks page.
On SourceForge, if you apply the filter "Require", "Programming language", "D", you get 113 hits, so it would seem so.
I've always been a bit worried about developing in D since I know little about this Digital Mars mob. Does D have a future outside of just piquing the interest of some nerds (using that term in a non-disparaging way)?
If you like games, check out Kento Cho at ABA Games (anything under Windows). His Windows games are written in D and demonstrate D with SDL.
His code is very, very nice to read. Highly recommended.
look also at code.google.com for some more D projects.