Re: dfix 0.2.0

2014-11-26 Thread Nordlöw
On Tuesday, 25 November 2014 at 23:58:21 UTC, Brian Schott wrote: On Tuesday, 25 November 2014 at 23:47:07 UTC, Nordlöw wrote: On Tuesday, 25 November 2014 at 23:45:17 UTC, Nordlöw wrote: I guess one solution would be to make warnings non-errors right but that seems dumb concerning what dfix

Re: dfix 0.2.0

2014-11-26 Thread Nordlöw
On Wednesday, 26 November 2014 at 13:11:28 UTC, Nordlöw wrote: It would be nice if we could call DUB either as dub -wi or in a more generic way as dub --dmd-flags=wi,... so I don't have to clone the top-level project and modify its dub.json myself in order to test dfix built using

Re: dfix 0.2.0

2014-11-25 Thread ketmar via Digitalmars-d-announce
On Mon, 24 Nov 2014 19:22:51 + Brian Schott via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: dfix is a tool for automatically upgrading the syntax of D source code. Changes since 0.1.1: * #1 dfix will now rewrite const int foo() {} to int foo() const {} * #6

Re: dfix 0.2.0

2014-11-25 Thread Nordlöw
On Monday, 24 November 2014 at 19:22:52 UTC, Brian Schott wrote: dfix is a tool for automatically upgrading the syntax of D source code. Changes since 0.1.1: * #1 dfix will now rewrite const int foo() {} to int foo() const {} * #6 The C-style array syntax fix is no longer incorrectly applied

Re: dfix 0.2.0

2014-11-25 Thread Nordlöw
On Tuesday, 25 November 2014 at 23:45:17 UTC, Nordlöw wrote: I guess one solution would be to make warnings non-errors right but that seems dumb concerning what dfix can do for us regarding auto-converting C-style arrays syntax to D-style :) BTW: How do I specify that a dependency package

Re: dfix 0.2.0

2014-11-25 Thread Brian Schott via Digitalmars-d-announce
On Tuesday, 25 November 2014 at 23:47:07 UTC, Nordlöw wrote: On Tuesday, 25 November 2014 at 23:45:17 UTC, Nordlöw wrote: I guess one solution would be to make warnings non-errors right but that seems dumb concerning what dfix can do for us regarding auto-converting C-style arrays syntax to D

Re: dfix 0.2.0

2014-11-25 Thread FrankLike via Digitalmars-d-announce
On Monday, 24 November 2014 at 19:22:52 UTC, Brian Schott wrote: dfix is a tool for automatically upgrading the syntax of D source code. Changes since 0.1.1: * #1 dfix will now rewrite const int foo() {} to int foo() const {} * #6 The C-style array syntax fix is no longer incorrectly applied

dfix 0.2.0

2014-11-24 Thread Brian Schott via Digitalmars-d-announce
dfix is a tool for automatically upgrading the syntax of D source code. Changes since 0.1.1: * #1 dfix will now rewrite const int foo() {} to int foo() const {} * #6 The C-style array syntax fix is no longer incorrectly applied to certain ASM statements. * #9 You can now provide directory

Re: dfix 0.1.1

2014-10-29 Thread FrankLike via Digitalmars-d-announce
On Tuesday, 28 October 2014 at 01:29:32 UTC, Brian Schott wrote: No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias syntax to new-style * Fixes implicit concatenation of string

Re: dfix 0.1.1

2014-10-29 Thread ketmar via Digitalmars-d-announce
On Tue, 28 Oct 2014 01:29:30 + Brian Schott via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias

Re: dfix 0.1.1

2014-10-29 Thread Martin Nowak via Digitalmars-d-announce
On 10/28/2014 09:07 AM, Daniel N wrote: Awesome, would be nice if it was included with the default install for 2.067+ It says 0.1.x, maybe when it's over 0.5.x :). In any case I'm really glad to see this moving forward.

Re: dfix 0.1.1

2014-10-28 Thread Daniel N via Digitalmars-d-announce
On Tuesday, 28 October 2014 at 01:29:32 UTC, Brian Schott wrote: No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias syntax to new-style * Fixes implicit concatenation of string

