00:00:00 --- log: started forth/21.03.08 00:14:40 --- join: mirrorbird joined #forth 00:24:05 --- join: andrei-n joined #forth 00:25:20 --- quit: f-a (Ping timeout: 256 seconds) 00:27:17 --- join: f-a joined #forth 01:17:38 is there a way to use do … loop outside a colon definition? 01:18:11 I am writing a simple script and would like to write something 100 0 do ." ciao" loop in my .fs file 03:02:22 f-a: I don't think there is, but just define a word, and execute it? 03:39:10 neuro_sys: well, not to pollute the dictionary 03:49:59 --- quit: gravicappa (Ping timeout: 276 seconds) 03:55:23 --- quit: f-a (Quit: leaving) 04:04:27 --- join: f-a joined #forth 04:06:39 f-a: one way would be to create a marker, define an anonymous word including your loop, execute it, and finally call the marker to cleanup 04:07:54 seems too much hassle 04:08:16 thanks for explaining 04:08:48 ie. MARKER WIPE :NONAME 100 0 do ." ciao" loop ; EXECUTE WIPE 04:09:35 HERE before and HERE after shouldn't change then 04:10:55 but you could also abstract it into an introducer and terminator word pair to do the marking/wiping and anonymous word definition/exec for you 04:13:33 Would it be too much overhead/hassle to "forget" the word right after execution? After all compile-only words need to be compiled one way or another, right? 04:14:07 I like marker solution, it's basically two lines, one at the beginning, and one at the end of the script. 04:14:16 https://pastebin.com/24fx2v3Q 04:14:19 true, cannot do that without compiling 04:14:36 I am not overly fussy, I am just trying to understand forth better 04:14:39 you could probably think of better names than [] and ][ though :) 04:18:06 I'm also trying to learn, I think one major important aspect Forth is the compilation, and interpretation states changes. I haven't yet fully grasped it in and out, I guess one better implement Forth to fully understand it 04:18:45 --- quit: hosewiejacke (Ping timeout: 245 seconds) 04:21:21 One alternative would be to use :NONAME to enter compilation state, end it with ;, and EXECUTE 04:21:24 :NONAME 10 0 DO I . LOOP ; EXECUTE 04:22:18 Ah I see that's what inode suggested, nevermind :) 04:23:02 Now I'm curious what would the dictionary entry look like when :NONAME is used. 04:27:37 --- quit: f-a (Ping timeout: 246 seconds) 04:29:29 --- join: f-a joined #forth 04:37:19 --- join: hosewiejacke joined #forth 04:38:06 --- join: tech_exorcist joined #forth 04:47:10 Hello. Is there an exercise book to learn to write forth code the correct way? Usually books include very few examples, not enough to learn the language... Thanks. 04:48:01 starting forth has some exercises 04:48:04 not that many 04:49:27 I have the main books, but I'd like to write a big project, but in order to do this I want to know how to code in an idiomatic way... 04:52:11 well, I guess *reading* code would be useful too 04:52:46 f-a, What for example? 04:55:35 I will let others reply, since I am not sure what the canonical Good Codebases™ are in Forth 04:55:51 --- join: m2rrorbird joined #forth 04:56:02 --- quit: mirrorbird (Remote host closed the connection) 04:59:10 --- quit: hosewiejacke (Ping timeout: 245 seconds) 05:07:00 --- join: hosewiejacke joined #forth 05:19:25 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 05:19:32 --- join: Zarutian_HTC joined #forth 05:26:08 --- quit: hosewiejacke (Remote host closed the connection) 05:26:15 --- join: hosewiejacke2 joined #forth 05:27:45 what do you think about gforth? 05:30:15 --- quit: hosewiejacke2 (Remote host closed the connection) 05:30:33 --- join: hosewiejacke2 joined #forth 05:33:26 andrei-n: I think gforth is great for learning. May I ask what kind of project are you thinking? 05:35:38 I've found the following useful in learning Forth so far in a brief time: skimming the fundamental books (I've a got list, can share), solving programming challenges (better to learn the language first with this), and only after that solving real problems. 05:35:50 ↑ 05:35:58 One major challenge is to learn "the Forth way", which requires you to forget everything you now about modern languages, they just get in the way. 05:36:32 Although I don't think it's wrong to write Forth in any other way you like, but it defeats the purpose IMO. 05:36:53 I've made that mistake when I wrote Forth as if it's C, which works exactly the same, but without type checking. 05:37:13 neuro_sys, Well, it's more a family of projects. The first would be a clone of ED.CMD from CCP/M-86 (it's a text editor), but later I would like to make it a bit like EMACS with forth as its internal language. 05:37:13 I reaped the benefits of REPL driven development though. 05:37:34 I've recently come across an editor project with Forth, I wonder if I can find it. 05:37:58 Is the forth code in gforth good? 05:38:28 I haven't checked that, but I've found gforth tends to be "modern" as it supports a few goodies that is not vanilla. 05:39:31 E.g. locals and :noname words IIRC, both of which I don't use to enjoy the old way. 05:39:40 At least the introduction of named variables seems to be a good idea instead of solving stack puzzles all the time. I'm not sure if everyone agrees. 05:40:09 Another alternative is to use globals and shadowing via Dictionary 05:40:23 It's not the evil kind of globals, since you can encapsulate them with vocabularies. 05:40:47 andrei-n: I am not saying they are bad, but R is a good friend 05:41:06 When I used locals all over, my code ended up being C, but worse. 05:41:49 As in, code that looks like C, but without any benefits of type checking. 05:42:25 I've found the gist of Forth is to utilize Dictionary as much as possible, and factor out as much as possible. 05:42:33 And use globals 05:42:43 Also I don't really like the idea of using the return stack for storing values, so I'd rather use names. 05:43:27 I do not use them as, say I want to write something for an obscure controller etc. 05:43:30 not every forth has them 05:43:35 but yeah what neuro_sys said 05:44:02 thinking forth by leo brodie (a superb book) said that too: factor out as much as you can 05:46:29 Yeah, I think he preferred many smaller functions to larger stacks. 05:48:11 That helps with reducing stack juggling obviously 05:48:12 Always keep your stack shallow. And factor factor factor. Then factor again. Return stack is your friend. Locals not so much. 05:48:25 Ideally one line per word (or words with loop bodies 2 or 3) 05:48:44 That allows the stack to be no deeper than 3 05:49:05 --- quit: hosewiejacke2 (Quit: Leaving) 05:49:17 But I've found that some state to be passed between different points across the call hierarchy, then I use globals 05:49:33 Typical example could be the file handle 05:52:17 If you're coming from a C background consider the dictionary as your heap. Don't be afraid to use it adhoc. 05:54:01 True. That was my first mistake. I used ALLOCATE/FREE for memory management. It turns out Dictionary and marker is all you need for storage. 05:55:13 You can reserve arbitrary space in Dictionary any time with ALLOT and store address with HERE (again, in the dictionary). 05:56:11 Or rather get the address with HERE, and store in however you like (, ! TO etc) 05:58:35 --- join: elioat joined #forth 06:28:19 --- quit: andrei-n (Read error: Connection reset by peer) 06:29:53 --- join: andrei-n joined #forth 06:50:36 So you usually write your own memory manager or not? 06:50:58 i did 06:54:25 But why not use the os functions? 06:54:54 in my case they would be slower because im not linking to any external libraries at all 06:55:09 every call to mmap would be a transition from user to kernel back to user 06:55:24 my memory manager removes the kernel transitons 06:55:41 which is what malloc does for you too 06:55:58 malloc is a wrapper for the mmap system call 06:56:11 So did you use the Fibonacci or similar algorithm? 06:56:14 it pre-allocates memory and does not return it to the os 06:56:18 no 06:59:21 well im not sure what fibinacci would do for you 06:59:34 Actually the forth dictionary reminds me of how the memory is managed in CP/M 2.2. You just have linear space until the end of RAM and hope that it will be enough. For simple programs you don't even need to release anything. 06:59:35 i do sort buffers according to size but not based on fibs 07:18:18 f-a: I might be being stupid but I think you could have a loop at interpreter, if a word sets >IN to loop back and it's all on one line 07:19:48 i.e. have a word that conditionally sets >IN to 0, and then your loop is from start of line to that word 07:20:55 worth a try 07:21:06 mark4: I got a segfault in x4 leaving it idling in the background all day and then coming back to it 07:26:02 mark4: What's your >IN equivalent? 07:32:23 --- quit: f-a (Quit: leaving) 07:36:42 --- join: lispmacs joined #forth 07:40:11 did you change the size of the window? 07:40:26 sig winch is not really being handled right 07:40:36 i have >in :) 07:41:01 tib, >in #out #line all the usual defs 08:05:40 --- quit: Zarutian_HTC (Ping timeout: 260 seconds) 08:09:57 mark4: Yeah probably I did change size of window 08:10:12 How did I know it was related to the terminal code :P 08:12:00 Oh I see your forth is case sensitive and only wants lowecase, I prefer writing FORTH not forth 08:12:34 mark4: How do I set >in? 08:26:37 --- quit: m2rrorbird (Remote host closed the connection) 08:30:06 in my forth >in is not a variable, its a var which ans calls a value 08:30:15 5 !> >in changes >in 08:30:25 ! store > to !> store to 08:30:36 --- join: Zarutian_HTC joined #forth 08:30:42 you can also use IS like ' foo is bar is the same as ' foo !> bar 08:32:50 >in is defined in parse.s 08:33:16 and those parseing words are from laxen and perrys f83 08:34:29 --- join: Zarutian_HTC1 joined #forth 08:34:30 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 09:14:36 --- quit: andrei-n (Ping timeout: 256 seconds) 09:19:12 --- join: andrei-n joined #forth 09:30:28 emerge kdbg with all 2856926523 T bytes of KDE libs that needs 09:31:01 JUST so i can fucking try ANOTHER debugger to see if it actually has a useable interface which nothing else so far has 09:48:56 --- join: f-a joined #forth 09:51:22 --- join: mirrorbird joined #forth 10:07:06 --- quit: shmorgle (Quit: [TalkSoup] via NEXTSPACE) 10:09:11 --- join: shmorgle joined #forth 10:33:04 --- quit: mirrorbird (Ping timeout: 265 seconds) 10:33:13 mark4, switch to 9front. smaller sizes... 10:47:24 --- join: gravicappa joined #forth 10:49:22 ? 10:49:59 one of the problems i keep having is postage stamp sized windows with fonts ... .. <-- that big lol 10:54:21 --- join: mirrorbird joined #forth 11:06:05 --- quit: Zarutian_HTC1 (Read error: Connection reset by peer) 11:06:05 --- join: Zarutian_HTC joined #forth 11:20:47 veltas: btw, to see that segfault happen lanuch x4, change the size of the window then press x or some other letter 11:20:50 it will segfault 11:20:56 but if you hit enter it wont 11:21:47 I am getting other random segfaults 11:22:41 i dont get segfaults at all randomly 11:22:50 maybe i should install your linux in a vm and check there 11:23:19 suggest for now switching from x64 to x4 because i know x64 is not as stable 11:23:26 but i dont get random segfaults like that 11:23:29 Using x4 11:23:32 ! 11:23:37 ok that is weird 11:23:40 On my work laptop I just had it in background with x4 11:23:54 In case I decided to forth it up 11:24:09 Every time I switched to window even without resizing if I had left it for a bit it would crash 11:25:09 im going to do that 11:25:12 f-a: https://pastebin.com/raw/Va0C17MX 11:25:14 was it just sitting at the OK prompt? 11:25:17 Yes 11:25:21 dog food your forth 11:25:26 Don't you use it every day? :P 11:25:37 you cant do >in ! in x4 11:25:47 I want to start using my ZX Spectrum Forth at work as a desk calculator 11:25:49 >in returns the contents of the >in variable 11:25:56 Yeah I understand 11:25:59 so you if >in is 5 you are storing at address 5 :) 11:26:06 I would have to do 0 !> >IN right? 11:26:21 Pft, Real Programmers™ build their own RPN desk calculator running their own Forth. 11:26:26 That's not the segfault I'm talking about, I did figure out >IN was a 'var' 11:26:33 oh i see what thats doing :) 11:26:51 x4 has var, const, variable and constant 11:26:58 thanks veltas ! 11:27:02 mark4: f-a asked if you can loop in the interpreter 11:27:06 const is a state smart immediate word that compiles the value as a literal in compile mode 11:27:10 And I said yeah probably if you keep it on one line :P 11:27:12 you can use rep 11:27:17 : blah ." blah " ; 11:27:21 10 rep blah 11:27:31 but you cant use begin/for etc 11:31:46 f-a: This works too https://pastebin.com/raw/DqK6iEm8 11:32:13 Not that you'd want to do that 11:32:25 mhhh I wonder what [do] [loop] do 11:33:13 >IN manipulation for control flow is kind of elegant 11:33:56 Although you should expect it to be slow, interpreting is slower than running compiled code generally 11:34:11 No harm for short loops though 11:37:11 --- quit: mark4 (Quit: Leaving) 11:51:00 --- join: mark4 joined #forth 11:56:28 --- quit: gravicappa (Ping timeout: 260 seconds) 12:19:14 --- quit: andrei-n (Quit: Leaving) 12:24:05 --- quit: mark4 (Remote host closed the connection) 12:25:10 --- quit: f-a (Read error: Connection reset by peer) 12:29:18 --- join: f-a joined #forth 12:31:20 --- join: mark4 joined #forth 12:33:23 --- quit: mark4 (Client Quit) 12:47:35 --- join: lispmacs[work] joined #forth 12:54:30 --- quit: f-a (Quit: leaving) 12:58:50 --- join: mark4_ joined #forth 13:04:24 --- quit: mark4_ (Quit: Leaving) 13:09:02 --- join: mark4 joined #forth 13:29:31 --- quit: elioat (Quit: elioat) 13:59:01 --- quit: dddddd (Ping timeout: 256 seconds) 14:00:40 --- join: dddddd joined #forth 14:17:44 --- join: neto_ joined #forth 14:28:36 --- quit: xek (Ping timeout: 264 seconds) 14:30:53 --- quit: mirrorbird (Ping timeout: 276 seconds) 14:34:51 --- join: mirrorbird joined #forth 14:39:10 --- quit: mirrorbird (Ping timeout: 245 seconds) 15:13:01 had a really silly bug in my code lol. when im updating the display theres an optimization you can do with terminal escape sequences 15:13:42 get the attribs of the firs characer, output the escqpe sequence to set those attribs then write every single character that has those attribs, bouncing the cursor all over the map in the procss. 15:13:49 then get the attribs for the next char and do the same 15:14:11 also, when doing the update instead of outputting each escape sequence immediately 15:14:27 buffer them all and write everything with one single user/kernel transition 15:14:52 well i kinda screwed that up lol. escape seqeunces were being cached till the end but characters themselves were being written instantly lol 15:15:07 /facepalm :) 15:28:27 what is this cli display for mark4 ? 15:31:42 its going to be a library like ncurse but insted of being 500 gigs in size its going to be a few K in size :) 15:31:50 you can look at it if you have linux 15:32:00 github.com/mark4th/uCurses 15:32:16 make then do ./u and space pauses the dance and any other key quits it :) 15:33:00 oh that's nice, i'm working on a forth based text editor, def will look into using uCurses instead of nCurses 15:33:32 it has movable overlapping windows and im about to add lorem ipsum scrolling up the first window and chinese text scrolling up the second 15:33:53 this is all in C tho but x4/x64 have the forth version of it but its kind of in a broken state there, 15:33:59 i will be fixing that tho 15:34:26 right now my plasma desktop is slightly confused lol 15:34:40 when i try launching anything it cant find my wayland desktop 15:34:41 ern 15:34:47 im not running wayland lol 15:35:24 --- quit: tech_exorcist (Remote host closed the connection) 15:48:01 --- quit: mark4 (Remote host closed the connection) 16:07:50 --- join: really2 joined #forth 16:11:58 --- quit: really2 (Remote host closed the connection) 16:13:19 is x4 ANSI compliant? I'm writing it in gforth so going over to another ANSI Forth would be the easiest. mark4 16:19:20 --- join: mark4 joined #forth 16:20:46 --- join: yyyyyy joined #forth 16:24:17 is x4 ANSI compliant? I'm writing it in gforth so going over to another ANSI Forth would be the easiest. mark4 16:25:00 no x4 is not ans compliant if thats what you mean 16:25:04 and does x4 provide a way to create bindings for C? 16:25:07 im dont have postpone defined 16:25:11 i dont have invert defined 16:25:20 and a whole bunch of other stuff i disagree with :) 16:25:33 actually no no bindings to c but i could add 16:25:45 alright that's fine, my project is still in very early stages so porting it should be no biggy 16:26:29 ah come on, you call it THE forth for Linux but you don't even have a way to interact with the de facto Linux language?! 16:27:11 i treat my forth as the OS and linux as my bios :) 16:27:20 are the 64 bit and 32 bit versions compatible? as in will properly written code work for both? 16:27:22 adding an FFI for calling C is non trivial 16:27:35 ah, taking the Emacs approach I see 16:27:38 the 64 bit version has some issues right now 16:27:51 no emacs is bloatware lol 16:28:04 my entire thing is minute :) 16:28:13 even gforth is bloatware imho 16:28:27 it's bloatware cuz it treats the OS has a bios and emacs itself as the OS : ) 16:28:39 yes gforth is p fat but it's convenient 16:29:03 has saved my ass a few times with some niche but very well documented extensions to the standard 16:29:17 i take the aproach that if its missing from my fort add it, thats the forth way :) 16:29:24 oh look, i need a memory manager. i added it 16:29:34 wouldnt terminal cursor control be nice? i added it 16:29:46 if this text editor project gets serious i'll either make a forth for it or move it to a lighter forth like x4 16:29:57 how do you think Emacs got so bloated! 16:30:03 on my wouldnt it be nice list is X protocol 16:30:16 30+ years of additions, that's how! 16:30:22 it was written in bash script? 16:30:52 people used to jokingly say that EMACS stood for eighty megs and constantly swapping 16:31:05 how DARE you, bash script is sacred for us unix folks! 16:31:10 but it being only 80 megs years ago lol 16:31:26 once upon a time there was a forth bulliten board system 16:31:38 the ENTIRE system was written in dos batch. literally the entire thing 16:31:42 yeah you can tell how old that joke is by the fact its way past the 80 megs weight limit lmao 16:31:52 my dad asked them why didnt you write it in forth and they never spoke to him again 16:32:00 lol 16:32:52 hmm what arch was emacs first implemented in? 16:33:52 68k? 16:33:58 z80? :) 16:34:43 you'd need one hell of a z80 to run any version of emacs 16:34:54 first release was in 1976, god damn 16:35:15 wow when i was 21 16:35:16 12 16:36:08 you're showing your age, mark4 16:36:27 hush u 16:37:23 how did you start working in forth btw 16:38:19 i'm in the process of finding my first job since i'm graduating soon and I have absolutely no hope of finding a job working with forth sadly 16:39:12 my father showed it to me 16:39:23 then i got a job in england simply because i knew forth 16:39:34 but they hired me temp as a test to see if i knew my shit 16:39:42 then after 8 months they offered me 14k a year 16:39:46 i told them where to stick it 16:39:53 make that 80k and we can talk 16:40:09 came back to the U.S. and literally MADE UP my resume lol 16:40:23 many moons ago 16:40:45 what kind of area did you find work in? space related applications or just general embedded systems? 16:42:10 embedded is all i do 16:42:14 any 16:42:21 "James Gosling, who would later invent NeWS and the Java programming language, wrote Gosling Emacs in 1981" A history of creating bloat 16:42:24 worked on military applications, medical, light and heavy industrial 16:43:06 yeah I'm finishing my degree in mechatronics/electrical engineering and hoping to find a job in embedded programming 16:43:22 tho it seems really hard to find a junior position in embedded programming 16:43:49 and they, junior or not, are all in C ofc 16:44:04 hopefully i'll be able to find something in Forth later on 16:44:06 mechatronics would be freeking awesome lol 16:44:26 not always 16:44:30 start doing contract work 16:44:34 invent your resume :) 16:44:46 i had the advantage that i put all of my non existent jobs in england lol 16:45:44 do they let you do contract work without any experience? lmao 16:46:00 i made up experience lol 16:46:14 what did you make up for your resume lmao 16:46:23 lots of jobs i never did :) 16:46:38 every time i completed a contract that contract when to the top of my resume and bs dropped off the bottom 16:46:43 I have a lot of projects in my resume so I HOPE I wouldn't have to lie to get a junior position 16:47:18 --- join: really2 joined #forth 16:50:44 --- quit: really2 (Remote host closed the connection) 16:50:54 mark4: are companies still developing new forth systems? I see absolutely nothing for forth positions here in Europe 16:51:06 or are you just maintaining old systems now a days? 16:52:28 only way i would know is if i got a job at forth inc. almost none of my jobs throughout my career have been forth 16:52:32 there have been some tho 16:54:32 --- quit: yyyyyy (Ping timeout: 276 seconds) 16:55:09 yeah, what a shame. Hopefully I'll get to a point where I can suggest forth during the design process for a system 16:55:23 :) 16:55:25 what do you mainly work in then, embedded C? 16:55:41 dont suggest it, implement it in parallel in secret 16:55:49 ya c 16:55:56 --- join: really21 joined #forth 16:56:50 ahah, what was that quote, "any sufficiently complex program will inevitably implement a lisp?" 16:57:02 something like that, not sure if it was lisp 16:57:17 isnt that what emacs is actually written in? :) 16:57:20 but maybe you could say the same about complex embedded systems and forth 16:57:41 indeed it is, EMACS lisp 16:57:56 guy that invented lisp was in uni with CM 16:58:07 cm was originally a lisper 16:58:35 "any sufficiently complex embedded system will inevitably implement a Forth, wether they know it or not" 16:58:53 Paul Graham? 16:58:55 or "they just wont know it till its too late }:)" 16:59:28 indeed : ) 16:59:39 looks like we will be getting our forth either way! 17:07:59 mark4: speaking of a forth OS, collapseOS might interest you 17:08:01 https://collapseos.org/ 17:08:21 "Winter is coming and Collapse OS aims to soften the blow. It is a Forth (why Forth?) operating system and a collection of tools and documentation with a single purpose: preserve the ability to program microcontrollers through civilizational collapse." 17:08:35 oh i cant view that right now my web browser wont launch lol 17:08:41 i think i have a gtk problem 17:08:58 this dude has his priorities straight 17:09:27 what does that os run on? 17:09:43 what WON'T it run on! 17:10:06 Self assembles on tight ressources. Known to self assemble on: 17:10:06 A RC2014 with a SD card adapter. 17:10:06 A TRS-80 Model 4P with floppies. 17:10:06 A Sega Master System with a keyboard adapter, a SD card adapter and dual EEPROM socket. 17:10:26 no raspberry pi? :) 17:10:29 or c64 meh 17:10:37 "Can assemble Z80, AVR, 8086 and 6809 binaries." 17:10:59 i wrote an avr assembler in forth 17:11:14 is it a risc? 17:12:33 how many lines was your assembler? 17:16:55 --- join: f-a joined #forth 17:17:54 erm if i can find it ill look lol 17:18:16 just give me a ball park answer, i'm setting up a joke 17:19:00 1146 lines 17:19:03 locate to the rescue lol 17:19:29 that's BLOATED 17:19:38 I wrote an assembler in one line: 17:19:40 : subleq, ( A B C --) .$ | swap rot | 3 0 DO dq LOOP | cr ; 17:19:53 it IS for a one instruction machine, so there is that 17:19:59 mine works with every single avr chip there is as long as you create a personality for it :) 17:20:07 i only ever made one for the 32u4 tho 17:20:53 ah that's where you went wrong my friend, no subleq chips exist, so I only have to deal with my virtual machine, no nasty reality to get in the way 17:21:35 if I learnt anything from Chuck Moore is to design the software and hardware together to simplify the system 17:21:56 I found reality too bloated to I went for a virtual machine B-) 17:22:06 so* 17:33:38 lol 17:36:29 jk, I created that "assembler" for my forth subleq compiler: https://github.com/afonsotrepa/obsFORTHcator 17:36:54 it compiles a very simple forth-like language to subleq and outputs that as NASM data 17:37:17 then that is run by a subleq virtual machine in 32 or 64 x86 17:37:41 I created it for a CTF challenge with the goal of creating an obsfucated binary 17:43:05 --- quit: Zarutian_HTC (Remote host closed the connection) 17:46:44 neto_: yeah Collapse OS is interesting 17:47:22 mark4: https://github.com/siraben/zkeme80 is nowhere near there but similar in spirit 17:47:47 siraben: got any experience with it? 17:47:57 neto_: collapse os? 17:48:00 yeah 17:48:08 def very impressive project 17:48:11 yeah played around with it for a bit but didn't use it 17:48:25 the person behind CollapseOS thinks we are headed towards civilizational collapse by 2030 17:48:26 ran it in linux? 17:48:32 yeah and macOS 17:50:35 this has TempleOS vibes 17:50:39 I like that 17:51:13 Tery created a great programming enviroment with TempleOS 17:51:31 ie: images were embedded directly in files 17:51:47 the shell was a JIT compiler of his version of C 17:52:02 obv it was all written in HolyC, his version of C 17:52:24 640x480 was the only supported format 17:52:30 256 colors I believe? 17:52:36 just really great stuff 17:52:51 I should look more into CollapseOS and the guy behind it 17:53:14 he is a sad story 17:53:17 but very talented 17:54:06 I think his end was tragic, but I'm happy he spent his last years working on what he believed in 17:54:44 an inspiration to us all, showing us what we can achieve when we go against the current on our own 17:54:55 a few fans have kept developing TempleOS 17:55:05 I know some even added TCP/IP support 17:55:09 well he obviously had some mental illness 17:55:19 apparently — but don’t quote me on that — schizophrenia 17:55:25 really a crippling illnes 17:55:43 he most certainly did, not that that's a bad thing 17:56:28 having schizophrenia? 17:56:36 yes 17:56:50 well it was not is fault but it is a bad thing, I feel, no? 17:57:40 he seemed freer than a normal person will ever be 17:58:39 and he spent his last years working on the his love project 17:59:00 and had many genuine fans by the end 17:59:54 I don't agree with many of his views, but I appreciate his intellectual freedom that you won't find in any "normal" person 18:14:26 --- quit: joe9 (Quit: joe9) 18:21:19 --- join: joe9 joined #forth 18:44:27 --- quit: neto_ (Quit: Lost terminal) 18:48:07 --- join: dave0 joined #forth 18:53:29 --- join: boru` joined #forth 18:53:31 --- quit: boru (Disconnected by services) 18:53:34 --- nick: boru` -> boru 19:02:13 --- quit: dave0 (Quit: dave's not here) 19:03:11 the thing about CollapseOS is that it assumes we'll all be using Z80's after the collapse 19:03:37 sounds like a nightmare scenario if something causes all the chip fabs to become useless 19:03:54 I suspect knowing some basic calculus and/or a slide rule will be more useful than anything like that 19:04:00 yeah 19:04:15 but hey it is a hobby project and you can learn a lot from it 19:04:40 * tabemann 's hobby project is a forth based OS for the cortex-m, and he's learned a lot from it 19:05:17 well, cortex-m4 or cortex-m7 19:06:16 I have read somewhere 19:06:33 that the state/universe preppers prepare for 19:06:43 is suspiciously similar to the one they lived in their childhool 19:06:49 at least technology wise 19:06:55 which made me smile 19:07:00 interesting 19:08:14 well if you think about it, it is ture 19:08:16 *tue 19:08:17 gah 19:08:20 true! 19:08:32 Freud moment? (something something longing for childhood) 19:08:34 we kind of reenact our childhood fantasies, sometimes with more expensive toys 19:08:39 yeah siraben , exactly 19:08:44 but presumably the world one lives in their childhood is advancing technologically all the time 19:09:15 * tabemann 's childhood fantasy was to write his own OS, and now thanks to cortex-m he has 19:09:32 I believe learning forth 19:09:33 and using it 19:09:38 taught me a lot about machines 19:09:50 I had not idea was an adress(sp) was, a byte etc 19:09:58 so: omnia in bonum 19:10:35 siraben: i cant watch that yet, my gtk is broken or somethng, ill see if a reboot fixes it. firefox wont launch 19:10:40 --- quit: mark4 (Quit: Leaving) 19:10:44 forth to me is the only non-trivial computing environment that one can program all by oneself and can fully understand without being a superhuman 19:11:02 mark4: you could just clone it :) 19:11:10 ↑ (@ tabemann ) 19:11:13 it is so refreshing 19:11:17 coming from Haskell 19:11:21 for me the same can be said about functional programming 19:11:27 when basically you treat the compiler as some kind of magic 19:11:38 * tabemann tried implementing scheme at one point at it was just too complicated 19:11:39 ok yeah FP compilation is another set of voodoo altogether, heh 19:11:50 but interpretation of functional languages is relatively simple. 19:11:52 * tabemann came from Haskell too 19:12:03 I know, I recognise the nicks from a certain channel :P 19:12:08 tabemann: which part did you struggle with? and what was the implementation language? 19:12:24 I think continuations and hygienic macros are the hardest (for me at least0 19:12:44 siraben: the implementation language was Haskell, and the hard part was macros and shit 19:13:03 whereas doing macro-y things in forth is trivial 19:13:12 that is syntax-rules, right? 19:13:20 well unhygienic macros is straightforward but syntax-rules yeah tougher 19:13:29 yeah 19:13:33 even today 19:13:38 tabemann: here's my impl in Haskell https://github.com/siraben/r5rs-denot 19:13:44 based on the formal semantics of the R5RS spec 19:13:49 I have asked why I cannot use if … then during interpretation 19:13:55 but the answer is so easy 19:14:00 call/cc works and everything but... no syntax-rules hehe 19:14:23 --- join: mark4 joined #forth 19:14:25 nope didnt fix 19:14:32 trying to get help in #gentoo 19:14:34 f-a: there's [if] 19:14:42 tabemann: yeah 19:14:42 everything worked just fine for the first hour 19:14:45 /usr/lib64/firefox/firefox: symbol lookup error: /usr/lib64/gtk-3.0/modules/libappmenu-gtk-module.so: undefined symbol: gdk_wayland_display_get_type 19:14:45 I like that in formal semantics for imperative languages, stack machines are widely used 19:14:46 mark4@ASUS:~$ 19:14:53 im not even using wayland grrrr 19:14:54 it's just easier to reason and work with than register machines, formally. 19:15:01 mark4: oof 19:15:09 siraben: in that type, do you have a SyntaxCase constructor too? 19:15:17 * f-a should check the code before asking 19:15:27 f-a: type of what? 19:15:39 siraben: inorite! 19:15:50 * tabemann actually uses [if] ... [then] a lot these days 19:15:58 Expr 19:16:03 mark4: such breakage doesn't happen on NixOS :P 🙈 19:16:15 but does firefox run there at all? 19:16:19 https://github.com/siraben/r5rs-denot/blob/7423d60fb9dbc628528142d788a045076ffcda68/src/SchemeTypes.hs#L128 Expr is only core scheme 19:16:21 mark4: well of course! 19:16:35 core scheme being if, set, lambda, const, id 19:16:55 Looks like dynlib error to me 19:17:04 siraben: thanks, I suspected so 19:17:06 tabemann: +1 [if] [then] 19:17:23 wonder if one could put scheme into GATDs 19:17:53 Yeah for type safety? 19:18:06 yeah 19:18:14 siraben: what I did is write a word that tests whether a word is defined or not, and then uses that to either raise an exception (if a word needed isn't defined), or to not compile code (if something has already been compiled) 19:18:16 Btw, when I was refactoring the denotational semantics into a monad transformer stack I came up with 19:18:17 newtype Scheme m u r s a = Scheme {unScheme :: ReaderT u (StateT s (ContT r m)) a} 19:18:17 deriving (Functor, Applicative, Monad, MonadReader u, MonadState s, MonadCont, MonadFail, MonadIO) 19:18:43 It's like describing a super duper generalized language with environment, state and continuations. 19:19:05 tabemann: Oh I see, to prevent shadowing? 19:19:27 siraben: to make sure dependencies are already compiled, and to prevent recompilation if the code already has been compiled 19:20:47 I think I've already shared it here, but tabemann, f-a you might be interested in https://github.com/OriansJ/blynn-compiler 19:20:58 --- quit: mark4 (Quit: Leaving) 19:21:04 It's a self-hosting compiler for a subset of Haskell that has been bootstrapped from a 357 bytes seed 19:21:28 super interesting 19:21:33 not directly doing anything for the GCC bootstrap yet but it may in the future/serve as a bootstrap for GHC 19:21:44 yeah this is the same project that takes that seed and plans to go to GCC via Guile 19:21:47 interesting 19:22:12 They have a Forth implementation to but apparently it was a dead end, maybe a true Forther can prove them wrong! 19:22:23 I wonder how hard it would be to write a C compiler in Forth. 19:22:53 you would have hundreds of blogpost on how pointless the endeavour is 19:23:07 would be all talk no action 19:23:37 I've only done up to a LL(1) parser generator in Forth, so I guess that's something. 19:31:10 --- quit: routeveg (Quit: leaving) 19:32:18 --- join: mark4 joined #forth 19:35:14 seems that kde plasma with +gtk support has an assinine dependency on wayland 19:35:27 recompiling kde-meta with a -gtk use flag fixed everything 19:35:47 back 19:36:40 --- quit: proteus-guy (Ping timeout: 245 seconds) 19:38:09 would that be enough for C siraben ? 19:38:11 * f-a has no idea 19:38:23 is parsec ll(1)? 19:38:32 f-a: probably. C was designed to be compilable in one pass. 19:38:53 --- mode: ChanServ set +v mark4 19:38:59 Parsec is LL(∞) if you use try, LL(k) otherwise, because parsers can consume unbounded lookahead with try 19:39:23 everyone uses try! 19:39:24 Let me double check by looking at the parsec paper 19:39:37 well everyone uses megaparsec nowadays 19:39:50 heh "LL(∞) is a powerful grammar class. Any non-ambiguous context-free grammar can be transformed into an LL(∞) grammar. In practice, there are many languages that require arbitrary lookahead; for example, type signatures in Haskell or declarations in C." 19:40:24 Looks like https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/parsec-paper-letter.pdf constrained parser combinators to be LL(1) 19:43:25 I suspect forth is not pleasant for parsing 19:45:40 forth is not pleasant for arbitrary data structures 19:45:48 unless you've written yourself a heap allocator 19:45:55 * tabemann has written himself a heap allocator 19:46:11 even then, it's not like working in a garbage-collected language 19:49:37 --- join: proteus-guy joined #forth 19:50:20 --- join: rixard_ joined #forth 19:50:45 --- join: mark4_ joined #forth 19:50:53 --- join: travisb_ joined #forth 19:51:07 --- quit: tabemann (Disconnected by services) 19:51:13 --- nick: travisb_ -> tabemann 19:51:31 --- join: X-Scale` joined #forth 19:51:42 --- quit: mark4 (Disconnected by services) 19:51:44 --- join: [1]MrMobius joined #forth 19:52:10 --- nick: mark4_ -> mark4 19:52:17 --- mode: ChanServ set +v mark4 19:53:06 did a server go down or something? 19:53:23 because i just got disconnected, and I see a number of people rejoining just now 19:53:29 --- join: ecraven- joined #forth 19:53:43 i got booted 19:53:49 matrix at it again? 19:53:54 maybe just a netsplit 19:54:06 no wait 19:54:08 x tabemann [~travisb@172-13-49-137.lightspeed.milwwi.sbcglobal.net] has left 19:54:11 Disconnected by services [#forth] 19:54:13 x mark4 [~mark4@cpe-75-191-74-68.triad.res.rr.com] has left Disconnected by 19:54:16 services [#forth] 19:54:18 netsplit would not boot you 19:54:19 what are you two up to :P 19:54:21 i was disconnected 19:54:26 by services yeah 19:55:22 --- join: scoofy_ joined #forth 19:55:39 I ghosted myself 19:56:06 i had to ghost my dead me too 19:56:09 --- join: nitrix_ joined #forth 19:56:13 now kiss 19:56:28 and go all «are you “owo” or “uwu”?» 19:58:37 are there archs where AUs are *not* the same as chars? 19:58:48 (per ANS Forth) 19:59:46 --- quit: joe9 (*.net *.split) 19:59:47 --- quit: KipIngram (*.net *.split) 19:59:47 --- quit: scoofy (*.net *.split) 19:59:47 --- quit: rixard (*.net *.split) 19:59:47 --- quit: X-Scale (*.net *.split) 19:59:47 --- quit: nitrix (*.net *.split) 19:59:48 --- quit: MrMobius (*.net *.split) 19:59:48 --- quit: really21 (*.net *.split) 19:59:48 --- quit: jess (*.net *.split) 19:59:49 --- quit: ecraven (*.net *.split) 19:59:49 --- quit: cmtptr (*.net *.split) 19:59:49 --- quit: klys (*.net *.split) 19:59:50 --- nick: ecraven- -> ecraven 19:59:58 --- nick: [1]MrMobius -> MrMobius 19:59:59 --- nick: X-Scale` -> X-Scale 20:00:05 --- join: cmtptr joined #forth 20:00:26 ok, deffo a netsplit ahappening 20:00:57 --- join: klys_ joined #forth 20:01:00 no it was not a netsplit 20:01:12 netsplits dont cause people to totally lose their connections 20:01:21 i was disconnected from the server entirely 20:01:35 --- join: jess joined #forth 20:01:46 after that I meant 20:03:03 --- join: KipIngram joined #forth 20:03:25 --- nick: KipIngram -> Guest74078 20:03:30 --- join: gravicappa joined #forth 20:10:55 --- nick: nitrix_ -> nitrix 20:13:49 --- join: really2 joined #forth 20:40:00 --- quit: sts-q (Ping timeout: 264 seconds) 20:40:22 f-a: Nonsense! Behold self-hosting LL(1) parser generator in Forth: https://github.com/siraben/meta-yacc 20:43:08 --- join: dave0 joined #forth 20:44:22 --- quit: f-a (Quit: leaving) 20:52:17 --- join: sts-q joined #forth 21:43:11 --- quit: dave0 (Quit: dave's not here) 21:51:05 --- quit: scoofy_ (Read error: Connection reset by peer) 22:24:46 siraben: that link you posted is much more professionally presented than x4/x64/t4 :) 22:24:59 like err.. you have docs and everything lol 22:25:19 heh, I was a high schooler with too much free time after uni applications 22:25:27 lol 22:27:23 i have a dental appointment tomorrow and i am supposed to have paperwork filled in electronically before then. ;/ 22:27:31 i hates paperwork ive been procrastinating lol 22:27:36 * mark4 gets a JD :p 22:32:35 siraben: any chance you've tried LR? been meaning to do that, I always suspected it'd be a good fit (use the data stack as the parse stack, etc) 22:33:05 remexre: haven't looked into LR/LALR yet 22:34:01 my hot take is, LR is totally worth learning, and not /that/ hard; LALR is a gross hack on top of it that gives the whole family of parsers a bad reputation 22:34:44 but the forth side would be the same for both, the hack is in the generator 22:40:43 --- join: dave0 joined #forth 22:43:57 remexre: what advantage does LR have over LL(k)? 22:45:51 can do left recursion; generally, warns you about problems ahead of time 22:46:12 there exist some composition properties, but idk how generalizable they are 22:47:47 (like, if you have two parse tables, there exist some guarantees about being able to parse "language A, but with every valid parse of language B as an Expr in A" 22:49:13 I see. 23:00:30 --- quit: really2 (Ping timeout: 260 seconds) 23:01:32 --- join: andrei-n joined #forth 23:01:33 --- quit: klys_ (Quit: Reconnecting) 23:01:40 --- join: klys joined #forth 23:29:28 --- join: jedb_ joined #forth 23:29:40 --- quit: jedb (Ping timeout: 260 seconds) 23:31:21 --- quit: mark4 (Remote host closed the connection) 23:33:43 --- join: mirrorbird joined #forth 23:33:54 siraben, there's a fairly famous project that generates C code from forth. It's very forth-like yet incredibly readable. Naturally forth is also great for making any kind of compiler and could certainly make a C compiler should you want such a thing. :-) 23:34:13 --- quit: proteusguy (Ping timeout: 272 seconds) 23:34:26 proteus-guy: Which project is this? 23:36:06 siraben, I haven't seen it in years.... I'd have to scour the interwebs for it again.... back ground is that he was a forth dev but his employer insisted on the project being done in C. So he wrote a forth program to write the C code. haha 23:36:20 he is also into literate coding styles. 23:37:12 Interesting. Well a C compiler written in Forth would certainly be useful for bootstrapping since implementing Forth in assembly is straightforward compared to implementing a C compiler in assembler 23:37:13 there was also some other technical innovation he did that is what initially attracted me to his work but I've forgotten what it is.... now I have to go find it again... 23:38:47 The Forth impl I was mentioning: https://github.com/oriansj/stage0/blob/master/stage2/forth.s , if anyone is up to the challenge 23:39:41 I like this line in the README, heh: "Additionally, all code must be able to be understood by 70% of the population of programmers. If the code can not be understood by that volume, it needs to be altered until it satisfies the above requirement." 23:46:36 Rob Champman's timbre system! https://web.archive.org/web/20070210141543/http://www.compusmart.ab.ca/rc/Timbre/timbre.htm 23:47:48 --- join: proteusguy joined #forth 23:47:48 --- mode: ChanServ set +v proteusguy 23:48:43 Damn, sources didn't make it to the archive https://web.archive.org/web/20060925015852fw_/http://www.compusmart.ab.ca/rc/Timbre/ContentPages/Timbre/V.9/Sources.zip 23:49:03 --- join: xek joined #forth 23:55:25 after some digging, found it: https://www.taygeta.com/forthcomp.html 23:58:57 Back when I looked it the sites were still alive. Wonder what happened.... 23:59:59 --- log: ended forth/21.03.08