March 09, 2007
Andrei Alexandrescu (See Website For Email) wrote:
> 
> Stepping through was of course possible and useful. The main difference was that stepping through manually-written code was replaced by stepping through the more compact templated code. The instantiation types are different and therefore different actual binary code maps to the same source line.

It sounds like you're describing debugging C++ template code.  Would the same thing be possible with code generated from strings in D via mixin?  I suppose the compiler could output source files to pair with the object files, but beyond that I don't see how this could be done.


Sean
March 09, 2007
Sean Kelly wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>>
>> Stepping through was of course possible and useful. The main difference was that stepping through manually-written code was replaced by stepping through the more compact templated code. The instantiation types are different and therefore different actual binary code maps to the same source line.
> 
> It sounds like you're describing debugging C++ template code.  Would the same thing be possible with code generated from strings in D via mixin?  I suppose the compiler could output source files to pair with the object files, but beyond that I don't see how this could be done.

Shriram Krishnamurthi has done work on macros that allow traceability back to the source code of the macro, but probably that won't be doable for string-generated code.

We need to devise a solution to that; for example, for each file blah.d that contains mixins, the compiler could automatically generate blah.d.expanded and make debugging info point into that file.


Andrei
March 09, 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Sean Kelly wrote:
> 
>> Andrei Alexandrescu (See Website For Email) wrote:
>>
>>>
>>> Stepping through was of course possible and useful. The main difference was that stepping through manually-written code was replaced by stepping through the more compact templated code. The instantiation types are different and therefore different actual binary code maps to the same source line.
>>
>>
>> It sounds like you're describing debugging C++ template code.  Would the same thing be possible with code generated from strings in D via mixin?  I suppose the compiler could output source files to pair with the object files, but beyond that I don't see how this could be done.
> 
> 
> Shriram Krishnamurthi has done work on macros that allow traceability back to the source code of the macro, but probably that won't be doable for string-generated code.
> 
> We need to devise a solution to that; for example, for each file blah.d that contains mixins, the compiler could automatically generate blah.d.expanded and make debugging info point into that file.
> 
> 
> Andrei

Assuming somthing like my dparse is used, another choice is to, inside of the static foreaches put in a debug block that assigns the values of the template variables to local variables then you can look at them in the debugger and figure out what state you are in.

I /realy/ need to get a debugger and see what happens when I step throught some of this stuff. <G>
March 09, 2007
This may get you started..
Main Sending Code
http://www.akbkhome.com/svn/team/dinc/src/dinc/deliver/Smtp.d
MX Lookup code
http://www.akbkhome.com/svn/team/dinc/src/dinc/deliver/MxRecord.d
Usage Example.
http://www.akbkhome.com/svn/team/dinc/src/dinc/deliver/External.d

Regards
Alan

Roger wrote:
> Hello i'm student of College of Engineering Informatics in Fribourg Switzerland.
> 
> For a semester project i want to create a E-mail client with D.
> 
> Anyone can help me to know how to create a pop3 and smtp connection with D?
> I have searched a lot but i found only a dead reference:
> http://www.digitalmars.com/d/archives/digitalmars/D/22349.html
> 
> Tanks a lot, bye, Roger
March 09, 2007
POP3 really isn't very complicated.  I've written clients for POP3 and SMTP (not in D) and it's really just a matter of following the RFCs. They're all command based so it's really just a matter of parsing the responses.

In fact, it wouldn't be that hard to adapt an existing FTP or SMTP implementation to POP3.  FTP is definitely much more complicated.

-[Unknown]


> Hello i'm student of College of Engineering Informatics in Fribourg Switzerland.
> 
> For a semester project i want to create a E-mail client with D.
> 
> Anyone can help me to know how to create a pop3 and smtp connection with D?
> I have searched a lot but i found only a dead reference:
> http://www.digitalmars.com/d/archives/digitalmars/D/22349.html
> 
> Tanks a lot, bye, Roger
March 09, 2007
Sean Kelly wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>>
>> Stepping through was of course possible and useful. The main difference was that stepping through manually-written code was replaced by stepping through the more compact templated code. The instantiation types are different and therefore different actual binary code maps to the same source line.
> 
> It sounds like you're describing debugging C++ template code.  Would the same thing be possible with code generated from strings in D via mixin?  I suppose the compiler could output source files to pair with the object files, but beyond that I don't see how this could be done.
> 
> 
> Sean

Its the same with any DSL compile-time or not.  You simply need to crate your own system to do it.  Most DSLs I've used (lua, shader lanaguages, script languages, xml) have done that.  Its not difficult.  It would be nice if the DSL helper library had some helpers for it though.

-Joel
1 2
Next ›   Last »