Fork me on GitHub

Anyone have a good recommendation for a list of exercises for mastering forth? I know of the books Thinking Forth / Starting Forth, but I feel like I have not yet run into an application where Forth just beats everything else.


I have this coming and going idea of making a forth compiler for the DMG-01 Nintendo GameBoy


It's worth looking at some of chuck's writing on colorforth too. Forth... really doesn't beat anything else, but it gives you a satisfying feeling when you get it. 😉


it was incredibly useful in the era of memory constrained and potentially massively binary incompatible systems. Since he was exposed to Lisp as an asm hacker, there are some (random) similarities.


There was a book I completely forgot from the 80's that built an OOP system in FIGFORTH with classes and inheritance etc, which gave a good impression of forth defining words (lisp macros) which was very good, though I forget the title, sorry. Definitely scour the Forth literature around the 80's microcomputer revolution though, since the exhilaration was quite palpable at the time 😉


(but look at it through the sober lense of 2018, naturally ;))


This has been on my todo-list for a while


Minecraft has a CPU forma, DCPU-16, and this guide targets that arch ?


[Just double checking, as it's so unexpected.]


> Ever wanted to learn how the system on the Philae comet lander works, ported to an imaginary vintage computer used to control a spaceship in a futuristic game by the creator of Minecraft? > The DCPU-16 was created by Markus “Notch” Persson in 2012 for the game 0x10c. Notch, having been responsible for Minecraft (one of the best selling and most widely known computer games of all time), had a fanatical following when 0x10c was announced. Since 0x10c was to be a successor to Minecraft, and since it concentrated on vintage computing with a 16-bit CPU, programmers descended upon it in droves and wrote their own emulators, assemblers, even entire operating systems, for the architecture before the game was even released.


I completeyl misread that. Thanks for clarifying. 🙂

👍 4

If you want to program an imaginary computer, play TIS-100 instead


Actually, I just want to master Forth. Though, in 2018, outside of embedded systems, it might as well as be an imaginary computer.

Richard Smedley13:12:14

There was a nice little board with Forth on launched in 2011, with a rather neat Lunar Lander program. Looks like it's still available:


Are most Forth impls: VM + indirect threaded code based ?


Threaded code was a big 80's thing when it was a benefit to store an instruction in 16-bits. 'modern' forths emit assembly basically using , and C,. Chuck himself was somewhat against complex register allocation and compilation last time I talked to him in the early 2000's, mostly because he saw Forth as 'simple and small'.


The DPANS implementing commercial forths completely ignored his position, of course


There is a fantastic book from the 80's called "Threaded Interpreted Languages" that is well worth the read if you know or are interested in the Z80. Designed very much for 16k systems, where an assembling compiler would have been pretty tight.

cvic15:12:54 is on my to check list for ages...

eccentric J18:12:56

It took me most of the weekend but I finally got my fish-shell prompt just the way I want it after learning about it last week:


@U8WFYMFRU Looks nice. Have you got a gist up somewhere? As a zsh user I may just be tempted to try the fish shell if I can get a head-start.

eccentric J21:12:01

I do have the theme and my config within You’ll need to install fish shell, copy the omf directory from the repo to ~/.config/omf, then install oh-my-fish

eccentric J21:12:53

@U05476190 After that you should be good to go. I was using zsh for a few years up until the end of last week, zsh is great but fish shell is really fast, provides a great shell user-experience, and makes it much easier to script. It even has a lispy philosophy where every value is treated as if it were a list with an emphasis on functions.


Thanks for the writeup, I’ll try it out over the holidays.

eccentric J16:12:13

Nice! Let me know if any issues come up getting it to work.


there is some erlang thing with a very generic name for specifying client/server behavior, it will even sit between a client and a server and throws errors if either party violates the behavior. does anyone know what the name of that is?


There's a library only for tests called Pact, if I'm not mistaken. It implements contract tests. Is it something like this that you're looking for?


Also, I've implemented this kind of behavior with Prismatic Schema on both services, but I don't believe that there's something that sits between client and server


I don't think so, this has a kind of specification language you feed in to it that defines the call response between the client and server


@hiredman are you referring to OTP?


isn't that just like the standard library? what I am referring to is a concrete thing with a schema language you feed in and you get a thing that verifies the behavior of clients and servers as they exchange protocol messages


dialyzer? But it's compile time. Otherwise there's no standard validation middleware that I know of, but usually pattern matching at least somewhat validates shapes

hiredman19:12:53 looks like what I was thinking of (apparently no one uses ubf, which would explain why this was so hard to find)


oohhhh neat!


it is very interesting, and in some ways similar to how I've been using graphql, but graphql doesn't include the notion of a connection state (some things are only valid in some states), but happen to be using graphql on a stateful connection




just figured out right now that python3 has been crazier change than i though


$ python3.6
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.5)
>>> round(3.5)

$ python2.7
Python 2.7.15+ (default, Oct  2 2018, 22:12:08) 
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> round(2.5)
>>> round(3.5)


i understand that this half_even rounding is good for stats but such a thing breaks a ton of code that works on both versions but just gives different results 😐


also, please don't do such changes in clojure, pretty please 🙂


I've never understood why anyone would use round instead of ceil/floor.


that would introduce a systematic skew to results