Why Forth Isn't Slow (1985)
archive.org
archive.org
In a lot of system code, the performance can be dominated by access to devices that are much slower than cache. In that environment, so long as you are careful about a few CPU intensive routines like memcpy and bitblt, threaded code can be nearly as fast as compiled code, and sometimes faster. And it is much more compact, which matters a lot when you have to fit everything into some flavor of ROM.
Reading old computer magazines: reads every ad, considers if copies of ancient literature still exist
The ads in old elektuur/elektor magazines are also quite interesting and welcome.
I still wonder why ad networks try to measure up me, instead of simply looking at the intended audience of the site I am at.
Explaining Computer Shopper to the web generation is always interesting.
Of course, the advertising back then used a trick which seems to escape all modern advertising think tanks: they had great user targetting without shady tracking schemes, by advertising things a magazine reader would be interested in. Imagine this trick being used in todays web :p.
I might be into archery and photography, but if I'm browsing an article about lenses and I see an ad for arrows, that's just creepy.
But if I see an ad for lenses, or even gimbals, I might go and buy one on the spot. Or put it in the cart and sleep on it, whatever.
At this point it's worse than that (for advertisers), because I'll never see the targeted arrow ad, since I block as much surveillance tech as I can without disabling Javascript entirely. But if a blog serves same-site content which happens to be an ad, and some of them are smart enough to do that, I'll see it.
Back in those days cover art and ads for games often had art drawn by artists in physical media, or photographs, which the 8-bit games of the day never had a snowball's chance in hell of living up to.
The blurbs in ads could never really tell you whether the gameplay was any good.
And, most of all, ads almost always lied.
I learned that marketers and advertisers would say anything to make a sale, and that it was best to just ignore them.
As a result, I never ever bought anything based on an ad... however, an ad might make me aware that something existed and entice me to investigate further.
Then I'd read reviews, which too often were almost as bad as the ads, especially in the popular gaming/software magazines which preferred to write puff pieces about everything they reviewed... probably to stay on the good side of advertisers and to keep getting sent free products to review.
It was rare to find honest reviews, and even then it was hard to ultimately know whether the product was actually any good until you tried it yourself, and did so for an extended period of time.
I've wasted so much money on products which seemed to be good at first but ultimately turned out to be trash or not what I actually wanted/needed.
Advertising rarely makes any of this any better. Usually it makes it worse.
I believe it's one of points of ads: when choosing what product to buy, you're likely to choose between options A and B, which you've heard about (either from ads, or friends), and not option C, which you've never heard about.
Oh no, that would involve the people operating the website to actually have to give a shit about what ads are shown, and worse, they would have to interact with their advertisers!
- it's a small size compared to a book
- it's not monitored
- it feels more personal (<= almost absurd)It's a link to a middle page on a PDF viewer in archive.org. It annoys me you can't do things better than that.
>It annoys me you can't do things better than that.
Today you can, buy a faster connection or step on your government feet.
https://archive.org/download/Forth_Dimension_Volume_06_Numbe...
From there you can hit those 'jpg' links next to each page, though the URLs can get pretty long:
https://archive.org/download/Forth_Dimension_Volume_06_Numbe...
https://archive.org/download/Forth_Dimension_Volume_06_Numbe...
There is no reason not to boot them up and use them and enjoy the way they work.
Disclaimer: 30+ machines in my retro- collection. I will have to dust off the Jupiter Ace and have some Forth sessions at the next 'one page of code' challenge ..
Old chips can definitely go bad as well. However, many of the machines were simple enough that it's possible to diagnose and fix the problem with a bit of knowledge and some gumption.
Electricity seems like one of those topics you really don't want to learn through experimentation with old hardware.
It's the one my dad bought in 1984 or so. Imagine the scene:
Me and my brother flew home to West Germany (Rheindahlen) from the UK (Army brats) for the Christmas hols. Dad proudly shows us the new computer and plugged the power into the video input. pop. About two months later we receive the repaired unit from NAAFI. Me and my brother went back to school for the spring term. Mum and Dad had not banked on the C64 as a main Chrimbo pressie for us and gave us other things. They clearly knew well ahead of time how IT will always screw up - they were clearly prescient types.
We absolutely loved it. I wont bore you any more with reminisces but I still have it and it still works.
Capacitors don't evaporate, they swell or blow if dodgy enough - long story, search it ("blown capacitors".)
I plan on recapping it soon.
Much rather have to replace a cap than de-glue a touchscreen display ..
In 1985ish I did a silly Forth prog on a Speccy for parent's day at school. I'm just an honest syadmin these days but I think I made text along the lines of "This is a line of text" or "Today is Parent's Day" smoothly bounce around the screen and change colours in about 20 LOC. Please be charitable, this was 35 years ago and I'm no programmer and still lack imagination.
http://grobots.sourceforge.net/
I recommend you do the basics of the tutorial, then watching some matches with the provided sides.
Ouch.
Does anyone have any other of these kind of programming games?
https://github.com/JohnEarnest/Mako/tree/master/games/Warrio...
You can play a browser-based build here:
http://johnearnest.github.io/Mako.js/?rom=Warrior
(Warning: this game quickly gets pretty hard.)
[1] http://koth.org/ [2] http://corewars.org/ [3] #corewars on irc.freenode.net
It would be nice to see it run under Linux... the C source looks too much like typical "be as clever as possible" macro magic, which my non-C adjusted brain can't hack.
I'll re-implement in either assembler, or free pascal.
The reason is that STOICAL implements types, arrays, and dictionaries in what seems to be a quite reasonable and sane matter.
It does type checking when you want, and seems like it could do object oriented as well, if I can push it that way.
My greatest motivation to learn Forth inside and out is its value in rebuilding civilization if we ever find ourselves in a place where a significant amount of technology has been lost. I don't think there's a more powerful and yet incredibly simple way to bootstrap a general purpose programming environment than writing a Forth. It's a relatively small amount of knowledge that needs to be preserved, compared to all the complexity that would be needed to have compilers, garbage collectors, and all that jazz again.
I mean, that's just my personal take on it.
I have seen embedded Forth developers do this on new CPUs and its fast and potent.
Enjoy.
The main argument of the article seems to be reiterating the idea that in a tree, most of the nodes are leaves. For instance, in a balanced binary tree containing 2^n-1 nodes, a little over half the nodes are leaves. So if we visualize the call graph as traversing a tree, where the leaves are primary primitives in machine language, the bulk of the activity is always going on in the machine language leaves. When a primitive operation returns, much of the time control soon passes to another primitive operation, staying near the bottom of the tree.
Depending on how the threading is implemented, the primitive "return" (NEXT) operation may even pass control directly to the next primitive; a typical threaded implementation of NEXT might be something along the lines of "load next codeword and branch to it". You only go through the full call/return sequence, e.g. updating the return stack, when entering or leaving a non-primitive word.
Often time this expresses itself as a framework du'jour. But recently it seems like people are reaching back to languages of yore to see if there is some piece of mystic art to be applied to today's problems.
I'll admit I'm guilty of this outlook. I would love to write code professionally in Forth, APL, or any number of 'long gone' languages.
I posted my project here just the other day: https://news.ycombinator.com/item?id=24604457 I had an absolute blast working on it, and I'm looking forward to my next Forth-related project (still deciding on what it's going to be).
http://stoical.sourceforge.net/documentation.php
The stand out features for me 'string puts a string on the stack (along with a type flag for string 'cube : dup dup * * ; is how you would define cube, which is a bit different, but not a huge shift
He's got ways to do types, dictionaries, arrays that also look like stacks... all sorts of magic including networking!
How much of it could be crammed into something that boots inside of a VM?
There's no way to save time like that any more; the computer's done -before- you finish typing 'run'. (Well, ok, infinite loops aren't any faster, just get -much closer to infinity. I postulate.)
Anyway, those old mags always bring back that sense of WHOA! (I still have Kilobaud #1 and #2.)