ForthHub / discussion

Discussion repository for Forth enthusiasts.
118 stars 4 forks source link

Forth at ApacheCon #29

Open niclash opened 8 years ago

niclash commented 8 years ago

I threw in a Presentation proposal named "Resurrecting Forth" for ApacheCon North America 2016, in May in Vancouver Canada. I wasn't really expecting it to be accepted (Linux Foundation is the organizer), but IT WAS.

The reason I think Forth should have a time of revival is the emergence of Internet of Things, where incredibly hardware capable devices, still have tiny amount of RAM on them (such as the ESP6266). And that over the last 10 years or so, the "Domain Specific Language" has had quite a lot of press, where Forth also shines more than most other languages.

Now, I am not particularly qualified talking about Forth, as my real-world experience is rather limited, and I would like to get advice on what you guys think are important to bring forth (pun intended) about Forth to a totally novice crowd (if anyone shows up). Pointers to other material that I am allowed to use will also be greatly appreciated. My own thoughts goes something like this;

* Stack operations on data stack
    * Show interactively how it works
    * Explain the simple mental model
    * Explain data types
    * Explain the two stacks
    * Strings
* Basic Word definitions
    * : Hello ." Hello, ApacheCon" ." cr cr ;
    * Blink from Arduino, when written in Forth (running on ESP8266)
* Control structures
    * Comparison operators
    * IF...ELSE...THEN
    * DO...LOOP/+LOOP
    * BEGIN...AGAIN/WHILE/UNTIL
* Resource Management (my weakest area)
    * How to handle dynamic memory, needed in text processing and such
    * Namespace conflicts?
    * Multitasking, threads
    * Input/Output to user, terminals, graphics
* Use cases
    * Replacement of C language for Arduino development, makers, ++
    * User facing programming language for programmability in tiny devices, such as home automation, system integrators, ++
    * Exotic use cases; Running Forth directly on hypervisor  (?), GreenArray 144 cores,

Yes, a lot of this will not fit into the 45 minutes or so slot that I have, and I am very anxious to hear from people who has experience with introducing Forth to new people.

lowfatcomputing commented 8 years ago

I threw in a Presentation proposal named "Resurrecting Forth" for ApacheCon North America 2016, in May in Vancouver Canada. I wasn't really expecting it to be accepted (Linux Foundation is the organizer), but IT WAS.

Awesome! I'm feeling a growing interest in Forth in the air!

Pointers to other material that I am allowed to use will also be greatly appreciated. My own thoughts goes something like this

I'd focus on the highlights of the Forth philosophy, Forth relation to small systems and IoT, and elaborate on that rather than the nitty gritty syntax etc (which is always in a state of flux and constroversy anyway!). Demo and explain some cool examples!

I tried to distill the reasons why Forth is interesting for the sidebar of https://www.reddit.com/r/forth

By the way, if you haven't seen it already, this paper is something I think you would be interested in for Forth in the IoT sphere, particularly for some of the motivations.

Control structures

Avoid them, use math instead.

How to handle dynamic memory, needed in text processing and such

Forthers generally favor parsing as early as possible and manipulating data in a structured way rather than scraping flat files all the time. This is one way which Forth philosophy contrasts with Unix philosophy. An example is using the comma compiler instead of the comma separated value (.csv) files

But as for memory allocation, Anton Ertl has been writing about region based memory allocation as a simpler alternative to garbage collection: http://www.complang.tuwien.ac.at/anton/euroforth/ef14/papers/ertl.pdf https://www.forth-ev.de/wiki/doku.php/events:euroforth-2013:rba

Namespace conflicts?

Not everyone is like me on this, but I liberally take advantage of the search order for context to avoid giving word names ever longer prefixes.

Input/Output to user, terminals, graphics

Just defer the words key and emit and rebind them to other IO devices such as radios and LCD displays for remote Forth etc.. You could also defer c@ and c! to read and write to different storage medium peripherals etc.

See the above paper I posted.

Multitasking, threads

This could go together with your GA144 discussion. GA144 doesn't need interrupts because it's asynchronous Also, Sam Falvo has been exploring event driven Forth, which (surprise!), starts to look like arrayForth.

Will your talk be recorded? I'd love to see it!

leonwagner commented 8 years ago

Niclas,

I just looked at the schedule and it so happens that I will be in Vancouver starting the day after that conference ends. I would so love to hear your talk! I hope it’s recorded and posted somewhere public.

Best regards,

Leon Wagner President FORTH, Inc. +1 310-999-6784 (Ext 794) www.forth.com http://www.forth.com/

On Apr 11, 2016, at 5:14 PM, Niclas Hedhman notifications@github.com wrote:

