Installing gForth on the Raspberry Pi

Since you're talking about raspberry pi's, this seems like a good chance to try Python.

Reply to
Paul Rubin
Loading thread data ...

Yes, that thought occurred to me last night, but I already have code in Forth for my app. I will try Python another time.

Btw, is that why it is the Raspberry 'Pi' as in 'Py'thon?

--

Rick
Reply to
rickman

I kinda doubt it ;-).

You should also look at the Beaglebone Black by the way.

Reply to
Paul Rubin

Why?

--

Rick
Reply to
rickman

Well it's a comparable board in the same space, but more technically oriented, has some different capabilities, worth looking into if you're into these things. You might like its realtime coprocessors, for example.

Reply to
Paul Rubin

On 10/27/14 11:51 AM, rickman wrote: ...

Baffled by your concern. Native Forths have been doing this since the

1970's, without OSs of any kind. Serial port drivers took (in the good old days) about one block/sceen of code. Multiple tasks could manage their own screens or ports.

IMO introducing OSs into the picture is complicating the process, not simplifying it.

Cheers, Elizabeth

--
================================================== 
Elizabeth D. Rather   (US & Canada)   800-55-FORTH 
FORTH Inc.                         +1 310.999.6784 
5959 West Century Blvd. Suite 700 
Los Angeles, CA 90045 
http://www.forth.com 

"Forth-based products and Services for real-time 
applications since 1973." 
==================================================
Reply to
Elizabeth D. Rather

I'm baffled by your response. I'm not writing this from scratch. I have a working program that runs under Windows using Win32Forth. I'm just trying to port that to the rPi. What native Forth should I use that would be more suitable than using the Raspian OS that comes with the board? I believe I have seen a native Forth for the rPi, but I don't see how that makes anything more simple.

Funny, one response in this thread says I am silly for thinking about writing my own code for the data display in a separate window since the OS provides so many other ways to do that. Now I am being told I am silly for not wanting to write nearly all of the code myself for the windows management as well as the serial port driver.... I think.

--

Rick
Reply to
rickman

I'm only looking at the rPi because I was given one. Since it has most of the capabilities of a PC I figure it would be nicer to use in the lab than a PC, mostly because it is so much smaller. I also have been considering rolling an add on board for the rPi but so far have not figured out what it would be. So this is a learning experience.

The BBB is interesting, but support is through a Google group and the market is *soooo* much smaller. The rPi really rolled over top of it and all the other SBC Linux units out there. They've sold 3.8 million so far. For 99% of the things I would do with a Linux SBC there is no difference so I will use the one with better support.

--

Rick
Reply to
rickman

