Coder Social home page Coder Social logo

discussion's People

Contributors

larsbrinkhoff avatar ruv avatar thedrake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discussion's Issues

Forth for ESP8266EX

For those who likes the ESP8266EX and Forth in tiny spaces, check out forthright that is still in development.

For completeness; I noticed that punyforth also started working on an implementation a few days ago.

forks in ForthHub

What is a reason to have so many forks here?

For example, what is the intended use for ffl?

  • If it is just a mirror, it should be kept in sync with origin in fast-forward mode.
  • If its intention to make pull-requests into origin (i.e. use the fork in ForthHub instead of creating own fork), participants should have access for that.
  • If it is just a backup copy, it should probably be in Archive team.

Forth file extensions on GitHub

Occasionally I check which Forth file extension are most popular on GitHub. It's not easy to know which files are written in Forth, but I use the heuristic "if it contains dup and swap, it's probably Forth".

These are the most recent results:

Extension Files Supported by GitHub
fs 33629 yes
fth 7041 yes
4th 2183 yes
f 2008 yes
frt 1182 yes
m 1003 yes
fr 556 yes
muf 365 yes
4 333
forth 121 yes
scr 88
fi 56
fb 37
ft 22
blk 17
for 18 yes
seq 4
ans 3
fo 0

There are some more used by particular Forth implementations:

Extension Files Forth
4k 32 FourK
8th 17 8th
aforth 14 colorForth
atl 21 Atlast
bth 51 OpenFirmware
cf 3 colorForth
cfs 152 colorForth
d4 57 muforth
e4 6 eForth
eforth 1 eForth
f83 1 F83
f99 2 Forth99
fbs 0 Block
fc 17 TurboOF
ff 16 FreeForth
fiv 13 Fifth
fpm 2 ?
fsb 37 "Blockish"
gf 23 GameForth
hfs 2 HenceForth
hsf 92 HsF2012
lse 10 LSE
mf 62 minforth
mu4 121 muforth
nf 29 various
nr 1 North
of 52 TurboOF, OpenFirmware
pez 44 Pez
retro 72 RetroForth
rx 441 RetroForth
spf 70 SP-Forth
vf 3 VentureForth
zf 16 zForth

12 coin problem simulator in jeforth

image

Chocolate factory is in trouble. One of the twelve chocolates is either lighter or heavier. Your job is to find it out by using the sponge floating in a bucket. If you were anticipating a balance scale, the sponge is its substitution. Play Now this game works fine on the Google Chrome web browser. To verify your answer, put all chocolates into the water. The lighter floats, the heavier sinks, all others balance in the water.

In addition to drag-and-drop the chocolates and the sponge by the mouse, these are useful commands:

'replay' command to re-assign the defected chocolate.

'home' command to bring all chocolates and the sponge back to their initial position especially if you have thrown them off the space 😉

'view' command to see the list of all chocolates with their weights ( or mass ) and recent positions.

'freeze' and 'unfreeze' commands work on the water.

Twelve chocolates are numbered 0 .. 11, command line "0 1 2 3 2:2" drops chocolate #0, #1 on the left side and #2, #3 on the right side of the sponge. Similar commands '1:1', '3:3' and friends are to drop corresponding quantities of chocolates respectively.

Above the input box and under the canvas is the output box that is where messages are printed to. If they become too many and annoying then, to erase text messages, type 'er' command or press the key multiple times when the input box is empty. Press Alt+ to do the same thing but erase from top of the output box.

You probably won't need to know this, but messages on the output box can be none-text, i.e. HTML elements. To erase them, we need to also press <Ctrl> key. Thus Ctrl+<backspace> and Alt+Ctrl+<backspace> work on HTML elements. If you went too far you might erase the canvas itself, then you need to reload the web page, that can be done by pressing <F5>.

This game is written in the Forth programming language, jeforth.3we actually. To view the source code, type 'char 12choc.f readTextFileAuto .' don't miss the ending dot, or clone the jeforth.3we project from GitHub. There are many other demos. I wish you like them.

