I'm trying (as a self-learning exercise) to create a Clojure macro that will generate code to apply a function to a sequence of integers and sum the result, e.g.
f(0) + f(1) + f(2) + f(3)
This is my attempt:
(defmacro testsum [func n]
`(fn [x#] (+ ~@( map (fn [i] `(~func x#)) (range n)))))
However something seems to go wrong wit...
Possible Duplicate:
Learning to write a compiler
I want to write a Compiler for C. This is a Project for my College i am doing as per my University. I am an intermediate programmer in C, with understanding of Data Structures.
Now i know a Compiler has the following parts:
1. Lexer
2. Parser
3. Intermediate Code Generator
4. O...
What are the performance issues associated with generating 100's of dynamic methods in Ruby?
I've been interested in using the Ruby Preferences Gem and noticed that it generates a bunch of helper methods for each preference you set.
For instance:
class User < ActiveRecord::Base
preference :hot_salsa
end
...generates something like...
I have CodeSmith and MyGeneration tools. I have SPs in SQL server. I want generate VB.Net code for SPs (not for Tables). Which templates will support for this? Please share if you know any templates that generates VB.net code from SP?.
...
I'm in middle of rewriting my assembler. While at it I'm curious about implementing disassembly as well. I want to make it simple and compact, and there's concepts I can exploit while doing so.
It is possible to determine rest of the x86 instruction encoding from opcode (maybe prefix bytes are required too, a bit). I know many people ha...
The team I'm on is currently writing code in TSQL to generate TSQL code that will be saved as scripts and later run. We're having a little difficulty in separating our unit tests between testing the code generator parts and testing the actual code that they generate.
I've read through another similar question, but I was hoping to get so...
I have a javascript based library and would like to generate some C# classes for it. Unfortunately, I do not know T4 at all, so I may not have included information you need to answer this question. please comment, and I will edit as needed.
Thanks!
...
Is anybody out there using Project Lombok for a large scale production system? How does it influence your compile process (i.e. does it do two-pass compilation, slow it down, make it more fragile)?
...
Can somebody suggest me a template engine (preferably written in Java) that could generate any text that I like from given XML input?
...
Hello,
I am new to the code generation tools and I would like to know how does a tool like LLBGen Pro compares with the Entity Framework?
On top of that my boos is really looking into a tool called CodeOnTime http://codeontime.com/default.aspx because he likes their good UI support.
I am asking here because I really want an unbiased o...
Hi,
I am using Eclipse for C++ development on windows. I have also written a code generator that take an xml file and produces several C++ files. The project I am working on is currently setup to use the internal builder. What I would like to do is to run the code generator as part of the build process.
My problem is that I haven't ...
I am looking for tool which will generate the basic stored procedure structure (CRUD operations) for the given table, Is there any tool for the same?
...
The problem is that I need to create in runtime a class like this:
public class Foo {
@Bar int value0;
@Bar int value1;
@Bar int value2;
....
}
with number of fields being decided at runtime.
I was looking at Javassist, and there you can create a new class, and add fields to it, but I haven't found a way to annotate those field...
What is the best way to implement an interface that combines some instances of the same interface in various specified ways? I need to do this for multiple interfaces and I want to minimize the boilerplate and still achieve good efficiency, because I need this for a critical production system.
Here is a sketch of the problem.
Abstractl...
Hello, i need some help with c# and nhibernate.
I'm working on a project that requires the entity classes to be generated from hbm files at runtime.
I get the mapping files from a service, and then need to generate the classes dynamicaly and configure nhibernate to use them.
The problem is that i'm new to nhibernate and not much of a pr...
Dear all,
I used to use OpenC++ (http://opencxx.sourceforge.net/opencxx/html/overview.html) to perform code generation like:
Source:
class MyKeyword A {
public:
void myMethod(inarg double x, inarg const std::vector<int>& y, outarg double& z);
};
Generated:
class A {
public:
void myMethod(const string& x, double& y);
...
Hi,
I'd want to start using a new system for this project and I was looking for some tools to achieve my goals. Those would be:
Data represented under only one form ( only the database schema, or the database itself or whatever)
Possibility to easily generate and update other data representations (ex: SQL code & forms from DB schema)
...
Possible Duplicate:
Code generator (.net)
I'm looking to do some side projects but don't have the time to hand code everything. What code generators has anyone used? Currently, I am looking at Iron Speed, but can't really afford to buy it. So I'm looking for a product under $300.00.
Any suggestions?
Jim
...
Where do I get IVsSingleFileGenerator?
The docs say to look for "Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)", but I can't seem to find it.
...
Is it possible to take an object file (like a macintosh dylib or a linux .so file), and automatically generate a C .h file?
...