digitalmars.D.ide - microEmacs in D
- Walter Bright (10/10) Feb 19 2008 I finally got around to translating microEmacs from C into D. It's still...
- Bill Baxter (6/20) Feb 19 2008 Should probably mention that it's D2.
- Walter Bright (3/7) Feb 19 2008 Fixed that.
- Derek Parnell (9/19) Feb 19 2008 In what way was this fixed? Is the import supposed to be 'disp' or
- Walter Bright (3/8) Feb 19 2008 I had forgotten to add disp.d to the zip file, which I then did and
- Bill Baxter (3/13) Feb 19 2008 And did you update the zip on ftp too? Seems unchanged.
- Walter Bright (2/3) Feb 19 2008 Ah, I see the problem, I copied the wrong file. Please try again.
- Derek Parnell (7/11) Feb 19 2008 Still doesn't compile (dmd 2.010).
- Bill Baxter (5/15) Feb 19 2008 Looks like maybe some bit of Windows API Walter hasn't checked into
- Bill Baxter (4/20) Feb 19 2008 My bad, i hadn't unpacked dmd 2.011 yet. Those structs were indeed
- Bill Baxter (6/28) Feb 19 2008 ... but now I get a link error:
- Walter Bright (3/9) Feb 20 2008 As a workaround, you can stick in a function:
- Walter Bright (2/5) Feb 20 2008 Ah, I went ahead and did that and uploaded a new zip file.
- Walter Bright (2/12) Feb 19 2008 Need dmd 2.011 with the updated windows API.
I finally got around to translating microEmacs from C into D. It's still in "C style", though :-) ftp://ftp.digitalmars.com/med.zip microEmacs is a simple text editor, easily customizable, portable, and is a great project to learn programming from. It's in the public domain. For those wanting to have some fun with it, some projects could be: 1) add regular expression searching 2) use std.algorithms to implement a "sort" function on a range 3) for the really ambitious, add in dmdscript as a way for users to script microEmacs
Feb 19 2008
Walter Bright wrote:I finally got around to translating microEmacs from C into D. It's still in "C style", though :-) ftp://ftp.digitalmars.com/med.zip microEmacs is a simple text editor, easily customizable, portable, and is a great project to learn programming from. It's in the public domain. For those wanting to have some fun with it, some projects could be: 1) add regular expression searching 2) use std.algorithms to implement a "sort" function on a range 3) for the really ambitious, add in dmdscript as a way for users to script microEmacsShould probably mention that it's D2. Also it seems to be missing disp.d. There's a display.d, but several files are importing "disp". Not sure if they're supposed to be the same thing or not. --bb
Feb 19 2008
Bill Baxter wrote:Should probably mention that it's D2.Yes.Also it seems to be missing disp.d. There's a display.d, but several files are importing "disp". Not sure if they're supposed to be the same thing or not.Fixed that.
Feb 19 2008
On Tue, 19 Feb 2008 16:24:28 -0800, Walter Bright wrote:Bill Baxter wrote:In what way was this fixed? Is the import supposed to be 'disp' or 'display'? There are a number of references to functions like "disp_..." that are not being found. eg. console.d line:65 has "disp_open();". -- Derek (skype: derek.j.parnell) Melbourne, Australia 20/02/2008 12:11:11 PMShould probably mention that it's D2.Yes.Also it seems to be missing disp.d. There's a display.d, but several files are importing "disp". Not sure if they're supposed to be the same thing or not.Fixed that.
Feb 19 2008
Derek Parnell wrote:I had forgotten to add disp.d to the zip file, which I then did and uploaded.Fixed that.In what way was this fixed? Is the import supposed to be 'disp' or 'display'? There are a number of references to functions like "disp_..." that are not being found. eg. console.d line:65 has "disp_open();".
Feb 19 2008
Walter Bright wrote:Bill Baxter wrote:And did you update the zip on ftp too? Seems unchanged. --bbShould probably mention that it's D2.Yes.Also it seems to be missing disp.d. There's a display.d, but several files are importing "disp". Not sure if they're supposed to be the same thing or not.Fixed that.
Feb 19 2008
Bill Baxter wrote:And did you update the zip on ftp too? Seems unchanged.Ah, I see the problem, I copied the wrong file. Please try again.
Feb 19 2008
On Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote:Bill Baxter wrote:Still doesn't compile (dmd 2.010). console.d:32 "static INPUT_RECORD lookaheadir;" - what is an INPUT_RECORD? -- Derek Parnell Melbourne, Australia skype: derek.j.parnellAnd did you update the zip on ftp too? Seems unchanged.Ah, I see the problem, I copied the wrong file. Please try again.
Feb 19 2008
Derek Parnell wrote:On Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote:Looks like maybe some bit of Windows API Walter hasn't checked into std.c.windows.windows yet: http://msdn2.microsoft.com/en-us/library/ms683499(VS.85).aspx?s=21 --bbBill Baxter wrote:Still doesn't compile (dmd 2.010). console.d:32 "static INPUT_RECORD lookaheadir;" - what is an INPUT_RECORD?And did you update the zip on ftp too? Seems unchanged.Ah, I see the problem, I copied the wrong file. Please try again.
Feb 19 2008
Bill Baxter wrote:Derek Parnell wrote:My bad, i hadn't unpacked dmd 2.011 yet. Those structs were indeed added to std.c.windows.windows in 2.011 so Walter could compile microemacs. --bbOn Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote:Looks like maybe some bit of Windows API Walter hasn't checked into std.c.windows.windows yet: http://msdn2.microsoft.com/en-us/library/ms683499(VS.85).aspx?s=21Bill Baxter wrote:Still doesn't compile (dmd 2.010). console.d:32 "static INPUT_RECORD lookaheadir;" - what is an INPUT_RECORD?And did you update the zip on ftp too? Seems unchanged.Ah, I see the problem, I copied the wrong file. Please try again.
Feb 19 2008
Bill Baxter wrote:Bill Baxter wrote:... but now I get a link error: f:\usr\pkg\d2\dmd\bin\..\lib\phobos.lib(stdio) Error 42: Symbol Undefined _popen OS is WinXP. --bbDerek Parnell wrote:My bad, i hadn't unpacked dmd 2.011 yet. Those structs were indeed added to std.c.windows.windows in 2.011 so Walter could compile microemacs. --bbOn Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote:Looks like maybe some bit of Windows API Walter hasn't checked into std.c.windows.windows yet: http://msdn2.microsoft.com/en-us/library/ms683499(VS.85).aspx?s=21Bill Baxter wrote:Still doesn't compile (dmd 2.010). console.d:32 "static INPUT_RECORD lookaheadir;" - what is an INPUT_RECORD?And did you update the zip on ftp too? Seems unchanged.Ah, I see the problem, I copied the wrong file. Please try again.
Feb 19 2008
Bill Baxter wrote:... but now I get a link error: f:\usr\pkg\d2\dmd\bin\..\lib\phobos.lib(stdio) Error 42: Symbol Undefined _popen OS is WinXP.As a workaround, you can stick in a function: extern (C) void popen() { assert(0); }
Feb 20 2008
Walter Bright wrote:As a workaround, you can stick in a function: extern (C) void popen() { assert(0); }Ah, I went ahead and did that and uploaded a new zip file.
Feb 20 2008
Bill Baxter wrote:Derek Parnell wrote:Need dmd 2.011 with the updated windows API.Still doesn't compile (dmd 2.010). console.d:32 "static INPUT_RECORD lookaheadir;" - what is an INPUT_RECORD?Looks like maybe some bit of Windows API Walter hasn't checked into std.c.windows.windows yet: http://msdn2.microsoft.com/en-us/library/ms683499(VS.85).aspx?s=21
Feb 19 2008