¿ªÔÆÌåÓý

Re: Trouble ahead


 

Very cool to hear about your Urdu typesetting system.
Yes, "fonts were stored as graphics described in text files of AutoCAD in dxf format" is a terrifying thought!

Found this Hackaday post when searching to see if anybody had Forth on an ATMega328P:
? ??

Some nice comments under that post, including this:
##################
Kit Scuzz?says:? ??

Any language in which you can redefine ¡°1¡± to be something different and the language doesn¡¯t bat an eye is a language which is dangerous. Check it out! (using gforth)

: 1 2 ; ok
1 1 + ok
. 4 ok

That¡¯s right! 1 + 1 = 4

The issue here is typing. There¡¯s no differentiation between the number 1 and the named object one. There¡¯s no separation of name spaces. People say things like ¡°C is powerful but dangerous,¡± but I had a professor who once told me: ¡°Programming in C is like walking through a workshop filled with bandsaws with no guards on the blades. Programming in forth is like turning off the lights on the guy walking around in that workshop¡± (and this was a professor who *loved* forth)

There are a lot of reasons why forth fell out of favor. I could ramble on and on about them. I think a lot of them simply have to do with the fact that we can provide a more functional experience with better syntactical sugar, better type checking, and that computers have enough horse power in general to just run more straightforward code. We can afford the cost of multi-pass compilation and strict type-checking. In uncompiled languages (ruby, python, etc), we can provide better syntaxes which make for more readable code.

Last but not least:?

###############


Another comment points us to this:
? ??

We could port all the Raduino code over to Forth, running on the Nano's ATMega328P.
Then we'd be far less likely to run out of memory.
No need for those fancy ARM processors.
(I'm joking.? The Harvard architecture of the ATMega328P means you'd be leaning awfully hard on that 2k of RAM).

For decades I used HP calculators, starting with an HP35 in college,
so I'm quite comfortable with Reverse Polish Notation on a stack machine.
All the cool kids had the HP45 which came out shortly thereafter,
they had a far easier time flipping between polar and rectangular on EE exams.
Now I find it easier to invoke python when I need to do basic arithmetic,
my HP35 is in one of those dusty old boxes down in the basement.

Jerry, KE7ER


On Mon, Mar 22, 2021 at 09:43 AM, Ashhar Farhan wrote:
Forth is a write-only language. Talking if postscript... In 1989, fresh out of college, I took on a really ambitious project to build a typesetting system for my mother tongue: Urdu. Working with turbo c, on a single floppy 8088 running at 12 mhz, I managed a ridiculous contraption : the fonts were stored as graphics described in text files of AutoCAD in dxf format. The system parsed the files and scaled them and rewrote the page full of text in dxf format. The system took about two hours to do one page.
I got sick of it, I went to a local college bookstore and bought a book in computer graphics. I learnt to draw lines using DDA algorithm and fill polygons using odd-evdn rules. I kept optimising it until i wrote the innee loops with inline assembly, finally producing a wysiwyg editor. I remember that i finished the polygon filling in one night.
Why am I saying all this? Much of that code is in ubitx text display routines!
- f

Join [email protected] to automatically receive all group messages.