Happy programming!

H.C. Chen
[email protected]
FigTaiwan
2016.11.27

Updated: The "Play now" URL is now https://cdn.rawgit.com/hcchengithub/jeforth.3we/develop/index.html?include%2012choc.f that has solved the Cross Origin Request issue that happens on IE, Firefox, Edge, ..etc.

Arduino-Shell: Token Threaded Forth Shell for Arduino

Started a small project last week with the intention to revisit Forth-land and token threading. This time around I wanted to build an interpreter/virtual machine that 1) used printable characters as token (abbreviated forth words), 2) code could be written directly without an outer interpreter (i.e. token compiler), 3) small enough to be added to Arduino sketches for scripting configuration and/or parts of the application.

The result is a strange marriage between some of the concepts from PostScript with the traditional Forth stack machine.

For more details please see the repository.

Forth game engine

Before anything thanks @larsbrinkhoff for the random invite to the group. This is great.

I've finally got my game engine up on github. It's split into 2 repos - originally it was a Mercurial project and one was a subrepo of the other, which didn't translate over so for now you have to do things manually.

In Forth spirit, the engine is a little bit different. In fact it is really a platform supporting the development of "engine definitions". That's the core idea anyway. Engine definitions are meant to be drop-ins optimized for a specific kind of game in mind and from there similar ones. We're currently focusing on 2D, 32-bit desktop games.

The two big features that make this tool special are:

  1. A well-factored Core of common game and development support
  2. A new way to manage "namespaces", called Idioms, built on plain old ANS wordlists. Idioms function like virtual dictionaries, bundling selections of what you care about in a given application domain behind words that rewrite the search order when executed.

The sole pack-in engine definition, called Saturn, is pretty much an ordinary, nearly feature-complete 2D game engine. Emphasis on nearly.

Additionally there is a built-in interactive console, and someday there will be a RAD environment implementing a bunch of ideas I've been working on for a while.

It makes use of these libraries, which are included.

Check it out.

100 members

Hello,

This group now have over 100 members!

Status of Bubble & Lantern

Last September I posted about my ANS Forth game engine with brief mention of its ancillary namespacing system which I call Idioms. Idioms are extensible gathered wordlists, with a convenient and complete declaration and switching grammar. The engine is now called Lantern and it's sort of a hybrid of 3 engines which powered The Lady and 2 unreleased games, one of which was started over 10 years ago. Thanks to idioms, the engine features an easy-to-use lexicon with a laser-like focus, without limiting the ability to provide more powerful features later on. Or at least that's the goal. I think it's going pretty well.

Instead of direct links, I'm just going to direct everyone to my profile - you can find them there.

Things were getting messy and uncertain last year, and I ended up taking a few months off from all programming due to burnout. But I got a new part time job that let me resume work. Many bugs were fixed (particularly with idioms) and the file structure was improved. The in-game "IDE" got a mini-rehaul and I started developing a GUI system. Having an in-game REPL is essential for fusing code and design, which is the direction I plan to go further in.

Bubble is pretty much stable. For Lantern, I'm on the final lap to 1.0 Beta. 1.0 is not meant to be very big. I have just a handful of features to complete and then I plan to shift gears to doing more game development within the defined boundaries (which still are pretty huge). A lot of the functionality is already provided by Bubble - it's bringing it all together that takes some planning and decision making. There will also be a handful of nice examples. (I use those to develop and test functionality.)

This is the apex of my years of research and development in Forth! The final destination. No more abandoned experiments. I'm excited to share it in its alpha phase and to enter a new chapter that should be marked by creativity and buttloads of fun. I hope to hear feedback from everyone!

Spirit of Forth

