Re: Speaking of Forth..

Jun 30, 2003 90 Replies

Not really true. It could do the JSR/RTS routines just as fast as a processor with those built in. You were just coding at a lower level to start with. Every instruction took two cycles. Faster than most CPUs of that day. The Intel CPU's were so slow by comparison taking many cycles to do everything. I dropped out when they became popular as I was a structured machine code/assembler type without the tolerence for the muddle head/instruction set count contest.

Now we are beyond nuances and talking about significant differences. Yes, Forth's interactivity is the key to the programmers productivity.

No, that's fast, particularly compared to the compile assemble EPROM half hour jaunts of the past. Forth really stood out as an almost instantaneous feedback then.

Now the update cycles are fast. But when it comes to a quick question, you still can't touch Forth. If I want to know what is on a parallel port, I just look. If I want to see a string in memory, I just dump it. You get all the advantages of ICE with Forth, and the ability to write one-liner programs to test ideas. Conventional systems still just can't emulate that interactivity.

I mostly work in an editor, and a serial downloader / terminal emulator. If I get carried away with an interactive session, I can go back and capture the buffer, edit out the false steps, and drop that into my developing source code. So no. I have few problems with loosing efforts.

If most think Forth is unreadable at a source code level, taking off the names makes the compiled code about as obscure as you care to imagine. Security by obscurity, for certain. All my Forth's can compile headerless code. It cuts code size by about another half (depending on programmer style).

Unfortunately, there aren't many opportunities to do direct comparisons between the use of two languages. All the data points I have personal knowlege of, came out strongly in Forth's favor, so this previously mentioned situation is not unusual.

The most convincing case for my personal experience base (at least to my thinking) came when I was a consultant to Eagle Signal, who made traffic lights. This was back in '83. Originally, they had a 1MHz 6801 that ran their lights, programmed in Forth by a single programmer. As modules were added, the program grew. Eventually they had to go to a 2MHz 6801. They were concerned because their traffic program was 7K and the total program size with the communications modules was over 32K and rising, and they were having to go faster and faster. They'd either gone to a

2MHz 6809, or were thinking about it.

When I came in as their consultant, I looked at the code and concluded it desparately needed some factoring, because 60 times a second, they were checking everything. They even check to see if it was midnight, Feb

28th, on a on a leap year, every 60th of a second. (Once a day should have been enough!) So I told them how to get their program back in order by doing a real time executive.

They accepted my proposals, and so asked me to head a team to rewrite the program, but do it in C, because they couldn't find Forth programmers. Well, the C version of my "improved" traffic module in Whitesmith C turned out to be 13K, up from 7 in Forth. So, I looked bad. I checked myself by writting my traffic module in Forth on my own time. It came down from the 7K Forth they had to 4.5K, about 1/3 the size of the C program. I wasn't wrong about the methods used being smaller, faster and more efficient.

So, anyway, they eventually turned the project over to someone else, and I left. Last I heard, about a year later, they had expanded the team to something like a dozen programmers, and had to go to a 10MHz 68008, and were over 108K of compiled code and climbing, to get the same traffic light they had when in Forth. And they'd spent more man years doing this behemoth, than they'd spent on the original Forth programmer to write, and then maintaining it, for years to begin with.

I am. I found C object to be 3 to 4x bigger, and needed a much faster, more powerful processor to run on, and took many more man years to get done. Again, actual experience, a1:1 comparison, not hypothetical paraboley.

So I have my personal experience, and many other second hand observations from those in the Forth community I trust to represent situations honestly, who have similar experiences. Now I want to repeat something I said early on; "some Forth programmer knock... out a solution in days, when a team of programmers struggles to do anything near the scope in months. Now, whether you can blame it on the programmer, or on the language, gets less likely when you see the same pattern repeated across many programmers and many situations."

Hi This is exactly opposite of the point that I was making. Advanced thinking in math is not arithmetic. Forth doesn't try to mix or confuse the two. Unlike most languages, Forth allows one to mix them if you want but making things more complex than they are is not good programming or good thinking. The language has never taken off for a few reasons that have little to do with RPN:

  1. The language is simple enough at the base level that almost anyone can create a Forth once they have seen one. This means that there is little advantage for large commercial software houses to sell it.
  2. The user can expanded Forth too easily. This means that value added software is difficult to sell unless it has a lot of investment in complexity. You won't see MS selling Forth or Forth applications.
  3. Most CS schools teach that software should look for your errors and that somehow that will make more correct code. Actually, code that is more thoroughly check and exercised at lower levels tends to be more correct at higher level. This is a basic concept that is encouraged in Forth.
  4. Most Forth programmers are self taught. This is a real problem for maintenance. When someone needs to maintain another's code. Coding styles are less restricted by the language. ( I'm a self taught Forth programmer. It has take me years to get rid of bad habits. )
  5. Chuck Moore stated that Forth is like a programmer amplifier. A good programmer can be quite a bit better. A bad one will be quite a bit worse.

