I've dabbled in elisp - I wrote a minor mode for APL back in the '90s. It was a fun challenge, but physically painful, and I had to give up emacs.
See... a problem with emacs is the keyboard chording system - if you are typing alt-shift A, control-P, ... or whatever, and are going 80 words per minute, and your posture isn't the greatest? I was doing something like that and my wrists started hurting terribly. I was afraid I would not be able to type at all. So I switched to vi, and switched my coding style from being prolific to thinking a lot and typing just a bit. This gave me a lot of appreciation to "old school style" and also gave my wrists a chance to recover. You can do a lot with small bits of shell script (or other coding), some careful thought, and working with people. So that is my signature, nowadays - I do not code a lot, and I put a lot of thought (perhaps too much thought) into the code I do write. My wrists thank me (usually - sometimes they still grumble), though sometimes I envy people who can comfortably crank out tons of code. Thanks, -- Raul On Wed, Jan 29, 2014 at 7:01 AM, David Lambert <[email protected]> wrote: > I have a quarter million lines of FORTRAN written over the years in the > various versions. Mostly f77 using ! comments, but not entirely. My goal: > convert the entire code to f2008. Parts A, B, and C are continuation mark, > code, and comment. At this stage I'm addressing various forms of > continuation lines, an example: > > call s( ! comment maybe > ! intervening remarks > *arg) > character*8 a=/'hi'/ ! or whatever > > becomes > > call s& ! comment maybe > ! intervening remarks > &arg) > character(len=8) :: a = (/'hi'/) ! fixed with sed > > Later I'll have emacs reindent the whole thing. Such transformations ignore > replacing common blocks with modules. A build with gfortran will catch > problems that our current compiler does not. Transforming the code with j > makes my job fun, whereas becoming an elisp expert hasn't ever grabbed my > attention. > > On 01/28/2014 07:00 AM, [email protected] wrote: > Message: 1 > Date: Mon, 27 Jan 2014 22:30:14 -0500 > From: David Lambert <[email protected]> > To: chat <[email protected]> > Subject: [Jchat] FSM enhancement proposal > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > I have information of the forms ABC, AB, BC, AC, A, B, C which I'd like > to separate into 3 boxes. If a part is missing the box should be > empty. I think it is impossible with the current FSM implementation > because it must read a character to yield output. With only one > character on input I cannot obtain '';'';C as output, or any three > boxes. I haven't investigated emit vector but I don't see how it will > help. The 3 boxes preserve the classification work that's already been > accomplished, and I can use _3&([\) to generate a useful array. > > We could enhance the FSM retaining backward compatibility. I'd prefer > to pass a gerund as an additional part of x, have the Function code > specify to use it as an agenda determined by the output code. The agenda > would monadically process the matched items. It seems to me that such a > j FSM would have the full capability of the gnu flex program, excepting > the automatic generation of the state table. > > Perhaps a new output code to emit something ( ace if F is 0 otherwise > i.0 ? ) and change state without reading the next input item would be a > simpler solution to treat the case I've presented. > > Or this may be far too complicated and I need to write my own function. > It would surprise me if the gerund concept were not part of the original > implementation debate. And it would surprise me to learn that I > understand the FSM. For now I'll use a flex bison program. > > > > ------------------------------ > > Message: 2 > Date: Mon, 27 Jan 2014 22:39:23 -0500 > From: Raul Miller <[email protected]> > To: Chat forum <[email protected]> > Subject: Re: [Jchat] FSM enhancement proposal > Message-ID: > <CAD2jOU_tfv6mDdU0o_E5nteCf0k9=v1x_isiaph1omscsud...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > > I am having trouble understanding your specification. > > Do you mean that you have a sequence of letters, such as: > > BBBCCCACBBBCBBAAAAABAABACACACC > > And you want to separate them into boxes whose letters are lexically > increasing? > > I'd not bother with ;: for that, I'd do something like this: > > (] <;.1~ 1 , 2 >:/\ 'ABC' i. ]) 'BBBCCCACBBBCBBAAAAABAABACACACC' > > Though if you prefer gnu flex and bison, I'm sure you can do it that > way too, with a little time and effort. > > Thanks, > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
