2023-05-16 03:28:34 crc: The easiest thing is probably to break on the syscalls and see which registers are cleared or otherwise mangled, and then just push/pop them 2023-05-16 03:28:41 if they're relevant 2023-05-16 03:29:14 And only do that on freeBSD, because all the other kernels seem to preserve the same registers 2023-05-16 03:29:49 Make sure you don't mix up the function call ABI with syscall ABI, they're not the same, SysV doesn't define a syscall ABI apart from for Linux 2023-05-16 03:30:06 An Appendix of SysV's supplemental for AMD64 defines Linux system calls 2023-05-16 03:30:35 But it doesn't claim to be supported by other OS's, it looks like OpenBSD supports the same style voluntarily 2023-05-16 03:30:40 But FreeBSD seems to use its own 2023-05-16 03:30:49 Which I think might be more based on the actual function call ABI 2023-05-16 03:34:17 i.e. it clears registers that are not preserved by function calls 2023-05-16 09:05:36 it's quite odd. Under FreeBSD, with no command line arguments, it tries to use the ilo binary as the block file. Passing the block file name as an argument has it load the blocks correctly. 2023-05-16 09:05:56 but, it only seems to actually work if I run it under truss(1) to trace the syscalls. 2023-05-16 09:06:43 running directly just exits immediately 2023-05-16 09:07:11 http://forth.works/temp/log.txt has traces w/o arguments & with a block file specified 2023-05-16 09:17:20 crc: Looks like truss is breaking it to me, it's opening ./i and ilo.rom, suggesting that truss has left 'truss' in argv[0], './i' in argv[1], and 0 in argv[2] 2023-05-16 09:17:41 I'm assuming it's something to do with an assumption it makes that it can pass argv++ to main() 2023-05-16 09:17:53 But my program just loads arguments from the stack directly 2023-05-16 09:19:59 Or maybe FreeBSD doesn't put the arguments in the correct place? 2023-05-16 09:22:38 According to SysV, argc is at (%rsp), and argv[0] at 8(%rsp). This is the one thing I'd expect to be correct between the different SysV kernels 2023-05-16 09:23:14 And likewise the last argv entry should be zero, which is how I check for presense of arguments 2023-05-16 09:24:53 I wonder if FreeBSD leaves zero at the end, might be worth using the count in (%rsp) instead to see if arguments are passed (i.e. argc > 1, argv[0] is the program name -- or NULL if someone's trying to hack a setuid program) 2023-05-16 09:37:14 Well, I think I am going to need to make Forth function as a "proper" vocabulary. When I write this meta compiler, I will be needing to write words that have the common names, but I don't want those words to be run until later. 2023-05-16 09:37:26 For example, I'll need to define metacompiler : 2023-05-16 09:37:45 But I only want to RUN that when meta compiling, not when compiling later parts of the metacompiler. 2023-05-16 09:38:02 So I will want my search path to have Forth on top of Meta. 2023-05-16 09:38:12 With Meta CURRENT. 2023-05-16 09:38:15 meta? 2023-05-16 09:38:29 I'm about to write up some stuff that will let me recompile my system. 2023-05-16 09:38:37 I'm going to house it in a vocabulary called meta. 2023-05-16 09:38:43 ah i see 2023-05-16 09:39:18 So if Forth is sooner in the search path that meta, it will find the normal : when : appears in the source code, even after I have added a definition for : to meta. 2023-05-16 09:40:06 The (small) problem is that forth the vocabulary exists in the native system, but I don't actually have vocabulary functionality until after I start up and load some source for it. 2023-05-16 09:40:18 So the word forth just behaves like a variable. 2023-05-16 09:40:45 I need to ajust it a little so that I can "poke it" after the fact and promote it to full vocabulary functionality. 2023-05-16 09:40:53 Once that functionality exists. 2023-05-16 09:41:17 Basically just means I need to get that extra pfa field that vocabulary words need into the word forth. 2023-05-16 09:41:28 Then I can set it to the right thing later. 2023-05-16 09:41:45 I can allocate that manually in my nasm source. 2023-05-16 09:41:55 which Forth system is this about? 2023-05-16 09:42:09 One I've written personally - I don't have it online anywhere. 2023-05-16 09:42:13 ok 2023-05-16 09:42:29 I kind of missed the beginning of the conversation 2023-05-16 09:42:40 someone said you're working on porting a Forth to FreeBSD or something 2023-05-16 09:42:40 Though I may be getting close to being ready to put it up somewhere. 2023-05-16 09:43:29 Yeah, over the past week or two we've had a few chats about meta compilation, and I've pulled together an approach for that I'm about to try to implement. 2023-05-16 09:43:51 I want to re-write this system using it itself instead of using an external tool. 2023-05-16 09:44:02 cool 2023-05-16 09:44:09 I've previously ported Mecrisp Stellaris to FreeBSD 2023-05-16 09:44:15 Well, not this exact system - I'm going to change the architecture to some degree. 2023-05-16 09:44:19 so let me know if you have any questions 2023-05-16 09:45:47 Will do. I think I know mostly what I'm about to do here, but over the last few days I've had some fuzzy spots around a couple of the more esoteric points of Forth (like how CREATE DOES> should work) that folks here have helped me recover my old memories of. 2023-05-16 09:46:04 oh yeah 2023-05-16 09:46:08 mecrisp struggles with that, too 2023-05-16 09:46:11 I was off on an overly complex path, but Zarutian_iPad bugged me until I got it straightened out. :-) 2023-05-16 09:46:15 it has instead 2023-05-16 09:46:22 which is slightly different but much saner to implement 2023-05-16 09:46:25 Yeah, I call mine builds> does> 2023-05-16 09:46:36 FUZxxl: I think crc's the one who might have some questions 2023-05-16 09:46:46 Because he's currently porting a program to FreeBSD and is having some issues 2023-05-16 09:46:49 cool thing about the mecrisp port is that it supports dumping itself 2023-05-16 09:46:58 you run save" foo" 2023-05-16 09:47:11 and it creates a binary foo that is the forth with all definitions you just typed 2023-05-16 09:47:18 Does FreeBSD obey the SysV rules for how arguments are passed onto stack at program entry? 2023-05-16 09:47:21 (as long as you compiled them to "flash" within the forth) 2023-05-16 09:47:25 veltas: it should 2023-05-16 09:47:35 I'm not sure if it puts a zero at end of arguments 2023-05-16 09:47:44 because crc's seeing weird behavior without arguments 2023-05-16 09:47:56 but if he specifies arguments it works (?) 2023-05-16 09:48:12 And the same code for reading arguments works on Linux and OpenBSD 2023-05-16 09:48:20 It should be the same on all of them, they're all SysV 2023-05-16 09:50:04 Once I've got that extra field into forth's header, then (does) find forth h! find pfa 4- h@ find forth pfa 4- h! should convert it. 2023-05-16 09:50:09 veltas: it should 2023-05-16 09:50:24 let me dig up the code 2023-05-16 09:50:45 Nah honestly it might be because FreeBSD handles registers differently for syscalls 2023-05-16 09:51:02 Could be a total red herring that the wrong file is being loaded 2023-05-16 09:51:16 it should do the registers the same way, too 2023-05-16 09:51:29 however, syscalls may have different numbers 2023-05-16 09:51:33 Yes 2023-05-16 09:51:34 and on i386 it's all different 2023-05-16 09:51:40 Does it preserve the same registers as Linux? AMD64 2023-05-16 09:51:50 it should though I have not checked 2023-05-16 09:51:55 easy to check though 2023-05-16 09:51:58 Linux preserves literally all the registers except ... rcx,r10 or something like that 2023-05-16 09:52:05 yes 2023-05-16 09:52:10 this is an architectural limitation 2023-05-16 09:52:22 But FreeBSD is acting like it clobbers more registers 2023-05-16 09:52:46 the only syscall I use that's different from OpenBSD numbering is lseek; I expected everything else to work the same as under OpenBSD 2023-05-16 09:53:08 It could be we've got wrong syscall numbers or wrong register assignments order? 2023-05-16 09:53:15 Maybe some of the parameters are in a different order? 2023-05-16 09:54:09 veltas: is the truss output suspicious? 2023-05-16 09:54:18 Have you perhaps tried to single-step through the code? 2023-05-16 09:55:40 crc: 166 and 199? 2023-05-16 09:55:43 For lseeks? 2023-05-16 09:56:43 you want 478 2023-05-16 09:56:49 478 (0x1DE) 2023-05-16 09:56:50 199 is from freebsd6 2023-05-16 09:56:56 and 19 is ... very old 2023-05-16 09:56:56 I stand corrected 2023-05-16 09:57:08 Good thing I'm not the one writing this lol 2023-05-16 09:57:39 I've verified the syscall numbers are correct 2023-05-16 09:57:52 It looks to me like the new lseek has very different paramters 2023-05-16 09:58:00 https://cgit.freebsd.org/src/tree/sys/kern/vfs_syscalls.c 2023-05-16 09:58:12 If sys_lseek is the one 2023-05-16 09:59:14 no 2023-05-16 09:59:33 or let me check 2023-05-16 09:59:50 Why else would the syscall number change, if they don't change the paramters? 2023-05-16 10:00:38 it changed from long to off_t 2023-05-16 10:00:47 and freebsd6 had different padding on 32 bit systems 2023-05-16 10:00:58 FUZxxl: You are clearly nice to have around. 2023-05-16 10:01:09 So the parameters are still the same? 2023-05-16 10:01:14 yes should 2023-05-16 10:01:22 Yeah apparently lol, onsite FreeBSD support callout 2023-05-16 10:01:23 for 64 bit systems I think there was never a difference 2023-05-16 10:01:31 Fair enough 2023-05-16 10:01:37 at least I think so 2023-05-16 10:01:45 there isn't any special handling for this one in the libc 2023-05-16 10:01:55 so I don't see how it should have non-standard argument order 2023-05-16 10:02:44 I'm not convinced lseek is the issue 2023-05-16 10:02:53 I don't think so either 2023-05-16 10:03:00 I'll leave this with you and crc since I don't have FreeBSD :) 2023-05-16 10:03:04 ACTION shuts up in corner 2023-05-16 10:03:43 best solution is probably to single step this 2023-05-16 10:04:11 I know Forth people are often not a fan of debuggers 2023-05-16 10:04:15 but I promise it's worth it 2023-05-16 10:04:26 I'm a fan of debuggers 2023-05-16 10:04:33 Especially gdb + tui enable + layout asm 2023-05-16 10:04:46 yeah 2023-05-16 10:04:48 gdb likes to crash too much, and then I put in printfs 2023-05-16 10:04:51 though the register output sucks for simd 2023-05-16 10:05:37 In Forth you want to add your own debugger really 2023-05-16 10:05:50 But before we have our own debugger we'll use gdb or whatever external debugger 2023-05-16 10:06:33 Or just old school it like me and stick in debug .'s or emits. 2023-05-16 10:06:48 yeah 2023-05-16 10:06:55 doesn't help you in this early stage of things though 2023-05-16 10:06:56 gdb is broken: 2023-05-16 10:07:00 ld-elf.so.1: Undefined symbol "rl_eof_found" referenced from COPY relocation in /usr/local/bin/gdb 2023-05-16 10:07:07 rebuild 2023-05-16 10:07:11 or update your packages 2023-05-16 10:07:24 Sometimes when I'm looking for a stack imbalance I put in a word that writes the stack pointer up in one corner of the screen. 2023-05-16 10:07:30 (there are points you might need to single-step but for me that's like way last resort) 2023-05-16 10:08:24 FUZxxl: I updated the packages yesterday before installing gdb 2023-05-16 10:08:25 I dont understand the hesitation. single stepping is the first step for me 2023-05-16 10:08:44 a lot of beginners ask for help then stop responding when you ask them to use the debugger 2023-05-16 10:08:52 crc: hm that doesn't sound good 2023-05-16 10:09:06 MrMobius: I noticed that many beginners don't know how to use debuggers 2023-05-16 10:09:25 once I had a beginner who I prompted for three days to look up how to use a debugger and he was really dismissive 2023-05-16 10:09:30 then one day he decided to give it a shot 2023-05-16 10:09:34 and was an instant fan 2023-05-16 10:09:40 why are you single stepping if you have no idea what or where the problem is? 2023-05-16 10:09:44 I don't know how to use the modern ones. 2023-05-16 10:09:51 right and they dont want to know either. a lot of them explain how they want to do it in some other way that usually doesnt work 2023-05-16 10:09:53 I'm not good with gdb, but I've used it in the past; was disappointed to have this not be working 2023-05-16 10:09:59 I got along fine with debug, but things have gotten a lot more complex since then. 2023-05-16 10:10:35 gdb is just fine or whatever your simulator has if that's what you're using 2023-05-16 10:10:51 FUZxxl: Trust me, crc is no beginner 2023-05-16 10:11:10 thrig: so you can find out when the programs behaviour diverges from your expectation 2023-05-16 10:11:26 Yeah that's why I do it 2023-05-16 10:11:34 six hours later, still single stepping... no, that's dumb 2023-05-16 10:11:46 When nothing makes sense and I can't figure it out more intelligently I'll start going through code I want to prove to myself works 2023-05-16 10:11:46 veltas: I'm sorry if that came over as me suggesting he was 2023-05-16 10:12:00 No I don't think you did imply that but I just wanted to say 2023-05-16 10:12:02 (maybe you stepped over the problem because you lost concentration, or you're barking up the wrong tree, or ...) 2023-05-16 10:12:12 Yeah it's not a magic bullet 2023-05-16 10:12:22 Debugging requires all your knowledge and faculties 2023-05-16 10:12:50 It's hard to know when to printf, when to break, when to watch, etc 2023-05-16 10:12:58 When to step 2023-05-16 10:13:10 Yeah, there really no telling where the key clue will come from. 2023-05-16 10:13:35 thrig: you dont have to start single stepping from the first instruction. you can start where you think the problem is probably starting 2023-05-16 10:13:36 It's usually just the case that once you "see it" it all makes total sense all of a sudden. 2023-05-16 10:14:20 I step to dummy check stuff 2023-05-16 10:14:29 I can also stick printfs around where I think the problem is. 2023-05-16 10:14:46 True that, it works the same 2023-05-16 10:14:51 hard to printf assembly though lol 2023-05-16 10:15:02 hehe 2023-05-16 10:15:35 veltas: the trick is to write a dumping function 2023-05-16 10:15:35 truss is our assembly printf 2023-05-16 10:15:42 Yeah that too 2023-05-16 10:15:44 that saves all the state, dumps it on the console, and then restores it 2023-05-16 10:15:46 i.e. use Forth 2023-05-16 10:15:57 It's easy to do this stuff in Forth 2023-05-16 10:16:48 sure once your Forth runs 2023-05-16 10:19:22 man I should write a Forth some day 2023-05-16 10:32:24 You should - it's fun. I suppose it's one of my main hobbies. 2023-05-16 10:32:48 Sometimes I go long periods without working on it, but I always eventually "come back home." 2023-05-16 10:35:55 I've worked on mecrisp 2023-05-16 10:35:59 but not written my own 2023-05-16 10:36:12 Working on mecrisp is worthy, one of the best forths IMO 2023-05-16 10:38:12 it is! 2023-05-16 10:38:17 the optimizer is pretty crazy 2023-05-16 10:55:20 I like the looks of mecrisp across. 2023-05-16 10:55:26 Looks really well thought out. 2023-05-16 10:55:36 I bought the little gadgets just so I could play with it sometime. 2023-05-16 10:57:15 Also, I replaced my ereader not long ago, because my dog chewed on my old one. But it still works - I'm thinking of looking into other things I can do with it. 2023-05-16 10:57:29 I think a Forth on an eink gadget might be fun. 2023-05-16 10:59:08 I'm quite along way from that, though. 2023-05-16 11:00:17 I think I may want a primitive version of "over over." 2023-05-16 11:00:40 I guess that would be 2dup or dup2 from the old double precision integer wordsets. 2023-05-16 11:00:59 I noticed, though, that I have over over lying around in enough places to perhaps justify that. 2023-05-16 11:01:05 RODGER WILCO NOVEMBER NINER 2023-05-16 11:03:45 KipIngram: the current hot thing is mecrisp quintus 2023-05-16 11:03:51 matthias is basically only working on that 2023-05-16 11:06:56 What does it bring to the table? 2023-05-16 11:07:44 RISC-V 2023-05-16 11:09:37 it's a port of mecrisp to risc-v and mips 2023-05-16 11:09:51 the main cool innovation is that the register allocation code has been rewritten in Forth 2023-05-16 11:09:55 so it's more maintainable 2023-05-16 11:14:44 Ah, nice. 2023-05-16 15:23:08 just got Zeptoforth installed on my RP2040 2023-05-16 15:23:53 1 1 + . 2 ok 2023-05-16 15:23:57 guess it works 2023-05-16 15:25:09 ship it 2023-05-16 15:25:29 paging tabemann 2023-05-16 15:32:46 That's definitely a ship it result. 2023-05-16 15:34:34 RP2040 - that's one of the little USB ARM Cortex dongle thingies, right? 2023-05-16 15:35:17 I've got one of those in a drawer in the bedroom. I think mines an M4. 2023-05-16 15:36:21 What does here . say? 2023-05-16 15:36:56 Just wondering where it's got Forth situated in the address space. 2023-05-16 15:37:16 Linux puts mine way up high. 2023-05-16 15:37:33 dp.b @ . 140221655440296 ok 2023-05-16 15:38:05 dp.h @ . 140221655474424 ok 2023-05-16 15:38:19 I've got the body and header regions in one 64k chunk. 2023-05-16 15:47:04 And for the current size of my system: 2023-05-16 15:47:08 dp.h @ base.h @ - dp.b @ base.b @ - + . 21348 ok 2023-05-16 15:49:23 I'm averaging 53 bytes per word at the moment. 2023-05-16 15:51:37 But that's after I've .wiped all the temporary words - average DEFINITIONS are somewhat shorter. 2023-05-16 15:53:24 37 bytes a word if I include those. 2023-05-16 15:53:32 KipIngram: RP2040 is the microcontroller in the Raspberry pi pico. They're all M0 2023-05-16 15:53:49 Yeah, mine's some different gadget. 2023-05-16 15:54:02 I just meant it was also a little USB-based ARM Cortex dongle. 2023-05-16 15:54:12 Except it doesn't plug straight in - it uses a cable. 2023-05-16 15:54:35 I'd have to look at it to refresh my memory of exactly what it's called. 2023-05-16 15:54:45 I'll go look and see if it's written on it. 2023-05-16 15:55:51 https://www.adafruit.com/product/3800 2023-05-16 15:57:01 Neat 2023-05-16 15:57:03 It is an M4. 2023-05-16 15:57:15 Yeah, it's kind of cute, and comes with Python ready to run. 2023-05-16 15:57:21 I want to replace that of course. 2023-05-16 15:57:54 Right. I think they put such a beefy MCU on the rpi thing specifically for Python 2023-05-16 15:58:05 Probably pretty lackluster on a normal speed mcu 2023-05-16 15:58:23 Yeah, that Python was one of their main marketing plugs. 2023-05-16 15:58:33 someone was saying vim was a bit pokey to startup on their rpi. on the plus side, they were learning ed 2023-05-16 15:58:54 Hmmm. vim seems fine on the pi I just set up last weekend. 2023-05-16 15:59:33 I had to install it though - onlyl vi was there initially. 2023-05-16 15:59:48 I haven't really done anything "big" with it, though. 2023-05-16 16:00:14 maybe they had a billion plugins? 2023-05-16 16:00:18 I did wonder about replacing my old Linux box with an rpi for vim/Python/assembly console stuff over ssh 2023-05-16 16:00:41 Seems like it might be a bit slow though from what people say 2023-05-16 16:01:50 Kind of irrelevant now though. I looked at buying a $35 pi for my 3d printer yesterday and they're like $140 if you can find them 2023-05-16 16:02:26 Sooner or later I'm going to have to get a 3D printer. 2023-05-16 16:02:29 time to look at other SBCs then 2023-05-16 16:03:23 Ya I saw QDROID or whatever but haven't found a comparison and there are tons of them 2023-05-16 16:06:28 Once I make forth behave as a proper vocabulary, I think I want to adjust vdrop so that it won't drop forth from the search list. That would be a quick way to brick my run. 2023-05-16 16:07:55 i got two of these (http://www.hlktech.net/index.php?id=436) for a project recently, they seem ok for the price 2023-05-16 16:09:14 That does look pretty neat. 2023-05-16 16:17:09 What my new rPi is doing that's odd is that my mosh connection to it from my notebook is intermittently freezing up for 40 seconds - a minute or so. The rest of the time it's just fine, but every few minutes it'll lock up for a while. 2023-05-16 16:17:26 It is on a separate network inside the house - that may be somehow related. 2023-05-16 16:17:41 And it doesn't seem that the pi itself freezes up during this time - it's just the mosh connection. 2023-05-16 16:18:21 does a connection to the sshd work during that period of mosh inactivity? 2023-05-16 16:18:45 I'd have to check. 2023-05-16 16:18:57 You mean locally, from the pi itself, right? 2023-05-16 16:19:03 localhost? 2023-05-16 16:19:34 from the notebook 2023-05-16 16:19:56 I'm not running sshd on the notebook. sshd is running on the pi. 2023-05-16 16:20:19 Are you just suggesting I try a separate connection during that period? 2023-05-16 16:20:23 yes 2023-05-16 16:20:30 a standard ssh connection to the pi's sshd 2023-05-16 16:20:31 Ok. I haven't tried that yet. 2023-05-16 16:20:44 Oh, you mean without using mosh. 2023-05-16 16:21:04 That's definitely worth a try - I will keep an eye on it and try it next time I see it happen. 2023-05-16 16:21:13 i'd guess that should rule out whether mosh is to blame or not 2023-05-16 16:21:30 Yes. I've never had ANY problem with mosh in all the years I've used it, but you never know. 2023-05-16 16:23:37 otherwise, any sort of filtering or lessened QoS for UDP at the hops between your notebook and the pi could be messing with connection 2023-05-16 16:24:59 Yeah, I've also thought about trying the notebook on the same network as the pi, but I'm usually downstairs and the connection with that one isn't as good. 2023-05-16 16:25:29 It's the actual network that my provider's equipment (AT&T uverse) creates. Downstairs we have another access point that connects to it. 2023-05-16 16:25:35 So that's the extra hop. 2023-05-16 16:54:45 Now of course it's not going to do it again. :-) 2023-05-16 17:04:24 Oh, cool. That pi has an assembler already installed. 2023-05-16 17:04:38 Just built and ran this: 2023-05-16 17:04:41 .global main /* Entry point for the program */ 2023-05-16 17:04:43 main: 2023-05-16 17:04:45 mov r0, #42 /* Move value 42 to register r0 */ 2023-05-16 17:04:47 bx lr /* Return to calling program */ 2023-05-16 17:05:18 this is ARMv7 or ARMv9 assembly? 2023-05-16 17:05:24 v7 2023-05-16 17:05:58 processor : 0 2023-05-16 17:06:00 model name : ARMv7 Processor rev 3 (v7l) 2023-05-16 17:06:02 BogoMIPS : 108.00 2023-05-16 17:06:04 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 2023-05-16 17:06:06 CPU implementer : 0x41 2023-05-16 17:06:08 CPU architecture: 7 2023-05-16 17:06:10 CPU variant : 0x0 2023-05-16 17:06:12 CPU part : 0xd08 2023-05-16 17:06:14 CPU revision : 3 2023-05-16 17:06:16 y 2023-05-16 17:06:18 four cores 2023-05-16 17:06:51 does anything use the thumb or crc32 nowdays? 2023-05-16 17:07:11 the features that is of ARMv7 2023-05-16 17:08:01 Well, I see a Forth coming for this guy. 2023-05-16 17:08:18 if it hasnt one already 2023-05-16 17:08:24 As I tackle this "meta" re-write, I want to try to implement that "portability" layer I've talked about. 2023-05-16 17:08:29 Oh, I've installed gforth. 2023-05-16 17:08:36 I meant one I write. 2023-05-16 17:08:49 olrighty! 2023-05-16 17:09:11 So what I'll be trying to accomplish is to be able to re-write that portability layer for arm7 and have it give me something that will work. 2023-05-16 17:09:23 a worthy goal! 2023-05-16 17:09:36 especially if youre porting to other 32 bit arches 2023-05-16 17:09:37 Yeah, but I'm probably biting off more than I realize. 2023-05-16 17:09:39 We'll see. 2023-05-16 17:10:04 other people who have gone down this route have tried to keep the primitive count extrememly low then implement other primitives out of the minimal set 2023-05-16 17:10:13 so relatively little to rewrite when porting 2023-05-16 17:10:15 how many essential primitives do you have in your forth, KipIngram? 2023-05-16 17:18:19 watch out for the ones with blowguns 2023-05-16 17:18:54 Oh, well... 2023-05-16 17:19:00 "essential"? 2023-05-16 17:19:14 I don't know - I have a lot of primitives though, many of which would be non-essential. 2023-05-16 17:19:23 I haven't gone through and sorted them that way yet. 2023-05-16 17:20:06 Like, for conditional returns I have a lot - all the variants of condition, signed/unsigned, etc. 2023-05-16 17:20:18 I generate the source for all those with Python. 2023-05-16 17:21:41 There's over two hundred primitives all told. 2023-05-16 17:22:03 But that's why I want this portability layer. 2023-05-16 17:22:14 I want to WRITE the primitives using "portability macros." 2023-05-16 17:22:30 that will emit short code sequences into the primitive being built. 2023-05-16 17:22:49 I would hope to have just a few dozen of those. 2023-05-16 19:43:33 Aha! I always thought that positioning the cursor to row 999, col 999 and then requesting cursor position with ansi sequence was a crap way to determine the console window size. 2023-05-16 19:43:43 Turns out there is an ioctl for that. Much better. 2023-05-16 19:45:41 BTW, I caught the mosh session to the pi freezing again and tried a separate ssh connection. Didn't work - it hung too. So looks like mosh is off the hook. 2023-05-16 19:45:57 I would have been surprised. 2023-05-16 19:48:13 how often does it happen? can you run tcpdump to capture? 2023-05-16 19:53:54 (update from earlier; the freebsd assembly is now working; I had to add code to save/restore r8, r9, r10, and rdx when doing syscalls) 2023-05-16 19:54:01 KipIngram: TIOCGWINSZ? 2023-05-16 20:00:25 Yeah. 2023-05-16 20:00:45 Hands back a 32-bit value - rows in the low 16 bits and cols in the high. 2023-05-16 20:01:08 thrig: I am running tcpdump | grep raspberry now, and see the traffic moving back and forth. 2023-05-16 20:01:18 UDP, so it is the mosh connection (it uses udp). 2023-05-16 20:01:26 Every few seconds. 2023-05-16 20:01:35 Hasn't frozen yet. 2023-05-16 20:01:38 if you write it to a file you could look at it in wireshark after it derps again 2023-05-16 20:01:41 Since I started that. 2023-05-16 20:02:00 Ok. I'll watch it like this for a bit, then restart it with a tee 2023-05-16 20:02:07 no, binary write 2023-05-16 20:02:15 Oh. 2023-05-16 20:02:16 -w or something, maybe with a filter for just that host 2023-05-16 20:16:20 if possible, also start a capture on the pi itself (in tmux, screen, nohup, whatever you can get to detach from the tty/pty) 2023-05-16 20:17:20 you might notice events, or a lack of events, on that network that could point you in the right direction 2023-05-16 21:12:13 lispmacs[work]: good to hear! 2023-05-16 21:58:27 So that "forth promotion" worked fine. 2023-05-16 21:58:38 After I plugged the fields it worked as a proper vocab.