Re: dfix 0.1.1

2014-10-28 Thread bearophile via Digitalmars-d-announce
Brian Schott: https://github.com/Hackerpilot/dfix Sounds like a very good start :-) Bye, bearophile

Re: dfix 0.1.1

2014-10-28 Thread Atila Neves via Digitalmars-d-announce
Good work, man. Atila On Tuesday, 28 October 2014 at 01:29:32 UTC, Brian Schott wrote: No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias syntax to new-style * Fixes implicit

Re: dfix 0.1.1

2014-10-28 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 10/27/14 6:29 PM, Brian Schott wrote: No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias syntax to new-style * Fixes implicit concatenation of string literals * Automatic

Re: dfix 0.1.1

2014-10-28 Thread Brian Schott via Digitalmars-d-announce
On Wednesday, 29 October 2014 at 02:10:09 UTC, Andrei Alexandrescu wrote: Cool! Is it idempotent if ran twice? -- Andrei It should be. If you find a case where running dfix on the output of dfix causes a change, please file an issue on Github.

dfix 0.1.1

2014-10-27 Thread Brian Schott via Digitalmars-d-announce
No. Really. I'm serious. https://github.com/Hackerpilot/dfix dfix is a tool for automatically upgrading older D syntax to the newer style. * Updates old-style alias syntax to new-style * Fixes implicit concatenation of string literals * Automatic conversion of C-style array declarations

Re: Lang.NEXT panel (dfix)

2014-06-20 Thread Stefan Koch via Digitalmars-d-announce
if, and the like. I imagine that trying to create an automated refactoring tool for D is a bit like parsing HTML with regex. http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags A hypothetical dfix-tool has a diffrent scope compared to a compiler. Every

Re: Lang.NEXT panel (dfix)

2014-06-20 Thread Bruno Medeiros via Digitalmars-d-announce
for examples of dfix changes (even if for hypothetical language changes) - to see how easily they could be implemented or not. -- Bruno Medeiros https://twitter.com/brunodomedeiros

Re: Lang.NEXT panel (dfix)

2014-06-20 Thread Dicebot via Digitalmars-d-announce
On Friday, 20 June 2014 at 13:04:23 UTC, Bruno Medeiros wrote: Rather, simple fix changes that would be useful if the API or syntax of the language changes. That's why I asked for examples of dfix changes (even if for hypothetical language changes) - to see how easily they could be implemented

Re: Lang.NEXT panel (dfix)

2014-06-19 Thread Brian Schott via Digitalmars-d-announce
On Thursday, 19 June 2014 at 20:37:48 UTC, Stefan Koch wrote: hmm well all string-mixins life at compile-time so one can print them out at runtime dump the source and but it into the ast same for the results of static if and the like I imagine that trying to create an automated refactoring

Re: Lang.NEXT panel (dfix)

