Re: Debian support [was D source code formatter]

2018-02-22 Thread Russel Winder via Digitalmars-d
On Thu, 2018-02-22 at 07:00 +, Seb via Digitalmars-d wrote: > […] > Though Sociomantic has recently taken over the release process of > dfmt and currently provides APT packages at bintray: > > https://bintray.com/dlang-community/apt/dfmt So now we have both: http://d-apt.sourceforge.net/

Re: D source code formatter

2018-02-21 Thread aberba via Digitalmars-d
On Thursday, 22 February 2018 at 05:38:38 UTC, psychoticRabbit wrote: On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote: On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote: I rely (heavily) on clang-format in my C code. It save me so much effort and has

Re: D source code formatter

2018-02-21 Thread Timothee Cour via Digitalmars-d
note that we'd need to implement https://github.com/dlang-community/dfmt/issues/159 ( option to format only diff-ed lines (like git clang-format)) in order to run dfmt on only the part of source code that was modified in a PR. this is to avoid concern that it affects git history / git blame

Re: D source code formatter

2018-02-21 Thread Seb via Digitalmars-d
On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote: I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word

Re: D source code formatter

2018-02-21 Thread rikki cattermole via Digitalmars-d
On 22/02/2018 6:38 PM, psychoticRabbit wrote: On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote: On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote: I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day

Re: D source code formatter

2018-02-21 Thread psychoticRabbit via Digitalmars-d
On Thursday, 22 February 2018 at 04:48:58 UTC, Nicholas Wilson wrote: On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote: I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also

Re: D source code formatter

2018-02-21 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 22 February 2018 at 04:35:24 UTC, psychoticRabbit wrote: I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word

D source code formatter

2018-02-21 Thread psychoticRabbit via Digitalmars-d
I rely (heavily) on clang-format in my C code. It save me so much effort and has become a vital day to day tool for me. I was wondering whether D also has a 'reliable' source code formatter. (reliable being a key word there). Also, if it does, then why is it not included in the distribution

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer and parser for D first (which I'd _love_ to do but just haven't had

Re: dfmt - D source code formatter

2012-07-05 Thread Paulo Pinto
On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote: On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer

Re: dfmt - D source code formatter

2012-07-05 Thread Jens Mueller
Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want. Jens

Re: dfmt - D source code formatter

2012-07-05 Thread Paulo Pinto
On Thursday, 5 July 2012 at 06:27:55 UTC, Walter Bright wrote: On 7/4/2012 10:22 PM, Jonathan M Davis wrote: On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer

Re: dfmt - D source code formatter

2012-07-05 Thread Jonathan M Davis
On Thursday, July 05, 2012 11:11:28 Paulo Pinto wrote: This are the type of projects that would benefit from having the compiler available as library. It will be eventually, but someone (or several someones) will have to take the time to do it. Once I find the time, I intend to port the lexer

Re: dfmt - D source code formatter

2012-07-05 Thread maarten van damme
2012/7/5 Jens Mueller jens.k.muel...@gmx.de: Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want. Jens I'm using uncrustify too

Re: dfmt - D source code formatter

2012-07-05 Thread Jens Mueller
maarten van damme wrote: 2012/7/5 Jens Mueller jens.k.muel...@gmx.de: Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm using uncrustify (http://uncrustify.sourceforge.net/). It does most of the time what I want

Re: dfmt - D source code formatter

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 06:46, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? It's a great idea but as others have said, I see no point in creating this until we have a D compiler available as a library. -- /Jacob Carlborg

Re: dfmt - D source code formatter

2012-07-05 Thread Jacob Carlborg
On 2012-07-05 06:46, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I just tried ddmd-clean and it already does some form of source code formatting. It will format the following file: https://github.com/zachthemystic/ddmd

Re: dfmt - D source code formatter

2012-07-05 Thread Brian Schott
On Thursday, 5 July 2012 at 04:47:29 UTC, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I'm already working on adding formatting to my general-purpose D tool. https://github.com/Hackerpilot/Dscanner

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/4/2012 9:46 PM, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way.

Re: dfmt - D source code formatter

2012-07-05 Thread Brian Schott
On Thursday, 5 July 2012 at 19:22:56 UTC, Walter Bright wrote: I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way. Eclipse has had a LOT of time and energy put into it, and it still makes my javadoc uglier than it was

Re: dfmt - D source code formatter

2012-07-05 Thread Roman D. Boiko
On Thursday, 5 July 2012 at 22:25:15 UTC, Walter Bright wrote: I agree that whatever is inside the comment should be left alone. I was more talking about lining up comment blocks, etc. Why would that be more difficult to do than code formatting? I'm wondering.

Re: dfmt - D source code formatter

2012-07-05 Thread Walter Bright
On 7/5/2012 1:52 PM, Brian Schott wrote: On Thursday, 5 July 2012 at 19:22:56 UTC, Walter Bright wrote: I think that formatting the code is actually rather easy - the hard part will be dealing with the comments in a reasonable way. Eclipse has had a LOT of time and energy put into it, and it

Re: dfmt - D source code formatter

2012-07-05 Thread Brian Schott
On Thursday, 5 July 2012 at 22:27:09 UTC, Roman D. Boiko wrote: On Thursday, 5 July 2012 at 22:25:15 UTC, Walter Bright wrote: I agree that whatever is inside the comment should be left alone. I was more talking about lining up comment blocks, etc. Why would that be more difficult to do than

dfmt - D source code formatter

2012-07-04 Thread Walter Bright
It would be nice to have a D source code formatter. But it needs a champion. Who's up for it?

Re: dfmt - D source code formatter

2012-07-04 Thread Andrei Alexandrescu
On 7/5/12 12:46 AM, Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Yes please. Andrei

Re: dfmt - D source code formatter

2012-07-04 Thread Jonathan M Davis
On Wednesday, July 04, 2012 21:46:29 Walter Bright wrote: It would be nice to have a D source code formatter. But it needs a champion. Who's up for it? Doesn't that need a lexer and parser for D first (which I'd _love_ to do but just haven't had time to get around to)? - Jonathan M Davis