Ok, if the board comes with all the code you need, why is there a long thread about how to do serial I/O? I understand that you have a whole application. It should be straightforward to write the underlying TYPE/ACCEPT support, either natively (I don't know how permissive Raspian is of folks doing their own I/O) or with OS calls. I do know that whatever solution you find will almost certainly be simpler than what you're doing under Windows.

Cheers, Elizabeth

--
================================================== 
Elizabeth D. Rather   (US & Canada)   800-55-FORTH 
FORTH Inc.                         +1 310.999.6784 
5959 West Century Blvd. Suite 700 
Los Angeles, CA 90045 
http://www.forth.com 

"Forth-based products and Services for real-time 
applications since 1973." 
==================================================
Reply to
Elizabeth D. Rather

I'm just not following what you are saying. I think when you say "native" you mean not using the OS rather than not *having* an OS. I have no interest in writing an interrupt driver for an OS when one already exists. Why should I reinvent the wheel?

Or do I still not understand what you are suggesting?

You also mention OS calls which is exactly what I am asking about. I find your comparison to Windows a bit silly. So far everything I have been told is virtually the same as under Windows. As much as anything I am asking about gForth really. gForth runs under Linux and Windows. I'm hoping I can find code that works transparently under both.

My point in asking about this is that I am sure I'm not the first person to use a serial port in gForth. The one code example found so far was very complicated, much more so than what I need.

--

Rick
Reply to
rickman

Or..

Since you're talking about a Linux computer, this seems like a good chance to try one of the 1000's of other languages avalable for it.

The Pi Foundation like Python and yes, the "Pi" in the name does refer to Python, but it's just another Linux system at the end of the day. Python is just one more language you can use with Linux. There are at least three different Forths avalable for it. And Cobol, Ada, brainfuck and who knows what else.. (even BASIC)

I'd suggest not picking a language because it's popular, but picking one you know how to use - and it seems Forth in this case is just what the OP wants.

Gordon

Reply to
Gordon Henderson

It really is. The foundation love Python.

Gordon

Reply to
Gordon Henderson

It can be easier to write the driver (which, in my experience, takes about an hour with no OS) than to spend days finding out how to do it through an OS. Back in the day, we ignored DOS calls for that very reason (DOS was much slower, anyway). I am not familiar with Linux or gForth, but the very fact that there has been such discussion here I find baffling.

If it's easy and just the same as Windows, why the long discussion?

I fervently hope you find a simpler solution. Serial drivers should be simple.

Cheers, Elizabeth

--
================================================== 
Elizabeth D. Rather   (US & Canada)   800-55-FORTH 
FORTH Inc.                         +1 310.999.6784 
5959 West Century Blvd. Suite 700 
Los Angeles, CA 90045 
http://www.forth.com 

"Forth-based products and Services for real-time 
applications since 1973." 
==================================================
Reply to
Elizabeth D. Rather

What are the other two Forths? Not that I would likely use one, but I'm curious. gForth runs on the PC as well and I am expecting to have one program that I can run on both platforms.

Yeah. I like your approach. :)

--

Rick
Reply to
rickman

yforth and the stand-alone one mentioned by someone else earlier. I'm sure there are others too.

Gordon

Reply to
Gordon Henderson

To see what is available in the standard software repositories: "apt-cache search forth | grep -i forth" (include grep to weed out things which are merely related).

Reply to
A. Dumas

It doesn't, but it may be a cheaper solution overall when your time is paid for.

Stephen

--
Stephen Pelc, stephenXXX@mpeforth.com 
MicroProcessor Engineering Ltd - More Real, Less Time 
133 Hill Lane, Southampton SO15 5AF, England 
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 
web: http://www.mpeforth.com - free VFX Forth downloads
Reply to
Stephen Pelc

On Mon, 27 Oct 2014 19:26:19 -0400, rickman declaimed the following:

From what I've read, YES... The intent was a small Linux teaching computer with Python as the primary programming language. True, being Linux, pretty much anything is available.

The BeagleBone Black is similar, but the primary programming language was Javascript using a Javascript interpreter accessed via a web browser.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/
Reply to
Dennis Lee Bieber

To find one may be easy. To get everything working like it does in Win32Forth or gForth is a gigantic task.

Here is an exercise: you can see that pipe is in man page 2 for linux That means that it must be possible to call it __NR_pipe XOS where XOS is int80 : the generic system call.

Now find the actual number __NR_pipe such that you can actually call it from Forth. Maybe you're very clever with this, but for me it takes time.

Groetjes Albert

--
Albert van der Horst, UTRECHT,THE NETHERLANDS 
Economic growth -- being exponential -- ultimately falters. 
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Reply to
Albert van der Horst

An operatings system for me is a couple of facilities: word processor, prefereably compatible with MS-WORD pc-board design Verilog implementation able to show all formats of you tube films shopping in all internet shops .... do latex typesetting prints on the usual printers you can buy

So colorforth doesn't fit the bill.

Groetjes Albert

--
Albert van der Horst, UTRECHT,THE NETHERLANDS 
Economic growth -- being exponential -- ultimately falters. 
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Reply to
Albert van der Horst

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.