2023-12-18 14:14:44 You know, the way my operating system (Fedora 36) seems to handle the keyboard is somewhat strange. It's as though its handling of the modifier keys (shift, control, etc.) and its handling of normal keystroke keys are separate threads, and those threads seem to be able to get out of phase with one another. It's very common for me to be typing and need a shifted character, and I wind up with several 2023-12-18 14:14:46 keystrokes before the I wanted shifted to wind up capitalized. 2023-12-18 14:15:04 I've seen this enough now that I'm quite sure it's not me hitting the shift key early. 2023-12-18 14:15:21 Unless I've developed some kind of very strange muscle control issue. 2023-12-18 14:16:23 I find it odd, because every time I've thought about implementing a keyboard control system it's never crossed my mind to do it any way other than using one thread that processes physical key events in a strictly sequential way. 2023-12-18 14:17:17 I.e., the "shift key down" event just wouldn't even get considered until i'd fully finished processing every event that occurred before it. 2023-12-18 14:25:04 I changed a bunch of things in vi because of "dragging" on the shift key producing :W instead of the :w that I wanted 2023-12-18 14:26:40 Yeah, I tuned my vim config a little in that way too. Particularly re: the escape key, which seems to have a delay built in with it. Probably so the system can determine whether you're hitting a multi-byte key or not. 2023-12-18 14:26:50 But this is happening everywhere - not just in vim. 2023-12-18 14:26:55 Like here, in weechat-curses. 2023-12-18 14:27:25 I suppose it could be some sort of setting in my terminator config. I could work in kitty for a while and see if I see it there too. 2023-12-18 14:32:25 there's probably a setting to lower the delay time somewhere 2023-12-18 14:34:04 There is - I found that one. 2023-12-18 14:34:24 But this is weird - it's a "sequencing" error. 2023-12-18 14:35:05 Like I said, it's like the setting and clearing of the bit that tells the system whether it's in shift mode or not is out of phase with the keystroke data sequence. 2023-12-18 14:35:49 In either direction - it's not just that the shift effect is "late" in showing up - it can be EARLY too. 2023-12-18 14:36:21 Like it's still in the process of handling earlier keystrokes, and the shift gets applied to them before they show up onscreen. 2023-12-18 14:40:43 I don't even know for sure if it's a hardware problem or a software problem. The computer is several years old now, and I've certainly pounded on this keyboard a lot. 2023-12-18 14:41:12 I do see that replacement keyboards are available, but Amazon wants $136 for one and I don't know for sure if it would even help. 2023-12-18 14:41:20 Or how hard it would be to install. 2023-12-18 14:44:17 Oh, another thing I could do is see how my Bluetooth keyboard behaves. 2023-12-18 14:44:23 See if the issue shows up with it, too. 2023-12-18 15:32:35 I've always had wierd behavior from wireless keyboards, but the ones I have used recently have always been cheap - because they always do badly, so why spend the money. 2023-12-18 15:36:34 As far as the wider input issues go, it looks like a universal problem with modern oses. It happens on windows and linux, as well as ios - but the manifestations are different. I don't know about mac os and android as I don't ue them often, but I would be surprised if they avoided the problem, especially given that they have the same modernised unix/linux heritage. 2023-12-18 15:38:24 presumably it has something to do with how complex the USB specs are and/or interrupt handling. 2023-12-18 15:45:08 To give an example, every version of windows from vista onwards that I have had to use has had problems with registering ctrl-c (copy). My typing is mediocre, but I know I'm not /that/ bad. 2023-12-18 16:05:45 no problems here (on OpenBSD, with X11) except for the dragging-shift thing 2023-12-18 16:09:14 The problems look a bit different on every os I use. that said, openbsd behaved well input-wise the last time I used it. 2023-12-18 17:06:40 i haven't had any input issues with cheap wireless keyboards on linux at all, apart from no input due to dead batteries. 2023-12-18 17:08:21 i'm so very close to having a working metacompiler when it just hit me. how am i going to handle numeric literals? 2023-12-18 17:10:35 for metacompilation, the host interpreter stays in interpret mode and i have a target compilation mode which is enabled by the target :. words defined for the target respect the target compilation flag and know that in this mode, they don't execute, but append themselves to the target definition. the problem is that numeric literals are handled by the host interpreter loop. there's nothing to compile the 2023-12-18 17:10:41 LIT word into the target unless i explicitely write LIT, or something 2023-12-18 17:10:42 but i can imagine that problems might be more frequent if the receiver is attached to a bus overwhelmed by too many devices attached 2023-12-18 17:12:29 In the past I had input delay (most noticible with a mouse - wireless mouses are usualy paired with such keyboards) with wireless stuff. Sometimes it was really horrid. The cheap wirless stuff I am using now doesn't have (too) much input lag, but it has problems with spurrious repeated character inputs and the like. 2023-12-18 17:13:26 do you live/work in a place where there is a lot of interference in the band that those input devices are communicating over? 2023-12-18 17:14:22 zelgomer: I've always figured I'd have a mode, so I'd know when I'm compiling to the target. So a literal encountered in that mode will need to be compiled on the target, however that needs to be done. 2023-12-18 17:14:26 Not to my knowledge, but there is a lot of EM stuff floating around, and I haven't ever specifically looked for it. 2023-12-18 17:14:34 I.e., interpreting will always be interpreting on the host. 2023-12-18 17:14:49 but compiling might be compiling on the host or compiling on th etarget. 2023-12-18 17:14:58 So it might be as simple as having words HOST and TARGET. 2023-12-18 17:15:20 Which will direct where "compilation" output goes. 2023-12-18 17:15:24 that only works if compilation on the target is the same thing as compilation on the host. if you're cross compiling, how would that work? 2023-12-18 17:15:47 I don't see how they'd have to be the same - the compiler would just have to be smart enough to do what was right in either case. 2023-12-18 17:16:00 It'll be aware of this mode too. 2023-12-18 17:16:29 so your kernel is going to be aware that it's a cross compiler and what the target is? 2023-12-18 17:16:35 I do agree with you, though, that the simplest to handle case would be meta compiling for the same system, since there wouldn't really be as many decisions then. 2023-12-18 17:16:48 Yes; I'm building that in from the get-go. 2023-12-18 17:17:17 I'm also planning for my virtual machine code to be binary compatible across platforms. 2023-12-18 17:17:22 ah, that was not my approach. my approach was to implement an interpreter only, and then implement a cross compiler in the interpreter 2023-12-18 17:17:33 zelgomer: :0 2023-12-18 17:17:41 ACTION is interested in this stuff 2023-12-18 17:17:42 Hi vms14. 2023-12-18 17:17:48 hi KipIngram :D 2023-12-18 17:18:13 i want to get the idea on how to make my dirty interpreter transpile js code 2023-12-18 17:18:24 So for me the main decision will be whether I add the compiler output to my host dictionary, or put it in a target image buffer. 2023-12-18 17:18:24 ouch 2023-12-18 17:18:37 I have a stack based rpn lang, very different from forth, but with colon words 2023-12-18 17:18:50 I see a lot of potential using colon words as some sort of macro assembler 2023-12-18 17:19:00 but meh 2023-12-18 17:19:19 i wonder if it's just better to make some kind of framework and/or some sort of dsl 2023-12-18 17:19:39 or start making words that write js code and combine them 2023-12-18 17:20:02 imo, it's a solid idea, js is just a minefield of fast-paced development. 2023-12-18 17:20:28 I have a version in js, but I dislike it cause I have to keep mantaining another implementation for the server stuff (or learn node better) 2023-12-18 17:20:58 for example stuff like html markup and microdata can't be done with the js implementation, and the manifest or a web worker 2023-12-18 17:21:17 hm 2023-12-18 17:21:25 if the language is able to transpile js, then there's no problem cause you can write html and then the js 2023-12-18 17:22:02 but transpiling is a thing i don't have very clear yet 2023-12-18 17:22:24 fair enough 2023-12-18 17:23:12 node is somewhat out of favor iirc, but I don't think there is any clear succesor yet either. 2023-12-18 17:27:51 If you are looking at frameworks and the like, you could check out the 'fireship' channel on youtube. he has a lot of succinct content giving overviews of webdev stuff. 2023-12-18 17:29:09 hmm 2023-12-18 17:29:32 i think the best idea is to start writing some words that generate js code and combine them in order to make something 2023-12-18 17:29:34 To say the above in a different way, in the system I'm trying to build, code compiled to the host dictionary will just be "vm code,' and code compiled to the target dictionary image under construction will just be "vm code." The host and target may have completely different vm implementations, but they will implement the same vm. 2023-12-18 17:30:06 So the plan right from ground zero is to design out these platform dependencies. 2023-12-18 17:31:15 but it seems to be easier to make some sort of framework and the js generated code being predefined or alike 2023-12-18 17:35:06 imo, it really depends on what you are trying to do. JS is already an interpreted cross-platform language - but it is alo kind of horrid. 2023-12-18 17:35:23 *also 2023-12-18 17:35:50 the main goal is to make web applications that will end running on a smartphone for the most part 2023-12-18 17:36:24 Sure, but what is your main concern? 2023-12-18 17:36:29 language wise 2023-12-18 17:36:29 a web application is a way to make applications for a smartphone, and at the same time it also serves for pc 2023-12-18 17:36:52 for exampl the transition between a stack based concatenative lang and a "normal" one 2023-12-18 17:37:06 the semicolons, you have to know when you put them 2023-12-18 17:37:21 yes, but how critical is performance, libraries, succinctness etc. 2023-12-18 17:37:40 ah, well the main goal is to make games using the canvas 2023-12-18 17:38:02 that's why i sometimes consider to make some sort of framework, but meh 2023-12-18 17:38:07 hm. 2023-12-18 17:39:01 lispers use something named "wishful thinking" which is just to pretend the code already exists and you just use it, it helps to define stuff 2023-12-18 17:39:54 you use the api/whatever as it already exists, so you just write the code as you might want it to be, then you write that code 2023-12-18 17:40:25 forth, or at least forth-style-code could be quite usefull to you, but it may be better for you to encase it in a framework to get better library support, and to avoid double-interpretation on performance critical paths. 2023-12-18 17:51:41 haha, my lang could be considered a reversed lisp 2023-12-18 17:52:05 and it's quite a write only lang 2023-12-18 17:52:18 https://termbin.com/18v1 2023-12-18 17:52:32 this is a simple cgi script 2023-12-18 17:52:41 but the language has too much syntax 2023-12-18 17:52:55 specially the list interpolation stuff 2023-12-18 17:53:58 [ , ,oh ,@oh [some code] # $conditional [this goes out to the stack] ^ ] and more xd 2023-12-18 17:55:24 but for example, the , inserts an element from the stack, ,oh executes oh and inserts an element from the stack ,@oh does the same but expects a list on the stack and flattens it into the current list 2023-12-18 17:55:56 [some code] # will interpret the list as code and insert the last element from the stack 2023-12-18 17:56:11 You ave definitely improved on the verbosity issue 2023-12-18 17:56:29 [element $conditional] this will leave element if 'conditional conditional 2023-12-18 17:56:42 conditional is a word that sets some sort of flag for conditional code 2023-12-18 17:57:00 in list interpolation you can execute conditional code, or have conditional elements 2023-12-18 17:57:19 that's what I'm using in the cgi script to print the input or an error if the input is not found 2023-12-18 17:57:28 unfortunately I have to go afk, but I wil take a longer look later and post something (even if it isn't usefull ;) 2023-12-18 17:57:46 it's a recent idea, so I might be able to improve it 2023-12-18 17:58:10 [title: content:] and ''yes ''no if.else conditional but this line sets the $yes or the $no 2023-12-18 17:58:45 everything can be improved. the difficult part is improving the thing you actually care about. 2023-12-18 17:58:50 afk 2023-12-18 17:59:06 'yes conditional [1 $yes] this returns [1] and would return an empty list if the 'yes conditional does not exist 2023-12-18 17:59:18 $@yes expects a list and flattens it 2023-12-18 18:00:23 yeah, I just wanted to improve the ways to print "conditional" html and since I use lists to represent and generate html I just added it to the list interpolation 2023-12-18 18:27:14 i'm thinking of doing something ugly. somebody stop me 2023-12-18 18:27:39 zelgomer: go ahead 2023-12-18 18:27:47 it will be fun 2023-12-18 18:28:05 i'm thinking my target compiler will be its own nested parsing loop 2023-12-18 18:28:47 time to make a copy before starting i guess 2023-12-18 19:22:07 As long as you do enough testing, I'd say go for it. If it turns out to be unreliable, you can always go for a more normal implementation. 2023-12-18 19:33:11 @vms14 having looked at your code (and only understod the standard stuff) I would say that your main struggle will be keeping your 'forth' lean. Large/fat forth stuff doesn't look like it has any meaningful advantages over other, more common languages. 2023-12-18 19:36:03 well those $yes and $no are conditional elements, I did not have any better idea for now to write "conditional" html 2023-12-18 19:36:08 better get rocky on that treadmill 2023-12-18 19:36:33 that code is just a simple cgi that returns

