2026-05-18 03:06:08 i would like to propose something that I think could save the forth community 2026-05-18 03:06:44 the young males who I talk to who are interested in code generally do not gather on irc, they gather on discord 2026-05-18 03:07:30 discord is a free service with chatting like in irc but it also has video calls and easier UI which is why its extremely popular with the youth 2026-05-18 03:08:29 there is something called a "irc bridge" which is free code you can use to connect your irc channel to a discord channel so that irc and discord users can talk in the same chat 2026-05-18 03:09:34 i am certain that creating a discord server, which is free of charge, and then connecting it to the forth and the concatenative irc channels would attract alot of young people into the forth community 2026-05-18 03:11:07 alot of young people know about forth compared to millenials or gen x, and they think about forth as an edgy hacker programming language and have created grungy memes about it some of which are edgy potty humor 2026-05-18 03:47:41 lisbeths, discord UI is very hard 2026-05-18 03:48:13 I can't even use it unlike IRC, where you just input name, password, server and port, encoding (UTF-8) and click connect 2026-05-18 03:48:47 it may be harder for older people but young iphone natives find discord more inuitive than irc 2026-05-18 03:49:49 for younger people, internet == web, because they don't know any better 2026-05-18 03:49:52 lisbeths, java script grind discord to halt even if you manage to connect 2026-05-18 03:50:10 you scroll and browser freezes for a minute 2026-05-18 03:50:51 And it constantly asks for account verification which doesn't work 2026-05-18 03:51:04 So you have to register a new account 2026-05-18 03:51:56 a proprietary centralized web platform, what could go wrong 2026-05-18 03:52:32 KVirc also has every feature for IRC, but it's on Qt and quite heavy compared to XChat 2026-05-18 03:53:16 IRC has a big problem that its showing everybody IP address to everybody else by default 2026-05-18 03:54:17 Which nowadays is not as relevant as it used to be, given so many people are forced to be behind CGNATs 2026-05-18 03:55:07 I wish there was a good text chat protocol which supported some light markup language (markdown or TeX maybe) and had reliable file transfer while providing IP anonymity out of the box instead of requiring registration and setting up a mask 2026-05-18 03:55:52 It should also be hard to block/censor 2026-05-18 03:56:04 pew research says 33% of teenagers use discord. it is a plain and simple fact that its the easiest way to reach young people right now 2026-05-18 03:56:24 its the modern day aol messenger except much more massive 2026-05-18 03:56:26 Why would they want Forth if they can't even set up IRC? 2026-05-18 03:56:37 Great point 2026-05-18 03:56:55 as someone who has taught alot of young people code its for several reasons 2026-05-18 03:57:29 first of all alot of young people are in a school system that doesnt teach them math effectively so they are resistant to anything mathematical 2026-05-18 03:57:44 the ones who are interested in learning code often dont know where to start 2026-05-18 03:58:04 Also I'm not sure I want Forth. I like GNU dc language, but it's quite limited (no way to input a string without a shell wrapper to transform it into sequence of numbers). 2026-05-18 03:58:05 also alot of young peopole dont see the point in using irc because none of their friends use it 2026-05-18 03:59:04 they insist on living inside that same-age bubble 2026-05-18 03:59:15 i have been working on a way to make a succesor to dc that has flexible syntax at runtime so that you can add things like string manipulation 2026-05-18 03:59:18 Have you checked PostScript? 2026-05-18 03:59:29 lisbeths, isn't Telegram more popular? 2026-05-18 03:59:36 my version of dc uses registers instead of a stack 2026-05-18 03:59:42 X-Scale, it's printer language 2026-05-18 03:59:48 telegram is very unlike irc 2026-05-18 03:59:57 My printer sadly doesn't support PS 2026-05-18 04:00:13 you dont have to have a printer to use ps 2026-05-18 04:00:23 you can also export ps to pdf then print it 2026-05-18 04:00:31 lisbeths, is ghostscript only implementation outside of printers? 2026-05-18 04:00:49 What's difference between .ps and .pdf? 2026-05-18 04:01:00 Both show in viewer as sequence of A4 pages 2026-05-18 04:01:01 ghostscript is just the most polular open source postscript implementaion 2026-05-18 04:01:31 pdf is a format that is more universa and easier to print 2026-05-18 04:01:40 converting to pdf is just one command 2026-05-18 04:02:12 but ghostscript does more than just printing. it isna general purpose coding language 2026-05-18 04:02:24 Postscript is a programming language based on Forth and taylored for page description 2026-05-18 04:02:43 no it is similar to forth but it has its own base or design 2026-05-18 04:03:07 postscript is a concatenative language but it isnt a forth 2026-05-18 04:03:28 What's historically younger, dc or Forth? 2026-05-18 04:03:40 Both are very old at least 2026-05-18 04:04:22 well dc was secretly an os that ken thompson wrote for the pdp7 cause he needed something memory safe and his bosses wouldnt let him make an os so he made a "calculator" 2026-05-18 04:04:30 lisbeths, what are reasons to prefer PS to Forth? Is there any program which is written in PS? At least forth is used in PowerMac firmware and I have one power mac (macmini 2005) 2026-05-18 04:04:48 1. forth is more performant by far 2026-05-18 04:05:01 2. forth has flexible syntax at runtime 2026-05-18 04:05:16 3. forth is a few kilobytes but ghostscript is megabytes 2026-05-18 04:05:31 4. forth can run on the baremetal as an os and ghostscript cant 2026-05-18 04:05:32 There should be lighter PS interpreter/compilers, right? 2026-05-18 04:05:45 there might be 2026-05-18 04:05:58 do you just want to make documents or do you want a concatenative language 2026-05-18 04:06:14 Then it seems there is absolutely no reason to write programs in PS? And printers do not support it either anymore 2026-05-18 04:06:47 ps is primarily used by professors to make essays with fancy mathsmatical notations print on the printer 2026-05-18 04:06:57 to make documents there is LaTeX and LibreOffice 2026-05-18 04:06:59 ps is significantly easier to use and learn than Latex 2026-05-18 04:07:15 postscript can do most of what latex can do 2026-05-18 04:07:35 There is also markdown 2026-05-18 04:07:54 forth is not for making those type of printer documents. it technically can but most of the software hasnt been made for it 2026-05-18 04:07:56 PostScript can do pretty much anything on a page 2026-05-18 04:08:03 I had a daydream about programming a solo rpg system in ps as a console game, that would print the resulting narrative out as a PDF. nothing became of this daydream yet 2026-05-18 04:08:07 ACTION stops lurking 2026-05-18 04:08:40 if you like concatenative and you want to make fancy printe documents use ghostscript 2026-05-18 04:09:33 the size of ghostscript likely wont be an issue on a personal computer like windows or mac 2026-05-18 04:10:10 i can personally teach you ghostscrip free of charge if youd like 2026-05-18 04:12:23 is Brodie still the best beginner book for Forth? i've been working through that and FORTH Inc's Application Techniques 2026-05-18 04:13:13 yes. there is also now ai that can help explain forth to you, although it is sometimes wrong 2026-05-18 04:13:34 forth hasnt significantly changed in 30 years so brodie is still current 2026-05-18 04:14:40 the ultimate way to understand forth is to write your own forth in assmbler and base it on jonesforth. forth is so small that every forth coder is generally expected to do this 2026-05-18 04:17:10 the majority of forth coders use forth to make very low power microchips cheaply, or else to write drivers and firmware for personal computers 2026-05-18 04:17:43 that's a goal, for sure. first of my goals is to become expressive in ANS Forth before delving into the innards of Assembly 2026-05-18 04:19:08 I read that huge ratfactor article that touched on JonesForth. it's fascinating 2026-05-18 04:21:03 lisbeths do you prefer your own custom forth to any extant varieties: gforth, swift, VFX? 2026-05-18 04:25:12 lisbeths, you could try to implement in GS to show how much it differs (it prints 0 padded 8 byte binaries from 0 to 255): dc -e '2o[seq]sq1[d127n]dsnx' 2026-05-18 04:27:16 Regarding Forth, the best way to teach me would be to provide a cheat sheet of commands it has. Like man dc, but for forth. Long tutorials which teach basics are tedious and manuals are overly detailed 2026-05-18 04:27:54 https://www.gnu.org/software/bc/manual/dc-1.05/html_mono/dc.html like this level of details 2026-05-18 04:29:01 lisbeths, also while dc supports as many stacks as one want I usually only use the main stack and variables and most of time variables store procedures 2026-05-18 04:50:04 highchurch: so ans forth is widely hated by most forth coders 2026-05-18 04:50:23 its slow and many people that use ans forth are known to write bad forth 2026-05-18 04:50:44 look to jonesforth as an example of what good forth is 2026-05-18 04:52:16 Stalevar: unfortunately I dont have a ghostscript cheatsheet. however most modern ais know ghostscript and can answer basic syntax questions about it 2026-05-18 04:52:48 But I need basic syntax overview before I start anything 2026-05-18 04:52:52 Stalevar: you can make artificial stacks in forth and in ghostscript you arent limited to one 2026-05-18 04:52:59 Of course 2026-05-18 04:53:10 But what you'd need it for if you have main stack? 2026-05-18 04:53:30 lisbeths: i see. i guess that answers my question about gforth, swiftforth, and VFX 2026-05-18 04:54:22 Stalevar: well you were talking about how dc has more than one stack 2026-05-18 04:54:55 Yes, but I only use variable mode (lowercase l and s) instead of stack / array mode ( L, S, ; : ) 2026-05-18 04:54:55 by the way dc is very bad at typing up technical documents for a printer so I am not sure why you are considering dc unless you want to use it for more than just documents 2026-05-18 04:55:17 I never said I wanted technical documents 2026-05-18 04:55:33 oh what are you using your language for 2026-05-18 04:55:55 lisbeths, usually converting number bases and things 2026-05-18 04:55:59 highchurch: most forth coders will turn their nose up at you unless you use your own custom forth 2026-05-18 04:56:25 Stalevar: and youre sure you want to use a postfix/concatenative language for it? 2026-05-18 04:56:26 tough crowd! 2026-05-18 04:56:43 lisbeths, not really sure, but dc is often shortest 2026-05-18 04:57:23 utf8() { for code in "$@"; do dc -e '2 6^sb[Pq]sq?dlb2*>q[dlb%lb2*+rlb/d2 Az-^!>t]dstxlb4*2 8z3--^-+[Pz0 highchurch the majority of forth coders write on very constrained performance based microchip projects. but writing your own forth is actually not that hard because of how small it is 2026-05-18 04:57:34 This is most common thing I use 2026-05-18 04:57:42 Stalevar: so you want code berevity? 2026-05-18 04:57:43 I should really put it in bashrc or something 2026-05-18 04:58:11 Instead of sourcing the file every time manually 2026-05-18 04:58:46 Stalevar: maybe what you would prefer is basforth 2026-05-18 04:58:54 it is a very small forth written in awk 2026-05-18 04:59:47 Why not to use awk directly then? 2026-05-18 05:00:15 Interpreted language written in interpreted language? It's only for toys 2026-05-18 05:03:31 because systems like forth an dc can do things that awk by itself doesnt do 2026-05-18 05:03:45 if an awkforth is foo slow for you there are c forths available 2026-05-18 05:07:11 is it a common exercise to build a forth in another language (other than bare-metal assembly, as discussed above)? 2026-05-18 05:07:30 yes 2026-05-18 05:07:31 ACTION codes Forth in GNU APL 2026-05-18 05:07:42 sick. that sounds like a fun project 2026-05-18 05:08:01 so for example there are forths written in javascript because the web used to only use javascript 2026-05-18 05:08:19 a new programmers first forth is often in an easier language than assembler for practice 2026-05-18 05:08:51 and finally, many forths are written in c because c is often treated as a high level alternative to assembler 2026-05-18 05:09:10 however most staunch forth coders consider a true forth to be written in asm only 2026-05-18 05:20:14 are there a lot of staunch forth coders these days? 2026-05-18 05:20:46 there is historical context here 2026-05-18 05:20:57 discord is proprietary, and the last time I tried to open it I had to kill my browser 2026-05-18 05:21:06 so most code these days is high level code in the browser in javascript 2026-05-18 05:21:29 but alot of forth coders are older folks who have been coding since the 80s when code was very different than today 2026-05-18 05:21:32 but people who like Discord should totally use it. it definitely has some advantages over IRC 2026-05-18 05:22:05 and the majority of forth coders use coding practices that require absolute maximum performance out of code 2026-05-18 05:22:47 so even though the majority of forth coders might laugh at you if you dont code in their style, this shouldnt deter you from using forth how you prefer 2026-05-18 05:23:00 these are just older folks who have a different way of doing things 2026-05-18 05:23:43 Stalevar: Adobe Acrobat Distiller was the outside-of-printers implementation used for a long time. also Google Drive apparently has an implementation of PostScript 2026-05-18 05:24:26 the difference between .ps and .pdf is that PostScript is a stack-based programming language (though more similar to Lisp than Forth) while PDF is a graphics format 2026-05-18 05:24:43 PostScript *is* a general-purpose coding language 2026-05-18 05:24:55 dc and Forth were both born in about 01969 2026-05-18 05:26:06 I wrote a sort of parametric CAD system in PostScript at one point 2026-05-18 05:27:12 PostScript lets you parse the input stream with code written in PostScript, so it can also have flexible syntax at runtime 2026-05-18 05:29:49 ANS Forth is not slow. the reason it's controversial is that some people think that the appeal of Forth is that you can tailor the system to your application and not include any complexity you don't need for your problem, and standardization cuts against that. Chuck Moore is one notable proponent of this view 2026-05-18 05:30:13 I don't think it's true that "most forth coders will turn their nose up at you unless you use your own custom forth" 2026-05-18 05:31:15 most of the Forth coders I know who have been coding since the 80s stopped using Forth in the 80s or 90s 2026-05-18 16:56:38 You can install https://github.com/siraben/zkeme80 or https://github.com/siraben/ti84-forth on a TI calculator 2026-05-18 16:57:12 But I wonder if you can get RP on a HP one, because I have a HP programming calculator from china, but they got rid of RPN by then 2026-05-18 20:15:22 Stalevar: does this help? https://web.archive.org/web/20251208140944/https://cheatsheetshero.com/user/all/373-forth-programming-language-cheatsheet.pdf 2026-05-18 20:16:52 DRO / P 2026-05-18 20:17:03 I wonder if PDF is broken or firefox rendering? 2026-05-18 20:22:46 it works here 2026-05-18 20:23:05 Wait, \ for division, not / ? 2026-05-18 20:26:40 Anyway, plain text format would work much better: 2026-05-18 20:26:44 DUP a -> a a 2026-05-18 20:26:45 DROP a -> 2026-05-18 20:26:45 2DUP a b -> a b a b 2026-05-18 20:31:47 Why 10 CONSTANT ten is in this order while 10 ten ! is in this order, while you do similar thing (assigning value to variable / defining constant)? 2026-05-18 20:33:02 DUP a -> a a ?  I thought a DUP -> a a or as a comment DUP ( a -- a a ) 2026-05-18 20:36:33 no, \ introduces a comment 2026-05-18 20:36:46 to end of line 2026-05-18 20:37:17 I'm guessing that cheatsheetshero.com just wasn't a reliable source 2026-05-18 20:38:40 It wasn't. And it's incomplete 2026-05-18 20:39:07 I don't see much of the chat history, so dunno if this was already mentioned, but have you checked the learnxiny page? 2026-05-18 20:39:09 https://learnxinyminutes.com/forth/ 2026-05-18 20:39:27 10 constant ten is in that order because that's sort of the order in which things are executed. 10 pushes 10 on the stack. constant wants to define a new word, which it does by reading "ten " from the input stream. If you were to write 10 ten constant then when the interpreter encountered ten it wouldn't yet know that it was going to constant, so it would just abort and tell you that the 2026-05-18 20:39:28 very short, doesn't cover a ton, but enough to start poking around 2026-05-18 20:39:33 word ten is undefined 2026-05-18 20:40:23 in general defining words in Forth have to read the name of the word they're defining from the input stream, so the name has to follow them. constant, variable, value, :, and create all work this way 2026-05-18 20:41:56 by contrast, if you say variable ten 10 ten ! then at the time that the interpreter encounters the second ten it is already defined (by the previous execution of variable) so that it can perform its action (pushing an address on the stack so that ! can store to it) 2026-05-18 20:42:41 this is also the case with the rather peculiar word to, which is used to change the value of a value 2026-05-18 20:43:51 it must read the name of the word it is to change from the input stream, not because it isn't defined, but because it wants to do something with it other than execute. The much more common word ' (tick) has the same design, for the same reason 2026-05-18 20:44:52 highchurch_, this one is better 2026-05-18 20:45:15 The pdf one didn't even tell that you need to define variable before use 2026-05-18 20:46:18 if you are just looking for reference material, the ANS Forth standard is good 2026-05-18 20:46:19 problem with cheatsheets is they're so shorthand they assume the reader knows enough to parse it all. I tried my hand at writing a cheatsheet for GNU APL and quickly found that if I want my reader to understand stuff I'd have to provide a biography of Ken Iverson lol 2026-05-18 20:46:29 for tutorial material, maybe check out Starting Forth 2026-05-18 20:47:02 getchu a Jupiter Ace off eBay and make it fly 2026-05-18 20:49:51 xentrac what's the coolest thing you've built in forth? right now I'm working on translating an old BASIC game (from David Ahl's BASIC Computer Games) into Forth just as learning experience 2026-05-18 20:49:55 : ?>64 ( n -- n ) dup 64 > if ." Greater than 64!" else ." Less than 64!" then ; 2026-05-18 20:50:28 I understand why it's like this, but they could perhaps use more logical keywords, like fi instead of then 2026-05-18 20:50:56 Stalevar what about 64 ?>64 2026-05-18 20:51:23 This one should say that it's greater 2026-05-18 20:51:36 nah, using "then" as punctuation is pure idiosyncratic style 2026-05-18 20:52:06 "forth love? if honk then" 2026-05-18 20:52:22 Wait, 64 64 > is false, then if executes the false branch which comes before then 2026-05-18 20:53:08 highchurch_, is Yoda a Forth programmer? 2026-05-18 20:53:27 a forthwright he is 2026-05-18 20:55:38 I mean, yes, usually else-branch comes after then-branch, but word else in the middle is confusing 2026-05-18 20:58:22 `condition if true-branch then false-branch else` order would make more sense maybe. But it might be harder to implement because it becomes not certain if `then` is terminating if or not 2026-05-18 20:59:30 i forget which book it was in, but some author said "then" could have been replaced with "endif" and been clearer, similar to your "fi" suggestion 2026-05-18 21:00:18 as for me and my household, we'll accept the strange word order and word choice 2026-05-18 21:09:27 highchurch_: probably this minimal Roguelike: http://canonical.org/~kragen/sw/dev3/wmaze.fs 2026-05-18 21:09:56 it runs as is in GForth, and there's a commented code block to run it in pForth 2026-05-18 21:10:30 Stalevar: yes, fi would have been better 2026-05-18 21:11:35 comment fi, od, and esac are from Algol-68 and didn't get very widely adopted tnemmoc 2026-05-18 21:12:26 highchurch_: you could maybe argue that https://github.com/kragen/stoneknifeforth is cooler but it isn't really Forth 2026-05-18 21:13:07 xentrac: it's awesome to see the maze being generated! 2026-05-18 21:16:31 highchurch_: thanks!