codemill-spec Mailing List for Code Mill
Status: Planning
Brought to you by:
richard_kolb
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David S. <xe...@ex...> - 2001-03-11 07:08:46
|
Inspired by Richards recent efforts I have released a codemill prototype of my own. The main thing demonstrated by my prototype is the template/style system. It is capable of assembling entire class filled with members and variable (although most of that isn't implemented yet). This very is only REALLY capable of creating a class with a constructor and destructor but is still pretty real-world-useful (I have already created templates/styles for my other projects and started using it!!). Unfortunately, I do not have the access required to put it up on sourceforge, but that should be remedied soon. Until then, it is available via cvs using: cvs -z3 -d:pserver:ano...@cv...:/cvsroot/codemill login password: <just press enter at the password prompt> cvs -z3 -d:pserver:ano...@cv...:/cvsroot/codemill co codemill-david To wet your appetite, here is the README file included with my source: codemill-david Prototype 1 (codemill version 0.0.1) This is the first prototype of the codemill-david branch. Although it is a prototype, it is fairly stable in the features that is does provide. However, its feature set is very limited: - C++ Source/Header file creation based on provided templates. This prototype comes with two sets of templates: simple and complex. You can specify which on the command line with "-t <template_name>". Template file are very simple. They are text-based files with a series of "variables" that codemill expands. The "variables" that can appear in a template file are language specific. Here is a list of all of the C++ ones: (see the included templates for examples) @CLASS@ = the name of the class to create @AUTHOR@ = the real name of the current user @HEADER_DEF@ = a version of the header file name, formatted nicely for use in a "header-protector" define @HEADER_INCLUDES@ = the include statements required to solve the dependancies of the class. NOT IMPLEMENTED! @HEADER_BEGIN@ = the place codemill inserts all of its class declaration data @SOURCE_INCLUDES@ = just includes the header file @SOURCE_BEGIN@ = the place codemill inserts all of its source file data - C++ Class creation based on coding style files. This prototype comes with two styles: loose and tight. You can specify which you would like on the command line with "-s <style_name>". Style files look fairly complex, but are essentially just collections of templates seperated by a LaTeX-like formatting language. (See the included style files for examples) - Extendable search paths. By using a "-C <new-search-path>" option, can add search paths to use when trying to load templates and styles. Command line interface: -l, --language sets the output language (only "cpp" implement so far) -f, --source sets the source file -h, --header sets the header file -c, --class sets the class (currently only used for creation) -s, --style sets the coding style to use -t, --template sets the file templates to use -C, --add-search-dir adds a directory to the list of search dirs Examples: codemill -l cpp -f test.cpp -h test.h -c NewTestClass codemill -l cpp -f test.cpp -h test.h -c SimpleClass -t simple -s loose codemill -l cpp -f test.cpp -h test.h -c CustomClass -C ~/codemill-files -t MyProject -s MyProject -- David Snopek /-- libksd -- | The C++ Cross-Platform Game Framework | Only want to write it once?? | http://libksd.sourceforge.net \------------ |
From: Richard <rk...@sw...> - 2001-02-21 13:42:54
|
Hi All, Sorry there has been a big delay in the progress of code mill, I had to go to england for a while , which threw a spanner in the works with the codemill prototype, Somebody (I forget who) asked if I could cvs up my latest source, so I will sometime this weekend, ( Just don't laugh at the code ) Development on the prototype so far, c++ : Creates class and header, java : creates class All of these come from templates, This substitutes things like classname, author etc... The command line interface is not done at all at the moment, but I will try get something going before I put it up. I'm worried about the portability of the getopt stuff, so I will try find some portable getopt like system. (must run on Linux , BSD , other unixes, Win32 ,etc) Maybe somebody has experence on this kind of thing? ---- I also have access to a AIX PPC box this week, so I will try to compile it on there, (just for fun) Cheers, Richard. |
From: Richard K. <rk...@sw...> - 2000-12-15 08:06:14
|
John Lindal wrote: > > I think it is important to keep the license template and the code > > template separate. Since someone could have the GNU coding style with > > the BSD license etc... ( I guess this is what you meant ) > > Yes, but I doubt most people will need more than one or two combinations > out of all the possible permutations. Thus, it seems easier to maintain a > couple of template files (each one complete in itself for a particular type > of project), rather than having to specify a long list of template files > for different purposes (code, license, header, footer, etc.) Ok, some general temples can be set, but the power to to funny options must still be there. I must also say, I think by default no code, license, header, footer parameters should be needed for codemill to do it's work, and none should be added , or worse guessed. Thanks, Richard. |
From: Richard K. <rk...@sw...> - 2000-12-15 07:59:20
|
David Snopek wrote: > Richard Kolb wrote: > > > if only one set variable is needed then it's not to bad, > > I don't want have unique / different variables is each template > > I think there may have been some misunderstanding on where the values for the > variables are coming from. When I was using variables in my example "initial > file" they would all be expanded by CodeMill and not passed through arguments. > There were also only four variables: YEAR, INCLUDES, FILE_BASE and START. All of > these variables would be expanded through direct find/replace operation (it could > be done with ed). I don't understand how that causes unique/different variables > in each "initial file" (you call it a template). Ok , I understand now, ( Your probably saying at last :-) ) if codemill expands these , then that will be very easy to implement, > > (P.S. I may have been replying directly to the author of particular messages > instead of to the whole mailing list. If you have no idea to what I am reffering > to in the above letter, please let me know and I will send my last letter to the > list) > I don't know why this mailing list does this, maybe it's a setting in mail man. Thanks, Richard. |
From: John L. <ja...@al...> - 2000-12-15 03:10:56
|
> I think it is important to keep the license template and the code > template separate. Since someone could have the GNU coding style with > the BSD license etc... ( I guess this is what you meant ) Yes, but I doubt most people will need more than one or two combinations out of all the possible permutations. Thus, it seems easier to maintain a couple of template files (each one complete in itself for a particular type of project), rather than having to specify a long list of template files for different purposes (code, license, header, footer, etc.) John |
From: David S. <xe...@ex...> - 2000-12-14 23:27:50
|
Richard Kolb wrote: > if only one set variable is needed then it's not to bad, > I don't want have unique / different variables is each template I think there may have been some misunderstanding on where the values for the variables are coming from. When I was using variables in my example "initial file" they would all be expanded by CodeMill and not passed through arguments. There were also only four variables: YEAR, INCLUDES, FILE_BASE and START. All of these variables would be expanded through direct find/replace operation (it could be done with ed). I don't understand how that causes unique/different variables in each "initial file" (you call it a template). -- David Snopek (P.S. I may have been replying directly to the author of particular messages instead of to the whole mailing list. If you have no idea to what I am reffering to in the above letter, please let me know and I will send my last letter to the list) |
From: Richard K. <rk...@sw...> - 2000-12-14 07:53:57
|
Hi All, John Lindal wrote: > >> > 6) The generated code must be under 'no license'. > >> > >> I agree with what you mean by this statement, but it made me think of > >> something. Most of the code I write is under LGPL and the GPL. For > >> every new bloody file I create, I have to copy/paste the info about the > >> license into the top of the file. I also put a little header with a > >> description of the file and some macros that CVS expands. It would be > >> really helpfull if I could some how point to a file containing the > >> software license/header info and CodeMill could copy that into the > >> created file. I can;t think of an intuitive way to work this into the > >> syntax... > > > > This is a very good idea, We could add a -L option to codemill that would > > add a license template at the top of the generated code, > > Why not just make this part of the template file that has already been > added to the spec? One would specify what should be in the header of the > source file, the header of the header file, same for the footers, and then > the format of the different code snippets that Code Mill creates. One > would probably only need to have one variable, the date, since names, etc. > would be entered by hand (once) into each peronalized template files. Yes , but I think it is important to keep the license template and the code template separate. Since someone could have the GNU coding style with the BSD license etc... ( I guess this is what you meant ) Then people can add there own headers/footers in with codemill. These can have CVS macros/ emacs settings etc. in. if only one set variable is needed then it's not to bad, I don't want have unique / different variables is each template I would also like to propose a system of finding templates. codemill would first search the current directory ( or a specified one ) Then codemill would go into it's own template directory like /usr/local/codemill/templates/cplusplus/ etc... Maybe if a verbose mode is set it will tell where it got it's templates etc... Thanks, Richard. |
From: Richard K. <rk...@sw...> - 2000-12-14 07:06:50
|
Hi All, The , does not work in 2.3.x kernels bug etc.. John Lindal wrote: > > When it comes to parsing , I think using ctags would be a big problem > > since of those nasty bugs which stop it from working. > > Which bugs? > > John |
From: John L. <ja...@al...> - 2000-12-14 02:47:34
|
>> > 6) The generated code must be under 'no license'. >> >> I agree with what you mean by this statement, but it made me think of >> something. Most of the code I write is under LGPL and the GPL. For >> every new bloody file I create, I have to copy/paste the info about the >> license into the top of the file. I also put a little header with a >> description of the file and some macros that CVS expands. It would be >> really helpfull if I could some how point to a file containing the >> software license/header info and CodeMill could copy that into the >> created file. I can;t think of an intuitive way to work this into the >> syntax... > > This is a very good idea, We could add a -L option to codemill that would > add a license template at the top of the generated code, Why not just make this part of the template file that has already been added to the spec? One would specify what should be in the header of the source file, the header of the header file, same for the footers, and then the format of the different code snippets that Code Mill creates. One would probably only need to have one variable, the date, since names, etc. would be entered by hand (once) into each peronalized template files. John |
From: Richard K. <rk...@sw...> - 2000-12-12 07:54:47
|
Oops I replied to David directly.... |
From: Richard K. <rk...@sw...> - 2000-12-11 14:15:42
|
Hi All, My major argument on this topic, is that I've had experience with a project called auto project. This basically generated code and did autoconf and automake stuff. Anyway is did some not nice things like adding the GPL license without asking, and starts putting comments in my code, etc. Just say , I deleted it very quickly and I'm sure many people did the same. ( I personally hate programs that try to hold my hand) I think the best way of doing this is to have a document header file where people can put in what they please. therefore someone could have a header_file.text document in there directory containing -// Copy Right 2001 Mr Me this is a cool program // Disclaimer : Please don't sue me ! and a license (this one is custom) beer.text -// The Beer license , I love Beer :-) Then someone could type codemill -c NewClass -b BaseClass -L beer.text -H header_file.text Where L is the license, and H is the header of the file defined by Mr Me. By default no license or header should be added Although I understand where you are comeing with this, ( I hate typing things twise or copy pasting every where) I think this is overcomplicating things a bit. Thanks, Richard. Richard Kolb wrote: > ------------------------------------------------------------------------ > > Subject: Re: [Codemill-spec] Re: Code Mill Spec > Date: Mon, 11 Dec 2000 07:14:39 -0600 > From: David Snopek <xe...@ex...> > Organization: KewL STuFf Inc. > To: Richard Kolb <rk...@sw...> > References: <3A2...@sw...> <3A3...@ex...> <3A3...@sw...> <3A3...@ex...> <3A3...@sw...> > > Richard Kolb wrote: > > > I don't think we should add things like copy right etc. to the top of source > > files, > > This would start complicating things , > > and convert a swiss army knife into a pile of spaghetti, so to speak, > > Well, you can't really have a license without a copyright, since the license is the > terms by which the source can be copied. But adding a copyright is just a matter of > simple replacing words, we could even use the name the user has registered with > there login as the author name. Generally source headers go like this: > > // Project Name - Our happy little project > // Copyright <year created> <Origanal authors name> > // > // <License> > // > // <Disclaimer: ... NOT EVEN THE IMPLIED WARRENTY OF USABILITY ...> > // > > If doing this worries you so much, we could just add support for an initial file > that has a few variables that are expanded. I could then put all my header stuff in > a file (or two files really because I do *.h's different than *.cpp's). For > example, mine would look something like this: > > //--------------------------------------------------------------------------- > // libksd -- KewL STuFf DirectMedium > // Copyright @YEAR@ David Snopek > // > // This library is free software; you can redistribute it and/or > // modify it under the terms of the GNU Library General Public > // License as published by the Free Software Foundation; either > // version 2 of the License, or (at your option) any later version. > // > // This library is distributed in the hope that it will be useful, > // but WITHOUT ANY WARRANTY; without even the implied warranty of > // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > // Library General Public License for more details. > // > // You should have received a copy of the GNU Library General Public > // License along with this library; if not, write to the > // Free Software Foundation, Inc., 59 Temple Place - Suite 330, > // Boston, MA 02111-1307, SA. > // > //--------------------------------------------------------------------------- > // File: $RCSfile: Surface.h,v $ > // > // Author: David Snopek > // Revised by: > // Version: $Revision: 1.9 $ > // > // Objects: @CLASSES@ > // > // Purpose: @DESCRIPTION@ > // > // Checked-in by: $Author: xevol $ > // $Date: 2000/11/18 05:24:36 $ > //--------------------------------------------------------------------------- > #ifndef _KSD_@FILE_BASE@H_ > #define _KSD_@FILE_BASE@H_ > //--------------------------------------------------------------------------- > @INCLUDES@ > //--------------------------------------------------------------------------- > #ifdef __GNUG__ > #pragma interface > #endif > //--------------------------------------------------------------------------- > namespace ksd { > //--------------------------------------------------------------------------- > @START@ > //--------------------------------------------------------------------------- > }; // namespace ksd > //--------------------------------------------------------------------------- > #endif > > The two variables that affect code mill the most are the @INCLUDES@ and @START@. > > This example would only be for one of my projects. For different projects or ones > where I am only contributing I could have different initial files with different > licenses and ways of setting up a file. > > I don;t know about syntax for this. There just needs to be a way to specify both > the header and source template at the same time. Maybe they could be named like: > "temp_libksd.h" and "temp_libksd.cpp" and we could just specify "-S libksd". (the > 'S' is arbitrary) > > -- David Snopek |
From: Richard K. <rk...@sw...> - 2000-12-11 13:33:30
|
From: Richard K. <rk...@sw...> - 2000-12-11 07:18:13
|
Hi All, David Snopek wrote: > Richard Kolb wrote: > > > 6) The generated code must be under 'no license'. > > I agree with what you mean by this statement, but it made me think of > something. Most of the code I write is under LGPL and the GPL. For every new > bloody file I create, I have to copy/paste the info about the license into the > top of the file. I also put a little header with a description of the file and > some macros that CVS expands. It would be really helpfull if I could some how > point to a file containing the software license/header info and CodeMill could > copy that into the created file. I can;t think of an intuitive way to work > this into the syntax... This is a very good idea, We could add a -L option to codemill that would add a license template at the top of the generated code, but by default it should not add any license, this would work similarly to the template, ie a few defaults licenses and custom licenses. I don't think we should add things like copy right etc. to the top of source files, This would start complicating things , and convert a swiss army knife into a pile of spaghetti, so to speak, If someone would like to do such a thing they should add a custom license. Thanks, Richard. |
From: David S. <xe...@ex...> - 2000-12-08 18:13:13
|
Richard Kolb wrote: > 6) The generated code must be under 'no license'. I agree with what you mean by this statement, but it made me think of something. Most of the code I write is under LGPL and the GPL. For every new bloody file I create, I have to copy/paste the info about the license into the top of the file. I also put a little header with a description of the file and some macros that CVS expands. It would be really helpfull if I could some how point to a file containing the software license/header info and CodeMill could copy that into the created file. I can;t think of an intuitive way to work this into the syntax... -- David Snopek |
From: Richard K. <rk...@sw...> - 2000-12-08 14:59:39
|
Hi All, David Snopek wrote: > You can't coyright names. Copyright means the right to control how it it > copied. Who ever owns the copyright gets to pick the license. In the > open source world the copyright owner is unimportant, its the license that > they picked. A lot of people wonder how you get copyrights, well as soon > as the work is created in tangible form the auther has the copyright. You > can go and fill out some forms and pay a fee to get an official copyright > but technically you don't have to do that until you are suing someone for > copyright infringement. > > With names you have to worry about trademarks. If none of the people who > are using the name CodeMill have the little floating "TM" after it its > safe. And i think that after more than one person uses the name, it is no > longer eligible for a trademark. > > Lots of software projects have the same or very similar names. This > shouldn;t be a problem. Thanks for the info. What do you think of these requirements ? --------- Requirements (according to Richard anyway ) 1) Create a class from scratch. 2) Derive a class from a base class / classes. 3) Add a member variable with a given visibility. 4) Add a member function with a given visibility and attributes like virtual/const etc. 5) The ability to have coding style templates to suit different styles and a custom user defined style. 6) The generated code must be under 'no license'. 7) The interface to Code Mill should a command line app, which can be used by Code Crusader etc. 8) The command line interface should be easy enough to use by a user on the command line. The command line interface should properly look +- like this : "codemill -c NewClass -b DeriveClass -I./ -t template.5 -o output.cc output.h" Where -c is the class to create -b for the class to derive from (base class) -I for the search paths -t coding standard to use. -o the output files to create the class in. This would look for file template.5 in the codemill template directory and generate a class to the users coding standards. I'm sure there are many more requirements so please add/change mine. ---------- regards, Richard. |
From: Richard K. <rk...@sw...> - 2000-12-08 07:46:58
|
Hi All, John Lindal wrote: > > and Code Mill Jnr which is some teaching tool, > > > > won't this cause problems if someone ever copy rights "codemill" ? > > Why bother to copyright the name? Oh , I thought you had to copyright the name to copyright the software, I'll do more research on this ( because I know +- 0 about it) I've written a skeleton of the code mill classes, It's basic target functionality is to create classes for c++/java and add members for c++ /Java. I'm also allowing extra room for other languages and other functionality. I'm hoping to have a small prototype by the new year, written in Linux. Heath , (who is one of my buddies at work ) will ensure it will work correctly in FreeBSD. Would you like to see codemill working in Win32 ? ---- When it comes to parsing , I think using ctags would be a big problem since of those nasty bugs which stop it from working. Doing our own parsing may be difficult at first , but may be the best solution for now. ( I'll write a wrapper so our parsing mechanisms can be easily changed from our own system , to ctags later. ) Thanks, Richard. |
From: John L. <ja...@al...> - 2000-12-07 19:47:15
|
> I've been searching the internet for the Code Mill name, > I have come up with codemill LTD (some ASP tool) codemill.com/net That URL doesn't contain anything. > and Code Mill Jnr which is some teaching tool, > > won't this cause problems if someone ever copy rights "codemill" ? Why bother to copyright the name? John |
From: John L. <ja...@al...> - 2000-12-07 19:45:01
|
>> Also, to allow it to be used via make, which is the easiest way to specify >> the include paths, I would suggest the same syntax as makedepend: >> >> codemill -- <garbage> -I./ <garbage> -DMY_DEFINE <garbage> -- -c >> NewClass -b BaseClass -t template.5 -o output.cc output.h >> >> This allows one to dump ${CPPFLAGS} between the --'s. This also brings up >> the point that many people use preprocessor symbols in the class >> declarations to allow the code to compile on UNIX/Win/Mac. This means that >> -D also has to be parsed when it occurs between the --'s. > > I can see the importance of using CPPFLAGS but, > > How would code mill use defines? You have to parse the base class header files in order to know which functions can be overridden. You will probably also have to parse the header file in order to allow adding functions and variables after the initial creation. John |
From: Richard K. <rk...@sw...> - 2000-12-06 13:21:41
|
Hi All, I've been searching the internet for the Code Mill name, I have come up with codemill LTD (some ASP tool) codemill.com/net and Code Mill Jnr which is some teaching tool, won't this cause problems if someone ever copy rights "codemill" ? Another choice could be Code Gen , but this is also taken. Maybe Source Mill ? (I don't want it to sound funny) or something like "code mill source generator ", to make it unique? Any Ideas? Thanks, Richard. |
From: Richard K. <rk...@sw...> - 2000-12-06 07:36:27
|
Hi Paul, John Lindal wrote: > I would suggest -b instead of -d, since the standard terminology is "base > class". > Ok, not a problem. > Also, to allow it to be used via make, which is the easiest way to specify > the include paths, I would suggest the same syntax as makedepend: > > codemill -- <garbage> -I./ <garbage> -DMY_DEFINE <garbage> -- -c > NewClass -b BaseClass -t template.5 -o output.cc output.h > > This allows one to dump ${CPPFLAGS} between the --'s. This also brings up > the point that many people use preprocessor symbols in the class > declarations to allow the code to compile on UNIX/Win/Mac. This means that > -D also has to be parsed when it occurs between the --'s. I can see the importance of using CPPFLAGS but, How would code mill use defines? Thanks, Richard. |
From: John L. <ja...@al...> - 2000-12-04 22:03:38
|
> The command line interface should properly look +- like this : > "codemill -c NewClass -d DeriveClass -I./ -t template.5 -o output.cc > output.h" > Where -c is the class to create > -d for the class to derive from > -I for the search paths > -t coding standard to use. > -o the output files to create the class in. > > This would look for file template.5 in the codemill template directory > and generate a class to the users coding standards. I would suggest -b instead of -d, since the standard terminology is "base class". Also, to allow it to be used via make, which is the easiest way to specify the include paths, I would suggest the same syntax as makedepend: codemill -- <garbage> -I./ <garbage> -DMY_DEFINE <garbage> -- -c NewClass -b BaseClass -t template.5 -o output.cc output.h This allows one to dump ${CPPFLAGS} between the --'s. This also brings up the point that many people use preprocessor symbols in the class declarations to allow the code to compile on UNIX/Win/Mac. This means that -D also has to be parsed when it occurs between the --'s. John |
From: Richard K. <rk...@sw...> - 2000-12-01 14:06:51
|
Hi All, Sorry I have not got things going , customers have been jumping down my throat this week :-( Just to get things started I would like to repeat some of the things that happened on the Code Crusader mailing list. Richard Kolb Wrote : >I think it was David that pointed out that a code generator like codemill , >could generate code that is under license of the generator. ( not very nice! >) > >Do you think we can add a exception to the license to say , all code >generated should be under 'no license.' ? To which John Lindel Replied, > >I thought that BSD didn't enforce this? If it does, you could switch to >the Artistic License that Perl uses. I think that is even less >restrictive. As far as I saw there have been a few flame wars about this, so maybe we should go for the Artistic License as John Suggested. ------ As some one said ( I can't remember who ) What should code mill be developed in , ie C,C++,STL,libarys etc... Is suggest using no library's since the project is quite small and wont need things like threads etc.. I would also suggest using C++ , we don't need anything fancy , just something maintainable and simple. When it comes STL , I think this is really going overboard. Unless I'm missing some thing. ----- Requirements (according to Richard anyway ) 1) Create a class from scratch. 2) Derive a class from a base class / classes. 3) Add a member variable with a given visibility. 4) Add a member function with a given visibility and attributes like virtual/const etc. 5) The ability to have coding style templates to suit different styles and a custom user defined style. 6) The generated code must be under 'no license'. 7) The interface to Code Mill should a command line app, which can be used by Code Crusader etc. 8) The command line interface should be easy enough to use by a user on the command line. The command line interface should properly look +- like this : "codemill -c NewClass -d DeriveClass -I./ -t template.5 -o output.cc output.h" Where -c is the class to create -d for the class to derive from -I for the search paths -t coding standard to use. -o the output files to create the class in. This would look for file template.5 in the codemill template directory and generate a class to the users coding standards. I'm sure there are many more requirements so please add/change mine. Thanks, Richard. |