Forth is about problem solving. It is based on simplifying program nesting so that problems can be more easily factored. Good factoring is not a disadvantage in programming. The language one uses should not make it difficult by excessive boiler plating. Forth allows one to transform the language into a problem specific language. This is why many hardware engineers find it such a good tool for hardware debug and development. Complexity in a programming language is good job security. You know that they will need to keep you around to fix the bugs that will constantly pop up. In the past, I've delivered several complex embedded application to customers and not had to fix a single bug. I may be wrong but I attribute that partly to the language that allowed me think and create solutions at the appropriate levels. It gave me pride to have a customer that had used one of my systems for 5 years tell me that he had never had troubles with the software. It surprised him when I told him that his system wasn't a mature product that it hadn't been used by many to work out all the bugs. His system was a "one of". Dwight

---snip---

No..each semi-micro instruction took two cycles. The JSR was about hmmmmmmm.....let's see

Label: resetPC switch PC back to normal (does JSR jump) Label: JSR load low jmp addie (with increment) put low normal PC load high byte Jmp addie (with increment) put high normal PC get high byte old PC stuff into stack (self decrementing?) get low byte old PC stuff into stack jmp back to resetPC

Remembering way back now...LOL We have a total of 10 bytes of code at 2 cycles each = 20 cycles (1 machine cycle = 1 clock cycle unlike Itell and other goofball concepts) I believe the 6800 was 9 cycles to do the same and 2 or 3 bytes of inline code. The 1802 took 3 lines of code for a 64K relative or absolute JSR. Actually you can design your own style of address independant code or any style you liked (or both)

The inlne call was this change PC to JSR code addie followed by the address

I don't think Forth would survive long in today's re-entrant, address independant code world on a decent op sys. The vector system would require a routine to intrepret addresses relatively and would slow the standard call and return techniques built into modern CPUs right down to a crawl. We may as well implement it on the 1802 then.

{{Date: Tue, 01 Jul 2003 21:49:43 GMT From: Jonathan Kirwan No one has ever even asked me if I knew forth, in my 27 years of active, full-time professional programming. ... But work in it seems far between, for most. ... If one is trying to develop marketable skills to the broader marketplace, then probably forth should be set aside for a while.}}

Do you know of *any* programming language where jobs are currently available without *already* having 3-5 years paid shrink-wrapped commercial-product experience in exactly that langauge, where you can learn the language on your own or via a class in a community college, and then you're employable? I have 22 years-fulltime-equivalent experience programming computers, including a couple weeks of Forth, but haven't been able to get a job since 1992 and haven't been able to even get an interview since 1994. For the past several years, I haven't seen any job ad I qualify for despite my many years of programming experience. The closet I've seen is one that required only HTML and Java, of which I've done the former but not the latter. Most other job ads list about ten languages all required (C C++ Java Oracle Sybase VisualBasic ...) of which I've done only one or two so even if I learned two or three more languages within a single week before the job ad expired I still wouldn't qualify for the job.

Programming is a craftsman's activity.

Professional work simply is not offered to those who have yet to teach themselves the craft.

I don't know what to tell you, Mr. Maas. It sounds like you have been "doing this" for about the time I have, adding your 10 years of 'slumber' from 1994 to 2003 and assuming that by 22 years you mean between 1973 and 1994. I've been at it since

1972.

Being self-employed means I'm active in the market, I have no problem finding work, and I'm in one of the two States which have the highest unemployment in the US, Oregon (Washington is the other.) But I did learn early on that everything in life is about relationship. I don't burn people, I don't jump ship, I take abuse and keep on ticking without returning fire, and I'm always available to support everything I've ever written. I'm available 24/7, 365 days, including Christmas, and I take responsibility for my projects, even when the client doesn't really know what that means to them. I am also reasonably fluent in most ancillary areas related to my programming area, including mathematics, elecronics, chemistry, physics and optics, numerical methods, and signal processing. And what time I don't spend with the family or in volunteer work, I spend keeping up on these subjects. Whether any of this has anything to do with it, I don't know. But I can say I'm not experiencing your circumstance. Maybe it's just luck.

But with what I guess would be your credentials in play and without assuming you live in some computer-forsaken part of the world, I'd be asking myself what I'm doing wrong. Something is amiss and it's probably not entirely just a problem with everyone else. You may have priced yourself out of the market, for all I know. But your 22 years would get my attention.

Jon

