March 08, 2014
On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
> I don't understand this part "converted to UTF-8 when necessary" in [1].

See Module::parse() in module.c, it converts all non-UTF-8 formats to
UTF-8 when reading a file.

Actually thinking about this, this has to be extremely inefficient. Hopefully once the compiler is ported to D we won't have to do this sort of conversion.
March 08, 2014
On Saturday, 8 March 2014 at 21:07:52 UTC, Andrej Mitrovic wrote:
> On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
>> [1]: I've been looking at trying to hook the DMD frontend up to
>> LLVM (www.llvm.org)
>
> Uhm, haven't you heard of the LDC project? http://wiki.dlang.org/LDC

He was quoting an ancient bit of the article :P
March 08, 2014
On Saturday, 8 March 2014 at 21:09:14 UTC, Andrej Mitrovic wrote:
> On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
>> Also, where is root/async.c actually used?
>
> In mars.c, take a look at the "#if ASYNCREAD" section.

Thanks. I will check out.
March 08, 2014
On Saturday, 8 March 2014 at 21:16:30 UTC, Andrej Mitrovic wrote:
> On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
>> I don't understand this part "converted to UTF-8 when necessary"
>> in [1].
>
> See Module::parse() in module.c, it converts all non-UTF-8 formats to
> UTF-8 when reading a file.
>
> Actually thinking about this, this has to be extremely inefficient.
> Hopefully once the compiler is ported to D we won't have to do this
> sort of conversion.

Umm, why exactly? what approach will you be using instead of? I'm learning a bit more about compilers/programming languages at my free time. And if when the dmd in D port starts and I know at least enough about to be able to get involved with the project sure I will do. Of course I hope my poor english don't scare everybody in there but it's something I'm going to change
March 08, 2014
On 03/08/2014 10:16 PM, Andrej Mitrovic wrote:
> On 3/8/14, Asman01 <jckj33@gmail.com> wrote:
>> I don't understand this part "converted to UTF-8 when necessary"
>> in [1].
>
> See Module::parse() in module.c, it converts all non-UTF-8 formats to
> UTF-8 when reading a file.
>
> Actually thinking about this, this has to be extremely inefficient.
> Hopefully once the compiler is ported to D we won't have to do this
> sort of conversion.
>

How many actual D source files are not UTF-8?
March 08, 2014
On 3/8/14, Timon Gehr <timon.gehr@gmx.ch> wrote:
> How many actual D source files are not UTF-8?

No idea. Maybe some Windows tools use UTF-16, although I can't think of any. VS uses UTF-8 right?
March 12, 2014
On Saturday, 8 March 2014 at 13:25:32 UTC, Andrej Mitrovic wrote:
> Recently Vladimir Panteleev has ported the DMD Source Guide from the old wiki to the new one[1], and updated it with up-to-date information. I've added a "DMD Hacking Tips & Tricks" section[2], which should help people new to the codebase to start hacking on DMD-FE. I've only added a few tips that I know of.
>
> If you regularly hack on DMD and know some good tips for new DMD developers, please either post those tips in this thread and we'll add them to the wiki, or you can directly add them to the wiki. Everybody benefits from sharing knowledge about compiler internals. For example, GCC has pretty extensive documentation about its internals[3].
>
> [1] : http://wiki.dlang.org/DMD_Source_Guide
> [2] : http://wiki.dlang.org/DMD_Source_Guide#DMD_Hacking_Tips_.26_Tricks
> [3] : http://gcc.gnu.org/onlinedocs/gccint/

Just for clarification, the parsing method which dmd use is a recursive descent parser, right?
March 12, 2014
On Saturday, 8 March 2014 at 22:20:50 UTC, Andrej Mitrovic wrote:
> On 3/8/14, Timon Gehr <timon.gehr@gmx.ch> wrote:
>> How many actual D source files are not UTF-8?
>
> No idea. Maybe some Windows tools use UTF-16, although I can't think
> of any. VS uses UTF-8 right?

VS do use UTF-16, IIRC.
March 12, 2014
On 3/11/2014 9:02 PM, Asman01 wrote:
>
> Just for clarification, the parsing method which dmd use is a recursive
> descent parser, right?

Yes.
March 12, 2014
On Wednesday, 12 March 2014 at 01:17:23 UTC, Asman01 wrote:
> On Saturday, 8 March 2014 at 22:20:50 UTC, Andrej Mitrovic wrote:
>> On 3/8/14, Timon Gehr <timon.gehr@gmx.ch> wrote:
>>> How many actual D source files are not UTF-8?
>>
>> No idea. Maybe some Windows tools use UTF-16, although I can't think
>> of any. VS uses UTF-8 right?
>
> VS do use UTF-16, IIRC.

You can change the file encoding but the default is codepage 1252
for me (I assume it changes based on your locale but I don't know
that for certain). It's definitely not UTF-16 encoded. I don't recall ever seeing Windows VS source code encoded with anything other than 1252/8859-1 or (rarely) UTF-8.