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
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
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
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
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
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
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 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
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
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
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.
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
Brian Schott:
https://github.com/Hackerpilot/dfix
Sounds like a very good start :-)
Bye,
bearophile
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
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
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.
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
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
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
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
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
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
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
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
? 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
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,
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
). 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
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
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
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
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.
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
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
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
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
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
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
38 matches
Mail list logo