I threw in a Presentation proposal named "Resurrecting Forth" for ApacheCon North America 2016, in May in Vancouver Canada. I wasn't really expecting it to be accepted (Linux Foundation is the organizer), but IT WAS.

The reason I think Forth should have a time of revival is the emergence of Internet of Things, where incredibly hardware capable devices, still have tiny amount of RAM on them (such as the ESP6266). And that over the last 10 years or so, the "Domain Specific Language" has had quite a lot of press, where Forth also shines more than most other languages.

Now, I am not particularly qualified talking about Forth, as my real-world experience is rather limited, and I would like to get advice on what you guys think are important to bring forth (pun intended) about Forth to a totally novice crowd (if anyone shows up). Pointers to other material that I am allowed to use will also be greatly appreciated. My own thoughts goes something like this;

  • Stack operations on data stack
    • Show interactively how it works
    • Explain the simple mental model
    • Explain data types
    • Explain the two stacks
    • Strings
  • Basic Word definitions
    • : Hello ." Hello, ApacheCon" ." cr cr ;
    • Blink from Arduino, when written in Forth (running on ESP8266)
  • Control structures
    • Comparison operators
    • IF...ELSE...THEN
    • DO...LOOP/+LOOP
    • BEGIN...AGAIN/WHILE/UNTIL
  • Resource Management (my weakest area)
    • How to handle dynamic memory, needed in text processing and such
    • Namespace conflicts?
    • Multitasking, threads
    • Input/Output to user, terminals, graphics
  • Use cases
    • Replacement of C language for Arduino development, makers, ++
    • User facing programming language for programmability in tiny devices, such as home automation, system integrators, ++
    • Exotic use cases; Running Forth directly on hypervisor (?), GreenArray 144 cores, Yes, a lot of this will not fit into the 45 minutes or so slot that I have, and I am very anxious to hear from people who has experience with introducing Forth to new people.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ForthHub/discussion/issues/29

niclash commented 8 years ago

@lowfatcomputing Awesome set of advice and resources, more than I wished for.

@leonwagner @lowfatcomputing I am not totally sure if it is going to be recorded. I think the video recordings are "limited", mainly due to the post-processing effort. I will let everyone know as soon as I know.

DRuffer commented 8 years ago

As someone who's been doing real-world IoT for a couple of years now, and still hasn't managed to bring Forth into any aspect of it yet, I would try to focus on the intersection with the rest of the world, rather than focusing just on what Forth is. IoT consists of many more pieces than just the sensor node where Forth should shine. You've got to get that data out, typically wirelessly, and you don't want to have to rewrite the communications stack every time the spec changes. You've got to figure out energy harvesting, and how to minimize what power you do use, unless you still do like living in legacy.

Now, I should also say that I haven't worked very hard at putting Forth into the mix yet. I haven't found many places where it would provide an advantage, and we are all running as fast as we can just to keep up with marketing demands. The VC money also just disappeared, as the market is shifting to the next phases of Big Data and Java Script enabled devices. I was having to interface with Node.js just last week. So, we are long past being able to do everything in Forth or C or a single process or processor or device or location or etc. Scalability has been the newest buzz word for quite some time now.

Forth has not fit into this new world very well yet, and it is going to have to find a niche and hold on tight as the world figures out how this new ecosystem works.

Good luck with your talk. ;)

larsbrinkhoff commented 8 years ago

I was asked to do a presentation on Forth last week.

I don't think a programming tutorial is the best way to present Forth. I only talked about programming in Forth for three minutes or so, just to give the audience a small taste of what it's like. Then I said "now forget all that", and went into length about Forth's strengths (and some weaknesses) on a more conceptual level. Minimalism, reduced compliexity, interactivity, extensibility, etc. Also how the terseness of the language forces you to write good programs.

niclash commented 8 years ago

Most presentations at ApacheCon weren't video recorded, but audio is now available; https://drive.google.com/folderview?id=0B4KM_amLomv0cS16QlBkbFNIU1k&tid=0B4KM_amLomv0MzBEZUZhRzdYTDQ

"thursday_02_hedhman...." is my talk.

Audience was, as expected quite small, about 10 people or so.

Yet, I enjoyed preparing for this presentation as it forced me to think a lot of things through in more detail.

On Tue, Apr 12, 2016 at 1:29 PM, Lars Brinkhoff notifications@github.com wrote:

I was asked to do a presentation on Forth last week.

I only talked about programming in Forth for three minutes or so, just to give the audience a small taste of what it's like. Then I said "now forget all that", and went into length about Forth's strengths (and some weaknesses) on a more conceptual level. Minimalism, reduced compliexity, interactivity, extensibility, etc. Also how the terseness of the language forces you to write good programs.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ForthHub/discussion/issues/29#issuecomment-208714263

Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java