00:00:00 --- log: started forth/20.03.24 00:12:26 --- quit: dddddd (Remote host closed the connection) 00:51:21 --- join: mtsd joined #forth 00:55:56 --- join: mtsd_ joined #forth 00:58:48 --- quit: mtsd (Ping timeout: 264 seconds) 01:00:19 --- quit: mtsd_ (Client Quit) 01:06:25 --- quit: phadthai (Quit: brb) 01:08:55 --- join: phadthai joined #forth 01:13:44 --- join: mtsd joined #forth 01:15:43 --- join: xek joined #forth 01:31:35 --- quit: WickedShell (Remote host closed the connection) 01:32:23 --- join: dave0 joined #forth 02:39:50 MrMobius: is switch the word you need? 02:47:21 I don't really like the name "cond" from scheme 02:47:28 neither do I like switch though 02:48:10 I like "where" 02:53:33 I've never felt the need for CASE in Forth 02:55:51 : foo where condition if-true , where condition2 if-true , ... ; 02:55:57 but not sure how it fits into forth 02:56:22 (above is to be pseudocode, not specifically forth) 02:58:46 I don't particularly like parsing and case is pretty much inherently parsing 03:00:21 CASE statements are syntactic sugar, they just stand in for either a jump table or a sequence of early exits, I'd rather code those directly 03:00:56 sugar = bad 03:01:30 rots your teeth 03:02:35 right 03:02:59 they're better suited to pure compiled languages 03:07:05 still a little sweet for me 03:08:47 in C the compiler decides for you whether the case statement results in a jump table or a series of conditionals 03:10:36 in Forth you decide such things 03:11:09 so no need for a case statement 03:11:18 explicit is better 03:12:14 for most things yes 03:12:44 when's it not? 03:13:24 exceptions might be simple peephole optimizations such as constant folding 03:14:35 strength reduction, etc... 03:15:38 idk I almost want that to be explicit too 03:16:34 because what if you wish to perform a modification of the way your language's built in strength reduction works 03:17:16 just turn it off for that sequence 03:17:34 you can change anything in Forth 03:18:40 --- quit: Bunny351 (Remote host closed the connection) 03:18:45 If you're Forth has inlining, it makes sense to eliminate redundant sequences such as "dup drop" and fold constants 03:19:13 yes, but when things are explicit, it's almost like you are being encouraged to inspect everything, and alternatively things not said are things not heard 03:19:19 --- join: Bunny351 joined #forth 03:21:50 once you inline two or more words back to back you probably want to remove their redundancies, but you can always make exceptions and turn off the peephole optimizaer for a special sequence you want untouched 03:22:24 how does turning it off look 03:22:53 anyway you want, e.g. -opt to turn it off, +opt to turn it on 03:24:22 such things come into play mostly with subroutine threaded forths that also support inlining, less so with other types of threading 03:25:33 except maybe for constant folding which is useful in any Forth 03:26:25 --- join: dys joined #forth 03:27:02 e.g. I'd rather code "#rows #cols *" then "[ #rows #cols * ] literal" 03:29:16 can put rows * columns in documentation and just have #product 03:29:24 although that's a bad example since a Forther would usually factor it out 03:29:40 yes 03:30:06 bad example 03:35:56 --- quit: mtsd (Ping timeout: 240 seconds) 03:49:35 --- quit: rdrop-exit (Ping timeout: 250 seconds) 03:54:33 --- join: rdrop-exit joined #forth 04:02:40 --- join: mtsd joined #forth 04:19:48 --- quit: mtsd (Ping timeout: 264 seconds) 04:48:58 --- quit: rdrop-exit (Ping timeout: 250 seconds) 04:49:12 --- join: rdrop-exit joined #forth 04:58:35 --- join: dddddd joined #forth 05:12:16 rdrop-exit, so if you have 5 or so options you would next them in IF statementes rather than a CASE? 05:44:08 --- join: M-Dog joined #forth 06:54:52 --- join: proteus-guy joined #forth 06:56:45 hey guys 07:05:53 about inlining does not necessarily mean doing peephole optimization; e.g. zeptoforth has inlining but currently lacks peephole optimization 07:07:01 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 07:10:01 --- quit: proteusguy (Remote host closed the connection) 07:41:05 --- join: TwoNotes joined #forth 07:41:23 --- part: TwoNotes left #forth 07:56:24 --- quit: tabemann (Ping timeout: 246 seconds) 08:04:34 I think you could do an even simpler version than peephole which is already simple by just examining the last word laid down and rewriting only that last word to optimize for your current word 08:05:38 if you were willing to provide multiple versions of at least the built in words 08:32:07 --- quit: rdrop-exit (Quit: Lost terminal) 08:41:53 --- join: Zarutian_HTC joined #forth 09:09:03 --- quit: dave0 (Quit: dave's not here) 09:10:24 --- join: rdrop-exit joined #forth 09:15:41 MrMobius, I rarely nest IFs, I usually either use early exits or jump tables, whichever is most appropriate for the logic. 09:18:44 If the logic requires evaluating conditions of different weight or priorities, then early exits. 09:19:50 If it's a straightforward interval of values, then a jump table. 09:25:43 --- nick: M-Dog -> DKordic 09:31:55 time to sleep, goodnight, stay healthy 09:31:59 --- quit: rdrop-exit (Quit: Lost terminal) 10:45:24 --- quit: clitoris (*.net *.split) 10:45:24 --- quit: irsol (*.net *.split) 10:45:24 --- quit: the_cuckoo (*.net *.split) 10:45:48 --- join: the_cuckoo joined #forth 10:45:49 --- join: irsol joined #forth 10:45:51 --- join: clitoris joined #forth 11:08:52 --- join: xek_ joined #forth 11:11:24 --- quit: xek (Ping timeout: 264 seconds) 11:34:51 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 11:35:03 --- join: Zarutian_HTC joined #forth 11:38:01 --- join: mtsd joined #forth 11:58:58 --- join: f-a joined #forth 12:17:15 --- quit: f-a (Remote host closed the connection) 12:43:35 --- quit: Mellowlink (Remote host closed the connection) 12:44:19 --- join: Mellowlink joined #forth 13:43:46 --- quit: mtsd (Quit: Leaving) 14:02:24 --- quit: actuallybatman (Ping timeout: 264 seconds) 14:08:59 --- join: actuallybatman joined #forth 14:13:07 --- quit: actuallybatman (Client Quit) 14:19:07 --- quit: gravicappa (Ping timeout: 256 seconds) 14:43:53 --- quit: xek_ (Ping timeout: 260 seconds) 14:55:30 Evening 14:59:11 h'lo. I must ask do you deal with lots of bellends day to day? 14:59:53 no :( just forth mostly 15:00:46 --- join: WickedShell joined #forth 15:05:21 what fascinates me about forth is how little is needed to get a growable language on top of rather simple architecture 15:06:37 that and ease of refactoring of common sub phrases into their own word definitions 15:06:50 --- join: tp joined #forth 15:07:12 forth is terrible 15:07:15 use a real language 15:07:54 like Coq then? 15:08:11 I don't swing that way 15:09:55 Forth is better in some ways to many Algol68 syntax inspired languages but more terrible than say Tcl 15:11:23 tcl < forth 15:18:47 I am curious though what you mean with real language 15:20:21 idk 15:20:22 english? 16:34:03 --- quit: logand`` (Ping timeout: 256 seconds) 16:36:06 --- quit: Mellowlink (Ping timeout: 240 seconds) 16:39:09 --- join: Mellowlink joined #forth 16:48:59 --- join: dave0 joined #forth 17:36:12 --- join: tabemann joined #forth 17:41:30 hey guys 17:41:32 hey tp 17:41:42 hey tabemann 17:41:54 I purchased an STM32F407 discovery board 17:42:21 so I can debug my port of zeptoforth to the F407 17:42:30 I've finally fixed up my template.xml register selection file and removed all the extranious guff 17:42:41 awesome! 17:43:25 I've been doing deep XSLT stuff the last 3 -4 days, my brain is burned out 17:43:33 I also made some function-calling conditional and looping constructs 17:43:46 I've been watching your changelog 17:44:05 I must say tho, git is very rough around the edges 17:44:22 so you can do things 0 [: dup 10 < ;] [: dup . 1 + ;] while-loop 17:44:57 I put [: ;] in all my forths :D 17:45:23 well all forths are different! 17:45:51 wait, are you parsing the XML in Forth? 17:46:08 remexre, no, definitely not 17:46:26 tp: ok lol 17:46:46 tp: what are the rough edges of git? 17:47:03 remexre, I generate some xml in Forth in one program, but I use XLST on a pc for transforming XML for Forth 17:47:34 Zarutian_HTC, example "git log" 17:47:52 Zarutian_HTC, show me how to limit the log to 20 lines ? 17:48:08 in fossil 20 lines of the log is default 17:48:18 tp: okay that makes more sense lol, I was wondering if there were some nice way to do things on tree-structured data in Forth 17:48:22 with some unix shell fu! 17:48:25 and in fossil one changes that if required with a switch 17:48:40 I think the git answer is | head -n20 :p 17:48:45 back 17:48:47 Zarutian_HTC, and now you know why I think git is rough 17:49:37 remexre, sure I cand do it with unix utils too, but why should I need to ? 17:49:37 I'll have to check out fossil, I'm at the point where I'm thoroughly dissatisfied with git, but I'm still promoting it at work (over svn) and using it in my personal projects 17:50:04 hmm... with just my default setup for STM32L476 DISCOVERY, after the final cornerstone the whole setup is $B800 in size 17:50:12 remexre, no SCM is perfect, but fossil does *everything* git does, but in a much more polished way 17:50:25 however git cant do everything fossil does 17:50:42 tp: yebb on its own it is but you have to understand the origin of it. Basically it is an offspring from THE Linuc kernel nerf :) 17:50:50 sure, that includes all the "basic" words, along with a multitasker and a scheduler and a multitasking-compatible serial driver and an led driver... 17:50:58 $B800 . 47104 ok. 17:51:11 Huh, I'm about to afk to eat, maybe I'll skim it's docs while I'm eating 17:51:19 nerd* 17:51:30 Zarutian_HTC, I do understand the origin of git, Ive been using Linux only since 1997 17:51:31 $B800 feels huge 17:52:01 --- join: iyzsong joined #forth 17:52:05 I must say, I DO like the pretty colors of GIT :) 17:52:20 tabemann, and it is 17:52:27 I just us it as an undo log for a filesystem subtree 17:52:35 use* 17:53:02 tp: the forth code seems far less dense than the kernel code 17:53:06 remexre, the doc is pretty good and also part of the fossil repo 17:53:24 tabemann, ? what do you mean 17:54:19 Zarutian_HTC, haha, we should all version our filesystems except me 17:54:39 Zarutian_HTC, I have live snapshots every 15 minutes going back years 17:55:02 the last word in the kernel is at $4AE4 17:55:12 tp: is that the other fossil? :P 17:55:25 $4AE4 . 19172 ok. 17:55:34 and the flash-space is set with the flash dictionary starting at $6000 for some reason 17:56:17 so including the final cornerstone, the flash code takes up $5800 17:56:18 remexre, sorry Im feeling dense today (more than usual) because too much XSLT 17:57:03 tp: the plan 9 fs was named fossil and had (constantly taken?) snapshots as a core feature 17:57:08 remexre, my snapshots are compliments of zfs-tools 17:57:42 remexre, aha, the famous plan 9, Ive zero experience with it 17:58:13 okay, time for dinner 17:58:15 bbl 17:58:17 remexre, Unix has been perfect for me, I stopped looking for a alternative OS back around 1993 17:58:22 cya tabemann 17:58:25 Ditto, but I've got a co-worker who likes it 17:58:47 remexre, sure, there seems to be tons of plan 9 love still about 17:59:06 with built in snapshots as a core feature no wonder ... 17:59:07 Tbh I totally agree that if the whole company switched from Unix to plan 9, it'd probably massively increase efficiency... Until we had to run a unix-dependent program 17:59:47 --- join: Mellowli1 joined #forth 17:59:53 --- quit: Mellowlink (Remote host closed the connection) 17:59:56 remexre, it is all about the apps, thats what windows users have been telling me since 1993 18:00:18 Yeah.... Or at least just Firefox tbh 18:00:30 Everything else I think we could virtualize 18:00:47 remexre, hahah, frankly I loathe Windows and havent used it since 1997 18:00:48 remexre: what? I thought Plan9 was POSIX enough 18:01:48 Zarutian_HTC: sure, but POSIX isn't enough for e.g. zoom and firefox 18:01:51 re windows apps: some software houses now make sure that their app runes under wine 18:02:12 And we're a lisp shop, which is actually pretty nice for cross-platform 18:02:36 runs* 18:02:37 remexre, thats awesome 18:03:08 Tho we write researchware, so I don't think anyone on windows tries to use our code /shrug 18:03:12 Scheme, CommonLisp or something else? 18:03:15 remexre, I was starting to learn lisp, but I've become detoured learning Retro for now 18:03:20 Common Lisp 18:04:12 Yeah, they're both mind-expanding in really different ways 18:04:29 remexe: then you can answer me this: what the hell are delimited continuations used for? 18:04:42 my mind can use some expanding, it's the size of a wallnut 18:04:54 Heh, common Lisp doesn't have them, but I know them from a different thing 18:05:05 Basically, call/cc continuations are basically useless 18:05:53 remexre, so your work is full of scientists ? 18:05:55 Because you don't know what happens after you call the continuation, so they're pretty hard to encapsulate 18:06:16 tp: yeah, mostly cs, a few psychologists, sociologists, linguists, etc 18:06:31 remexre, wow 18:06:50 Zarutian_HTC: with delimited continuations you can "scope" where they end, which makes them a lot easier to work with 18:07:21 Zarutian_HTC: I've mostly looked at them in the context of building an effect system like Eff (eff-lang.org iirc) has 18:07:33 * Zarutian_HTC prefers coroutines or ejectors (like those in E from erights.org ) 18:08:35 Huh, I'll have to look at E; I'm unfamiliar with ejectors 18:09:39 you can find them in all jet fighter planes ;-) 18:09:46 Lol 18:11:01 remexre, if you dont love Fossil I will be surprised 18:11:48 tp: I'll let you know how it goes, my dinner's almost done so I'll check it out in a bit 18:12:04 remexre, my Forth development system includes a 'project builder' which sets up a new project with a ton of my home made support stuff 18:12:13 remexre, no worries :) 18:13:19 remexre, and in setting up everything automatically, it also sets up fossil automatically, but some configs arent available until the fossil repo is actually created 18:14:27 I work around this by using the sqlite database in the newly created fossil repo, which is something git can never do as it doesnt have a database 18:15:31 remexre, but fossil was actually created by the sqlite author as his SCM and every fossil repo is a single binary that contains everything in a self contained sqlite db 18:15:49 Oh, huh 18:16:36 git on the other hand uses a content-addressable filesystem and not a db 18:18:21 Yeah, I'm more familiar with git's inner workings than I'd like to be :/ 18:18:42 hahah 18:19:01 life does involve some suffering at times ;-) 18:19:06 i heard that is why quite a few git repos can share the same backing store directory 18:19:40 Zarutian_HTC, why not ? 18:20:46 there is no not in that previous statement 18:21:02 Zarutian_HTC, I have 253 fossil repos in the one directory here 18:21:21 Though I'll note that I like content-addressed filesystems in general, my main gripe with git is merge and rebase being a lot less effective than I'd like them to be 18:21:39 Zarutian_HTC, apologies for my poor english, especially as it is my 'mother tongue' 18:22:24 hah! it is the third spoken language I learned 18:22:48 Zarutian_HTC, after viking and polar bear ? 18:23:38 Like my workflow typically ends up being "there's two dozen branches off the master branch, most of them are inactive, and what I actually want to merge is a subset of any given Branch's changes, so I usually end up manually applying them anyway" 18:23:50 tp: well not polar bear but potato stuck in throat 18:24:03 Zarutian_HTC: Danish? 18:24:10 Zarutian_HTC, there are only three polar bear phrases one must learn 1) "I'm all gristle and unpleasant to eat", 2) "my friend is much tastier than I" 3) "I think I just soiled myself" 18:24:35 remexre: you got it one! 18:24:40 A former partner who spoke Danish used to describe it as exactly that 18:24:50 hahah 18:25:41 --- quit: dddddd (Ping timeout: 256 seconds) 18:26:28 the issue is that most are tought the Jótland version instead what most of them speak which is closer to Swedish and Norsk 18:27:21 I blame royals with speach impediments 18:27:36 6 fingered royals ? 18:28:35 royals that wouldnt go far off in the company of loafs 18:29:42 it's all the inbreeding 18:29:54 can't be breeding with any old 'commoner' 18:30:14 * Zarutian_HTC sees his inbred pun go amiss 18:31:19 I'm very stupid today, my IQ which is normally 10 is down to 3 18:33:08 or I should have said inbred bun 18:33:40 but that is wheetly pushing it 18:34:44 --- join: keltono joined #forth 18:34:58 --- quit: keltono (Client Quit) 18:35:31 there isnt a grain of truth in that last statement 18:36:01 * Zarutian_HTC is floured 18:36:38 --- join: keltono joined #forth 18:37:03 yeah, I should stop this. It is barley funny 18:37:36 Im just getting a rise out of you 18:38:26 Zarutian_HTC, so you work in all the cold datacentres ? 18:38:45 are they warm inside or cold ? 18:39:36 depends on which side cortidor around the racks 18:39:54 but no I dont work in those 18:41:00 you guard them with a large rifle from polar bear entry ? 18:45:12 there havent been polar bears in Iceland for years 18:45:42 and no I do not know how to shoot a gun, bow though 18:46:59 a bow would probably just annoy a polar bear ? 18:47:15 it might not get the point ? 18:47:37 or you may fail to drive home your point ? 18:49:09 depends how many are in the quiver and that can change due to time flies 18:49:47 more like the arrows all fly out of your quiver as youre trying to run away 18:50:30 if it comes down to it, you can borrow my 357 magnum, it's bound to leave an impression 18:51:25 well I prefer long high vibro sword. Now that is some cutting power 18:51:57 is that what we call a 'chainsaw' here ? 18:53:43 no chains just two serrated edges moving back and 4th at around a kilohertz 18:54:33 ahh piezo electric ? 18:55:44 nope, dual spring neodynium solenoid driven 18:56:02 neodynium core* 18:56:10 ahh, loudspeakers! 18:56:50 saw a polar bear to death while playing tchaikovsky 1812 overture ? 18:57:02 pretty much but like miniturized version of those used at rock festivals 18:57:53 * Zarutian_HTC has for some reason the image of mineralogist in grunge tee shirt 18:59:05 back 18:59:08 hey guys 19:01:40 hey tabemann 19:04:03 okay, the asm for zeptoforth is 6888 lines 19:04:33 the forth for zeptoforth, including the blinkers, is 1799 lines 19:04:50 yet the latter is larger than the former when compiled 19:07:53 thats like testing which weighs more, a witch or a rock 19:08:13 of course forth is denser than asm 19:08:42 especially if your Forth is crap like your assembly ;-) 19:09:02 my assembly is crap? 19:09:11 thats why Im not making my own Forth 19:09:20 no, not yours 19:09:29 I was speaking about myself 19:09:33 the thing is that my assembly isn't dense 19:09:48 if you look at it it's full of push_tos and pull_tos macros 19:09:53 each of those is 32 bits 19:10:12 essentially dup and drop 19:10:13 assembly is definitely a art, matthias thinks and dreams assembly 19:10:46 he made a standalone MSP430 blinky in 14 bytes of assembly 19:10:53 14 bytes! 19:11:45 one problem with zeptoforth is that it has to pad each word written to flash to a 16 byte boundary 19:12:43 yeah, flash is a problem 19:12:59 with f407 that won't be a problem 19:13:51 because the f407 can write bytes and halfwords to flash 19:14:11 I know with every model of ARM, matthias has to get the USART working, then the Flash, they are his two challenges 19:14:34 and those are the key things I had to copy from matthias 19:14:42 my stm32f051 can only write halfwords as the smallest item 19:15:10 aside from those and the led drivers, and the vector table, I wrote everything else myself 19:15:56 well unless youre a assembly guru, you cant expect to come close in size to matthias work 19:16:16 I can't say I'm an asm guru 19:16:32 he knows *every* trick in the book 19:16:45 but I got my kernel down to little over 4AE4 in size 19:16:57 I think my attempt at a standalone MSP430 blinky was 80 bytes 19:17:42 tabemann, why worry about the kernel size, all M4's have 1MB 19:17:45 ? 19:18:02 youre not doing M0 where size is critical as there is only 64kB 19:18:15 15416 is mecrisp-stellaris for stm32l476's kernel size 19:18:34 non RA ? 19:18:36 whereas 19172 is zeptoforth for stm32l476's kernel size 19:18:39 non RA 19:18:46 i dont use non ra 19:19:13 because RA makes heaps smaller user code 19:19:42 see if your kernel is small, then you will have larger user code as your kernel wont be doing many opts ? 19:19:59 20076 is stm32l476-ra's kernel size 19:20:01 everything is always a compromise 19:20:11 thats more realistic 19:20:43 one thing about zeptoforth is that it has a good amount of inlining, but it doesn't optimize its inlined code 19:20:53 but I havent been able to pull any clever tricks to make my user code smaller with RA 19:21:17 in some cases inlining may actually make code smaller, in other cases it may make code bigger 19:21:36 when I study the generated machine code I see that it has already done what I was planning to do 19:22:02 RA only inlines where possible 19:22:47 typically his compiled code is about 1/2 the code of my equivalents in Forth on the same machine 19:22:52 zeptoforth requires an explicit [inlined] directive, and then only inlines if all the words compiled into that word also could be inlined 19:23:14 well that lounds like non RA 19:23:20 sounds 19:23:44 bbl, lunchtime here :) 19:23:47 zeptoforth doesn't do register assignment besides the TOS register 19:25:16 --- part: keltono left #forth 19:45:17 --- join: boru` joined #forth 19:45:20 --- quit: boru (Disconnected by services) 19:45:22 --- nick: boru` -> boru 20:16:37 tp: kinda meh on fossil, it seems to fix the problems of git that bother me 20:17:09 like (from reading its docs), it's a step up, but probably (for me) not worth changing existing infra over 20:22:08 --- quit: X-Scale (Ping timeout: 240 seconds) 20:23:03 --- join: X-Scale` joined #forth 20:23:37 --- nick: X-Scale` -> X-Scale 20:43:56 --- join: gravicappa joined #forth 21:48:24 --- quit: _whitelogger (Remote host closed the connection) 21:51:28 --- join: _whitelogger joined #forth 22:13:17 remexre, no worries, changing scm is a big thing 22:13:50 even to a tiny hobby developer like me who is a tech and not a programmer 22:15:05 I went cvs, hg, bzr, fossil myself since 1996 22:30:25 --- quit: _whitelogger (Remote host closed the connection) 22:33:28 --- join: _whitelogger joined #forth 23:07:48 --- join: xek_ joined #forth 23:59:59 --- log: ended forth/20.03.24