digitalmars.D - Pop3 connection with D
- Roger (6/6) Mar 08 2007 Hello i'm student of College of Engineering Informatics in Fribourg Swit...
- BCS (9/18) Mar 08 2007 As with a lot of D you might (but not nessisaraly) have to roll your
- Andrei Alexandrescu (See Website For Email) (5/29) Mar 08 2007 Possibly implementing protocols could be an area in which DSLs might
- kris (2/5) Mar 08 2007 Compile-time DSLs?
- Andrei Alexandrescu (See Website For Email) (3/10) Mar 08 2007 Obviously.
- kris (3/17) Mar 08 2007 That sounds reasonably sophisticated.
- Andrei Alexandrescu (See Website For Email) (10/29) Mar 08 2007 Very easy. The FTP protocol is described as a collection of states with
- kris (5/44) Mar 08 2007 sounds good.
- Andrei Alexandrescu (See Website For Email) (7/54) Mar 08 2007 Stepping through was of course possible and useful. The main difference
- Sean Kelly (6/12) Mar 08 2007 It sounds like you're describing debugging C++ template code. Would the...
- Andrei Alexandrescu (See Website For Email) (8/20) Mar 08 2007 Shriram Krishnamurthi has done work on macros that allow traceability
- BCS (7/35) Mar 08 2007 Assuming somthing like my dparse is used, another choice is to, inside
- janderson (6/21) Mar 08 2007 Its the same with any DSL compile-time or not. You simply need to crate...
- Lars Ivar Igesund (9/19) Mar 08 2007 There is a Pop3 client in Tango's patches directory which is likely to b...
- Alan Knowles (10/19) Mar 08 2007 This may get you started..
- Unknown W. Brackets (7/16) Mar 08 2007 POP3 really isn't very complicated. I've written clients for POP3 and
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
Mar 08 2007
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, RogerAs with a lot of D you might (but not nessisaraly) have to roll your own. SMTP isn't that bad (I've used it by hand in telnet). I expect pop would be about the same. IIRC there /is/ a lib out there for SMTP. If you feel "nerdy" enough you can just read the RFC's <G> pop3 http://tools.ietf.org/html/rfc1939 SMTP http://tools.ietf.org/html/rfc2821
Mar 08 2007
BCS wrote:Roger wrote:Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help. AndreiHello 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, RogerAs with a lot of D you might (but not nessisaraly) have to roll your own. SMTP isn't that bad (I've used it by hand in telnet). I expect pop would be about the same. IIRC there /is/ a lib out there for SMTP. If you feel "nerdy" enough you can just read the RFC's <G> pop3 http://tools.ietf.org/html/rfc1939 SMTP http://tools.ietf.org/html/rfc2821
Mar 08 2007
Andrei Alexandrescu (See Website For Email) wrote:Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 2007
kris wrote:Andrei Alexandrescu (See Website For Email) wrote:Obviously. AndreiPossibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 2007
Andrei Alexandrescu (See Website For Email) wrote:kris wrote:That sounds reasonably sophisticated. Just out of interest, how does one easily debug something like that?Andrei Alexandrescu (See Website For Email) wrote:Obviously.Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 2007
kris wrote:Andrei Alexandrescu (See Website For Email) wrote:Very easy. The FTP protocol is described as a collection of states with prescribed transitions in between them. A DFA (in C++) implemented them in a compact manner; whenever the DFA would bail out (by throwing), it would tell what state it was in, what was the expected input, and what the actual input was. I remember that library was a rewrite of a library written in a "old school" style from first principles (e.g. int and if and switch), meaning that following what the code does and where you are was horrendous. We were very pleased with the rewrite. Andreikris wrote:That sounds reasonably sophisticated. Just out of interest, how does one easily debug something like that?Andrei Alexandrescu (See Website For Email) wrote:Obviously.Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 2007
Andrei Alexandrescu (See Website For Email) wrote:kris wrote:sounds good. Yet, you appear to be describing a "black-box" of sorts, with diagnostic exceptions? My guess is that interactive "step through" debugging, with something like MSVC6 for example, would not be particularly feasible?Andrei Alexandrescu (See Website For Email) wrote:Very easy. The FTP protocol is described as a collection of states with prescribed transitions in between them. A DFA (in C++) implemented them in a compact manner; whenever the DFA would bail out (by throwing), it would tell what state it was in, what was the expected input, and what the actual input was. I remember that library was a rewrite of a library written in a "old school" style from first principles (e.g. int and if and switch), meaning that following what the code does and where you are was horrendous. We were very pleased with the rewrite. Andreikris wrote:That sounds reasonably sophisticated. Just out of interest, how does one easily debug something like that?Andrei Alexandrescu (See Website For Email) wrote:Obviously.Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 2007
kris 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. Andreikris wrote:sounds good. Yet, you appear to be describing a "black-box" of sorts, with diagnostic exceptions? My guess is that interactive "step through" debugging, with something like MSVC6 for example, would not be particularly feasible?Andrei Alexandrescu (See Website For Email) wrote:Very easy. The FTP protocol is described as a collection of states with prescribed transitions in between them. A DFA (in C++) implemented them in a compact manner; whenever the DFA would bail out (by throwing), it would tell what state it was in, what was the expected input, and what the actual input was. I remember that library was a rewrite of a library written in a "old school" style from first principles (e.g. int and if and switch), meaning that following what the code does and where you are was horrendous. We were very pleased with the rewrite. Andreikris wrote:That sounds reasonably sophisticated. Just out of interest, how does one easily debug something like that?Andrei Alexandrescu (See Website For Email) wrote:Obviously.Possibly implementing protocols could be an area in which DSLs might help, e.g. in the guise of automata and of course regex. I once designed a little DSL for implementing FTP and it was of great help.Compile-time DSLs?
Mar 08 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
Mar 08 2007
Sean Kelly wrote:Andrei Alexandrescu (See Website For Email) wrote: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. AndreiStepping 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.
Mar 08 2007
Andrei Alexandrescu (See Website For Email) wrote:Sean Kelly wrote: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>Andrei Alexandrescu (See Website For Email) wrote: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. AndreiStepping 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.
Mar 08 2007
Sean Kelly wrote:Andrei Alexandrescu (See Website For Email) wrote: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. -JoelStepping 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
Mar 08 2007
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, RogerThere is a Pop3 client in Tango's patches directory which is likely to be included in a later release. We hope to get smtp too, but it's further away. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Mar 08 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
Mar 08 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
Mar 08 2007