Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #22844
| Newsgroups | comp.lang.forth |
|---|---|
| Date | 2013-05-20 13:12 -0700 |
| Message-ID | <3c38190c-3f5a-4f4a-93bc-ecda0cf87f72@googlegroups.com> (permalink) |
| Subject | off topic: Poslin |
| From | thomas.bartscher@gmail.com |
I feel kinda bad for doing this as my first post on comp.lang.forth, especially since my only experience with Forth is writing a limited version of it in the course of working through "Let Over Lambda", but I didn't find any better place. The code of Poslin is written in Common Lisp and can be found at https://bitbucket.org/thomas_bartscher/poslin There is a tutorial consisting of currently one part. I hope it explains the ideas behind the language. Later parts will show how the standard library is implemented. Short version: when learning about postfix notation in school I came up with Poslin, a programming language using postfix notation. I didn't know about Forth and were just getting used to lisp and only now, more then 5 years later I was able to actually implement Poslin. Now I need some ideas about where to go with the language, what pitfalls to avoid and which additions to the language might be useful. Poslin is designed after Lisp, as Common Lisp is the only language I am familiar with (although I learned Haskell (yay) and Delphi (nay) in school). It was not designed with hardware or speed considerations in mind. It doesn't implement 'if' by manipulating the program counter but by something like lazy evaluation - most operations need to be called explicitely, which is a bit verbose but can be quite useful when defining syntactic sugar. Poslin doesn't use one parameter stack but a stack of parameter stacks called the path. Originally I wanted a tree of parameter stacks but practically it's just more bookkeeping for the same effect. The path is used for opening up temporary stacks that can be used for defining new operations, holding local lexical environments and similar tasks. Lexical environments and variable bindings (at least I think that's what they are, maybe they're pointers?) are available as first class objects. There are two primitives for manipulating the return stack. implementing primitives for manipulating the program counter is trivial but I am not sure whether those are any use. I think I need some kind of type system but I am not sure what kind would be best. Any thoughts, suggestions or anything else?
Back to comp.lang.forth | Previous | Next — Next in thread | Find similar
off topic: Poslin thomas.bartscher@gmail.com - 2013-05-20 13:12 -0700
Re: off topic: Poslin anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-05-21 15:43 +0000
Re: off topic: Poslin thomas.bartscher@gmail.com - 2013-05-21 14:22 -0700
csiph-web