Re: Sample Forum
Nice work Nathan, that certainly is a more pleasant user interface than nabble but I don't ever use nabble but rather just email clients. I'd certainly be happy advertising something like this as another alternate informal channel for Groovy communication alongside Slack and StackOverflow. If there was a way to make emails show up on the mailing list we could possibly take it further. Would this only be possible if Apache hosted their own discourse instance? Is that possible? I suspect that is what is really needed. We have a requirement to conduct all official project business using Apache mailing lists but really I believe the underlying requirements are: * Being able to link users back to an Apache user id is useful for checking CLA agreements have been signed etc. PMC members/Committers have a responsibility to check this. * Having Apache Infrastructure being able to vouch that messages haven't been tampered with which is important from an Apache Legal point of view. * Hard requirement for Apache Members and Apache Board members to be able to peruse our mailing lists in the same way as other projects. * Single point of call for anyone to go to see all official decisions made by the project. * An ability to also have a private list so that things like security issues can be discussed before being made more widely available. Cheers, Paul. On Thu, Jan 18, 2018 at 2:20 PM, Nathan Harveywrote: > The delay can be removed, no worries :). The posts from the forums do not > show up on the mailing list, but they show up as emails as if they were > part > of a mailing list. Basically the idea is that people don't have to leave > their email client if they don't want to. Apologies if that was unclear. > > > > -- > Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html >
Re: Sample Forum
The delay can be removed, no worries :). The posts from the forums do not show up on the mailing list, but they show up as emails as if they were part of a mailing list. Basically the idea is that people don't have to leave their email client if they don't want to. Apologies if that was unclear. -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
Re: Improving named-argument support
Yes, we have spoken about providing named arguments as a language feature before. It doesn't rule out the need for other options though. I have put some comments in the issue. On Thu, Jan 18, 2018 at 7:37 AM, Nathan Harveywrote: > MG's approach is the one I favor, although I am not sure I like using = in > the calling syntax; the colon makes more sense to me. Small detail, though. > > > > -- > Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html >
Re: Sample Forum
Let me clarify the two minute delay. When you start composing your post (on the forums, not from email) you of course have an unlimited amount of time for writing your post. Once you post it on the forums, it is posted to the forum instantly, but the email to people receiving emails alerts is not yet sent. After two minutes the email alert will be sent. This gives you time to fix a mistake , if you made one, before the email is sent out. When you post directly from your email client, there is no intentional delay. I see your post in my email! Thanks for giving it a try :) -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
Re: Sample Forum
Hi Nathan, Thanks for your spending time on setting up the forum. I tried just now, it's amazing! As for the following feature about delay sending, I wish you could remove it(and wish send the mail without any delay)... because if we are editing and have not completed in 2 minutes but the mail is sent, then the mail is not complete... ``` Quick note: when you post a topic, there is a 2 minute window in which you can make edits before it is sent out to email subscribers, so if you experience delay that is why. ``` P.S. I replied your "Improving named-argument support" thread, looking forward to seeing it in mailing list ;-) Cheers, Daniel.Sun Cheers, Daniel.Sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
Sample Forum
Hi guys, today I have set up a sample Discourse forum for everyone to use. You can find it here: http://groovy.trydiscourse.com/ This forum is configured to behave almost exactly like a mailing list, for those who want it. You can mail in topics. For example, send an email to: groovy+us...@discoursemail.com - you should not have to create an account for this to work. It will create one for you. In addition, if you create an account on the forums, you are by default subscribed to the categories of the forums, just like the mailing list. New topics will trigger an email sent straight to your inbox, to which you can reply. Obviously you can reply to them on the forum as well. When replying via your email client, you should take advantage of using Markdown syntax. I've also created a sample topic (copied from the mailing list) for you to view on the forum, so you can appreciate the modern forum experience that Discourse offers: http://groovy.trydiscourse.com/t/improving-named-argument-support/15. I encourage you to look at the current equivalent here: http://groovy.329449.n5.nabble.com/Improving-named-argument-support-tp5746753.html for comparison. Please feel free to make your own topics and see how they interact with your email client and let me know if you have any problems. Quick note: when you post a topic, there is a 2 minute window in which you can make edits before it is sent out to email subscribers, so if you experience delay that is why. -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
Re: Improving named-argument support
MG's approach is the one I favor, although I am not sure I like using = in the calling syntax; the colon makes more sense to me. Small detail, though. -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html
Re: Executing dynamic DSL command
I've been reading the older posts and this code which constructs a closure works. It evalutes this line of code. bootStrap '//*[@id=\"pane\"]' public Object runInContext(Object context, String script, GroovyShell shell) { Closure cl = (Closure) shell.evaluate("{->" + script + "}"); cl.setDelegate(context); cl.setResolveStrategy(Closure.DELEGATE_FIRST); return cl.call(); } Thanks, Mohan On 16 January 2018 at 19:35, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > I mean that this works if the DSL command is hard-coded. I was trying to > pass it into the shell. > > Am I allowed to pass it into the shell ? This evaluation is generic for > many such fluent commands. > > def evaluatexpath( String dsl ){ > def binding = new Binding( > dxp: new DynamicXPath(), > DslCommand: dsl > ) > > def shell = new GroovyShell(this.class.classLoader, binding) > > shell.evaluate ''' > @BaseScript(com.automation.script.AxesBaseScript) > import groovy.transform.BaseScript > bootStrap "//*[@id='pane']" > ''' > } > > Mohan > > > On 16 January 2018 at 19:06, Mohan Radhakrishnan < > radhakrishnan.mo...@gmail.com> wrote: > >> Hi, >> >> I am reading the book 'Groovy in Action' and this code is based on >> that. >> >> My base script stores 'DynamicXPath' like this. >> >> abstract class AxesBaseScript extends Script { >> >> public DynamicXPath bootStrap(String initialPath ){ >> this.binding.dxp.bootStrap initialPath >> } >> } >> >> And here I want to execute a dynamic DSL command 'dsl ' >> >> by storing it in the binding as 'DslCommand'. >> >> def evaluatexpath( String dsl ){ >> def binding = new Binding( >> dsp: new DynamicXPath(), >> DslCommand: dsl >> ) >> >> def shell = new GroovyShell(this.class.classLoader, binding) >> >> shell.evaluate ''' >> @BaseScript(com.automation.script.AxesBaseScript) >> import groovy.transform.BaseScript >> DslCommand >> ''' >> } >> >> Looks like the DSL string I pass 'bootStrap somestring' is returned as >> it is as a string by evaluate. >> >> Can I not execute 'bootStrap somestring' ? >> >> The relevant section in the book is '*Listing 19.12 Using a custom base >> script class'* >> >> *My '*DslCommand' replaces 'move left' which you see at the end of the >> listing. >> I just want to pass my DSL commands to the evaluate method as parameters >> through the binding. >> >> >> Thanks, >> Mohan >> > >