{{Date: Sun, 27 Jul 2003 08:09:29 GMT From: Jonathan Kirwan Being self-employed means I'm active in the market, I have no problem finding work}}

But that's because you have recent work (paid) experience. How do you get a programming job when you don't have any?

{{I did learn early on that everything in life is about relationship.}}

Please instruct me how to obtain relationship.

{{I don't burn people, I don't jump ship,}}

I don't either. I stayed with my last major employer until the very end. Two weeks before my employment ended, I learned of the upcoming ending due to lack of any more available funding. At that point, not before, I started looking for a new job. Most of my co-workers had already jumped ship a year or two before, but I stuck with my employer to the very end.

{{I take abuse and keep on ticking without returning fire,}}

I did that too. For example, when my supervisor humiliated me in front of the whole meeting of appx. ten co-workers, I just silently suffered.

{{and I'm always available to support everything I've ever written.}}

With or without pay? I.e. would you be willing to work 40 hours per week for ten weeks without any pay whatsoever just to upgrade something you wrote ten years ago?

I would be glad to support my past projects, if it was just a little bit of help for free, or if I got paid for any serious time I had to spend.

{{I take responsibility for my projects, even when the client doesn't really know what that means to them.}}

I do too, as long as I'm allowed.

{{I am also reasonably fluent in most ancillary areas related to my programming area, including mathematics,}}

I placed top five nationwide in the Putnam competition, but after school I never found any employer interested in me doing any mathematics for them. The closest I ever got to some employer appreciating me for my math ability was in 1970 when John McCarthy of Stanford offered me a chance of a data-compression job if I'd do some free work first to prove that I had any productive ideas to contribute. I worked for free from October to April, then got the job which lasted two months ($450/mo).

{{I can say I'm not experiencing your circumstance.}}

That's because your resume shows recent paid experience. I was refused any work (except 2.5 weeks in 1992) for two years, because there was a recession (1991-93) and "nobody is hiring", then from that point onward I was refused any work because I didn't have any significant amount of experience within the past years. How can I get a job now despite no paid experience in more than ten years? I've continued to develop my programming skills, but hardly anyone will even look at my work much less pay me to work for them.

{{without assuming you live in some computer-forsaken part of the world,}}

So-called "Silicon Valley", which currently has just about the highest unemployment rate in the country.

{{I'd be asking myself what I'm doing wrong.}}

I have no idea what the answer is, so asking myself the question is a worthless philosophical exercise.

{{You may have priced yourself out of the market, for all I know.}}

Why do you make such a stupid assumption?? I'd like to get at least $20/hour but I'd be willing to work for only $10/hour if that's all anybody would offer. But I haven't even been offered mininum wage in the past ten years. Do you really believe $20/hour too much to ask for high-quality software development?

{{But your 22 years would get my attention.}}

Then you must not be like employers. All the employers and agencies I've contacted say that they don't want to hire anyone with that much experience. They'd rather have somebody with only five or ten years experience because they believe they couldn't afford somebody with so much experience as I have.

Being self-employed has meant that there were "lulls." Nothing like 10 years, though. I admit that. Of course, I did start out without experience and got jobs. But that was a different time, so I won't hold that out as any evidence of anything.

It's not something I'm able to instruct over this medium.

I don't know your circumstance there, so I can't tell you "good" / "no good." But I was just tossing out possibilities, to see if any stuck. Sounds like you are saying that this isn't it.

Cripes!! What in the heck was that for? I don't think I'd take public disrespect from anyone I work with and stay very long. In a case like that, I'd probably take the supervisor into a private spot and tell them that if they have a complaint, they tell me about it in private (as I'd be doing at that moment.) And that if this kind of mistake happens again, I'll assume they wanted me to leave -- that day. I can be wrong, I don't even mind being made an example of (if permission is first sought), but random public abuse I don't have to take.

On another note, I do NOT like getting consultant pay from a company that is firing their own good employees who do work similarly to what they are asking me to do. I've told some before that they should terminate my contract, as I'm much better able to handle the effects than are their employees. In fact, this rule also applies if I'm an employee -- I'm used to it and I know how to handle it so I can take it much better.

Which is probably part of why I'd not waste much time with a supervisor or boss or client who acted as you suggest above.

Sometimes, yes. It's part of that "relationship" deal. You don't sweat the small things in a healthy relationship. Of course, there's always the risk that something "small" won't actually "be small." But I'm quick to point it out if it drags on very far -- if the relationship is healthy, they will indeed understand. But I'd meant more that I will work reasonably hard to find a mutually agreeable arrangement to support anything I've done in the past.

Yes, that's about it, I guess. You don't go crazy, nickel and diming people you care about. But you also don't get taken for a ride, either.

What I mean is that I branch out into other areas so that things don't slip through the cracks between functional areas of responsibility. It's subtle. Sometimes, just a few friendly phone calls to gently remind someone, so that things happen as they should, but without making anyone feel bad or stepped on. Sometimes, it is even disobeying a direct order (I've done this) and working behind their back with departments from which they need help in order to be a success, charging them for the extra but folding it into their bill. It's doing what's right for the client when they don't even know it's right. It's all the things that, in the end, make them feel that I got paid too much for the easy project they handed me. It might not have *been* such an easy project, but for that watchful eye.

Sounds like a typical university mindset, all right.

One difference between you and me in this case may have been that I was raised quite poor -- actually had to beg food from grocery stores and the like to eat as a child. I worked the berry fields and vegetable fields for some cash, in high school times, and had to pay for every nickel of my expenses during college while taking 18 cr-hr/term. There is no way I would have worked for anyone for six or seven months without pay -- didn't matter whether I wanted to, or not. The option was simply removed from the table.

Even today, I negotiate my medical expenses. For example, I reduced an MRI expense for one of my children by first negotiating the price before getting the service -- reduced to

25% of what they originally expected to get. A habit learned early and still ingrained. Sadly, negotiating your part of the fees beforehand is actually __illegal__ and you can get into serious trouble for it, when insurance is involved. I can ask my dentist to "forgive" my part of the debt after the service takes place. But if I dare to ask the dentist _beforehand_ if this is okay, then it is illegal. Can you believe it?

And by the way, mathematical familiarity is one aspect I count as important -- in my area, anyway. Removes a lot of barriers. I routinely use higher math in my work.

Nice you were able to survive it.

In times when I've been unable to fill my time with contracting work, I've wasted little time filling it with "honest" work -- I call up Kelly Girl (Kelly Services, now) and tell them I'm available. My typing rate, corrected, is 86 words a minute and I'm fluent with most word processing. I'll string phone cable in the ceilings, count plumbing inventory, and do just about any work I'm asked to do and at rates which are 10X less than what I get contracting. My time is worth _exactly_ what people are willing to pay for it, at the time I'm willing to offer it.

Those early days are still with me and I don't waste any thought about holding out for "what I'm worth," I guess. I stay busy.

I'd start with something else, then. Anything. Doesn't matter. No way would I not have been doing work for ten years.

Just as a note you might not realize, offhand. As just one example of those Kelly Girl jobs I took? It was a simple inventory job, expected to take two days. Kelly sent me and two others to the job site. At the end of the day, the president came over (small company) and said he was pleased. He didn't rehire the other two for the next day, kept me instead doing various tasks about the business for that week, and I learned a lot about running a small business. The last day he said, "If you __ever__ need a recommendation for a job, Jon, just point them to me."

That's what I'm talking about.

Try Oregon and Washington. I think we might give the Bay Area more than just a run for its money. I think we have you beat.

I'm not saying I know anything, here. Just what I consider to be a rational consideration for you. You can close that door if you like -- you know, better than I do.

It's not an assumption, it was simply a point about how little I really know about your circumstances. That's all. That you'd imagine it was more than that, is odd.

You'll get $10/hr at Kelly, I'd imagine. Maybe more. You can probably get $15/hr for disabled support services from the state, I'd guess. And all they probably care about is that you are breathing and don't have a felony on your record.

But I don't know what will work for you. I'm just this guy in Oregon, for gosh sake. But even without providing a hiring history I can get a job around here just doing typing for $10/hr. In a day's notice, I think.

Not at all. I hope you didn't imagine I would.

Have you told them what you'd be willing to consider? I suppose you must have.

Look, I can't tell you what it's like down there. I do fly there fairly frequently, so I'm somewhat aware of the local issues. (I couldn't afford to live in the kind of home I'd like and do have, there. But a lot of people in that area, who actually own part of their home, can sell it and buy something up here outright for less than their equity of just a few years time.) I've also been in some pretty tough situations in my life and I've never been able to say I couldn't get work when I really looked. Maybe I'll regret my comment and be taught my lesson soon enough.

But I'm only telling you about what my own experiences have been. This cannot possibly tell you what they *might* have been, were I in different shoes. It could have been very much otherwise, perhaps. There is an important element of luck in everyone's life, especially for those not born into comfort, wealth and power. And being skilled or smart only means you might be in a somewhat better position to recognize it and take advantage of it when it happens. Not that you are assured that it _will_ happen. (Kind of like evolution, I suppose. Nature doesn't design mutations, but when they happen nature gets its chance to operate on them.)

Jon

I once had my company car publicly removed by one of those. Then the silly girl had to lend me hers to go and fix an Encad plotter up in Newcastle. I spent the whole trip picking my nose and wiping it on the controls. I stopped for lunch on the way back and didn't notice I'd trodden in dog doo.

C'est la vie

Robin G Hewitt

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required