What do you think is the spirit of Forth (the system, the language and programming) ?

  • For me this is the reduction, or better elimination, of complexity. If I try to reduce the complexity and have to write the application with Java, then this does not make any sense to me. To write an application in a language orders of magnitude more complex than my solution, is an oxymoron.

  • Another important point is that in Forth we almost don't have grammatical or syntactical rules. Maybe this is a part of reduction of complexity.

  • One person can hold the full control over the whole environment.

best wishes
Andreas Klimas

Finding Forth repositories

Hello,

I created a GitHub user to put a star on Forth repositories:
http://github.com/stars/ForthStar

I'd be happy to take suggestions for more repositories. The criteria are:

  • Detected as Forth by GitHub, and not a false positive. Or
  • At least 20% Forth, and not a toy.

New England Forth Interest Group reLOADed ! ." JOIN US!" You will be WARMly welcomed !

When we have our first meeting it will be dovetailing with one of the Tuesday night project meetups at the Cambridge Hackspace ( they recently moved to the P.irateship in Somerville, MA, USA ).

This is something I've been kicking around for a while but I've just created the meetup group a moment ago and I'm waiting for people to join on the meetup page before we have our first official meetup.

I'll be there chatting with other Forth programmers, Makers, and DIY enthusiasts. I personally look forward to seeing YOU there so we can all bounce ideas off each other!

http://www.meetup.com/New-England-Forth-Interest-Group-NEFIG

All the best, and may the Forth be with you!

Andreas

Welcome!

Hello,

Welcome to this group for Forth enthusiasts.

Please open an issue to start a new discussion. Or stop watching this repository to unsubscribe.

By default, your ForthHub membership will be hidden from view. If you'd like to display the organization icon in your profile, you can switch from "Private" to "Public" here: https://github.com/orgs/ForthHub/people

Best regards,
Lars Brinkhoff

What forth systems you use?

  1. What forth systems do you use and for what OS?
  2. What is your favourite forth system or systems?

My answers:

  1. Windows: SP-Forth, Quark Forth
    Linux: gForth, SP-Forth linux
    OSX: nop
    Embedded: one time was Swift Forth
  2. SPF, Quark, gForth. I think VFX Forth looks very useful. Have no time to try it :(

Merry Xmas!

Merry Xmas and a Happy New Year to all Forth programmers!

Return stack and tail call optimizations

Has anyone here ever worked with (or implemented) a Forth that prevents a tail call to a word?

I'm currently implementing my own little Forth modeled after the F18A. And while tail call optimization is quite simple, occasionally it should be illegal and I'm having a heluva time coming up with an algorithm to figure out when.

Consider this (contrived example) I've created using F18A to load a literal, counted string into the A register:

000 - @p push ex .
001 - 5
002 - 2
003 - 'H'
004 - 'i'
005 - pop a! @+ ;

When this code is done executing, the A register should point to 003 ('H') and 2 should be on the parameter stack (length).

But, let's say we have several literal strings in our code and so we decide to break out the instructions at address 005 into their own word, not because we're saving space, but because we don't want to accidentally mess it up or forget to do it:

( >string )
000 - pop a! @+ ;

Well, obviously this word doesn't work as-is, because since we'll be getting called, the top of the return stack will be a return address and not the address of the string. So, we swizzle the return stack a bit...

( >string )
000 - pop pop a! push
001 - @+ ;

So, now we go back to our original code and modify it to call our subroutine instead:

005 - call (>string)
006 - ;

But, now we perform tail call optimization...

005 - jump (>string)

And suddenly our definition for >string is broken. The return address we expected to be on the stack is no longer there.

Aside from a modifying word (like ANS Forth's IMMEDIATE) identifying a word as "cannot be tail called" I can't think of a solution to this.

Better still would be to somehow realize that the (unswizzled) definition of >string is a single cell and should just be inlined, but ignoring that, has anyone run into this ever with their Forth implementations or on the F18A?

Thanks!

EuroForth 2017 invitation

Dear Forthers,

EuroForth brings together researchers and practitioners from the Forth community (quote from the EuroForth Website).
This year's EuroForth will be held in Bad Vöslau near Vienna.

Papers are solicited on all aspects of Forth (applications, implementations, extensions, etc.) and related topics. Here is the Call for papers.

We (regular EuroForth attendants) would love to meet people from the ForthHub in person, and as I have the feeling that lots of ForthHub members are not following comp.lang.forth or other ancient technologies, I wanted to reach out to you directly.

Before the EuroForth conference the Forth Standard Meeting takes place in which the language and its compilation techniques are discussed in detail.

In case you want to merge a vacation and the conference: a separate partner track which includes lots of sightseeing in Vienna will also be provided, so bring your partners ;)

More details and the registration Form can be found on: http://euro.theforth.net/

Regards,
Gerald Wodni

Spreading Forth



Spreading Forth


we can do something like << forth dimensions >>

to publish readings about forth in html and pdf

  • interviews
  • articles
  • reports
  • ideas
  • compares of features & syntaxes & semantic of variety of forth dialects

and interfacing our publishes with a good database from our web page


I think it won't require any very hard works to start

and

<< Spreading Forth >>

<< Forth Spreading >>

<< Forth ideas >>

are my proposed names :)

