00:00:00 --- log: started forth/19.06.23 00:10:23 --- quit: X-Scale (Quit: HydraIRC -> http://www.hydrairc.com <- Nine out of ten l33t h4x0rz prefer it) 00:16:40 --- quit: dys (Ping timeout: 245 seconds) 00:54:24 --- join: dys (~dys@tmo-102-251.customers.d1-online.com) joined #forth 00:56:07 --- quit: dys (Remote host closed the connection) 02:01:02 --- quit: cantstanya (Remote host closed the connection) 02:06:20 --- join: cantstanya (~chatting@gateway/tor-sasl/cantstanya) joined #forth 03:44:35 Just saw a post on r/Forth 03:44:50 someone named a Forth-like elisp macro "eForth" 03:45:10 ... 04:01:45 oops! naming is a problem thesedays, try getting a useful domain under 25 letters ? 04:02:19 there are still a few 4 letter domains around but no one seems to want them ;-) 04:05:30 --- join: sarna (~sarna@d146-51.icpnet.pl) joined #forth 04:07:59 hey, I want to write a pretty trivial program and I've noticed R@ behaves strangely sometimes 04:08:37 I mean, sometimes it gives me a really big number instead of the thing I want 04:09:48 my word is defined like this: : ** ( base exponent -- base**exponent ) OVER >R 0 DO R@ * LOOP R> DROP ; 04:09:49 I'm only a Forth beginner but perhaps you're copying the wrong number on the return stack ? 04:10:42 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 04:10:57 it seems like once I enter the loop, the return stack forgets what is on it 04:11:15 maybe DO pushes something on the return stack? 04:12:36 > Anything already on the return stack becomes unavailable until the loop-control parameters are discarded. 04:12:37 ohhh 04:12:52 that's a bummer :^( 04:13:22 Data put on the return stack outside a ?DO (DO) … LOOP (+LOOP) cannot be accessed within the loop. 04:13:39 why is it so? 04:13:46 Data put on the return stack within a ?DO (DO) … LOOP (+LOOP) must be taken back before leaving the loop. 04:14:21 because the return stack is where the do Loop stores it's looping stuff 04:14:49 oh, I see 04:15:03 thats the purpose of the return stack 04:15:20 it seems a lot less cool than before 04:15:36 youd probably want to use variables in this case as repellent as that may seem ? 04:16:25 I think it's pretty cool, Ive done some awesome things with the return stack 04:16:25 well, I can implement this word using only the regular stack 04:16:31 i wrote something in forth! 04:16:37 nice! 04:16:43 : ** 1 swap 0 DO over * LOOP nip ; 04:16:56 dave0, in *your* DOS Forth you mean ? 04:17:11 oh no my forth's don't work :-) 04:17:17 yet ? 04:17:31 nope 04:17:44 I'm sure they will in time :) 04:17:45 i'm terribly lazy and procrastinate 04:18:01 some people say I procrastinate .... 04:18:45 ... and do you ? ... I'll let you know later 04:19:50 it takes a long time for me to write forth code, i'm a beginner 04:19:58 takes me a long time 04:20:10 your ** code works though :^) 04:20:28 i had to write it 5 times lol 04:20:42 Im fairly fast now, and I have overcome some of the typical beginner techniques 04:21:04 dave0, *everyone has to write it *5 times* ! 04:21:07 my version didn't even work and I spent entire yesterday thinking about it :D 04:21:24 we are all beginners and Forth takes time 04:21:41 I've been learning Forth since 2014 and I've put a LOT of time into it 04:22:04 forth is horribly unreadable for me, at least now 04:22:18 but at some point it clicked for me, now my old languages look uglier and uglier everytime I see than 04:22:54 what are your old languages? I'm curious 04:22:56 sarna, thats common also, and some Forth is very ugly to a beginner, indecipherable even 04:23:03 only C and Perl 04:23:13 i write c 04:23:22 I can barely stand to look at C now 04:23:45 i think in c which is very different to Forth 04:23:55 I used to use C in embedded, I made one commercial product with it and it was fine, very simple tho 04:24:11 yes, they are utterly different 04:24:23 c has warped my mind.. i have to unlearn lots of stuff 04:24:51 C is ok, but I now feel that it's not well suited to embedded, but excellent for PC type apps 04:25:04 hahah, Id say that about BASIC 04:25:16 I had to unlearn BASIC before I could learn C 04:25:26 tp: nice, I came to forth searching for an alternative to C 04:25:32 but going from C to Forth has been a sweet pleasure for me 04:26:02 sarna, whats your main use, embedded on small systems or PC's ? 04:26:49 tp: it's for hobby projects (I write C# at work), so mostly PC and sometimes embedded stuff 04:26:57 dave0, Ive had to confront C lots of times because of Forth 04:27:40 sarna I like C pn PC's tho Im learning LISP and hope to transition from Perl to LISP oneday on PC's 04:27:57 i love assembly.. but i did not realize assembly is tailored for popular languages like c and c++ so i found that mindset in C 04:28:17 tp: I don't like the omnipresent UB in C :) 04:28:33 dave0, because Forth is used so little thesedays on cortexM Ive had to read countless useless C code for hints on setting up certain peripherals 04:28:55 ah 04:29:14 i've read that Forth is real nice for bringing up hardware 04:29:18 dave0, really ? after 5 years of Forth Id sat that Forth and assembly are like twins ? 04:29:58 sarna, heheh, well with Forth youll get tons of what you *think* is UB until you know what youre doing :) 04:30:25 dave0, absolutely, Forth is imho the *only* choise for bringing up hardware 04:30:47 tp: the idea of variables indexed in a stack frame is very C 04:31:01 tp: getting garbage values /= UB though :D 04:31:25 dave0, I made up a parser that takes a cortexM cmsis-svd file and generates pretty print Words for every hardware register 04:32:11 dave0, but C always looks like C, but Forth looks like whatever you design it to look like 04:32:33 yep extensible 04:32:40 c will always lack that 04:32:53 and i love how Forth is interactive 04:33:32 all other languages lack the 'reprogramability' of Forth, and language is so important to understanding a problem 04:34:04 sarna, Im not sure Forth is gigo proof ;-) 04:34:31 i do a lot of 'flowcharting' thesedays with Forth 04:34:54 tp: no language is :) 04:35:01 I used to do a lot of flowcharting with machine code, then assembly, but never did it with C for some reason 04:35:11 sarna, so true :) 04:36:03 only C/++ get a license to kill when you deref a null pointer though :^) 04:36:43 i find lots of little annoyances with c and also unix 04:37:10 here is a example of my recent flowcharting tests, as I'm still working on a format that is best for me https://mecrisp-stellaris-folkdoc.sourceforge.io/project.3temp.sensors.html#software-flowchart 04:37:14 but i use them on my computers :-/ 04:37:47 dave0, all programming languages suck, but some suck a bit less ? 04:38:00 ehehe i suppose :-) 04:39:23 dave0, I think everyone uses Forth because of it's interactivity, same with LISP 04:39:43 it's awesome having instant feedback, especially with hardware 04:40:19 i don't know python, but is it interactive too? 04:40:51 take cortex-M for instance, it's incredibly complex and the data books sometimes dont seen clear and thats where it's fabulous to use Forth and actually test to find out 04:41:02 the only other interactive language i've used is basic in the 80's microcomputers 04:41:08 yeah, apparently tho Ive never used python 04:41:24 eww, basick has been proven to rot a persons mind! 04:41:32 ehehe 04:41:42 a intel 8051 with dartmouth basic ? 04:41:44 it had line numbers! 04:42:01 yeah, that was my first HLL, and it rotted my mind 04:42:17 c has done that to my mind 04:42:20 Id only used machine code and assembly before that 04:42:58 i used basic first then a little bit of assembly... i was too young to really get it 04:43:08 dave0, I find the more Forth i write, the better my C and Perl code gets 04:43:30 hmm yeah 04:43:31 Forth seems to be helping my programming skills a lot, such as they are 04:43:37 --- quit: sarna (Quit: Leaving) 04:43:40 i write smaller functions in c than i used to 04:43:51 I'm a hardware guy, a electronics tech, I'm not a programmer by profession 04:43:57 ah 04:44:29 I'm a two finger typist, proper programmers look away in embarrassment 04:44:36 lol 04:44:42 but I'm a awesome tech 04:45:26 luckily Forth is a gret fit for my mind nowadays 04:45:42 being so low and high level at the same time 04:46:50 I still have a new original 8051 with basic in my parts draws, I should advertise it for $1000 on eBay ;-) 04:47:19 someone may wish to rot their brains with it 04:48:44 there's an 8051 forth camelforth 04:49:06 yeah, camelforth seems pretty good 04:49:26 this 8051 has it in ROM, it cant be reflashed 04:49:36 it's from the 80's :) 04:50:04 wow! 04:50:36 i shouldn't have given away my first computer :-( 04:50:41 heh 04:50:44 besides, I have hundreds of stm32f051's that are like a F22 compare to that 8051 sopwith camel and they all run mecrisp-stellaris Forth 04:51:27 i probably paid $60 for that Intel 8051 back in the day 04:51:36 that stuff was expensive 04:51:47 and that's in 80's money 04:52:05 and in comparison to todays mcu's, slow and braindead 04:52:11 yeah 04:52:32 in 1975 we paid $270 for a single 16 bit National Pace CPU 04:52:48 no peripherals and ran at about 1Mhz 04:53:12 these are the 'golden days' of embedded 04:54:58 damn mobile phones 04:55:26 and social media 04:55:30 amen 04:55:53 tho I keep a low profile on social media, I'm too old to be interested in it 04:56:22 irc and some forums are about as social as I get 04:56:58 my 80 year old neighbor, who can't set her clock on the microwave, is on facebook lol 04:57:10 haahh 04:57:11 on her phone 04:57:45 yeah, I've 15 years until I'm 80 yet, gahhh 04:58:08 i cant set the clock on my microwave either, but I can program in Forth 04:58:14 lol 04:58:24 i hope that one cancels out the other 04:58:27 oh you're alright 04:58:34 my dad's age 04:58:45 white goods arent made for minds like mine 04:59:31 i can fix a microwave, hand draw the complete schematic, just dont ask me to set the damn clock 05:00:00 wow 05:00:15 50 years of being a technician ... 05:00:22 it's no big deal 05:54:34 --- quit: deesix (Remote host closed the connection) 05:54:57 --- join: deesix (~dddddd@unaffiliated/dddddd) joined #forth 06:10:06 --- join: markweston (~markwesto@78-62-196-119.static.zebra.lt) joined #forth 06:10:27 echo 42 EMIT > forth.fs 06:10:46 gforth --evaluate forth.fs 06:10:56 *OS command line*:-1: Undefined word 06:11:00 what the heck 06:12:33 how do I make a FORTH script that prints an asterisk and run it? 06:12:59 --evaluate takes a string 06:13:05 gforth --evaluate '42 emit' 06:13:47 gforth --evaluate < forth.fs ? 06:14:23 I've never used gforth 06:14:28 just gforth forth.fs should work 06:14:33 that prints a lot of other garbage besides the asterisk 06:15:14 echo "42 emit bye" > forth.fs 06:15:20 gforth forth.fs 06:15:33 gforth < forth.fs ? 06:15:36 gforth forth.fs -e bye 06:15:37 was it 06:16:58 --- quit: markweston (Remote host closed the connection) 06:23:30 malyn: "gforth forth.fs" will do the trick. 06:24:02 Uuuh, sorry wrong tab completition 06:24:31 no way! that's far too simple to ever work ;-) 06:25:20 That and an added bye in the script. Welp. 06:38:11 --- join: X-Scale (~ARM@167.247.28.37.rev.vodafone.pt) joined #forth 08:19:51 --- quit: dave0 (Quit: dave's not here) 08:34:34 --- quit: gravicappa (Ping timeout: 258 seconds) 08:34:54 --- join: gravicappa (~gravicapp@h109-187-235-21.dyn.bashtel.ru) joined #forth 09:22:07 re 8051, Dallas makes one that is single cycle 09:22:16 compared to 12 cycles/insruction back in the day 09:50:14 still not an F22 though :) 09:54:47 back 09:58:28 now that I can trap segfaults, I want to make things crash 09:59:05 I've been entering 0 @ , 0 0 ! , and 0 >r exit for the hell of it 10:18:45 the only thing is I don't think it'll probably recover from (data or return) stack overflow or underflow 10:19:27 or from corruption of the compiled code 12:40:07 --- quit: gravicappa (Ping timeout: 248 seconds) 13:06:18 --- join: reepca` (~user@208.89.170.37) joined #forth 13:06:29 --- quit: reepca (Ping timeout: 246 seconds) 13:10:38 --- join: dys (~dys@tmo-116-175.customers.d1-online.com) joined #forth 13:13:02 --- quit: reepca` (Ping timeout: 272 seconds) 14:47:54 --- quit: Zarutian (Ping timeout: 245 seconds) 14:49:51 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 15:20:07 hey 15:51:14 --- quit: Zarutian (Read error: Connection reset by peer) 15:51:20 --- join: Zarutian_2 (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 15:55:30 --- part: tabemann left #forth 15:56:10 --- join: tabemann (~tabemann@2600:1700:7990:24e0:2862:ec59:7c07:8f3d) joined #forth 16:14:26 --- nick: Zarutian_2 -> Zarutian 16:30:44 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:44:20 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 18:08:05 --- quit: dddddd (Read error: Connection reset by peer) 20:40:09 --- join: dave0 (~dave0@069.d.003.ncl.iprimus.net.au) joined #forth 21:20:46 --- join: reepca (~user@208.89.170.37) joined #forth 21:23:45 --- quit: proteusguy (Remote host closed the connection) 21:28:49 --- join: gravicappa (~gravicapp@h109-187-235-21.dyn.bashtel.ru) joined #forth 21:39:35 --- join: proteusguy (~proteusgu@mx-ll-180.183.96-185.dynamic.3bb.co.th) joined #forth 21:39:35 --- mode: ChanServ set +v proteusguy 22:13:08 --- quit: dave0 (Quit: dave's not here) 22:26:08 --- quit: reepca (Ping timeout: 246 seconds) 22:45:47 --- join: reepca (~user@208.89.170.37) joined #forth 22:59:04 --- join: Blue_flame (~cdadr@2409:4042:2607:76eb:b:2c7:6987:f4f4) joined #forth 23:07:18 --- join: tpbsd (~Terry@mecrisp/staff/tp) joined #forth 23:15:52 --- quit: cantstanya (*.net *.split) 23:16:13 --- quit: tp (*.net *.split) 23:16:32 --- quit: gravicappa (Ping timeout: 246 seconds) 23:20:46 --- join: Green_flame (~cdadr@2409:4042:2607:76eb:b:2c7:6987:f4f4) joined #forth 23:20:52 --- quit: Green_flame (Client Quit) 23:21:07 --- join: Green_flame (~cdadr@2409:4042:2607:76eb:b:2c7:6987:f4f4) joined #forth 23:21:27 --- quit: Green_flame (Client Quit) 23:22:02 --- nick: tpbsd -> tp 23:22:12 --- join: Green_flame (~cdadr@2409:4042:2607:76eb:b:2c7:6987:f4f4) joined #forth 23:22:45 --- quit: Green_flame (Client Quit) 23:22:48 --- quit: Blue_flame (Ping timeout: 258 seconds) 23:23:01 --- join: Blue_flame (~cdadr@2409:4042:2607:76eb:b:2c7:6987:f4f4) joined #forth 23:25:04 --- join: dave0 (~dave0@069.d.003.ncl.iprimus.net.au) joined #forth 23:46:40 --- quit: dys (Ping timeout: 245 seconds) 23:59:59 --- log: ended forth/19.06.23