2022-10-11 09:49:00 I recall there being something to print the entire contense of the stack for like, debugging, but for the life of me I cannot find what it is 2022-10-11 09:49:38 .s commonly 2022-10-11 09:50:03 that makes sense 2022-10-11 11:29:13 Frithian: : .s depth 0 do i pick . loop ; 2022-10-11 11:29:36 That prints it in reverse order from gforth, though. 2022-10-11 11:34:54 (it's also covered in Starting Forth) 2022-10-11 11:35:36 Yeah, SF is sort of a "staple." 2022-10-11 11:36:03 I can't remember if it was what I began with or not; that was a long time ago. 2022-10-11 11:36:39 Probably 1982-1983. Looks like it was published in March, 1982, so it could have been. 2022-10-11 11:37:06 I was immediately obsessed, because I used an HP RPN calculator for my classes. 2022-10-11 11:37:24 So it was that alone that initially attracted me to Forth; only later did I fall in love with the innards. 2022-10-11 11:40:15 I'm doing this as part of a class on the structure of programming languages 2022-10-11 11:40:34 I mainly just needed that .s for debugging reasons 2022-10-11 13:28:33 Sure thing - it's not a word one would normally use in an application. 2022-10-11 13:28:56 Unless maybe the app was a debugging environment of some kind. 2022-10-11 13:29:18 I can't really think of any reasons to use it in an actual applications 2022-10-11 13:29:22 Even then, you'd probably want a static stack display in some tile of your screen. 2022-10-11 13:29:33 yeah you'd be better off doing it in a more elegant way 2022-10-11 13:33:21 .s is right proper caveman debugging 2022-10-11 13:34:14 sorta like whenever I do c++ and my million std::cerr <<"HERE01 2022-10-11 13:34:14 ";s everywhere 2022-10-11 13:34:38 oops irssi ate the \n 2022-10-11 13:35:40 in theory there is gdb but that's hard to use on curses apps and hard to use when it segfaults 2022-10-11 13:36:21 curses, bah, notcurses is where it's at 2022-10-11 13:37:25 I've mostly just gotten along over the years with debug prints. 2022-10-11 13:37:33 Or, in this case debug .'s 2022-10-11 13:39:00 this was a really simple program so not really needed, except I'm an idiot and had an extra DUP so ofc things shat themselves 2022-10-11 13:42:43 notcurses ain't available, so 2022-10-11 15:18:51 thrig: I've never found gdb to be very friendly. My first experience with a debugger was the old DEBUG on DOS PC's. And while it was simple, it was super easy to poke around with it. 2022-10-11 15:19:06 gdb seems to have all these requirements about symbol files and all that jazz. 2022-10-11 15:19:25 I'm sure it's not "that bad," but it wasn't "sufficiently obvious" for me to just pick it right up the way I did DEBUG. 2022-10-11 15:44:15 maybe ones of these years I'll find a debugger I like (signs point to no) 2022-10-11 15:47:43 I got into gdb and love it 2022-10-11 15:48:33 The key is to type "layout regs" so it steps through source, shows regs and gives you command prompt all in one 2022-10-11 15:52:24 is there a speed difference between 2/ and 2 / ? 2022-10-11 15:53:58 for assembly, I make a few generic named breakpoints and at the end of everything put a macro that defines those labels if not already defined. v easy to set from inside source 2022-10-11 15:55:00 you can also use a breakpoint macro and have "halt" or something. all those breakpoint Labels are stored in an options file gdb reads on startup 2022-10-11 16:08:24 putting 2/ and 2 / in loops it seems 2 / is slower, which seems odd to me 2022-10-11 16:08:40 wait no I'm stupid I switched the files 2022-10-11 16:35:39 http://luajit.io/post/2022/gdb-black-magics/ seems a neat trick 2022-10-11 16:42:59 wouldn't you expect 2 / to be slower? 2022-10-11 16:44:26 that's what I expected, and that's what it was, I just mixed up the two files I had the tests in so I thought it was backwards 2022-10-11 16:44:59 wait I mixed it up typing it too :|