I am not good at English

so

may you suggest more



Would you use smart Forth Vim plugins?

I use and love Vim. In particular I'm a fan of code folding (at the function/word level, anyway) and of autocomplete as I type, using YCM. I've been missing support for both of those while writing Forth over the last few weeks.

YCM's general-purpose identifier autocomplete doesn't work for Forth; it doesn't realize hyphenated-words-are-identifiers. I want to fix that.

I also want to write a basic folding plugin that will fold at the colon definition level, with a useful summary (probably the exact defining word, the name of the word, and the stack comment if any.

Would anyone else find one or both of those plugins useful? Am I a terrible heretic for not embracing Emacs or another tool for writing my Forth? What do others use when writing Forth?

STM8EF continued development

I'm a Forth newbie working on an eForth for low-end ($0.20/piece) STM8S Value Line devices. My starting point was Dr. C.H. Ting's STM8EF eForth demo (a STC eForth). My contribution is new features, bug-fixes, support for cheap target boards, and more compact code (core, and compiled code).

It's no match for AmForth or Mecrisp, but I like the challenge of targeting a device with very limited resources.

The repository is here. There is also a Wiki with some documentation, and a project on hackaday.io.

Feedback and advice from Forthers is welcome!

Forth at the Vintage Computer Festival Europe April 29th and May 1st 2017 in Munich/Germany

The 18th annual European Vintage Computer Festival will take place on April 29th and May 1st 2017.

http://vcfe.org

I will be presenting the "Amitari" (an Amiga 600 running EmuTOS, the open source version of the Atari ST operating system), running some Forth-Systems (VolksForth, I also will try lbforth, oneForth, FusionForth ).

I'll also plan to test SoloForth with the help of a ZX Spectrum user.

Also, as each year, the great ultimate Forth Benchmark will continue.

Location:
Kulturzentrum Trudering
Wasserburger Landstraße 32
81825 Munich
Bavaria

If you are in Bavaria next weekend, don't miss this show.

See you there

Carsten

Forth at ApacheCon

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.

How do you do struct packing in FORTH?

FORTH 200X introduced structs. I can't find any documentation on online or in documentation for the best way to perform struct packing, though.

Is it possible in FORTH (GForth, specifically)? I'm trying build an MQTT message packet which requires setting flags that are smaller than one byte.

nnCron and Github

nnCron — most powerful automation program for windows now available on github: https://github.com/nnCron/nnCron
nnCron here is only one day and I'm still work on repositories filling. Any suggestions, bug reports and plugins are welcome.

Logotype

The current ForthHub logotype is a simple combination of a colon definition and the friendly Forth prompt:

I'm happy to take suggestions for a fancier logo.

Forth Virtual Machine for Arduino

Started a new Forth kernel project targeted for the Arduino. This time a more traditional multi-tasking token thread kernel with the focus on performance, foot-print and integration with Arduino core functions and libraries.

Written in C++ with approx. 110 kernel functions. Kernel foot-print is 3.5Kbyte without dictionary strings. The dictionary strings adds 750 bytes. A built-in trace adds approx. 1Kbyte. https://github.com/mikaelpatel/Arduino-FVM/blob/master/examples/Blink/Blink.ino

Follow the development on https://github.com/mikaelpatel/Arduino-FVM.

Cheers!

Getting started in the FreeBSD bootloader

Hey! I am interested in learning more (and hacking on) Forth in the FreeBSD bootloader (or any other bootloaders that use a Forth interpreter). Does anyone have any suggestions for getting started on this? (Guides, posts, anything.) Thanks!

Use cases asking for forth

Hi there,

maybe it's a dumb question. Maybe a nice starter. But I kinda feel limited of using forth mostly in the context of writing a forth system from scratch or the obvious "embedded system" usage of it.

Most stuff besides either forth systems itself or embedded systems are not obvious to me.
Yes you can write everything theoretically in forth but what use cases are from the structure of the
language and it's syntactical or environmental features one step away?

Using prolog to code an Expert System is not far reached. Using lisp for the same or for a use case which asks for the abstraction and list processing is also one step away.
Using C for embedded programming or writing a unix program is also one step away.

I leave that here maybe you can add some more worked out ideas :-)

