Live data from Hacker News

Starting Forth

forth.com

61–70 of 71 posts

Re: Starting Forth

#61

Question for the Forth folks in this thread. Does Forth support loadable code modules? Here's the problem I'm trying to solve (still in the tinkering stage). I have an embedded processor with small on-board SRAM but huge external address space and a NAND flash. Can't add external RAM. http://www.atmel.com/tools/ATSAM4S-XPRO.aspx Would like to be able to run more code than can fit in the SRAM. With C, I was looking at…

The traditional FORTH "overlay" is to use FORGET. You create a dummy word to serve as a marker, like ": OVERLAY ;" or something, then later, you can "FORGET OVERLAY" and load in new code to replace it. This only affects the dictionary -- the stack and heap (if any) aren't touched.

The new ANS hotness is the "MARKER" word, you just say "MARKER OVERLAY" and then you can just invoke OVERLAY later and it clears things out for you. See Elizabeth Rather's comment here: http://computer-programming-forum.com/22-forth/c67f31fe1e09b...

Re: Starting Forth

#62

Question for the Forth folks in this thread. Does Forth support loadable code modules? Here's the problem I'm trying to solve (still in the tinkering stage). I have an embedded processor with small on-board SRAM but huge external address space and a NAND flash. Can't add external RAM. http://www.atmel.com/tools/ATSAM4S-XPRO.aspx Would like to be able to run more code than can fit in the SRAM. With C, I was looking at…

[deleted]

Re: Starting Forth

#63

Question for the Forth folks in this thread. Does Forth support loadable code modules? Here's the problem I'm trying to solve (still in the tinkering stage). I have an embedded processor with small on-board SRAM but huge external address space and a NAND flash. Can't add external RAM. http://www.atmel.com/tools/ATSAM4S-XPRO.aspx Would like to be able to run more code than can fit in the SRAM. With C, I was looking at…

Jim the minimal Tcl dialect that your link points to is a pretty interesting animal, notable in its own right. I believe its one of the few Tcls to have lambda and tail call elimination. Its author would be a familiar figure to HN readers but perhaps associated with a different tool he wrote, redis. I for one knew about Jim and knew about Redis but made the connection that they were written by the same person much later.

Re: Starting Forth

#64
post #63

Question for the Forth folks in this thread. Does Forth support loadable code modules? Here's the problem I'm trying to solve (still in the tinkering stage). I have an embedded processor with small on-board SRAM but huge external address space and a NAND flash. Can't add external RAM. http://www.atmel.com/tools/ATSAM4S-XPRO.aspx Would like to be able to run more code than can fit in the SRAM. With C, I was looking at…

Jim the minimal Tcl dialect that your link points to is a pretty interesting animal, notable in its own right. I believe its one of the few Tcls to have lambda and tail call elimination. Its author would be a familiar figure to HN readers but perhaps associated with a different tool he wrote, redis. I for one knew about Jim and knew about Redis but made the connection that they were written by the same person much la…

The Tcl might be less of a learning curve for myself and new employees. Forth is quite different.

Re: Starting Forth

#65

Earlier quoted context omitted.

I liked programming in PostScript more than Forth because of all the additional non-graphic things it had. Look at the Blue Book ("The PostScript® Language Tutorial and Cookbook") http://partners.adobe.com/public/developer/ps/sdk/sample/ind... for some examples.

Many years ago I did a project with a lisp back-end, a front end in PostScript (NeWS/HyperNeWS) and C code gluing the two together - it made me appreciate than an interactive PostScript environment is surprisingly lisp-like. Edit: This has made me wonder about a NeWS-like server sitting on top of OpenGL and using an interactive PostScript like language.....

I started my career with a Turbo C complier, a PostScript printer, and a government database written in FoxBase. I learned a lot of PostScript programming in order to generate the report we needed. I later got NeXTSTEP 3.3 which made interacting with PostScript a true joy.

I have often thought a NeWS-like server would be a fine replacement for a lot of web stuff.

Re: Starting Forth

#66

And here is what Forth creator Chuck Moore does today: http://www.greenarraychips.com/

Green Array Chips architecture is quite interesting.

Perhaps a natural question, is there a software framework that mimics this way of building horizontally scalable services?

Re: Starting Forth

#67
post #51
post #27

Forth seems to have one thing in common with Lisp: a small dedicated following that believe it's the way forward and considerably easier to learn, despite never really having taken off. I suspect this is something to do with different ways of conceptualising programs.

Forth have, literally, "taken off" far further than pretty much anything else. Many spacecraft in our Solar system are run by forth, the most notable recent example being Philae: https://en.wikipedia.org/wiki/RTX2010

Those spacecraft run all kinds of things. Philae also ships Ada (http://www.adaic.org/2014/11/rosettaphilae-run-on-ada/)

Re: Starting Forth

#68
post #63

Earlier quoted context omitted.

Jim the minimal Tcl dialect that your link points to is a pretty interesting animal, notable in its own right. I believe its one of the few Tcls to have lambda and tail call elimination. Its author would be a familiar figure to HN readers but perhaps associated with a different tool he wrote, redis. I for one knew about Jim and knew about Redis but made the connection that they were written by the same person much la…

The Tcl might be less of a learning curve for myself and new employees. Forth is quite different.

Forth will might attract a different pool of candidates. That might be a good thing if the idea of programming in Forth excites more people than programing in TCL does. And my unsupported by data gut suggests that Forth is more likely to excite people than TCL.

Re: Starting Forth

#69
post #63

Question for the Forth folks in this thread. Does Forth support loadable code modules? Here's the problem I'm trying to solve (still in the tinkering stage). I have an embedded processor with small on-board SRAM but huge external address space and a NAND flash. Can't add external RAM. http://www.atmel.com/tools/ATSAM4S-XPRO.aspx Would like to be able to run more code than can fit in the SRAM. With C, I was looking at…

Jim the minimal Tcl dialect that your link points to is a pretty interesting animal, notable in its own right. I believe its one of the few Tcls to have lambda and tail call elimination. Its author would be a familiar figure to HN readers but perhaps associated with a different tool he wrote, redis. I for one knew about Jim and knew about Redis but made the connection that they were written by the same person much la…

The mainstream version of Tcl has supported lambda and tail call features for quite some time.

Re: Starting Forth

#70
post #25

Earlier quoted context omitted.

Embedded stuff is nearly always C. Arduino have made the "Wiring" language popular for rapid prototyping (based on processing and hence javascript). But these days, embedded full Linux systems are just too cheap to not be the default option when you want to develop on the device itself.

My understanding is that the link between Arduino and Processing is solely in the IDE. I don't think the two share any common ground beyond just the fact that Java (which Processing is a very thin layer on top of) is similar to C (which Arduino is a very thin layer on top of.)

Arduino's language is just GCC C++ with some extra Arduino-specific libraries and some standard libraries missing.

I think there's now Rust for the Arduino Due, which is ARM-based.

Post reply on HN