Moses-support Digest, Vol 103, Issue 37

Send Moses-support mailing list submissions to
moses-support@mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu

You can reach the person managing the list at
moses-support-owner@mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."


Today's Topics:

1. Re: Formatting source code (Gumble)
2. Re: Formatting source code (Jeroen Vermeulen)
3. Re: Formatting source code (Hieu Hoang)
4. Re: Formatting source code (Jeroen Vermeulen)
5. Re: Formatting source code (Jeroen Vermeulen)
6. Re: Formatting source code (Jeroen Vermeulen)


----------------------------------------------------------------------

Message: 1
Date: Fri, 15 May 2015 14:59:31 +0800
From: Gumble <abcdoyle888@gmail.com>
Subject: Re: [Moses-support] Formatting source code
To: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Cc: moses-support <moses-support@mit.edu>
Message-ID:
<CAFt8H75zOoCnMzR2sG27n1nBCMpv73MJ+yDcEGieYW9PiACqOQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The triple quote string literal in Python for example? Safety first.
2015?5?15? 14:25? "Jeroen Vermeulen" <jtv@precisiontranslationtools.com>???

> On 15/05/15 10:33, Hieu Hoang wrote:
> > Be my guest
>
> Thanks. As a bonus, it'll be really easy to clean up trailing
> whitespace in other types of files besides C/C++ source files. Provided
> that we know it's absolutely definitely safe for those file types, of
> course.
>
> Any suggestions?
>
>
> Jeroen
>
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20150515/6f0aeb13/attachment-0001.htm

------------------------------

Message: 2
Date: Fri, 15 May 2015 14:05:57 +0700
From: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Subject: Re: [Moses-support] Formatting source code
To: moses-support@mit.edu
Message-ID: <55559AD5.7080500@precisiontranslationtools.com>
Content-Type: text/plain; charset=windows-1252

On 15/05/15 10:33, Hieu Hoang wrote:
> Be my guest

First step is done. Instead of scripts/other/beautify.perl we now have
scripts/other/beautify.py.

It adds some options:

* --help, obviously.
* Verbosity is optional.
* It supports dry runs.
* You can make it ignore a difference in astyle versions.

Use that last option with care: I'm seeing a huge diff when running
astyle 2.04 instead of 2.01!

Next step is to generalize the "don't clean up in these directories"
part so we can easily reuse this for other projects. If it stays as
simple as it is, I could just make it a file of newline-separated
entries, named .beautify-ignore (or whatever better idea comes along).


Jeroen


------------------------------

Message: 3
Date: Fri, 15 May 2015 11:58:53 +0400
From: Hieu Hoang <hieuhoang@gmail.com>
Subject: Re: [Moses-support] Formatting source code
To: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Cc: moses-support <moses-support@mit.edu>
Message-ID:
<CAEKMkbi=1YzoQYygpO9KDh6Scz58=ABWfwG1Lbfk3ZQBF1K5SA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hieu Hoang
Researcher
New York University, Abu Dhabi
http://www.hoang.co.uk/hieu

On 15 May 2015 at 11:05, Jeroen Vermeulen <jtv@precisiontranslationtools.com
> wrote:

> On 15/05/15 10:33, Hieu Hoang wrote:
> > Be my guest
>
> First step is done. Instead of scripts/other/beautify.perl we now have
> scripts/other/beautify.py.
>
> It adds some options:
>
> * --help, obviously.
> * Verbosity is optional.
> * It supports dry runs.
> * You can make it ignore a difference in astyle versions.
>
> Use that last option with care: I'm seeing a huge diff when running
> astyle 2.04 instead of 2.01!
>
it's best to take this option out. Otherwise the formating will flip flop
depending on who's running beautfity and on what machine, We really don't
want it complicating code merge

>
> Next step is to generalize the "don't clean up in these directories"
> part so we can easily reuse this for other projects. If it stays as
> simple as it is, I could just make it a file of newline-separated
> entries, named .beautify-ignore (or whatever better idea comes along).
>
>
> Jeroen
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20150515/625bee50/attachment-0001.htm

------------------------------

Message: 4
Date: Fri, 15 May 2015 15:27:30 +0700
From: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Subject: Re: [Moses-support] Formatting source code
To: Hieu Hoang <hieuhoang@gmail.com>
Cc: moses-support <moses-support@mit.edu>
Message-ID: <5555ADF2.6000207@precisiontranslationtools.com>
Content-Type: text/plain; charset=utf-8

On 15/05/15 14:58, Hieu Hoang wrote:

> Use that last option with care: I'm seeing a huge diff when running
> astyle 2.04 instead of 2.01!
>
> it's best to take this option out. Otherwise the formating will flip
> flop depending on who's running beautfity and on what machine, We really
> don't want it complicating code merge

Done. It seems a bit silly that they just make format changes between
minor upgrades. I guess at some point we'll want a big-bang upgrade to
some newer version.


Jeroen



------------------------------

Message: 5
Date: Fri, 15 May 2015 16:06:49 +0700
From: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Subject: Re: [Moses-support] Formatting source code
To: moses-support@mit.edu
Message-ID: <5555B729.4060701@precisiontranslationtools.com>
Content-Type: text/plain; charset=windows-1252

On 15/05/15 14:05, Jeroen Vermeulen wrote:
> On 15/05/15 10:33, Hieu Hoang wrote:
>> Be my guest
>
> First step is done. Instead of scripts/other/beautify.perl we now have
> scripts/other/beautify.py.

Actually, there are still some bugs in the pattern-matching for the
directories that should *not* be beautified. Working on it.


Jeroen



------------------------------

Message: 6
Date: Fri, 15 May 2015 16:46:47 +0700
From: Jeroen Vermeulen <jtv@precisiontranslationtools.com>
Subject: Re: [Moses-support] Formatting source code
To: moses-support@mit.edu
Message-ID: <5555C087.9070305@precisiontranslationtools.com>
Content-Type: text/plain; charset=windows-1252

On 15/05/15 16:06, Jeroen Vermeulen wrote:

> Actually, there are still some bugs in the pattern-matching for the
> directories that should *not* be beautified. Working on it.

Should be fixed now. Hieu, could you try it and see if the results are
to your liking?

Use the --verbose (-v) and --dry-run (-n) options together if you only
want to see which commands it wants to run. It won't make any actual
changes.

Next question is, which files/directories in mgiza++ should not be
beautified? We should write a .beautify-ignore file there similar to
the one I just added to Moses. The new script requires this file, so
that there are no misunderstandings about where the ignored paths are
relative to.

Once we have that, we can run the same script on mgiza++. The script
doesn't need to be inside the source tree it operates on.


Jeroen


------------------------------

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


End of Moses-support Digest, Vol 103, Issue 37
**********************************************

0 Response to "Moses-support Digest, Vol 103, Issue 37"

Post a Comment