no input

if there are no input parameters from the form 2023-12-18 19:36:49 or prints the title and content parameters if they exist 2023-12-18 19:37:29 'parameters' returns a hash table with the input form parameters as key/values 2023-12-18 19:37:34 stuff like instant compilation (of simple programs), interactivity, and so on are available for most widely used languages. so forth has lost some of its original selling points, on the other hand everything else is getting super fat, and forth is about as lean as ou can get. 2023-12-18 19:38:10 by lean you mean like performance and low memory footprint? 2023-12-18 19:38:17 my lang can't do that :/ 2023-12-18 19:38:22 not in this case 2023-12-18 19:38:32 performance is a joke, and memory footprint too 2023-12-18 19:38:38 ah, then you mean to be concise? 2023-12-18 19:38:43 yes 2023-12-18 19:38:58 and easy to emorise the whole syntax 2023-12-18 19:39:11 *memorise 2023-12-18 19:39:18 that's an issue I have, I have a lot of different syntax 2023-12-18 19:39:44 I think that will be the main issue in making this truly usefull for you 2023-12-18 19:39:47 @ is a word that performs interpolation in lists, and it has its own directives 2023-12-18 19:40:07 but I somehow need those directives, they would be names instead of symbols, but meh 2023-12-18 19:41:19 the interpreter has also a lot of syntax sugar and I have a word named 'format' which somehow resembles a bit the lisp's format function which also has its own syntax 2023-12-18 19:41:41 https://termbin.com/9nej 2023-12-18 19:41:54 this is the whole implementation written in perl 2023-12-18 19:42:12 the function interpret_atom is the syntax sugar of the interpreter 2023-12-18 19:42:21 You wil probably have to iterate and choose what things you actually need to do and need good syntax for. 2023-12-18 19:42:38 there's also interpolate_list and interpolate_string 2023-12-18 19:43:06 interpolate_list has even more syntax than the interpreter it seems 2023-12-18 19:44:35 yeah, I might be able to remove a lot of directives in interpolate_list and to choose better symbols for the remaining ones 2023-12-18 19:46:02 I'm afraid you have exceeded me via your perl. My knowledge of perl is exceedingly basic, so I can;t say anything of use about your last section of code. 2023-12-18 19:47:21 I wonder how much of the code actually sucks :D 2023-12-18 19:47:39 for some reason this implementation is much faster than the last one 2023-12-18 19:47:56 0 1 1000000 range [ + ] dolist .cr 2023-12-18 19:48:22 this iterates a list of the first million numbers and sums them 2023-12-18 19:48:33 =? wish I could help, but perl isn't high on my priority list atm 2023-12-18 19:48:37 it took 12 seconds in the last implementation and now for some reason takes 5 2023-12-18 19:49:16 yet performance is not my goal for now, but I wonder why 2023-12-18 19:49:30 it could just be a js thing 2023-12-18 19:49:35 it's perl 2023-12-18 19:49:42 ah, k 2023-12-18 19:49:47 Well, I've got the bluetooth keyboard fired up and am giving it a go. No "weird events" yet, but I guess I'll give it a while. 2023-12-18 19:49:52 the js implementation takes like 0.5 seconds 2023-12-18 19:50:06 'that sounds better 2023-12-18 19:50:20 This is a Logitech K810 - I've been exceptionally pleased with it. Enough so that I bought two of them. 2023-12-18 19:50:50 I wonder when was the last time I touched a mouse :/ 2023-12-18 19:50:55 and a real keyboard 2023-12-18 19:51:00 ? 2023-12-18 19:51:19 you aren't phoneprogramming are you? 2023-12-18 19:51:22 my computers are the gpd micropc and a phone which is a copy of a blackberry 2023-12-18 19:51:31 oh 2023-12-18 19:51:33 the unihertz titan pocket 2023-12-18 19:52:03 slacko_user13052: I've written more than 2000 lines of code with that phone xD 2023-12-18 19:52:13 but I'm using the gpd now 2023-12-18 19:52:51 the only reason I bought it was to be able to program anywhere, as the gpd fits in a pocket but I do not carry it with me always, the phone is with me 24/7 2023-12-18 19:53:16 what editor do you use via the phone? 2023-12-18 19:53:27 the day I touch a real keyboard will be a nice day 2023-12-18 19:53:34 unjust: emacs with evil mode 2023-12-18 19:53:39 wow 2023-12-18 19:53:52 i like ed for phone programming 2023-12-18 19:53:55 emacs hotkeys make me crazy with the phone keyboard, but with vi mode works fine 2023-12-18 19:54:10 and you have the best of both worlds, which is nice 2023-12-18 19:54:29 not how I would do it, but if it works for you, it works. 2023-12-18 19:55:04 I went to emacs some years ago and I have a hate relationship, but I did not find anything better 2023-12-18 19:55:09 touchscreens don't like my fingers so I couldn;t imagine typing code on them, but hey 2023-12-18 19:55:23 slacko_user13052: it's a physical keyboard, a tiny one 2023-12-18 19:55:38 this phone is a ripoff of the blackberry, but with android 2023-12-18 19:55:41 ah, ok, less insane ;) 2023-12-18 19:56:14 https://www.unihertz.com/en-es/products/titan-pocket 2023-12-18 19:56:34 I'm quite happy with it, I sometimes wonder what if I buy the bigger one 2023-12-18 19:57:03 https://www.unihertz.com/en-es/products/titan 2023-12-18 19:57:21 it's a bit bigger, it took me a while to get used to the keyboard of the titan pocket 2023-12-18 20:01:39 it sucks for games and everything else, but I have fun typing code in it 2023-12-18 20:02:17 I could see that. 2023-12-18 20:02:56 Some people purportedly code on touchscreen keybords, which I find somewhat implausible. 2023-12-18 20:03:29 crc prefers to use a phone to develop software than a computer, which amused me 2023-12-18 20:03:36 but he uses a real keyboard 2023-12-18 20:04:20 actually some stuff is quite convenient, like the wifi and data 2023-12-18 20:04:44 yeah, I can deal with a bad mouse and whatnot. A bad keyboard is not really livable 2023-12-18 20:05:49 slacko_user13052: i find the lack of visual area more of a downside than how bad of a keyboard the average phone touchscreen makes 2023-12-18 20:05:55 phone + physical keyboard is pretty useful; my son does programming on his phone using only a software keyboard 2023-12-18 20:06:17 kids these days! 2023-12-18 20:06:23 heh 2023-12-18 20:06:44 i've found using a line editor rather than a visual editor makes text editing on a phone more sane 2023-12-18 20:07:00 I could see that 2023-12-18 20:08:38 unjust: I agree with that. Most of my coding now is in blocks, and I use a line editor for this 2023-12-18 20:10:25 yeah sometimes might be an issue to have such limited space 2023-12-18 20:10:34 https://i.imgur.com/DbpG14m.png 2023-12-18 20:10:40 this is how it looks in my phone 2023-12-18 20:11:13 >.> low screens-space means I have to go back to splitting my giant equations into multipe lines. 2023-12-18 20:11:24 don't want 2023-12-18 20:11:33 it encourages factoring, which is good 2023-12-18 20:11:34 :D 2023-12-18 20:11:39 heh 2023-12-18 20:11:58 which reminds me in my lang factoring is expensive :/ 2023-12-18 20:12:11 but performance is not an issue for now 2023-12-18 20:12:27 someone here was encouraging lines of 40 characters max, with another 40 reserved for comments 2023-12-18 20:12:46 iiuc at least. seems like an interesting idea 2023-12-18 20:13:08 lol, even chuck goes up to ~70 when needed 2023-12-18 20:13:38 unjust: I've done something similar to that in the past 2023-12-18 20:14:07 crc: how did it pan out? 2023-12-18 20:15:30 I didn't end up sticking with it. I prefer to alternate between blocks of comments and code, so for files, I made up a format for that. For blocks, I can just alternate or use a full line comment or two if I feel it necessary 2023-12-18 20:17:34 which reminds me I have to write documentation 2023-12-18 20:18:38 crc do you use a nice irc client in android? 2023-12-18 20:19:15 I have andchat, which is not even in the play store anymore and seems to be discontinued, but it seems to disfail sometimes 2023-12-18 20:19:24 fail* 2023-12-18 20:20:00 I use irccloud & irssi 2023-12-18 20:20:28 hmm 2023-12-18 20:20:49 then I guess I'll just use emacs erc, like I do with the computer 2023-12-18 20:21:33 irccloud has their own client, which is fine, but I live in the terminal most of the time 2023-12-18 20:23:07 do you have any kind of way to sync your computer to the phone? 2023-12-18 20:23:24 I guess I'll just use sockets, for now I use a web server xd 2023-12-18 20:24:14 I did try with cvs, it worked quite fine, the server was on the phone and I just had to share wifi to the computer, no matter if there's internet connection 2023-12-18 20:24:16 I have a set of shell scripts using scp & rsync to push/pull data between the phone and my dev. server 2023-12-18 20:24:22 but I guess a socket might just work fine 2023-12-18 20:25:35 (Mostly this is just pushing my block set between systems) 2023-12-18 20:35:36 @KipIngram Re:k810 I can deal with thinkpad stile chiklets, but the apple style isn't something I want more exposure to. That said, logitch is supposed to be the leader in wireless peripherals, so it should be good at that stuff. 2023-12-18 20:36:14 *style 2023-12-18 20:41:18 Yeah, at the time I was using a work-issue Mac for most of my computing. 2023-12-18 20:41:25 That was why I chose that one. 2023-12-18 20:42:11 I'm not really planning to use it long term here - this is really just to help diagnose the keyboard issues I've been having. Still no issues with this keyboard - looking more and more like a keyboard age issue. 2023-12-18 20:42:26 Or I suppose I might just need to clean it. 2023-12-18 20:44:01 hm... I don;t recall any of this wierdness happening in the ps2 era. 2023-12-18 20:45:17 but, software has gotten massively more complex as well, so I don't know. 2023-12-18 20:51:08 much less to go wrong with ps/2 vs usb comms 2023-12-18 20:55:38 Yeah, the symptoms I'm seeing I have trouble even imagining a failure mode for. It's like it *anticipates* me hitting the shift key. 2023-12-18 20:56:21 I.e., shifts early. 2023-12-18 20:56:32 Late too, but that's easier for me to understand. 2023-12-18 21:05:54 USB keyboards have generally had problems with nkro ( n key roll over ) - that is, multiple keystrokes simultaneously being registered correctly. I have heard a lot of complaints about the complexity of usb=anything, so a software+hardware idiocy is suspect. 2023-12-18 21:08:57 According to a lot of the linux dirver gurus, many of the devices they need to work with don't even follow their own specs; or indeed behave predictably in any fashion.