2022-03-28 03:11:17 KipIngram: Yep that's the roadmap for normal human eyes, gets harder to look at stuff close when you pass late-middle age 2022-03-28 03:11:59 I'm still at the short-sighted early adulthood stage, apparently there's a brief bit in the middle where my eyes will work correctly but it signals the decline 2022-03-28 07:38:19 Yes, I experienced that. I wore contact lenses for a long time, to see well far away. Then it started to get hard to see close up, when I had the contacts on. But with them off close up was fine. 2022-03-28 07:38:32 So I started wearing one of them - let one eye do close up and hte other do far off. 2022-03-28 07:39:17 Somehow that caused the non-contact eye to try to "keep up" with the contact eye for far off viewing, and after 3-4 years of that I suddenly realized that my left I could see far off, no contact, almost as well as my right eye with the contact. 2022-03-28 07:39:51 So I stopped wearing the other contact, and that's where I've been for a good while. Just 3-4 months ago I started wearing readers from Walmart for work on the computer, with my e-reaer, etc. 2022-03-28 07:40:09 But "walking around in the world" I still do quite well with nothing. 2022-03-28 07:40:41 The readers spend a lot of time either lying by my computer or hooked in the neckline of my shirt. 2022-03-28 08:14:28 If "Brutal OS" really was brutal it would use FORTH 2022-03-28 08:56:26 :-) 2022-03-28 08:56:36 Most people just don't realize. 2022-03-28 08:57:16 It's really the same "oversight" I saw in college - people just didn't get how truly good those HP calculators were. 2022-03-28 10:30:22 veltas: my issue, being near dyslexic when younger, was that serif heavy Times New Roman made it difficult to read cheap arse photocopied text from old printed books. Something that the perpetually funds starved elementary school system used a lot. Now? I just switch to reader mode on crappy websites 2022-03-28 10:32:18 made it near difficult to diffrientate between a, c, e, and o, specially if there was some wicking in the original printing process 2022-03-28 10:50:16 Zarutian_HTC: What I can't handle is the low-contrast colours on so many websites, I will always go into dev mode and tweak CSS when I see that 2022-03-28 10:51:48 FWIW, depending on your browser, there's plugins for that. I have a bunch installed to fix some of the Clever™ things web developers seem to think is cool. 2022-03-28 10:51:54 Yes - I absolutely hate those. Writing is no good if you can't SEE it. That's a case of someone's "art" getting the better of their common sense. 2022-03-28 10:52:09 The web is a pain in the arse, generally. 2022-03-28 10:53:00 One great plugin I have removes those stupid overlays they insist on bothering you with for sundry annoying services they offer which you can't remove without enabling javascript. 2022-03-28 11:01:46 I have noticed something peculiar, the less showy an website is the more likely it is informative 2022-03-28 11:02:51 take piclist.com for instance 2022-03-28 11:03:48 And a propensity for not requiring javascript to display simple text, or presenting you with a video instead of textual information. 2022-03-28 11:03:50 ugly as hell but has everything about Microchip PIC you could possibly want to know 2022-03-28 11:06:11 boru: right! reminds me of cooking.com versus blogspam 'recipies' were you get authors life story instead of just the recipie 2022-03-28 11:06:33 Yeah, it's truly a pox on the modern web. 2022-03-28 11:07:33 or was it cooking.net? 2022-03-28 11:09:47 or the insistence of 'social' feature crap 2022-03-28 11:10:30 I recall a GDC talk about games networking 2022-03-28 11:11:46 it was quite nice about going into friendslist support, having extra payloads in challanges between friends, etc 2022-03-28 11:12:20 but she insisted on voice chat in some spefic genre of games 2022-03-28 11:14:00 which is a big NO for me and many others as one might often be in situations of playing using headphones because of not disturbing others 2022-03-28 11:14:50 or that the voice banfwidth or possibly the thick accent or shrillness of some 12yo 2022-03-28 11:16:07 I recall how neat I found the radio fast menu in Counter Strike (the original not this Global Offense knock-off) 2022-03-28 11:17:11 heck, it promoted me to look into what had been done fo 2022-03-28 11:17:44 r dialogue driven by fast composer 2022-03-28 11:18:50 some Animal Crossing esque Disney thing used that 2022-03-28 11:19:30 originally to prevent cussing and such sexually explict stuff 2022-03-28 11:20:24 that was defeated in testing by a teenager that came up with "I want to stick my long giraffe up your white fluffy bunny" 2022-03-28 11:22:07 but they kept it as an option for two reasons: cut down on chat bandwidth requirement and it was localizable which meant that it was pretty decent translator 2022-03-28 11:22:35 Zarutian_HTC: Whenever I see a plain HTML website it looks like an old school computer scientist has written it, or scientific results from the 90s/00s, and it just looks like I'm going to get good info 2022-03-28 11:22:41 Like the Moving FORTH articles 2022-03-28 11:22:53 Or GNU manuals et 2022-03-28 11:22:57 cetera 2022-03-28 11:23:01 oh and it made it quite snappy to input with a gamepad 2022-03-28 11:27:48 http://habitatchronicles.com/2007/03/the-untold-history-of-toontowns-speedchat-or-blockchattm-from-disney-finally-arrives/ 2022-03-28 11:30:48 heck iirc a student in ai research at Reykjavík University ( cadia.is iirc ) was intrgued when I brought up the possible application of chatting with NPCs using speedchat 2022-03-28 11:31:44 forth related: this also got me thinking about input methods for forth using a gamepad 2022-03-28 11:33:23 the idea is pretty basic and builds on the 'combo-wheel' like many SEGA and SNES games used for highscore name entry, cheat codes or level passwords 2022-03-28 11:34:15 left and right selects the letter space and up and down scrolls the letter 'wheel' 2022-03-28 11:35:44 my idea was to do 'auto-complete' based on the word inputed so far by searching through the dictionary 2022-03-28 11:38:28 which means that you often just find the first few letters then pushing right most of the time 2022-03-28 11:40:39 as the dictionary is in latest defined word order the words you are more likely to use due to their recent definition are found first 2022-03-28 11:41:51 could even augment ." " and such to turn this off and on 2022-03-28 11:45:50 I'll try again to do a forth-like xD 2022-03-28 11:46:41 actually my goal was to do several iterations, this time I'll make a real parser and I'll have a string type instead of that dirty stuff I've made earlier 2022-03-28 11:47:08 and I'm wondering if make a real return stack instead of my "exeution stack" 2022-03-28 11:48:37 I have no memory access after all, so faking memory seems to be a bad decision (I think I don't have that need), but I didn't like what I've done with the execution stack 2022-03-28 11:49:55 stuff like if, and loops were just adding stuff to this execution stack, and I've done a list iteration by multiplying the words to be executed and adding a word to set the "i" 2022-03-28 11:51:42 was like ( 1 2 3 ) { i . cr } dolist, it would put this in the execution stack: 1 set-i i . cr 2 set-i i .cr 3 set-i i .cr 2022-03-28 11:53:07 I know forth puts i in the return stack, I don't really like that, but it's surely much better than my approach 2022-03-28 11:53:09 I agree - some things got done right back then. There's always a tendency to keep tinkering until things get broken. I feel like I watched MS Office legitimately get better and better for quite a few years - then it hit a high point and started getting worse and worse. 2022-03-28 11:53:18 They just couldn't leave it alone. 2022-03-28 11:53:30 Guess there's a "team" and they have to generate work to say they're doing. 2022-03-28 11:53:59 KipIngram: like doing somemthing just to not being fired? 2022-03-28 11:54:05 I'd rather see things "perfected" and then the primary development team disbanded, or stripped down to a "maintenance" level. 2022-03-28 11:54:27 Well, yeah - to justify the continued existence of someone's power base. 2022-03-28 11:55:01 Someone who's made the last few years of their career leading a particulra team isn't going to want to announce they they have no further major work to do. 2022-03-28 11:55:31 In a well-run company, someone further up the pole would have new work waiting for them. 2022-03-28 11:55:36 well my purpose was do several iterations because I have to learn and decide a lot of stuff, so every iteration I make is better than the previous one, actually I was thinking in using my "present iteration" for some "real" (not so real) stuff so I can detect more flaws and decide how things would go 2022-03-28 11:55:57 Sure - I'm not criticizing that. Like I said, Office got better over a long period. 2022-03-28 11:56:09 it can do some basic cgi 2022-03-28 11:56:09 I just think that eventually such processes should "complete." 2022-03-28 11:56:21 Mostly, at least. 2022-03-28 11:56:38 if the product is completed, more products can be made 2022-03-28 11:56:43 A "long term target" should exist - a "finish line." 2022-03-28 11:56:46 why dont companies see this :P 2022-03-28 11:56:47 I'm not worried since nothing can be worse than my previous versions xD 2022-03-28 11:57:10 so it's likely another version will be better, but I get your point and I'll take as a warning 2022-03-28 11:58:17 eris[m]: maybe is also the fact that if they don't add new and shiny stuff they'd fear the customers thinking it's abandoned or deprecated 2022-03-28 11:58:27 true 2022-03-28 11:58:31 also I suppose the competence can put a lot of pressure 2022-03-28 12:01:22 vms14: My systems have gotten steadily better. I didn't at all mean to imply that first cuts should be perfect. 2022-03-28 12:01:43 Especially in an actual commercial product - you learn things from how people respond to your early versions. 2022-03-28 12:04:06 KipIngram: there's a way we can try/use your stuff? 2022-03-28 12:04:12 like if I use a vm 2022-03-28 12:05:03 KipIngram: hahaha I imagine my users crying 2022-03-28 12:05:04 Not yet; I've been shy about sharing it. Maybe soon. 2022-03-28 12:06:32 Plus I've zero documentation, and I definitely want to fix that. 2022-03-28 12:06:57 A lot about it is "standard Forth," but a lot about it isn't, too. 2022-03-28 12:09:49 I need a forth implementation to learn forth, that's why I'm making my own 2022-03-28 12:10:08 I think mine would definitely not be the one to "learn on." 2022-03-28 12:10:16 I mean, it doesn't even have IF ELSE THEN. 2022-03-28 12:10:20 You could write it, of course. 2022-03-28 12:10:46 I have gforth or retro-forth, retro-forth seems to not work with sockets, it just says ok but not even blocks or does anything 2022-03-28 12:11:04 and gforth can't find libraries, I'd like to do fancy stuff while I'm learning 2022-03-28 12:11:37 I haven't used retro, but I'd be surprised to find it's "not doing something" it's supposed to do. My impression has been that it's quite solid, just judging by things people have said here. 2022-03-28 12:11:45 but still I can do plenty of stuff with gforth I suppose, specially learn forth 2022-03-28 12:11:57 Yeah, I think gforth is good for learning. 2022-03-28 12:12:13 And it seems to almost always be available, whatever your platform. 2022-03-28 12:12:28 KipIngram: netbsd has a binary for retro-forth, but I've tried some examples for sockets and they did nothing 2022-03-28 12:12:56 KipIngram: what do you think about gforth, I suspect you guys don't entirely like it at all 2022-03-28 12:13:26 there's also a binary for pforth btw 2022-03-28 12:15:49 pforth is also easy to build from the C source, or at least it was 20 years ago or so. 2022-03-28 12:16:24 I still wonder if having a return stack or not 2022-03-28 12:16:33 I don't enjoy gforth very much, but that doesn't mean a lot - I don't really do a lot with any "external" Forths. I used pforth in some consulting I did in 2004 or so. But mostly I write my own. 2022-03-28 12:16:58 why did you prefer pforth over gforth? 2022-03-28 12:17:03 It's a lot like my beer brewing, which I did a lot of in the past. What I most enjoyed about it was the process - tinkering with my gear and so on. 2022-03-28 12:17:08 forth somewhat needs a return stack 2022-03-28 12:17:11 just because was more portable, tiny or something? 2022-03-28 12:17:15 Engineer sickness or something. 2022-03-28 12:17:25 Yes, "somewhat." :-) 2022-03-28 12:17:30 without it you just have joy, lol 2022-03-28 12:17:49 I preferred pforth because it was easy for me to take the source and use it for what I was wanting to do, and it bore a suitable license. 2022-03-28 12:17:57 I used it in a commercial project. 2022-03-28 12:18:16 eris[m]: I have something I call the execution stack, the interpreter just executes whatever is there, and for example a colon word is split to this stack, if tests a condition and pushes stuff to this stack if the test is true 2022-03-28 12:18:25 I turned it into a socket-accessible control language for a pick-and-place machine. 2022-03-28 12:18:48 And then wrote all the code to make the machine do actual assembly jobs and so on. 2022-03-28 12:19:12 doesnt sound like you'll learn forth from this 2022-03-28 12:19:27 you'll learn something for sure 2022-03-28 12:19:30 I set up a system that let one simply code circuit assembly processes that involved a lot of conccurrent motions happening in parallel. 2022-03-28 12:19:38 eris[m]: you're right, it's not even a forth 2022-03-28 12:20:09 but I'm using perl and I have stuff that makes me think I can do it in another ways 2022-03-28 12:20:16 The Forth ran through a loop - the words in the loop were steps in the assembly job and would usually just pass through without doing anything, but when their pre-conditions were met they would "fire" and intiate an operation. 2022-03-28 12:20:30 So it was a sort of "parallel language" at the pick and place process level. 2022-03-28 12:21:04 I've also thought about a transpiler where words being executed just generated target code 2022-03-28 12:21:20 I made that client quite happy until I let him cajole me into undertaking the creation of a GUI for his system. Then I didn't do well with that part, and he wound up unhappy. 2022-03-28 12:21:33 My fault - I should have just flatly refused to do work I didn't have the experience to do. 2022-03-28 12:21:36 but you loose the interactivity 2022-03-28 12:22:03 KipIngram: sure you learned stuff in the process 2022-03-28 12:22:31 Indeed. The whole five-year experience also taught me that I could make more money holding a regular job, so in 2007 or so I went back to regular employment. 2022-03-28 12:22:42 But it was good to be able to say I'd tried consulting out. 2022-03-28 12:23:02 Otherwise I'd have always wondered if I had missed out on some "true calling." I did not - it wasn't for me. 2022-03-28 12:23:04 well I'm always blaming myself for being poor when people gets rich with the most absurd ideas they had 2022-03-28 12:23:38 I have a lot of ideas, if I'd at least tried them I think I would get something 2022-03-28 12:23:45 I know - I'm very prone to only be interested in things that strike me as "real cleverness." Meanwhile people get rich just out of willingness to sweat, doing really simple things. 2022-03-28 12:24:05 I won't complain, though - I've done fine. 2022-03-28 12:24:16 but any idea I have ends by "I have to make a language for this" xD 2022-03-28 12:24:25 Managed to send four daughters through college - just one to go now. 2022-03-28 12:25:01 in my case I would like to get a programmer job, but to be hired as a junior I have to choose between java, php, js or python 2022-03-28 12:25:11 I had a few years in there where I felt like I was really kicking ass and taking names - these days I turn a crank. But they still pay me to turn it, so... ok. 2022-03-28 12:25:14 languages I have 0 interest in, specially I hate java 2022-03-28 12:25:40 Like that Springsteen song, Glory Yers. I had those - they were... back then. But at least I had them. 2022-03-28 12:25:51 Years 2022-03-28 12:26:14 It was enough to make me believe I could survive swimming in those waters. 2022-03-28 12:26:19 I just have some basic perl knowledge, I can't consider myself an advanced programmer, but I think I qualify better than a lot of other juniors who have a job 2022-03-28 12:26:25 And honestly I can do without the stress, at my age. 2022-03-28 12:26:49 Cause I took it really seriously and worked myself damn near to death. It's a wonder I didn't wind up divorced. 2022-03-28 12:27:13 the fact is the languages I have have 0 job market and here if you get hired will be through a recruiter, a person who does have any idea about programming so can't judge your knowledge more than to hear the expected keywords 2022-03-28 12:27:29 languages I know(* 2022-03-28 12:28:17 Yeah. Things are so corporate these days. I always liked small companies - the people running things were more clued in to things like actual skills and so on. I tried - the last job I accepted was for a small 100-person company; I hired on as the software engineering manager. 2022-03-28 12:28:27 you might develop an interest if you start learning one of those languages. I did a lot of practice with python trying to find a job and came to absolutely love it. now I use it for all kinds of stuff in hobby projects 2022-03-28 12:28:44 20 years ago I could get a job as a sysadmin or even as a perl programmer 2022-03-28 12:28:46 Then one of the biggest companies in the world bought them about six months later, and there I still sit. Fairly sure there I will retire somewhere a little further down the road. 2022-03-28 12:29:35 I made a pretty penny on that acquisition, because when the little company owner hired me he offered me a drab of stock. 2022-03-28 12:29:41 And the big corporation bought it off of me. 2022-03-28 12:29:52 MrMobius: python was my first language, I was looking about a programming language for noobs and everyone recommends python 2022-03-28 12:30:09 It's a good thing - not too long after that one of my daughters needed some expensive medical treatment. I wouldn't have had the $$$ had it not been for that largesse. 2022-03-28 12:30:19 also I decided to choose python because I wanted to make a game and I saw the blender game engine, which uses python 2022-03-28 12:30:41 but after some days with python I had the feeling I was skipping a lot of knowledge and wen to C 2022-03-28 12:30:44 So some of it is in equity in the home we're living in, and the rest is gone. But it accomplished some necessary things. 2022-03-28 12:31:18 today if I had to learn python I would prefer ruby, I think ruby is much better language than python if we don't count libraries and look at the base language instead 2022-03-28 12:31:37 vms14, python is an awesome language for augmenting all kinds of things. i have used it to preprocess and optimize forth source before sending it to be compiled. also all kinds of stuff for assembly. i think embedded guys should learn it as a second language 2022-03-28 12:31:43 I don't know Ruby, but yes - one of Python's huge strengths is that extensive package library. 2022-03-28 12:32:01 MrMobius: yes, you can actually do almost whateever you want with python 2022-03-28 12:32:15 as long as you dont need it to be super fast :) 2022-03-28 12:32:15 you have libraries for almost everything 2022-03-28 12:32:28 I generate the nasm source for my 100+ conditional words using a couple dozen lines of Pyhton. 2022-03-28 12:32:29 MrMobius: most of them are written in C 2022-03-28 12:32:36 God - I can't type today. Python. 2022-03-28 12:32:59 ya that's the other side. ive never used a library for anything. just vanilla python is so fast and easy to write 2022-03-28 12:33:00 KipIngram: don't apologize, I'm near writing much worse than you 2022-03-28 12:34:39 what's the "application" forth is best suited for? 2022-03-28 12:34:49 making dsl? 2022-03-28 12:36:46 btw did you guys wrote some forth documentation, like tutorials or alike? 2022-03-28 12:36:56 write* 2022-03-28 12:38:41 there's some minimal documentation for my unfinished forth based calculator - http://calc6502.com/calc6507/main.html 2022-03-28 12:39:01 if you click on the links in the Quick Start section 2022-03-28 12:39:29 http://calc6502.com/RobotGame/summary.html 2022-03-28 12:39:44 this reminds me I had an idea for a forth tutorial 2022-03-28 12:40:39 something like you pretend to be a robot and your assembly language is English, and from there you add colon words, so primary words are defined in english and then you understand colon words 2022-03-28 12:40:59 primitive words* idk why but always call them primary 2022-03-28 12:41:00 that would be neat 2022-03-28 12:41:20 I personally think it's best suited for managing hardware, but honestly you can make it suited for anything you want. Maybe out of the box managing hardware is a good application. 2022-03-28 12:41:41 You can "grow" any type of system you want with it. 2022-03-28 12:42:27 it's sad because I have 0 interest in managing hardware, I like forth because I always wanted to learn about bottom up, and somehow I like how you go defining little words, factoring and alike 2022-03-28 12:43:00 Yeah, it's a "pleasing process." 2022-03-28 12:43:03 and it's funny because I always do things in reverse order, so at least forth will understand me 2022-03-28 12:46:10 MrMobius: I like how you can play with your forths in a browser 2022-03-28 12:48:09 an evil robot killed me :/ 2022-03-28 12:48:22 vms14, ty. the forth is someone else's called TaliForth2. just the game and simulator it runs on is mine 2022-03-28 13:07:45 I was looking for some js forths, I wanted a forth I could just add as a js script file and have it evaling stuff 2022-03-28 13:08:09 jsforth needs browserify and some others are alike 2022-03-28 13:08:17 I'll look at this one 2022-03-28 13:25:53 ftp://ftp.taygeta.com/pub/Forth/Compilers/native/unix/ :0 2022-03-28 13:39:46 found this link with a lot of stuff http://www.complang.tuwien.ac.at/forth/ 2022-03-28 13:47:54 KipIngram: idk if that can interest you http://www.forth.org/svfig/osf.html 2022-03-28 13:51:05 https://en.wikipedia.org/wiki/Jupiter_Ace 2022-03-28 13:53:16 to use forth on web pages? 2022-03-28 13:55:52 MrMobius: yes 2022-03-28 13:56:52 I saw several, and even some in wasm, but no one as a simple script.js file I could add and feed some words like it just exposes an eval function or a similar thing 2022-03-28 13:58:35 there's more info of Forth than what I've initially thought, sad it's a very unknown language for most people 2022-03-28 13:59:17 yet most of the links are very old and forth does not seem to escape too much from embedded systems 2022-03-28 14:01:34 a simple js forth seems like a neat project if youre looking for one :) 2022-03-28 14:02:24 there is a good amount of forth stuff happening on a hobby basis. svfig has monthly meetings with project presentations you can watch on youtube. also 4ther and forth2020 on youtube 2022-03-28 14:03:00 Brad Nelson had a forth haiku website where you type in tiny forth programs that draw designs on a website 2022-03-28 14:04:19 *has 2022-03-28 15:13:50 MrMobius: I'm looking at some videos, 4ther videos are in a language I won't understand so meh 2022-03-28 15:14:21 trying to find the haiku stuff, but only see presentations 2022-03-28 15:14:27 I think a lot of them are in German though im pretty sure some are in English if you dig 2022-03-28 15:15:10 vms14, https://forthsalon.appspot.com/ 2022-03-28 15:20:16 tnx for the link 2022-03-28 15:55:24 anyone care to try a quick experiment opening a tcp port to a server i'm running here? just needs socat or nc or similar on your side (rlwrap can also help if socat lacks readline) - server provides a locked down rpn calculator 2022-03-28 16:04:41 So you just want someone to run socat and poke at your calculator? 2022-03-28 16:05:02 yup 2022-03-28 16:05:13 I'll try it - what's your address? 2022-03-28 16:05:51 cheers - rlwrap socat - tcp4:81.82.222.37:57708 - don't worry about rlwrap if you don't have it 2022-03-28 16:06:15 It's ready now? 2022-03-28 16:06:24 yup 2022-03-28 16:06:34 .. should be anyway :) 2022-03-28 16:06:39 ok; got a calculator> prompt. 2022-03-28 16:06:49 cool - just type help 2022-03-28 16:07:30 just throw stuff at it and see what happens i guess :) 2022-03-28 16:07:37 Yeah; diddling around. 2022-03-28 16:07:41 :) 2022-03-28 16:08:28 Seems to work fine. 2022-03-28 16:08:38 I did some floating point, a bit of trig. 2022-03-28 16:08:50 cool - appreciated :) 2022-03-28 16:09:09 Nice job. 2022-03-28 16:09:24 i hope it's not exploitable :) 2022-03-28 16:09:34 Well, I certainly wouldn't know how. 2022-03-28 16:09:48 But of course you're trusting a stack of some kind, I guess. 2022-03-28 16:10:04 heh - well, i've disabled stuff from the language which enable loops and word definitions 2022-03-28 16:10:05 How hard was it to set up the server end of that, once you had the thing itself running? 2022-03-28 16:10:17 Sure. 2022-03-28 16:10:55 this is a c++ interpreter, so it wasn't that difficult to set up the comms side of things 2022-03-28 16:11:28 Ah, ok - so the comms are compiled in? I thought maybe you'd taken a console program and "wrapped it" in some Linux magic or something. 2022-03-28 16:11:47 yeah - compiled in - using boost::asio library 2022-03-28 16:11:49 I.e., something I could easily try on mine. :-) 2022-03-28 16:11:57 ah :) - sorry :) 2022-03-28 16:12:12 No worries - not actually something I need, but I like new pony tricks. 2022-03-28 16:13:06 well, the main idea is that i can use the interpreter to build actual comms protcols - using the language to interpret and reply kinda stuff 2022-03-28 16:14:04 building a server for control of media playout as a work experiment 2022-03-28 16:24:52 hmm - but actually... i do have a bash script which could possibly expose some interactive commands by way of a socket i guess... https://gitlab.com/lilo_booter/imp - the idea is that the script creates an instance of an interactive command (like bc, dc, bash, python, festival etc etc) as a background process and creates fifos to allow you to communicate with the instance 2022-03-28 16:26:48 has some limitations and as written is designed not to allow remote access, but that could probably be resolved with socat or something (even bash's built in tcp stuff i guess, not that i've every used it as ubuntu to enable that) 2022-03-28 16:31:07 ubuntu to/ubuntu doesn't 2022-03-28 16:40:27 Cool - nice to know about. 2022-03-28 16:41:26 thought it was an interesting idea at least, and i liked the idea of those personal daemons :) 2022-03-28 16:57:15 lilo_booter: inetd? 2022-03-28 16:57:29 wrt fixing limitations of the bash script 2022-03-28 16:57:59 ah yeah - that rings a bell 2022-03-28 16:58:59 I think xinetd is still the best for non-systemd systems (or if you don't wanna write systemd units) 2022-03-28 16:59:07 and systemd socket-activated units can do the same thing 2022-03-28 17:00:18 So I wound up opting to use a single signal handler to handle both arithmetic and RAM exceptions. The handler can fetch the signal number from a parameter passed to it, but I'm not bothering right now - I just throw a "signal exception" error. It tells me the word that caused it - I figure I'll know from that what kind of signal it was. 2022-03-28 17:01:03 Installing the handler for a second signal just requires three aditional instructions in the initialization code. 2022-03-28 17:03:31 remexre: yeah - when KipIngram asked, it definitely felt like a solved problem (though not quite what i'm aiming for which is about sharing a central state with multiple clients, rather than just providing each with their own state [in the demo though, the only shared is the server socket itself]) 2022-03-28 17:06:00 yeah, depending on what you're doing, might be better/easier to hand-roll something custom; if you're aiming for "nice" interop with "modern" things, my personal inclination is to keep the shared state in a redis instance that the servics connect to 2022-03-28 17:08:17 in the intended case, it's a handful of c++ objects which are demuxing and decoding video - clients can connect and control content of the playlist, position, speed and so on - very finegrained control and should be low latency 2022-03-28 17:08:48 ah, yep, sounds like an awful case for redis :) 2022-03-28 17:08:53 :) 2022-03-28 17:14:20 fwiw, the graph building mechanism is all rpn :D - like video1.mp4 video2.mp4 video3.mp4 filter:playlist slots=3 (but with a lot more filters :)) 2022-03-28 17:15:02 provides a nice way to both build and serialise the graphs 2022-03-28 17:49:28 : :D cr ." :D" cr ; 2022-03-28 17:49:36 this is my favourite forth word :D 2022-03-28 17:49:53 all forths should include it :/ 2022-03-28 17:50:41 I propose changing "ok" for ":D" 2022-03-28 17:50:56 and "not ok" for ":/" 2022-03-28 18:41:26 I really need to learn forth, even a simple script that only saves a word from input is hard for me 2022-03-28 18:41:28 https://termbin.com/5gvl 2022-03-28 18:41:42 and surely is wrong/can be much better 2022-03-28 18:43:22 I should change it for a counted string and use type instead 2022-03-28 18:53:23 how can I improve it? 2022-03-28 18:53:37 I only can change the print-word by : print-word the-word index @ type ; 2022-03-28 18:55:31 no idea about how to improve the other words 2022-03-28 18:57:46 Take a look at the word EXPECT. 2022-03-28 18:58:20
EXPECT will let you type a string up to chars long, and store it at
. 2022-03-28 18:58:38 Normally it would automatically provide normal line editing features (cursor motion, backspace, etc.) 2022-03-28 18:59:12 It's the same word the system uses to get you to type a line of input. 2022-03-28 18:59:39 In that case the system supplies
and . 2022-03-28 19:00:15 thanks KipIngram <3 2022-03-28 19:03:50 but KipIngram as I see accept won't give me the number to print it later? 2022-03-28 19:03:55 expect* 2022-03-28 19:04:13 they say to use accept instead, expect does make a counted string? 2022-03-28 19:06:28 or I could set the characters to some value initially so when I find this value it means the end 2022-03-28 19:06:44 but it seems more reasonable and cleaner to just use accept 2022-03-28 19:07:38 anyways I want to stop as soon as I hit a space or a newline, so it seems I need key 2022-03-28 19:07:52 but I needed to see those words so thanks 2022-03-28 19:08:03 I don't think EXPECT gives a count - it probably null terminates it. 2022-03-28 19:08:09 it does 2022-03-28 19:08:18 oh my cat is nice ok 2022-03-28 19:08:19 Stack<10> 124644098114856 17 2022-03-28 19:08:40 the address I think it was on the stack yet 2022-03-28 19:08:47 ah you mean expect 2022-03-28 19:09:06 I saw a Z in the position 16 which should be the null 2022-03-28 19:09:06 A lot of Forth systems are designed so that if you try to parse a word out of the string and there isn't any more, WORD returns "the null string." 2022-03-28 19:09:26 By having an actual word bearing the null string as its name, and making it immediate, you can use that to break the interpreter loop. 2022-03-28 19:09:33 I usually do mine that way. 2022-03-28 19:09:41 when I was trying at first I saw a lot of ZZZZ because I wasn't saving the word properly 2022-03-28 19:09:56 Z is the null? it's pforth 2022-03-28 19:10:07 So INTERPRET is written as an infinite loop. 2022-03-28 19:10:20 It has no "end checking." 2022-03-28 19:11:04 The termination is forced on it by the null word doing a two-level return when it's EXECUTED. So instead of returning to INTERPRET, it returns to INTERPRET's caller. 2022-03-28 19:11:31 Therefore, the string you hand to INTERPRET *must* be null terminated 2022-03-28 19:12:03 Otherwise WORD will just run right off the end trying to parse. 2022-03-28 19:13:38 I'm looking now at word and parse 2022-03-28 19:15:32 but they work on the TIB 2022-03-28 19:15:37 meh 2022-03-28 19:16:10 I need to find some basic programs to do in order to practice forth 2022-03-28 19:17:09 I think I'll try a shop program 2022-03-28 19:17:21 I should make a todo app too 2022-03-28 19:23:38 Yes - they're focused on the input. 2022-03-28 19:24:29 Something involving fixed point math would be good practice. Scaled integers, I mean. Maybe some astronomy program or something. 2022-03-28 19:25:41 Or write a little DIY floating point library. Not an officially compatible one - there's a lot to that. But just something where you have to keep up with your mantissa and exponent. 2022-03-28 19:26:37 If you're on a 64-bit system you could have six-byte mantissa and two-byte exponent. 2022-03-28 19:27:12 Use power-of-10 exponent. 2022-03-28 19:27:41 Writing words to read those, print those, and do basic calculator ops on them would be educational, I think. 2022-03-28 19:41:11 hahaha I need to get a base first 2022-03-28 19:41:22 I've read some stuff but practiced 0 2022-03-28 19:42:23 I saw D> or something alike that was kind of printf for floating numbers 2022-03-28 19:53:13 https://termbin.com/a19u 2022-03-28 19:53:43 I have this to exit 3 of R> endof 2022-03-28 19:54:02 tried with bye and abort but gives an error (exits anyways) 2022-03-28 19:54:15 so I just pop the return stack :D 2022-03-28 19:55:05 sad I don't have sql or alike, could be more useful and I would elaborate 2022-03-28 19:55:36 but I could read from a file or make a file with forth words for the products 2022-03-28 19:56:52 I have a gpd micro pc so I could take this computer to the supermarket which means a shop program could end being useful 2022-03-28 19:57:16 specially if I can save new products and mantain a list of things to buy etc 2022-03-28 19:58:05 how do I exit from a begin again word being in another word? 2022-03-28 19:58:19 I don't like the R> it's not likely to work always 2022-03-28 19:58:47 and I shouldn't pop the return stack unless I have a real reason (almost never?) 2022-03-28 19:59:31 abort and bye give me an error, they exit, but show an error on the line of the begin again word 2022-03-28 20:03:14 that's why I wanted a forth with ffi or something 2022-03-28 20:03:29 at least I could have sqlite or the berkeley db 2022-03-28 20:04:26 I'm liking forth btw, cannot explain exactly why I like it 2022-03-28 20:34:16 Wow - what a fiasco: 2022-03-28 20:34:18 https://www.youtube.com/watch?v=OWwzQyXAvXI 2022-03-28 21:59:01 BEGIN ... AGAIN is an infinite loop. The only way out of there is a return. In traditional Forth you can't return from that word directly, but you can do r> drop ; a level down. 2022-03-28 21:59:40 I have a word I call ;, in my system - it's just a normal ; except it doesn't end the definition. So that would pop me out of a begin ... again (if I had them). 2022-03-28 22:00:27 I have a primitive that's equivalent to r> drop ; which I call ;; 2022-03-28 22:01:05 So I could use ;; a level down to exist an infinite loop, or ;, at the level of the loop. 2022-03-28 22:02:49 lol I forgot to drop the R> 2022-03-28 22:02:53 My looping constructs always jump back to the very beginning of the word, so I don't need BEGIN, which serves only to mark where to jump back to. 2022-03-28 22:03:07 I factor the loop content into its own word so that the right place to jump is the beginning. 2022-03-28 22:03:35 My word ME will do that, unconditionally, or I can use any of numerous conditional variants of it to do so conditionally. 2022-03-28 22:04:16 Heh. Well, you still got out of the loop, but you had a present waiting for you back in the caller. 2022-03-28 22:04:54 well the program ends so there is no stack anymore 2022-03-28 22:05:03 but it's a bug anyways 2022-03-28 22:05:27 I don't like to use R> btw 2022-03-28 22:05:58 I think I should be doing it differently and the fact I'm using R> to end the program seems more like a flaw in design 2022-03-28 22:06:13 but idk why abort and bye give an error 2022-03-28 22:06:45 I think Forth will end being my main language 2022-03-28 22:06:54 Well, I agree that r> drop is a bit ugly. I guess that's why I packaged that functionality up in a differently named word, with a name that makes more sense to me. 2022-03-28 22:07:07 ;; encapsulates what it's actually DOING. 2022-03-28 22:07:28 I just like it and don't feel comfortable yet, but when I make a forth that does not give me cancer by using it I think I'll be pretty happy 2022-03-28 22:07:43 every day I'm more convinced to have a return stack 2022-03-28 22:07:45 :-) 2022-03-28 22:08:21 I regard a return stack as essential - factoring your code is a big part of writing good Forth, and you can't really factor without a return stack. 2022-03-28 22:08:22 KipIngram: when the program starts the return stack has all the words present in the text? 2022-03-28 22:08:36 No, it starts empty. 2022-03-28 22:08:49 when I've tried I just did that 2022-03-28 22:09:05 I mean, it's never empty when you're working at the command line - the interpreter has already put some stuff on there. 2022-03-28 22:09:14 But at the VERY start it's empty. 2022-03-28 22:09:19 but it puts the whole line? 2022-03-28 22:09:42 I don't want to read by lines btw 2022-03-28 22:10:20 No - you're not seeing it quite right. The Forth system is alays, always executing some compiled definition. When the word it needs to execute is a primitive, the return stack isn't involved at all - it just runs the code for that word and scoops up the next word using the instruction pointer. 2022-03-28 22:10:53 But when the word it need to execute is a colon definition, it needs to point the instruction pointer at that word's definition. So it has to save the current value somewhere, and it uses the return stack for that. 2022-03-28 22:11:11 Puts the IP on the return stack, loads the new def's address into IP, and carries on. 2022-03-28 22:11:36 When it comes to the ; of that def, it pops the old IP value back off of the return stack, so it goes back to the word right after that def it just executed. 2022-03-28 22:11:53 The line of code you type is put into a text buffer as a string. 2022-03-28 22:12:15 WORD peels it off one word at a time, and the interpreter looks each word up in the dictionary and runs its definition. 2022-03-28 22:12:37 When that happens from the command line, it's running a loop inside the word INTERPRET. 2022-03-28 22:12:44 so if the return stack is empty when exiting from a colon word it just calls word? 2022-03-28 22:13:22 Ok, so let me sketch this out. At the very top level, neglecting some initialization, the interpreter has this: 2022-03-28 22:13:47 BEGIN QUERY INTERPRET ." ok" AGAIN 2022-03-28 22:13:59 QUERY uses expect to load what you type into the input buffer. 2022-03-28 22:14:11 INTERPRET looks something like this: 2022-03-28 22:14:33 BEGIN FIND EXECUTE AGAIN 2022-03-28 22:14:46 I'm neglecting compiling here - this just covers interpreting the line of text. 2022-03-28 22:15:06 FIND uses WORD to get the next word and then looks up its definition address, leaving that address on the stack. 2022-03-28 22:15:13 EXECUTE runs it. And you repeat. 2022-03-28 22:15:56 Eventually the next word will be the null word, and when that is executed it does the r> drop ; which sends you back up to the loop with query - so you print the prompt loop around and ask for another line of input. 2022-03-28 22:16:03 So you see, some definition is running all the time. 2022-03-28 22:16:20 The Forth system itself - the interpreter - is a definition. 2022-03-28 22:16:48 So that outer loop with QUERY calls INTERPRET - that causes a return address to go onto the return stack. 2022-03-28 22:17:12 When \ 2022-03-28 22:17:15 Ooops. 2022-03-28 22:17:38 So there are always a couple of return addresses, servicing the interpreter, on the return stack - it will never get completely empty. 2022-03-28 22:17:55 but that doesn't concern you - those return addresses have nothing to do with YOUR code. 2022-03-28 22:18:51 I'll save this 2022-03-28 22:19:11 Usually that outermost loop will actually clear the return stack, so I guess it's empty then. But INTERPRET has pushed a return address on there, so when your entered words execute it won't be empty. 2022-03-28 22:19:27 For instance, in my system I get this: 2022-03-28 22:19:51 rp@ rp0 @ - . 8 ok 2022-03-28 22:20:32 So that tells me there's one item on my return stack, and that's at the level of my words executing. rp@ is a primitive, so it doesn't affect the return stack itself. 2022-03-28 22:20:42 thanks KipIngram I've saved this into a fil 2022-03-28 22:20:44 file* 2022-03-28 22:21:15 atm I want to learn some basic forth until I try to iterate again in my dirty forth 2022-03-28 22:21:32 but this time I think I'll have a return stack, because my approach won't work at the end 2022-03-28 22:22:22 As the system is starting up you pass through a couple of points you can jump back to if you want. In my system I have COLD WARM and QUIT. QUIT is the BEGIN QUERY ... AGAIN loop. 2022-03-28 22:22:33 And as I said, it will reset the return stack at the beginning. 2022-03-28 22:22:42 WARM resets the data stack and then falls into QUIT. 2022-03-28 22:23:07 And COLD re-initializes my entire system (actually makes a new copy of the load image) and then falls into WARM. 2022-03-28 22:23:50 So WARM and QUIT don't affect your dictionary - you still have any words you've added. But COLD puts you back to a virgin dictionary as well as doing everything WARM and QUIT do. 2022-03-28 22:24:25 If I've read data into disk buffers, I still have that even after COLD - that's the only thing that's not touched. 2022-03-28 22:29:00 I have to dig into forth a lot first 2022-03-28 22:29:24 the problem is I don't have memory access and faking it doesn't seem to be productive 2022-03-28 22:29:56 but the return stack can work anyways, I won't get forget but I could have some kind of restore points 2022-03-28 22:30:05 like a copy of a previous dictionary 2022-03-28 22:30:55 and I could fake forget by having a list of defined words, but the dictionary is actually a hash, not a linked list 2022-03-28 22:31:33 which means forgeting a redefined word could kill the previous one unless I do it by having a copy 2022-03-28 22:31:54 but I won't maintain a copy of the whole dictionary for every new defined word 2022-03-28 22:32:18 so I'll forget about forget, I can delete words from the hash 2022-03-28 22:32:42 Yeah - it's certainly possible to use alternate structures (other than linked lists), but the linked list does give you some protection against issues like you just described. 2022-03-28 22:32:58 and I could provide a way to make checkpoints in order to come back to a previous dictionary state, as long as the user makes that checkpoint with some word 2022-03-28 22:33:15 Forgetting gets a lot more cumbersome when you have vocabularies - you've got to make sure you prune every vocabulary pointer back to below the forget point. 2022-03-28 22:33:25 Which means you've got to check every one of them. 2022-03-28 22:33:32 I don't aim to have vocabularies from now 2022-03-28 22:33:49 and it's likely once the language has a shape I'll be able to do it in another language 2022-03-28 22:34:13 atm I'm using perl as a playground, but I should really learn forth first and understand it 2022-03-28 22:34:15 Yeah - I was thinking earlier that you're complicating your life a little via your current choice of tools. 2022-03-28 22:34:36 You CAN do it in C, but Forth really wants to be written in assembly. 2022-03-28 22:34:56 For one thing that lets you use the registers more effectively. 2022-03-28 22:34:59 it needs words as memory locations 2022-03-28 22:35:19 and the IP makes it easy too 2022-03-28 22:35:34 That's somewhat true - I definitely have some byte oriented things, but that 32-bit definition cell size is a pretty important thing. 2022-03-28 22:38:20 One little rough edge on my system right now is that when I compile a number in a definition, I don't check it to see if it needs to be represented as a 64-bit quantity instead of a 32-bit one. 2022-03-28 22:38:22 but I like the fact that the stack can have any kind of type 2022-03-28 22:38:27 I just compile a 32-bit literal. 2022-03-28 22:38:47 KipIngram: aren't floating numbers represented as two cells? 2022-03-28 22:38:49 Which works virtually all the time, but only because I don't really need to compile any 64-bit numbers. 2022-03-28 22:39:06 The way the processor sign extends on 32-bit loads makes it work for all numbers I have any need for. 2022-03-28 22:39:54 But I really should add a (lit64) primitive and put a test in the compiler. 2022-03-28 22:42:10 Except... who knows when I'll ever use it? 2022-03-28 22:42:28 I can't really think of a likely need for actually typing in a 64-bit number. 2022-03-28 22:43:31 And if I do need to, my alternative is to define it as a constant and use the constant in the definition. 2022-03-28 22:43:37 That works just fine. 2022-03-28 22:44:57 floating numbers is the less of my concerns for now 2022-03-28 22:45:20 I just need a base that does not make me cry because of how I've implemented it 2022-03-28 22:48:52 Oh, I was talking about integers that can't be represented in 32 bits. 2022-03-28 22:50:07 it's likely you won't use values like 2,147,483,647 2022-03-28 22:51:02 Right - I agree. But, right now I get this: 2022-03-28 22:51:05 x:FFFFFFFF . 4294967295 ok 2022-03-28 22:51:08 : test x:FFFFFFFF ; test . -1 ok 2022-03-28 22:51:46 isn't it right after all? 2022-03-28 22:51:52 The one inside a definition gets sign-extended to 0xFFFFFFFFFFFFFFFF = -1 when it loads. 2022-03-28 22:52:06 No - the first one is right. 2022-03-28 22:52:17 The second one is wrong because it sign-extends. 2022-03-28 22:52:33 Ideally they'd give the same output, the 429... number. 2022-03-28 22:52:54 and how you plan to solve it? 2022-03-28 22:53:17 Well, as I said, I'll need to add a (lit64) primitive which loads 64 bits from the definition. 2022-03-28 22:53:44 And in the compiler I'll want to test the number and use either (lit) with 32 bits after or (lit64) with 64 bits after, as appropriate. 2022-03-28 22:53:52 but you'll have to test those numbers or make everything as 64 bits 2022-03-28 22:53:59 Exactly. 2022-03-28 22:54:06 And I don't want to make everything 64 bits. 2022-03-28 22:54:19 For one thing there are a lot of 32-bit literals in my assembly definitions I'd have to change if I did that. 2022-03-28 22:54:29 The right solution is a test in the compiler. 2022-03-28 22:56:42 Honestly even using 32-bits by default is wasteful. Virtually everything I do would be covered by an 8-bit value, and literally everything would be covered by 16. But I prefer keeping 32-bit alignment, so it's ok. 2022-03-28 22:58:45 I was just thinking a day or so ago that the size this is all coming in at I could made all of this part 16 bits and it would have been about half the size. 2022-03-28 22:59:04 But I could at least *imagine* outgrowing that, whereas I'll never outgrow this. 2022-03-28 23:06:15 I wish it was possible to mix 16 and 32 bit definitions, but unfortunately that just doesn't pan out. Primitives have to know how big the next definition cell is. 2022-03-28 23:13:39 sure there's a way but does not seem to be a real need 2022-03-28 23:13:48 unless you're really memory constrained 2022-03-28 23:14:43 forth is likely to stay small anyways, at least compared to other languages, but I've read some forths end growing so much that they loose the common thought of being a small language 2022-03-28 23:29:20 Yes - Forth ought to stay small. 2022-03-28 23:44:29 I've historically usually thought of Forth as an "8kB-ish" thing. That's for 16-bit cells, though; 32-bit cells "kind of doubles it." And mine's just under 19k right now, so not too much over double. 2022-03-28 23:45:01 I have a lot of primitives, and those names add up, so it doesn't surprise me it's a bit above 16kB. 2022-03-28 23:47:05 there's a lot of primitives in almost all forths 2022-03-28 23:47:22 I cry when I type words because I only know like 10 words xD