On Thu, Mar 19, 2020 at 1:09 PM Patricia Shanahan <p...@acm.org> wrote: > > On 3/19/2020 9:11 AM, Sam Ruby wrote: > > On Thu, Mar 19, 2020 at 10:48 AM Patricia Shanahan <p...@acm.org> wrote: > >> > >> What mailing list should be used for discussing Whimsy implementation? > > > > At the top of this thread, I pointed people to > > dev@whimsical.apache.org. I encourage people who reply to this email > > to move the conversation there. I would do that, but that's a public > > list and I would be including content from a message sent to a private > > list. Everyone has my permission to copy my parts of this email > > there. > > > >> I would prefer to see effort expended on a clear list of the languages > >> and tools I would need to know to contribute to Whimsy in general, with > >> pointers to documentation and recommended tutorials, and a tutorial on > >> how to go about changing or adding a feature. Adding more tools to the > >> list seems undesirable. > > > > If you go to whimsy.apache.org and click on the About link at the top > > right of the page, you will be taken to: > > > > https://whimsy.apache.org/technology > > Thanks. I will get reading. > > ... > >> I am not a fan of machine converted code. One tends to get very stilted, > >> unnatural code in the new language, rather like machine translation of > >> natural language. I have only done a little Javascript programming, and > >> no Ruby, but I would be pleasantly surprised if the most natural, > >> idiomatic way of doing things were the same in the two languages. > > > > They actually are very close, meaning that a machine translation is > > largely feasible. Compare: > > > > https://github.com/rubys/whimsy-board-agenda-nodejs/blob/master/src/server/agenda/special.js > > https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/agenda/special.rb > > > > I have a tool that does a one way conversion from Ruby to Javascript. > > You can try it out here: > > > > https://whimsy.apache.org/ruby2js/functions > > Given my current situation, no Ruby and only very basic Javascript, > which should I study now? I have some Javascript books, but if I should > learn Ruby I would welcome recommendations. I prefer books that teach a > language from scratch to "conversion" books. Each language I've used has > its own mindset, and I find that easier to get if I ignore all the > languages I already know and concentrate on thinking in the one I'm > learning.
I actually don't recommend starting with books. I recommend starting with an example that you understand and modifying it. > I am mainly interested in areas other than the agenda, and in adding new > areas. For example, it should be possible to fully participate in the > Members' Meeting without using Subversion. Between increased recognition > for non-programming contributions, and young programmers growing up with > Git, we may already have members who do not know Subversion, and we will > be likely to have more in the future. This might be the closest example: https://whimsy.apache.org/treasurer/bill-upload The source code is here: https://github.com/apache/whimsy/blob/master/www/treasurer/bill-upload.cgi It is a simple form, where both the display of the form and the processing of the form inputs are in the same file. The first bit of learning curve you will find is not the Ruby language syntax, but that I've created a library (in Ruby terms, it is called a gem) that converts method calls that start with an underscore to HTML. This library can be found here: https://github.com/rubys/wunderbar/blob/master/README.md Note the following line: _form.form_horizontal enctype: 'multipart/form-data', method: 'post' do The lack of an action attribute causes the POST to be sent to the same URL. Wunderbar will take the form fields and populate variables with names that start with an @ sign. So the following input field: _textarea.form_control name: 'source', id: 'source', cols: 80 will cause a variable named @source to be set in response to a POST with that data. An example of an actual call to svn: _.system ['svn', 'checkout', File.join(bills, @dest), tmpdir, '--depth=empty', ['--no-auth-cache', '--non-interactive'], (['--username', $USER, '--password', $PASSWORD] if $PASSWORD)] - Sam Ruby