2014-06-18 Thread Jacob Carlborg via Digitalmars-d-announce
On 17/06/14 22:00, Bruno Medeiros wrote: And perhaps rightly so, one could make a case that string mixins should be used sparsely? We have to realize that string mixins are very useful, but are a dirty hack that is a replacement for AST macros. I fully agree, but that won't stop anyone from

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Jacob Carlborg via Digitalmars-d-announce
of modifications that would be useful for such a dfix tool? (I haven't yet had the time to watch the full panel video, if that's relevant) * The parser haven't been available for that long (I think) * Can they handle whole language? * Semantic analysis is needed. Otherwise as soon as someone uses templates

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
On 16/06/2014 22:10, Stefan Koch wrote: The thing I have in mind should be really easy for simple tasks as in `if constuctor in any class has parameter of type oldRouter change that parameter to type new Router` but i habe yet to find a good notation for that I guess a DSL for simple

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
? Can someone give some examples of modifications that would be useful for such a dfix tool? (I haven't yet had the time to watch the full panel video, if that's relevant) * The parser haven't been available for that long (I think) * Can they handle whole language? Dunno about DScanner

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
On 17/06/2014 16:45, Bruno Medeiros wrote: Dunno about DScanner, but if it's being used in DCD, I'd guess it can handle the whole language, or be fairly close to it. Similarly, there is also DParser2 from MonoD and the DDT parser (for the tool I'm working on) And DDT is fairly complete,

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
On 17/06/2014 16:45, Bruno Medeiros wrote: Similarly, there is also DParser2 from MonoD and the DDT parser (for the tool I'm working on) And the DDT parser is fairly complete, AFAIK, and well covered in tests. There might be some syntax I have missed if I misunderstood the grammar spec, but

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread deadalnix via Digitalmars-d-announce
). But that's why I asked for examples of dfix scenarios. Until you hit a static if. Which is always. Adding final to every method in certain classes could be done without semantic analysis. Reworking certain constructs to different constructs possibly as well (for example change

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Jacob Carlborg via Digitalmars-d-announce
On Tuesday, 17 June 2014 at 15:45:55 UTC, Bruno Medeiros wrote: Adding final to every method in certain classes could be done without semantic analysis. Reworking certain constructs to different constructs possibly as well (for example change foreach_reverse to just foreach usage) What

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
as soon as someone uses templates or mixins the tool won't properly work I think there would be a lot of modifications that one can do without semantic analysis (or limited analysis). But that's why I asked for examples of dfix scenarios. Until you hit a static if. Which is always. Adding final

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Bruno Medeiros via Digitalmars-d-announce
to those templates as well, or just the class. If doing do might break other classes that use the same template, well, that is a problem that transcends whether this transformation is done manually or by a tool. It would not be an issue with dfix itself then. -- Bruno Medeiros https://twitter.com

Re: Lang.NEXT panel (dfix)

2014-06-17 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 17 June 2014 at 19:48:42 UTC, Bruno Medeiros wrote: On 17/06/2014 19:10, deadalnix wrote: On Tuesday, 17 June 2014 at 15:45:55 UTC, Bruno Medeiros wrote: Dunno about DScanner, but if it's being used in DCD, I'd guess it can handle the whole language, or be fairly close to it.

Re: Lang.NEXT panel (dfix)

2014-06-16 Thread Bruno Medeiros via Digitalmars-d-announce
always suffers of human errors. I got convinced a dfix tool would be a strategic component of D's offering going forward. Andrei What's keeping us from having such a tool? It seems that after one has a decent parser (that also keeps tracks of the source ranges of AST nodes), it's easy

Re: Lang.NEXT panel (dfix)

2014-06-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/16/14, 6:43 AM, Bruno Medeiros wrote: On 12/06/2014 18:53, Andrei Alexandrescu wrote: I got convinced a dfix tool would be a strategic component of D's offering going forward. Andrei What's keeping us from having such a tool? It seems that after one has a decent parser (that also

Re: Lang.NEXT panel (dfix)

2014-06-16 Thread Stefan Koch via Digitalmars-d-announce
for such a dfix tool? (I haven't yet had the time to watch the full panel video, if that's relevant) Well, my recent efforts lead my to belief that I am in over my head with this. But ... many sufficiently simple transformations can be done with a complex regex and for me that is faster, given

Re: Lang.NEXT panel (dfix)

2014-06-16 Thread Bruno Medeiros via Digitalmars-d-announce
of modifications that would be useful for such a dfix tool? (I haven't yet had the time to watch the full panel video, if that's relevant) Well, my recent efforts lead my to belief that I am in over my head with this. But ... many sufficiently simple transformations can be done with a complex regex and for me

Re: Lang.NEXT panel (dfix)

2014-06-16 Thread Stefan Koch via Digitalmars-d-announce
DSL?! You crazy bro? If you are using DScanner, just let people use D itself to write their own custom AST transformation code. With DUB it should be super easy to compile that code and run it on the target D code. This solution is vastly more simple than inventing your own DSL, and scales

Re: Dfix

2014-06-14 Thread Stefan Koch via Digitalmars-d-announce
As it happens I am writing a kind of DFIX on top of DScanner right at the moment. There are a few details to sort out. But I should have some small demo pretty soon. Regrards, Stefan