2024-06-21 13:47:26 : whitespace? [ char ~ 1+ ] literal [char] ! within ; 2024-06-21 13:51:26 aha 2024-06-21 13:51:47 -1 < x < 33 2024-06-21 14:06:25 Nope, CHAR ~ 1+ is 7F so it's 7F 21 WITHIN which is equivalent to 21 7F WITHIN INVERT i.e. 'not in [21,7F)' 2024-06-21 14:09:35 Although you are essentially right if I treat any number over 7E as negative, because WITHIN really just defines a range of contiguous values, even if they 'wrap round', it doesn't care if you're unsigned, two's complement, or 7F is -1, as long as the values you want are 'contiguous' in unsigned binary 2024-06-21 14:11:02 So you can definitely think of the range as {7F, 80, 81, ...., 1E, 1F, 20}, that's probably the easiest way to think about it 2024-06-21 14:22:56 : SPACE? DUP 32 = OVER 9 <> OR OVER 10 <> OR SWAP 13 <> OR ; 2024-06-21 14:24:40 https://blog.regehr.org/archives/320#example7 2024-06-21 14:24:43 For interpreting purposes : SPACE? 33 U< ; 2024-06-21 14:27:23 GeDaMo: Doesn't work nicely without 64-bit forth and is probably premature optimisation for high-level code; but that's a cool technique I've not thought of before 2024-06-21 14:27:33 I'll probably find some use for that 2024-06-21 14:28:09 I suppose you just need 32-bit forth 2024-06-21 14:28:29 But need the check for 33 U< anyway to bound it 2024-06-21 14:28:43 Yeah 2024-06-21 14:31:21 Hmm need to handle space separately too 2024-06-21 14:31:51 In 32-bit 2024-06-21 14:32:13 This is the kind of code I'd write in assembly rather than Forth 2024-06-21 14:35:08 this c code on that regehr site is low quality 2024-06-21 14:36:14 The sort of thing that programmers might write :P 2024-06-21 14:37:16 i hope not :-( 2024-06-21 14:38:27 Something like 2024-06-21 14:38:29 : SPACE? 1- DUP 31 U> IF FALSE ELSE 1 SWAP LSHIFT [ 1 8 LSHIFT 1 9 LSHIFT 1 12 LSHIFT 1 31 LSHIFT OR OR OR ] LITERAL AND 0<> THEN ; 2024-06-21 14:39:31 the bitmap trick is clever! 2024-06-21 14:42:17 Yeah definitely 2024-06-21 14:43:22 I keep forgetting even humble CPU's have this powerful set of 1-bit vector operations :P 2024-06-21 14:45:29 It's basically in where covers a limited range 2024-06-21 14:54:33 I'm reminded of a trick they use in simdjson for character classification (alpha, digit, punctuation, etc) 2024-06-21 14:54:33 Normally you would use a LookUp Table but LUTs don't fit well with SIMD 2024-06-21 15:24:33 Nice 2024-06-21 15:24:47 Vector processing is fascinating 2024-06-21 15:35:56 https://hbfs.wordpress.com/2008/08/05/branchless-equivalents-of-simple-functions/ 2024-06-21 16:56:40 'frequently used' is an antipattern, just make navigation easy and structured and my muscle memory will let me find what I use frequently 2024-06-21 17:30:42 The problems start when I try to get something that isn't frequently used, and then I don't understand how to get it because I've got 'frequently used'-itis 2024-06-21 17:35:41 I was thinking about the slash menus from Visicalc / Lotus 1-2-3, they're pretty good for that 2024-06-21 17:36:16 Slash brings up the top level menu, you see the words with each having a letter capitalised to active them 2024-06-21 17:36:40 If you remember the sequence you can just type /fres whatever 2024-06-21 17:37:02 If you don't you can type the bits you remember then see the menu as a reminder 2024-06-21 17:37:08 Most keyboard controls for menus are good 2024-06-21 17:37:25 Like on most old Windows programs you can do alt,f,a to save-as etc 2024-06-21 17:37:35 But a lot of GUIs have weird Ctrl- or Alt- sequences 2024-06-21 17:37:45 New ones are total crap 2024-06-21 17:38:03 The new outlook, I can't figure out how to focus the reminder notification 2024-06-21 17:38:08 Yeah, those old ones are basically the same as slash menus 2024-06-21 17:38:24 It was a window that got focus with alt+tab and now it's a mystery, so I'm slowed down 2024-06-21 17:38:33 Have to touch the mouse 2024-06-21 17:38:50 emacs is like this too 2024-06-21 17:39:32 Well... not as refined because you need - between letters to generate a command name 2024-06-21 17:43:15 Windows had really good generic support for keyboard access, you could totally use the desktop without a mouse, and often it would give a huge speedup 2024-06-21 17:43:22 It's now a total afterthought 2024-06-21 17:43:35 When I first used Windows 1, it was on a machine that didn't have a mouse 2024-06-21 17:44:07 Although there was a problem getting out of it because chose the default button, whereas chose the selected on 2024-06-21 17:44:32 So we'd tab to the button and press enter :/ 2024-06-21 17:44:50 The default was no so it would cancel the exit 2024-06-21 17:44:51 That's been fixed at some point in the last 30 years 2024-06-21 17:45:04 That does suck 2024-06-21 17:45:18 I think we had to look at the manual to figure that one out :P 2024-06-21 17:45:25 You can put alt-shortcuts on buttons 2024-06-21 17:45:29 The horror! :P 2024-06-21 17:45:31 now, don't know about then 2024-06-21 17:45:44 So you can alt+c to cancel, alt+o to OK 2024-06-21 17:45:47 Or K 2024-06-21 17:46:01 Mmm .. I can't remember if Y and N were underlined 2024-06-21 17:46:12 Probably not 2024-06-21 17:46:23 I think you would have figured that out with your Lotus training 2024-06-21 17:46:43 Windows 1 was bad, from my understanding 2024-06-21 17:46:46 I've not used it 2024-06-21 17:47:17 I'm not sure I'd seen Lotus 1-2-3 at that point, I remember being sent to train someone on using it without ever having used it myself :P 2024-06-21 17:47:23 Windows 3 was the first 'pretty good' Windows IMO, but also was the first I used so maybe I'm biased 2024-06-21 17:47:36 Well all DOS apps worked in a similar way even then right? 2024-06-21 17:47:43 Letters would be highlighted 2024-06-21 17:47:47 if they were a shortcut 2024-06-21 17:47:49 I think my company was selling SuperCalc 2024-06-21 17:48:37 Have you developed much for Windows? 2024-06-21 17:48:58 I think the last time was VB 1.0 :P 2024-06-21 17:49:17 Oh wait, I wrote some Windows C programs at home 2024-06-21 17:50:20 I've written a few small Windows apps and I actually don't mind win32, MFC etc