Thread overview | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
February 19, 2008 microEmacs in D | ||||
---|---|---|---|---|
| ||||
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 |
February 19, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | 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 microEmacs
Should 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
|
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | 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. |
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tue, 19 Feb 2008 16:24:28 -0800, Walter Bright wrote: > 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. 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 PM |
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> 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.
And did you update the zip on ftp too? Seems unchanged.
--bb
|
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote:
>> 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();".
I had forgotten to add disp.d to the zip file, which I then did and uploaded.
|
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | 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.
|
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote: > 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. 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.parnell |
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote: > On Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote: > >> 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. > > 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 --bb |
February 20, 2008 Re: microEmacs in D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter wrote:
> Derek Parnell wrote:
>> On Tue, 19 Feb 2008 19:33:56 -0800, Walter Bright wrote:
>>
>>> 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.
>>
>> 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
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.
--bb
|
Copyright © 1999-2021 by the D Language Foundation