This list is closed, nobody may subscribe to it.
| 2009 |
Jan
|
Feb
|
Mar
(3) |
Apr
(37) |
May
(4) |
Jun
(1) |
Jul
(18) |
Aug
(12) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
|---|
|
From: Fintan F. <fi...@gm...> - 2009-07-26 15:00:24
|
Myself and Mikolas noticed this before, but hadn't got around to fixing it. I believe the problem for us is to do with the platform setting. At least that is what we had narrowed it down to before. It seemed that the sourceforge site was doing some sort of OS detection and attempting to offer the right file - we got different results on different OSs. On 0.2.1 we had the platform set to Java SE I think, and for 0.2 we had "platform independent". I seem to remember it offered 0.2.1 for windows, but 0.2 for linux and mac. It all seems to be different now due to the SF revamp, so I'm not entirely sure what's going on. Right now when I visit the page (FF on mac) I do not see any default download. On Sun, Jul 26, 2009 at 11:30 AM, Radu Grigore <rad...@gm...>wrote: > FYI, there seems to be a SF bug: > https://sourceforge.net/apps/trac/sourceforge/ticket/2748 > > On Sun, Jul 26, 2009 at 2:46 AM, Radu Grigore<rad...@gm...> > wrote: > > For me the default download appeared to be 0.2, not 0.2.1. I tried to > > change it from ("Project Admin" -> "File Manager") and the default > > download disappeared completely :( However, SourceForge seems to have > > some trouble right now since it gives "error 500" from time to time > > and it even displayed once a list of "news" that were clearly old. > > > > So, I'm hoping it's just a temporary SF glitch. Please let me know > > what default download do you see when you go to > > https://sourceforge.net/projects/clops/ > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Clops-users mailing list > Clo...@li... > https://lists.sourceforge.net/lists/listinfo/clops-users > |
|
From: Fintan F. <fi...@gm...> - 2009-07-26 14:54:25
|
The plan is to wrap it, but our initial pass at implementation was just to use a plain list. We discussed this on Friday and had already agreed such. On Sun, Jul 26, 2009 at 1:23 PM, Mikoláš Janota <mik...@gm...>wrote: > Fint and Radu has changed the parse method to return a list of errors > rather than a boolean (and only runtime exceptions are thrown). > I must say I'd have preferred a class wrapping the list: > a) To get the previous code to compile I added isEmpty() which looks > unintuitive. isOK would look nicer. > b) The standard toString of List is probably not desirable for > presenting to the user the aforementioned class could have some > printMe method, presenting the errors nicely. > > > > -- > Mikoláš Janota M. Sc. > School of Computer Science and Informatics, > University College Dublin, > Belfield, > Dublin 4, > Ireland > > > ------------------------------------------------------------------------------ > _______________________________________________ > Clops-users mailing list > Clo...@li... > https://lists.sourceforge.net/lists/listinfo/clops-users > |
|
From: Mikoláš J. <mik...@gm...> - 2009-07-26 12:24:23
|
Fint and Radu has changed the parse method to return a list of errors rather than a boolean (and only runtime exceptions are thrown). I must say I'd have preferred a class wrapping the list: a) To get the previous code to compile I added isEmpty() which looks unintuitive. isOK would look nicer. b) The standard toString of List is probably not desirable for presenting to the user the aforementioned class could have some printMe method, presenting the errors nicely. -- Mikoláš Janota M. Sc. School of Computer Science and Informatics, University College Dublin, Belfield, Dublin 4, Ireland |
|
From: Radu G. <rad...@gm...> - 2009-07-26 10:30:26
|
FYI, there seems to be a SF bug: https://sourceforge.net/apps/trac/sourceforge/ticket/2748 On Sun, Jul 26, 2009 at 2:46 AM, Radu Grigore<rad...@gm...> wrote: > For me the default download appeared to be 0.2, not 0.2.1. I tried to > change it from ("Project Admin" -> "File Manager") and the default > download disappeared completely :( However, SourceForge seems to have > some trouble right now since it gives "error 500" from time to time > and it even displayed once a list of "news" that were clearly old. > > So, I'm hoping it's just a temporary SF glitch. Please let me know > what default download do you see when you go to > https://sourceforge.net/projects/clops/ > |
|
From: Radu G. <rad...@gm...> - 2009-07-26 01:46:15
|
For me the default download appeared to be 0.2, not 0.2.1. I tried to
change it from ("Project Admin" -> "File Manager") and the default
download disappeared completely :( However, SourceForge seems to have
some trouble right now since it gives "error 500" from time to time
and it even displayed once a list of "news" that were clearly old.
So, I'm hoping it's just a temporary SF glitch. Please let me know
what default download do you see when you go to
https://sourceforge.net/projects/clops/
|
|
From: Radu G. <rad...@gm...> - 2009-07-23 23:21:17
|
I changed clops to maintain the order of enum values. The syntax for the property "choices" of the type "enum" (and of the type "enum-list") is now: choices="string1|string2(VALUE1),string3(VALUE2)" You are guaranteed that VALUE1.compareTo(VALUE2) < 0. This is nice to have if you use an enum to represent verbosity levels. The syntax used to be: choices="string1(VALUE1),string2(VALUE1),string3(VALUE2)" or choices="string1(VALUE1),string3(VALUE2),string2(VALUE1)" I added as a task the check that values are unique. Let me know if you see any problems with this, or if you like a different syntax. |
|
From: Mikoláš J. <mik...@gm...> - 2009-07-16 15:33:09
|
On Thu, Jul 16, 2009 at 4:13 PM, Radu Grigore<rad...@gm...> wrote: > On Mon, Jul 13, 2009 at 8:52 PM, Mikoláš Janota<mik...@gm...> wrote: >> I know we can do allowarg=false, but I don't like that solution that much. > > Don't we need allowarg=false to match how svn and gzip behave anyway? > Which reminds me that you were saying something about global defaults. > It is true that we need this if we want to model svn's etc. behavior. In general, I don't like the assymetricity of false and true (i.e. user being able to set things to true, but not to false). Another thing is that you can have similar interactions between options of non-boolean values, e.g. the verbosity in gzip is 0..3. I think there should be a general guideline/syntactic sugar that tells you how to handle these things (boolean or not). Global defaults would be useful, I think.(the properties resemble command line options more and more :) ). --m. -- Mikoláš Janota M. Sc. School of Computer Science and Informatics, University College Dublin, Belfield, Dublin 4, Ireland |
|
From: Radu G. <rad...@gm...> - 2009-07-16 15:13:33
|
On Mon, Jul 13, 2009 at 8:52 PM, Mikoláš Janota<mik...@gm...> wrote: > I know we can do allowarg=false, but I don't like that solution that much. Don't we need allowarg=false to match how svn and gzip behave anyway? Which reminds me that you were saying something about global defaults. |
|
From: Mikoláš J. <mik...@gm...> - 2009-07-13 19:52:12
|
I was just looking at svn and gzip and both contain the same pattern,
(realized differently):
-- gzip
quiet -> verbose:={0};
verbose -> quiet:={false};
-- svn
quiet { $(verbose?) } -> verbose := { false };
verbose { $(quiet?) } -> quiet := { false };
Both of them are wrong as the triggering variable might be set to
false instead of true, so I guess it should be
quiet { $(verbose?) && $(quiet) } -> verbose := { false };
or
quiet { $(quiet) } -> verbose := { false };
Suggestions?
I know we can do allowarg=false, but I don't like that solution that much.
--
Mikoláš
|
|
From: Radu G. <rad...@gm...> - 2009-06-23 01:08:13
|
There seem to be enough changes for a new release. From the logs: * license file * removed unnecessary runtime classpath * compile path fix * don't crash if 'choices' isn't specified for enums * nested enums are static * better error message when -t is not given (hack) * better handling of multiline descriptions (although I see OptionStore still contains crap * generation of ant task base class * (simple) ant task for clops It would be nice if we could schedule one day for bugfixing/testing/releasing. Let me know if you have one free day in the next week. |
|
From: Mikoláš J. <mik...@gm...> - 2009-05-10 18:57:35
|
Hi David, the docs are generated via Velocity templates. Velocity is an apache project, very similar to the C preprocessor (http://velocity.apache.org/). There are several predefined templates in the templates directory but you can define any template you want and pass it as an argument to clops. Personally, I'm not too happy about printing rules, I think we could improve it but still it seems difficult. I think the templates that are in the project should give you an idea what you can do (start by all.vm, help.vm), but of course, if you have any questions let us know. Regards, mikolas On Sat, May 2, 2009 at 3:47 AM, David W <di...@ho...> wrote: > Yes, I can see both of your points. In any case, the recommended method is > reasonably clean and consolidated. I will be occupied for a while with > adding all the commands and options and the other cleanup that needs to be > done, but I figured I would ask another question looking forward. > > What are your thoughts or advice on generating documentation or help. I > haven't read in great detail about this yet, so I don't know if there's much > control over the documentation format. At the least, our documentation > person will create a user's guide for the CLI. It would also be nice for the > complete usage to be pretty printed if help is specified on the command line > or if there was an error with an option. Is the generated documentation > capable of this or was it meant more functional--to make the CLOPS > specification file more readable? > > > ________________________________ > Date: Fri, 1 May 2009 22:20:55 +0100 > From: fi...@gm... > To: clo...@li... > Subject: Re: [Clops-users] usage after parsing > > I'd agree with Mikolas, but for slightly different reasons. > > Extending the option types, by providing your own custom option class is > possible but will take a reasonable amount of work, largely in sufficiently > understanding the mechanisms involved in order to do so. I wouldn't advise > it in this case. > > Even if you were to create a custom class, it will not be more succinct and > barely more efficient than creating a simple method that takes the created > option enum type as an argument, and returns an instance of the type that > you want (the body of the method just being a switch statement with each > case creating and returning the appropriate subclass type). > > Hope this helps, > > Fintan > > > ________________________________ > Windows Live™ Hotmail®:…more than just e-mail. Check it out. > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Clops-users mailing list > Clo...@li... > https://lists.sourceforge.net/lists/listinfo/clops-users > > -- Mikoláš Janota M. Sc. School of Computer Science and Informatics, University College Dublin, Belfield, Dublin 4, Ireland |
|
From: David W <di...@ho...> - 2009-05-02 02:47:42
|
Yes, I can see both of your points. In any case, the recommended method is reasonably clean and consolidated. I will be occupied for a while with adding all the commands and options and the other cleanup that needs to be done, but I figured I would ask another question looking forward. What are your thoughts or advice on generating documentation or help. I haven't read in great detail about this yet, so I don't know if there's much control over the documentation format. At the least, our documentation person will create a user's guide for the CLI. It would also be nice for the complete usage to be pretty printed if help is specified on the command line or if there was an error with an option. Is the generated documentation capable of this or was it meant more functional--to make the CLOPS specification file more readable? Date: Fri, 1 May 2009 22:20:55 +0100 From: fi...@gm... To: clo...@li... Subject: Re: [Clops-users] usage after parsing I'd agree with Mikolas, but for slightly different reasons. Extending the option types, by providing your own custom option class is possible but will take a reasonable amount of work, largely in sufficiently understanding the mechanisms involved in order to do so. I wouldn't advise it in this case. Even if you were to create a custom class, it will not be more succinct and barely more efficient than creating a simple method that takes the created option enum type as an argument, and returns an instance of the type that you want (the body of the method just being a switch statement with each case creating and returning the appropriate subclass type). Hope this helps, Fintan _________________________________________________________________ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009 |
|
From: Fintan F. <fi...@gm...> - 2009-05-01 21:21:08
|
I'd agree with Mikolas, but for slightly different reasons. Extending the option types, by providing your own custom option class is possible but will take a reasonable amount of work, largely in sufficiently understanding the mechanisms involved in order to do so. I wouldn't advise it in this case. Even if you were to create a custom class, it will not be more succinct and barely more efficient than creating a simple method that takes the created option enum type as an argument, and returns an instance of the type that you want (the body of the method just being a switch statement with each case creating and returning the appropriate subclass type). Hope this helps, Fintan On Fri, May 1, 2009 at 1:25 PM, Mikoláš Janota <mik...@gm...>wrote: > Hi David, > > technically this is possible as you can extend the option types > yourself and the rules can contain any java code. > > However, it's something that I'd discourage you from doing as the > CLOPS file was meant to be as Java-independent as possible and should > express only the logic of options, not the program. There's always a > blurry line between the program and option processing, so this is a > matter of personal opinion. > > mikolas > > On Fri, May 1, 2009 at 12:22 AM, David W <di...@ho...> wrote: > > Fintan, thanks. I hadn't even looked at the fly rules and didn't realize > how > > powerful they could be. I tried out what you described and that worked. > > > > I don't suppose there would be a way to use fly rules and virtual options > to > > create a new instance of a user defined object? With the method mentioned > > previously, I would just need to pass an enum value to a factory if I > needed > > to create objects of a specific type. I was wondering if I could even > bypass > > the creation of this factory and have CLOPS return back a new object of > the > > type that I need (they would all be subclasses of a single base class). > So > > basically, it would be nice if I could define an arg with type "Command" > and > > then be able to return back "CMD1Command" and "CMD2Command" depending on > > which command was set. > |
|
From: Mikoláš J. <mik...@gm...> - 2009-05-01 12:34:49
|
Hi David,
technically this is possible as you can extend the option types
yourself and the rules can contain any java code.
However, it's something that I'd discourage you from doing as the
CLOPS file was meant to be as Java-independent as possible and should
express only the logic of options, not the program. There's always a
blurry line between the program and option processing, so this is a
matter of personal opinion.
mikolas
On Fri, May 1, 2009 at 12:22 AM, David W <di...@ho...> wrote:
> Fintan, thanks. I hadn't even looked at the fly rules and didn't realize how
> powerful they could be. I tried out what you described and that worked.
>
> I don't suppose there would be a way to use fly rules and virtual options to
> create a new instance of a user defined object? With the method mentioned
> previously, I would just need to pass an enum value to a factory if I needed
> to create objects of a specific type. I was wondering if I could even bypass
> the creation of this factory and have CLOPS return back a new object of the
> type that I need (they would all be subclasses of a single base class). So
> basically, it would be nice if I could define an arg with type "Command" and
> then be able to return back "CMD1Command" and "CMD2Command" depending on
> which command was set.
>
> ________________________________
> Date: Thu, 30 Apr 2009 19:14:44 +0100
> Subject: Re: [Clops-users] usage after parsing
> From: fi...@gm...
> To: di...@ho...
> CC: clo...@li...
>
> Hi David,
>
> Thanks for the question. If I understand you correctly, what I would
> recommend is this:
>
> -Create a "virtual option" (i.e. an option that is not reachable in the
> FORMAT:: section, but is defined in ARGS::) of type "enum".
> e.g.
> ChosenCommand:{}:{enum}:[choices="CMD1,CMD2,CMD3"]
>
> -Create some fly rules to set the ChosenCommand option when any of your
> commands are set. I'm not sure if you know about fly rules, but they are
> rules that can are triggered when a certain option is set.
> e.g.
> CMD1 {$(CMD1)} -> ChosenCommand := {"CMD1"};
>
> There's quite a bit going on in that example, so I'll break it down. The
> first CMD1 indicates that it is a rule that should be fired when option CMD1
> is set. The curly braces are used to delimit where you can write arbitrary
> Java code. In the first case the code must be a boolean expression. In the
> second case it is an expression that is of the correct type for the object
> we are assigning to, which in this case is a String for ChosenCommand.
>
> You could read the whole rule as: If CMD1 is set then check if CMD1 is true.
> If it is true set ChosenCommand to the value "CMD1".
>
> The $(CMD1) inside the braces is a placeholder that is converted into code
> that gets the value for the CMD1 option. I'm assuming your commands are all
> boolean options? If they are booleans and you are not allowing the user to
> write CMD1=false (disallow by setting property allowarg="false" in the
> option definition), then you can omit the {$(CMD1)} as this will always be
> true. Thus:
> CMD1 -> ChosenCommand := {"CMD1"};
>
> -In the code where you direct the program's execution by the option values,
> you can simply get the value of the option ChosenCommand. Note that if you
> use the enum option type, we automatically generate an enum with the choices
> you provided in the option's specification. The enum definition will appear
> in the generated OptionInterface, and will be the return type for the
> getChosenCommand() method.
>
> I hope I've answered your question. If any of the above is not clear, or you
> want to know more, just ask.
>
> Cheers,
>
> Fintan
>
>
> ________________________________
> Rediscover Hotmail®: Get e-mail storage that grows with you. Check it out.
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Clops-users mailing list
> Clo...@li...
> https://lists.sourceforge.net/lists/listinfo/clops-users
>
>
--
Mikoláš Janota M. Sc.
School of Computer Science and Informatics,
University College Dublin,
Belfield,
Dublin 4,
Ireland
|
|
From: David W <di...@ho...> - 2009-04-30 23:22:56
|
Fintan, thanks. I hadn't even looked at the fly rules and didn't
realize how powerful they could be. I tried out what you described and
that worked.
I don't suppose there would be a way to use fly
rules and virtual options to create a new instance of a user defined
object? With the method mentioned previously, I would just need to pass
an enum value to a factory if I needed to create objects of a specific
type. I was wondering if I could even bypass the creation of this
factory and have CLOPS return back a new object of the type that I need
(they would all be subclasses of a single base class). So basically, it
would be nice if I could define an arg with type "Command" and then be
able to return back "CMD1Command" and "CMD2Command" depending on which
command was set.
Date: Thu, 30 Apr 2009 19:14:44 +0100
Subject: Re: [Clops-users] usage after parsing
From: fi...@gm...
To: di...@ho...
CC: clo...@li...
Hi David,
Thanks for the question. If I understand you correctly, what I would recommend is this:
-Create a "virtual option" (i.e. an option that is not reachable in the FORMAT:: section, but is defined in ARGS::) of type "enum".
e.g.
ChosenCommand:{}:{enum}:[choices="CMD1,CMD2,CMD3"]
-Create some fly rules to set the ChosenCommand option when any of your commands are set. I'm not sure if you know about fly rules, but they are rules that can are triggered when a certain option is set.
e.g.
CMD1 {$(CMD1)} -> ChosenCommand := {"CMD1"};
There's quite a bit going on in that example, so I'll break it down. The first CMD1 indicates that it is a rule that should be fired when option CMD1 is set. The curly braces are used to delimit where you can write arbitrary Java code. In the first case the code must be a boolean expression. In the second case it is an expression that is of the correct type for the object we are assigning to, which in this case is a String for ChosenCommand.
You could read the whole rule as: If CMD1 is set then check if CMD1 is
true. If it is true set ChosenCommand to the value "CMD1".
The $(CMD1) inside the braces is a placeholder that is converted into code that gets the value for the CMD1 option. I'm assuming your commands are all boolean options? If they are booleans and you are not allowing the user to write CMD1=false (disallow by setting property allowarg="false" in the option definition), then you can omit the {$(CMD1)} as this will always be true. Thus:
CMD1 -> ChosenCommand := {"CMD1"};
-In the code where you direct the program's execution by the option values, you can simply get the value of the option ChosenCommand. Note that if you use the enum option type, we automatically generate an enum with the choices you provided in the option's specification. The enum definition will appear in the generated OptionInterface, and will be the return type for the getChosenCommand() method.
I hope I've answered your question. If any of the above is not clear, or you want to know more, just ask.
Cheers,
Fintan
_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009 |
|
From: Fintan F. <fi...@gm...> - 2009-04-30 19:38:01
|
Just to clarify: All clops library/tool code and documentation is under the MIT license. The clops release also contains the antlr, velocity and some velocity dependencies. Each of these is under a separate license. None of these libraries are required at the time of using the generated code (just the clops-runtime.jar), so there is obviously no need to include them in your product. So the terms of the MIT license is all you have to worry about. We mistakenly didn't previously include the license text in our releases on sourceforge. We've remedied that now. By the way, we appreciate your questions and use of the tool, so if you have any feedback big or small, please send it our way! Cheers, Fintan On Wed, Apr 29, 2009 at 8:14 PM, Viliam Holub <vil...@uc...> wrote: > On 29. Apr (Wednesday) v 19:05:22 +0000 2009, David W wrote: > > I did have one question about the licensing for CLOPS. I will check > > again, but is there a file or a license notice that I need to add > > somewhere if I plan to redistribute CLOPS runtime along with the CLI > > I'm working on (it will be in a commercial product)? > > We haven't discussed it yet explicitly. But the whole project is MIT > license > thus the only obligation for you is not to remove the license from the > source code (if there is any). > > Regards, > Viliam > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Clops-users mailing list > Clo...@li... > https://lists.sourceforge.net/lists/listinfo/clops-users > |
|
From: Fintan F. <fi...@gm...> - 2009-04-30 18:14:48
|
Hi David,
Thanks for the question. If I understand you correctly, what I would
recommend is this:
-Create a "virtual option" (i.e. an option that is not reachable in the
FORMAT:: section, but is defined in ARGS::) of type "enum".
e.g.
ChosenCommand:{}:{enum}:[choices="CMD1,CMD2,CMD3"]
-Create some fly rules to set the ChosenCommand option when any of your
commands are set. I'm not sure if you know about fly rules, but they are
rules that can are triggered when a certain option is set.
e.g.
CMD1 {$(CMD1)} -> ChosenCommand := {"CMD1"};
There's quite a bit going on in that example, so I'll break it down. The
first CMD1 indicates that it is a rule that should be fired when option CMD1
is set. The curly braces are used to delimit where you can write arbitrary
Java code. In the first case the code must be a boolean expression. In the
second case it is an expression that is of the correct type for the object
we are assigning to, which in this case is a String for ChosenCommand.
You could read the whole rule as: If CMD1 is set then check if CMD1 is true.
If it is true set ChosenCommand to the value "CMD1".
The $(CMD1) inside the braces is a placeholder that is converted into code
that gets the value for the CMD1 option. I'm assuming your commands are all
boolean options? If they are booleans and you are not allowing the user to
write CMD1=false (disallow by setting property allowarg="false" in the
option definition), then you can omit the {$(CMD1)} as this will always be
true. Thus:
CMD1 -> ChosenCommand := {"CMD1"};
-In the code where you direct the program's execution by the option values,
you can simply get the value of the option ChosenCommand. Note that if you
use the enum option type, we automatically generate an enum with the choices
you provided in the option's specification. The enum definition will appear
in the generated OptionInterface, and will be the return type for the
getChosenCommand() method.
I hope I've answered your question. If any of the above is not clear, or you
want to know more, just ask.
Cheers,
Fintan
On Thu, Apr 30, 2009 at 4:47 PM, David W <di...@ho...> wrote:
> The main question that I have is what would be the most efficient way to
> dispatch on options?
>
> The CLI that I'm working on basically consists of two levels of
> options--commands and options. The best analogy is something like Busybox,
> where there's a single binary (in this case jar file) that implements
> multiple commands, each with its own set of options (if any).
>
> So to be more concrete, in the "ARGS" section of the CLOPS file, I have
> command1 through commandN defined. I can check for the presence of a single
> command via iscommandNSet(). I'm wondering if there's a more efficient way
> of dispatching or testing for the command instead of doing a massive
> if/else-if statement, perhaps with enums or something (the enum could be
> used to create a proper subclass corresponding to a specific command). I
> would almost be tempted to define an enum with the same command names,
> create the correct method name programmatically (prepend "is" and append
> "Set" to the enum value), and then iterate through the list of enums,
> calling the automatically-generated method for checking to return back the
> correct enum.
>
> Basically, any pointers or suggestions at this point would be great.
> Normally I would ruminate on this for a bit, but I'm in a crunch situation
> and would appreciate some pointers. Thanks.
>
> ------------------------------
> Rediscover Hotmail®: Get e-mail storage that grows with you. Check it out.<http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Clops-users mailing list
> Clo...@li...
> https://lists.sourceforge.net/lists/listinfo/clops-users
>
>
|
|
From: David W <di...@ho...> - 2009-04-30 15:47:26
|
The main question that I have is what would be the most efficient way to dispatch on options? The CLI that I'm working on basically consists of two levels of options--commands and options. The best analogy is something like Busybox, where there's a single binary (in this case jar file) that implements multiple commands, each with its own set of options (if any). So to be more concrete, in the "ARGS" section of the CLOPS file, I have command1 through commandN defined. I can check for the presence of a single command via iscommandNSet(). I'm wondering if there's a more efficient way of dispatching or testing for the command instead of doing a massive if/else-if statement, perhaps with enums or something (the enum could be used to create a proper subclass corresponding to a specific command). I would almost be tempted to define an enum with the same command names, create the correct method name programmatically (prepend "is" and append "Set" to the enum value), and then iterate through the list of enums, calling the automatically-generated method for checking to return back the correct enum. Basically, any pointers or suggestions at this point would be great. Normally I would ruminate on this for a bit, but I'm in a crunch situation and would appreciate some pointers. Thanks. _________________________________________________________________ Rediscover Hotmail®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009 |
|
From: Viliam H. <vil...@uc...> - 2009-04-29 19:15:11
|
On 29. Apr (Wednesday) v 19:05:22 +0000 2009, David W wrote: > I did have one question about the licensing for CLOPS. I will check > again, but is there a file or a license notice that I need to add > somewhere if I plan to redistribute CLOPS runtime along with the CLI > I'm working on (it will be in a commercial product)? We haven't discussed it yet explicitly. But the whole project is MIT license thus the only obligation for you is not to remove the license from the source code (if there is any). Regards, Viliam |
|
From: David W <di...@ho...> - 2009-04-29 19:05:24
|
I did have one question about the licensing for CLOPS. I will check again, but is there a file or a license notice that I need to add somewhere if I plan to redistribute CLOPS runtime along with the CLI I'm working on (it will be in a commercial product)? _________________________________________________________________ Windows Live™ SkyDrive™: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009 |
|
From: David W <di...@ho...> - 2009-04-29 19:01:39
|
Thanks Julien and Fintan for looking at the problem, responding to my email, and fixing the problem so quickly. I just downloaded the new point release and it works in Windows now as well. I will definitely let you know if I have any other requests or see any other issues as I will be using CLOPS along with a coworker to rework a CLI that was written in Java and needs to be redone. There was one issue that I posted on the sourceforge page, which was to update the examples directories (the build.xml as well as the lib directory) to work with the latest version of CLOPS. When I was going through the tutorial and trying to compile the wc example for myself, I had no clue what was going on until I looked into the jar files and then realized that the manifest had the previous version of velocity mentioned. Date: Wed, 29 Apr 2009 10:38:24 +0100 Subject: Re: [Clops-users] error running 0.2 on Windows From: fi...@gm... To: di...@ho... CC: clo...@li... Hi David, Firstly, thanks for your interest in clops and for reporting this issue. I have been able to recreate this issue on windows xp x64, running java 1.6.0_13. The issue was that we had a path containing a '/' instead of a File.separator, and we've now fixed this. It now works on my windows test setup. We have a created a maintenance release (0.2.1) which contains this fix. https://sourceforge.net/project/showfiles.php?group_id=257014&package_id=315070&release_id=679186 If you can confirm that this fixed version works for you, that would be great. Thanks again, Fintan On Wed, Apr 29, 2009 at 1:47 AM, David W <di...@ho...> wrote: I'm trying to parse a .clo file that I created and am having issues getting it to work in Windows (it succeeds in linux with no problems). The output is as follows (I've removed the paths in the output): > java -jar ..\ThirdParty\clops-0.2\lib\clops.jar edgecli.clo -o=src\generated -p=generated clops 0.2 rev572 (2009-04-21 16:20:07) Successfully parsed dsl file! Error, template not found: templates\gen-parser.vm Error, template not found: templates\gen-interface.vm Error, template not found: templates\gen-op-store.vm Error, template not found: templates\gen-rule-store.vm Created code in src\generated Any ideas on why this would be failing (I suppose I could look through the source code to see what it's doing, but I'd prefer not to go that route for now)? Rediscover Hotmail®: Get e-mail storage that grows with you. Check it out. ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Clops-users mailing list Clo...@li... https://lists.sourceforge.net/lists/listinfo/clops-users _________________________________________________________________ Rediscover Hotmail®: Get quick friend updates right in your inbox. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates2_042009 |
|
From: Fintan F. <fi...@gm...> - 2009-04-29 09:38:34
|
Hi David, Firstly, thanks for your interest in clops and for reporting this issue. I have been able to recreate this issue on windows xp x64, running java 1.6.0_13. The issue was that we had a path containing a '/' instead of a File.separator, and we've now fixed this. It now works on my windows test setup. We have a created a maintenance release (0.2.1) which contains this fix. https://sourceforge.net/project/showfiles.php?group_id=257014&package_id=315070&release_id=679186 If you can confirm that this fixed version works for you, that would be great. Thanks again, Fintan On Wed, Apr 29, 2009 at 1:47 AM, David W <di...@ho...> wrote: > I'm trying to parse a .clo file that I created and am having issues > getting it to work in Windows (it succeeds in linux with no problems). The > output is as follows (I've removed the paths in the output): > > > java -jar ..\ThirdParty\clops-0.2\lib\clops.jar edgecli.clo > -o=src\generated -p=generated > clops 0.2 rev572 (2009-04-21 16:20:07) > Successfully parsed dsl file! > Error, template not found: templates\gen-parser.vm > Error, template not found: templates\gen-interface.vm > Error, template not found: templates\gen-op-store.vm > Error, template not found: templates\gen-rule-store.vm > Created code in src\generated > > Any ideas on why this would be failing (I suppose I could look through the > source code to see what it's doing, but I'd prefer not to go that route for > now)? > > ------------------------------ > Rediscover Hotmail®: Get e-mail storage that grows with you. Check it out.<http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009> > > > ------------------------------------------------------------------------------ > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > _______________________________________________ > Clops-users mailing list > Clo...@li... > https://lists.sourceforge.net/lists/listinfo/clops-users > > |
|
From: David W <di...@ho...> - 2009-04-29 00:48:16
|
I'm trying to parse a .clo file that I created and am having issues getting it to work in Windows (it succeeds in linux with no problems). The output is as follows (I've removed the paths in the output): > java -jar ..\ThirdParty\clops-0.2\lib\clops.jar edgecli.clo -o=src\generated -p=generated clops 0.2 rev572 (2009-04-21 16:20:07) Successfully parsed dsl file! Error, template not found: templates\gen-parser.vm Error, template not found: templates\gen-interface.vm Error, template not found: templates\gen-op-store.vm Error, template not found: templates\gen-rule-store.vm Created code in src\generated Any ideas on why this would be failing (I suppose I could look through the source code to see what it's doing, but I'd prefer not to go that route for now)? _________________________________________________________________ Rediscover Hotmail®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009 |
|
From: Julien C. <jul...@gm...> - 2009-04-24 12:01:27
|
Hi guys, I am a little scared by the downloads stats: https://sourceforge.net/project/stats/detail.php?group_id=257014&ugn=clops&type=prdownload Cheers, Julien |
|
From: Fintan F. <fi...@gm...> - 2009-04-22 11:55:08
|
CLOPS release 0.2 is now live. This release contains a number of bugfixes, changes and improvements, including: - Template name is now taken from the template file, or specified by the user, or taken from the template file name. - Added templates: htmldev - Enhanced templates: html, all the code templates - string-enum generate a Java enum type - The option syntax for the command line of CLOPS changed - Enabled description String for the Name section and the format section in the DSL - Improved documentation of CLOPS command-line input. - Infinite lookahead parser provided as a method, rather than an option. The release is available from the sourceforge download page: https://sourceforge.net/project/showfiles.php?group_id=257014 Please note that the svn layout has changed to have top-level folders of trunk/ and tags/. Thus, to get the trunk check out the following url: https://clops.svn.sourceforge.net/svnroot/clops/trunk |