What graphic libraries you use?

What graphic libraries you use in your forth programs?

For simple windows programs I use winlib in SP-Forth. For few complicated programs I used NodeWebkit as GUI (chromium + nodejs) via web-sockets.
For linux never used graphic libraries.

Starting FORTH Calculator Screen Keyboard on Scratch.MIT.Edu (#MOBLuSE_FORTH)

I have made a FORTH compiler and interpreter for Scratch.MIT.Edu that is FOSS: https://scratch.mit.edu/projects/137676871/ .
This requires Flash in the browser, but you can also run it on http://phosphorus.github.io/app.html?id=137676871&turbo=true&full-screen=true and this only requires JavaScript in the browser. The instructions are only on Scratch.MIT.Edu and https://github.com/mobluse/mobluse_forth.sb2 .

Type using these keyboard keys (due to Scratch limitations):
0-9, A-Z = types key. FORTH is case insensitive.
Arrow right = Full stop, <.>.
Arrow left = Backspace, <BS>.
Arrow down = Carriage return/Enter, <CR>.
Arrow up = Shift - pressed before 0-9, A-Z, <.>, <SPACE>, <CR>.
Shift+J = -. Shift+K = +. Shift+B = *. Shift+V = /. Shift+M = >. Shift+1 = !. Shift+2 = @. Shift+I = (. Shift+O = ). Shift+P = ". Shift+Arrow right = ,. Shift+Z = :. Shift+X = ;. Shift+C = ?.
Shift+A = Ask – this makes copying from a tutorial and pasting into Scratch possible – typographical quote-characters from pasted text are converted to ASCII.
Shift+SPACE = Break.

If you run this on a device w/o keyboard, you may use the screen keyboard by clicking the blue keyboard in the upper right corner (same as Shift+A / Arrow up+A).

I have made some new videos about this FORTH programming language and a FORTH playlist:

  1. (old) https://youtu.be/VZfUFnioLko 1 min <-- Dec 26 2016
  2. (new) https://youtu.be/FwEgRetggFg 1 min <-- Feb 2 2017
  3. (new) https://youtu.be/tPk1nNgq6NE 1 min
  4. (new) https://youtu.be/tZOYPTv77pI 1 min
  5. (new) https://youtu.be/nr0c87lrC64 1 min

https://www.youtube.com/playlist?list=PLD8D8534DD63B28EA

There is an article about the project here:
https://scratch.mit.edu/discuss/topic/233532/ .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.