On Wed, 20 Sep 2017 10:21:59 -0700, Mark Wills wrote:
> On Wednesday, 20 September 2017 11:30:21 UTC+1, Terry Porter wrote:
>
>> I'm already as productive as I need to be with Forth, you're advocating
>> Micropython to solve a problem I don't have, using a programming
>> language I don't need.
>>
>>
> Forgive me, but are you?
I believe so.
>
> From what you've posted above, you are using Forth to explore a
> particular processor, and that's absolutely fine. But what are you doing
> with the hardware? What applications are you writing?
I only make very small embedded gear, mainly for industrial,
instrumentation and automotive. 64KB of flash is massive for my projects
even using C.
Here is a example. Guy comes to me wanting a 'drag bike, second stage
clutch release timer'.
He has a nitro fuelled Harley drag bike that does the standing quarter
mile in something like 9 seconds. He needs to control the second clutch
which needs to be engaged up to a couple of seconds after the bike takes
off from the line when the first clutch is engaged.
He wants a box with dip switches he can set and forget, he doesn't want
usb, bluetooth, or any thing he can't understand and easily adjust.
I built a small box, bank of dip switches, FET, attach wires and
schematic of how to connect, and it's done.
I don't need a library to provide a spin timer, scan dip switches, or
operate a FET, these are the kinds of simple things I do.
Forth allows me to do this kind of thing so fast, it's probably illegal
;-)
>
> I am only interested in making money. I've been self employed since
> about 2000, so I tend to think in terms of what is going to continue to
> feed my family! Further more, if I can do something fast, that means I
> can bill the customer quicker, and potentially get more work from him,
> or move onto the next job.
I've been self employed most of my life, and making money is also a
necessity for me. Fortunately I have a small non embedded business that
pays most of my bills, but I suppliment it with custom (small) embedded
solutions.
>
> In microPython, I can interface to a GPS unit over a serial port,
> a GPRS modem over another serial port, and implement a vehicle tracking
> system in a day.
>
> I can't do that in Forth.
Will your solution involve buying ready made boards from adafruit, wiring
them together and than wondering how covert your lunchbox sized vehicle
tracking system will be ?
Or will it involve a custom hardware on a pcb you design and lay out
along with a design for the case or enclosure ? Will it work from 12 or
24 volts and withstand automotive charging spikes or is it battery
powered ?
How much time will you spend coding diagnostics for the production
process, or component changes depending on component supply problems?
Hell, I couldn't even design and make a decent waterproof, automotive
grade enclosure for it in a day, besides, aren't those kind of tracking
devices made cheaply (and nastily) in China now ?
>
> In Forth, there's way to open a serial port.
? what word(s) are missing above ?
>
> Again, it's *not* the language, it's the software or libraries that are
> available to the programmer in that language. For the Forth programmer,
> the number of libraries that is available is practically zero. There's a
> few, like various flavours of object libraries etc, but if I want to
> query an SQL database, or FTP a file onto a server, or grab a HTTP page,
> or open a serial port, or send TCP or UDP packet, then forget it.
If I wanted to any of those things, I'd use embedded Linux and something
like a RPi as I have done on a few occasions.
For me, every project is different and I always write my own code, design
my own pcb's and enclosure etc. I have a good collection of libraries
that I use for my projects, but theyre pretty simple, ADC routines etc.
>
> There's no software libraries for Forth, because it needs a platform
> upon which to gain some traction, then it would give people a platform
> around which to coalesce. Unfortunately that hasn't happened.
I don't see that as a disadvantage, I want my choice of hardware, my own
development system and the rest I'll do myself.
Before I used Forth, I used machine code, assembly, basic, and C. I
didn't have any libraries then either, and I didn't want any.
>
> I too have been having some fun with Forth in embedded environments.
> I've been using FlashForth on the ATMEGA328P and have been very
> impressed indeed. That particular platform does have some FlashForth
> libraries that you can use, for I2C etc. I developed a driver for the
> Hitachi LCD units, which was fun, but I'd rather not have to do it
> myself.
Flashforth is excellent, I first used it about 5 years ago and made up
some hand wired PIC18 and PIC24 series units to test it. I'm a PIC fan,
not so much a Atmel fan, and I've moved onto 32 bit STM32F MCU's now and
I like it there.
> Consider, on the Arduino (same processor) in C I just type:
>
> <#include wire.h>
> <#include lcd.h>
>
> void setup() {
> LCD lcd(); lcd.clearScreen(); lcd.setCursor(0,3); lcd.print("Hello
> Mother!");
> }
That looks easy, no argument, but I'd enjoy doing the code for that with
Forth if I had a application that needs a LCD display. Besides, Mecrisp
users have written plenty of LCD code I can reuse or learn from.
>
> When we can get to that point on an embedded hardware platform, we'll
> have something to shout about.
I'm already 90% happy with Forth, and I have the development environment
I always wanted when I used C.
I have Gcc and Gdb with libopenCM3, debugging with GDB over SWD etc, but
nowdays I find I don't want to use C, I have grown to love the
simplicity, versatility and speed of project development using Forth.
>
> Until then, all we have is an absolutely *incredible* mind-blowingly
> good programming language - Forth; but no eco-system to do anything
> with.
I don't need or want any eco-system for Forth, I *need* a really good
development system where I can rapidly develop solutions. I build what I
need, and it's always different.
So far, Forth is the best system I've seen for this. I don't use Windows,
Linux or Osx, if any solutions require them, they're not for me.
>
> And that's very unfortunate.
Sorry, I just don't see it that way, but it's only my opinion, I'n not
saying your're wrong.