00:00:00 --- log: started forth/21.06.09 00:30:21 --- quit: crab (Ping timeout: 272 seconds) 00:34:36 --- quit: proteus-person (Quit: Leaving) 00:34:55 --- join: proteus-guy joined #forth 00:43:52 --- join: Glider_IRC__ joined #forth 00:47:27 --- quit: Glider_IRC_ (Ping timeout: 272 seconds) 01:10:58 --- join: neuro_sy` joined #forth 01:14:41 --- quit: neuro_sys (Ping timeout: 272 seconds) 01:17:33 --- quit: skapata (Quit: Hi, I'm a quit message virus. Please replace your old quit message with this one and help me take over the IRC world.) 01:50:03 There was a non standard word that takes a counted string and stores it in memory, what was it? I thought it's `pack`. 02:21:19 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 02:25:22 Ah yes it's pack and place. 02:46:02 --- quit: wineroots (Remote host closed the connection) 02:48:25 --- quit: Glider_IRC__ (Ping timeout: 272 seconds) 02:55:23 --- quit: neuro_sy` (Ping timeout: 272 seconds) 03:34:55 --- join: Glider_IRC joined #forth 03:48:14 --- quit: Glider_IRC (Remote host closed the connection) 03:51:02 --- join: Glider_IRC joined #forth 06:08:02 --- quit: cbridge_ (Remote host closed the connection) 06:08:13 --- join: cbridge_ joined #forth 06:22:56 --- quit: cbridge_ (Remote host closed the connection) 06:23:11 --- join: cbridge_ joined #forth 06:29:48 --- quit: cbridge_ (Remote host closed the connection) 06:30:00 --- join: cbridge_ joined #forth 06:40:29 --- quit: cbridge_ (Remote host closed the connection) 06:40:43 --- join: cbridge_ joined #forth 08:43:34 -!- ChanServ changed mode/##forth -> +v KipIngram 08:44:43 How is that different from cmove? 08:45:07 Is cmove standardized to not necessarily deal with bytes? 08:45:36 So cmove works in terms of unicode characters or something? 08:46:13 I do see the issue there - at the time cmove was conceived, characters were bytes, and that was that. 08:46:28 But they're not anymore, and the name does imply it's working with CHARACTERS rather than bytes. 08:54:01 Well, in C, the decision was to leave 'char' defined as "byte," and introduce new wchar_t for characters that don't necessarily fit one byte. 09:47:54 --- join: crab joined #forth 10:31:48 --- join: wineroots joined #forth 11:06:26 --- join: neuro_ joined #forth 11:09:41 --- quit: crab (Ping timeout: 258 seconds) 11:22:01 I feel like flashing forth to this tiny portable ARM based computer and take it to the park and type in code from a block editor. 11:22:29 And sip from my cold mint lemonade. 11:23:49 that sounds really nice 11:25:01 it's a "feels like" temp of 107F where I am, and the AC in my office is out... 11:29:01 It's 18 celcius here (Finland), but still quite hot in the apartment with the heat during the day. 11:29:50 I sometimes code on paper, that's fun too. 11:38:36 Hmm I wonder if I can change the DP to some other value temporarily so that I can ALLOT arbitrary length data. The case was that I am building a table of structures that contain arbitrary length strings. In order to keep structures the same size, I'd like to store strings into another location. 11:44:19 --- join: crab joined #forth 11:44:22 yo yo yo 11:58:58 https://gist.githubusercontent.com/neuro-sys/9d5595e028a1693b741b1cb511ec45b6/raw/f50e5171e4f39b68a644d0e0f7f9a3eb965e2bc7/example.fs 11:59:07 This is related to the above question ^ 12:01:51 Deleted unused words: https://gist.githubusercontent.com/neuro-sys/9d5595e028a1693b741b1cb511ec45b6/raw/73e5c00e70beb29352151c350c43f312c3b26a50/example.fs 12:08:44 I write more code on paper than anywhere else 12:08:51 rarely does it make it to the computer 12:09:34 because nitty gritty implementation specifics and errors are often unimportant until the very end 12:09:47 most of the 'design' phase I can just do on paper 12:45:03 crab: Yes, I know what you mean. I don't use paper, but I often write my Forth in a vim text file; just mentally executing it. When a a bit of coding is done, I usually have a dozen or two very short definitions - 35-40 characters each, that inter-operate very tightly with one another. 12:45:29 I leave it there in vim for a few days and go over it every now and then, and when I'm satisfied I hand-compile it into my assembly source. 12:45:33 And check it out. 12:45:47 There are usually one or two small errors, but most of the time it's very close to right. 12:46:08 Soon I won't need to do that anymore - soon I'll be able to code directly in my block file with the system itself. 12:46:19 But before the system can handle that, that's how I do it. 12:47:09 Just as a sample, I believe my NUMBER word was the top word of 20 or so definitions, and my FIND word was the top word of 13 or so. 12:47:34 Usually only one or two of those one or two dozen definitions become full fledged words in my dictionary - the rest are just factorings. 12:48:39 In the system I'm writing now, they still have headers, but ultimately their headers are unlinked from the dictionary. In the last Forth I wrote I had a way of actually recovering the header space they occupied, but I simplified that capability away this time. 12:49:13 Last time I had a fixed block size heap manager that was very fundamental to the system; this time I've got a more traditional memory structure - no dynamic memory management yet. 12:50:38 For a long time I didn't really realize what I was doing, exactly, but now I see that these definitions have grown shorter BECAUSE of how "vertically integrated" they are with one another - it's like I'm creating control structures up and down the call hierarchy. 12:51:01 I expect some structured software purists would hate it, but I find it pretty pleasing, actually. 12:53:09 I have really been converted to shorter definitions recently 12:53:24 it's still difficult for me to figure out the factoring a lot of the time 12:53:56 but rarely do I run into a situation where the effort to get down to 5-6 word definitions isn't just plain better 12:54:13 and the more I do it the faster and more natural the factoring comes 12:57:24 --- quit: gravicappa (Ping timeout: 258 seconds) 12:58:29 I've also thought about including word versions of all the machine instructions as an easy assembler to mitigate that period of writing words into the dictionary with an external assembler 13:10:18 I agree whole-heartedly. 13:10:47 And yes, I do plan to push on until I can completely recompile the system, with "itself. 13:10:58 That will involve a layer of assembly level words. 13:11:16 That's been sort of part of my plan all along, and I think this time I'm going to be able to get there. 13:11:40 Once I can do that, then I imagine this system will be the only thing I develop with, at least for my personal projects. 13:12:18 I've added conditional return words to my system - that facilitates building those "vertical" control structures I mentioned. 13:12:36 I can conditionally return, or conditionally double-return, using pretty much the full complement of conditions. 13:13:23 That winds up being a fairly long list of primitives, but I wrote a Python script to generate the source for them, and when I move toward that re-compiling thing I'll have Forth scripts to do that. 13:14:09 The move to shorter definitions is relatively recent for me too - just happened in the last 2-3 years. 13:16:10 --- quit: cbridge_ (Remote host closed the connection) 13:16:22 --- join: cbridge_ joined #forth 13:24:01 Forthers should video record over-the-shoulder coding sessions more often like Sam Falvo did. 13:24:05 It would be fun to see. 13:24:31 I actually would like to do something like that once I'm more proficient with the language. 13:24:45 Hopefully with my own Forth if I ever get around to writing it. 13:27:27 Own Forth, and own code editor would be lovely. 13:28:28 That feeling of, what else do you need to program a computer but Forth, and knowing (and thus being able to change) every bit of it. 13:31:13 Yes - that's what I'm lusting for as well. My own environment, that I'll use for any sort of gadgetry I build in retirement. 13:31:19 I think I'm close. 13:31:51 I like the over-the-shoulder idea. Often people don't know how to teach what they do well, so just seeing them in action would be useful. 13:33:10 Sam Falvo's video is great, although it's a bit showy and just one specific utility he writes (which is pretty cool though). 13:33:50 Forth seems to have a lot of despisers somehow, probably because they don't get it. 13:34:14 The best way would be to show off and build very cool and practical things. 13:35:03 Not that it's a good idea, but for the modern people, what they would need is things like: Regexp parser, json parser, http client, package manager, etc. 13:35:21 I *might* end up writing those at some point (not sure if there's already good ones). 13:35:48 And obviously there's the issue of standards being somewhat contrary to Forth philosophy. 13:36:23 So that pretty much guarantees that Forth will never be a go to tool for high level popular programming language. 13:36:58 Look at the popular languages of the last decade or two: Golang, Rust. They all started with enormous loads of public or standard libraries and package managers. 13:37:40 And of course the intrinsic value of each respective language. But Forth has something very special. It just lacks the practicalities. Then again, not that it should be mainstream. 13:39:33 Even just screencap would be good 13:39:45 perhaps something of this nature would be welcome on twitch even 13:40:01 I wonder, live programming could be a good niche 13:40:12 Hmmm. 13:40:25 You know, that seems like the sort of thing one could build into a code editor. 13:40:29 A "recorder." 13:40:30 programming is one thing where it is difficult to 'see the experts in action' 13:41:02 I'm planning a "comment database" for my system - I tend to undercomment, because I don't like how inline comments ugly up my code. 13:41:16 So I'm going to have a way of putting the comments elsewhere, and linking them to the code. 13:41:20 lots of comments are superflous 13:41:33 Sort of like shadow screens, but more general. 13:41:40 A recorder would record all of that as well, I'd think. 13:41:57 At first that was all I envisioned - one level of links. Code -> comment. 13:42:12 I do like literate programming 13:42:21 But then I realized once a link mechanism existed, it could be used generally, so it will wind up being like a "documentation wiki," tied directly to the code itself. 13:42:27 perhaps write documents that link to code 13:42:29 right 13:42:41 And a big part of my work on the editor will be to support that functionality. 13:42:48 I already have a decent start on a basic code editor. 13:42:54 I'll start there and extend it. 13:43:05 I liked this about crc's forth that it had a nice way to deal with documentation mixed with code 13:43:11 s/had/has 13:43:15 It's the editor I wrote for my last system - no linking capability, but it's fairly nice for entering code. 13:43:45 I'm unfamiliar with his work, but it wouldn't suprise me if I'm on a similar path. 13:43:50 It really feels like a sensible one to me. 13:44:00 You're referring to retro? 13:44:53 yeah 13:45:20 retro very much lives on existing operating systems though, I'm not sure if that's what you're doing or not 13:47:23 --- quit: cbridge_ (Remote host closed the connection) 13:47:33 --- join: cbridge_ joined #forth 13:47:36 neuro_: If Forth was actually popular that would probably be bad 13:48:02 I mean, look at the most popular programming languages. Stuff like JavaScript, C#. Not even bad necessarily but just very boring in a way. 13:48:13 If your programming language is "just a tool" then go for it 13:48:31 I think javascript is bad necessarily 13:59:07 --- quit: mark4 (Ping timeout: 258 seconds) 14:01:46 --- join: mark4 joined #forth 14:17:04 crab: it should be noted that while retro as published lives on existing operating systems, that's not required. 14:17:43 I do have a version running on x86 without an underlying OS, as well as versions that use nothing but the OS kernel as a sort of BIOS. 14:18:44 (My primary working environment is the latter, using OpenBSD kernel and a static VM to run a set of programs written entirely in Retro) 14:24:38 veltas: I see what you mean. But I'd still prefer not to have javascript there because of coincidental historical/economic reasons. 14:24:59 I'd prefer Forth, or perhaps Lisp, and I'm fine with them being as bad. 14:26:34 The bad quality software is inevitable when there's such level of global popularity and public uncurated libraries that barely work and written by random people for fun with no tests and specifications no matter what language. 14:26:47 But on top of that you get a mess and unperforming language like JavaScript 14:27:58 Also there're many popular languages for different problem domains, and they're not necessarily all too bad. 14:28:34 Some of thoes languages are just corporate or joint corporate efforts that cater their needs and agenda. 14:30:38 --- quit: cbridge_ (Remote host closed the connection) 14:30:49 --- join: cbridge_ joined #forth 14:31:21 I think JavaScript was an accident. A Lisp would fit much better for the context, but of course a VM bytecode should have been done from the get go so that language choice wouldn't be limited to one, people just didn't think it would grow this big. 14:34:24 It's not just JavaScript, all software sucks somehow. Recently I got a Windows laptop for work, and on fresh boot it's running 5K threads, thousands of processes. 14:34:44 Some of those processes regularly consume fair amount of CPU for god knows what. 14:35:42 Microsoft Teams and several such apps written in Electron, enormously complex browser engines that run inefficient javascript applications choking the machine. 14:43:54 Teams is horrid 14:46:01 --- join: Glider_IRC_ joined #forth 14:49:20 --- quit: Glider_IRC (Ping timeout: 258 seconds) 14:52:57 --- quit: crab (Ping timeout: 272 seconds) 14:54:29 --- join: crab joined #forth 15:12:21 I hated teams 15:47:28 maw 15:50:26 maw dave 15:51:47 maw crc 16:16:38 --- quit: neuro_ (Ping timeout: 260 seconds) 16:24:31 maw 16:53:21 maw dave0 16:53:36 maw KipIngram 16:55:29 --- quit: Keshl (Quit: Konversation terminated!) 16:56:27 --- quit: crab (Ping timeout: 272 seconds) 17:41:01 --- quit: pareidolia (Ping timeout: 272 seconds) 17:46:12 --- join: pareidolia joined #forth 18:56:19 re maw 19:32:07 --- join: Keshl joined #forth 20:05:49 are there any other languages that allow you to start creting a function and half way through the function definition you switch into interpret mode, then back to compiel to complete the definition? 20:06:06 : foo ..... [ do this now ] ... ; ??? 20:33:22 It's not entirely unrelated to pre-processor directives. 20:33:36 The equivalent in most languages would be a "compile time computation," right? 20:34:59 Most languages don't offer the interactivity of Forth to begin with. 20:38:34 mark4: I think some LISP implementations support something like this 20:58:15 Probably not quite the same thing you are referring to with interpret mode. In some languages, local functions can be declared inside of other functions, and those functions could be templates, so that is like compile time interpretation. I'm not sure how the state compares with what you have in forth, so not exactly the same, but a little similar. 20:59:24 --- join: crab joined #forth 20:59:47 And you can't execute a shell command while you are evaluating a template, so depends on how much you want to consider inside of [...] for comparison. 21:05:11 metaocaml might be in the "relevant work" category too (and other staged languages) 21:09:44 --- quit: crab (Ping timeout: 250 seconds) 21:47:15 --- join: crab joined #forth 21:56:15 --- join: gravicappa joined #forth 22:03:57 yo 22:04:03 wassup forth friends 22:10:48 I think lisps do not because everything comes down to playing with their AST defined by parens... there could be some exit mechanism I don't recall but I'm not aware of a language outside of forth that let's you mess around between compilation & code interpretation/execution all at the same time. 22:11:21 (aiiiigghhh) meant to prefix that with crc :-) 22:11:58 spoofer I think you're describing meta-code which is yet another thing entirely. 22:12:06 proteus-guy: lisps do not what? 22:12:12 I might be missing context here 22:15:36 siraben - they don't do this: are there any other languages that allow you to start creting a function and half way through the function definition you switch into interpret mode, then back to compiel to complete the definition? 22:15:56 Ah, well you can do this with quasiquote 22:16:04 Do you know if there's some parse time exit in lisp/scheme that allows it? 22:16:08 What's that look like? 22:16:26 `(this is just syntax (+ 1 2) but this is 3 ,(+ 1 2)) 22:16:51 In guile this returns 22:16:51 (this is just syntax (+ 1 2) but this is 3 3) 22:17:07 quasiquote can be thought of as, "quote this expression except here where it's unquoted with ," 22:17:13 very useful 22:17:30 so an expression that leads with a comma gets reduced immediately in the current environment? 22:18:43 Correct. 22:18:53 nice 22:20:00 folks here might find this interesting 22:20:00 https://gitlab.com/giomasce/asmc/-/blob/master/G_LANGUAGE.md 22:20:06 "The G language is conceived to be logically as similar as possible to 22:20:07 a reasonable subset of C, while at the same time being easy to parse 22:20:07 and removed of features that are unessential to bootstrapping." 22:20:57 has some Forth-like elements 22:21:19 was gonna say - remove the variables and use forth! ;-) 22:22:09 this damn complement check is confusing me 22:22:25 proteus-guy: they did implement Forth but it's unused in the bootstrapping 22:22:26 complement check? 22:22:45 maybe someone here could prove them wrong :P, but they just went ahead and wrote a minimal C compiler in assembly 22:22:59 siraben - I've always said that "C" properly used is a platform independent assembly language. Seems they took that to heart with G. 22:23:02 wrt parse-time exit; in CL, reader macros or #. 22:23:38 yes, now that they have the bootstrap it makes sense they really want to get a sharp knife and cut out all the inessentials 22:23:54 the shorter the path the more robust this will last into the future, and hopefully not lost again 22:24:09 How do I add 30 one-byte values, take the two's complement, and expect to get a one-byte value 22:24:29 C as a "platform independent assembly language" is sort of true, depends of course how you write C 22:24:43 my 30 bytes add to 578h this just isnt gona work 22:24:48 I try to use ctype.h whenever possible instead of "int" or "char" 22:25:11 siraben - ALL the most successful C projects do this. Most all of the ones that fail don't. Same as all good forth programs are first writing DSLs then solving the problem in the DSL. 22:25:52 yeah, it's nice when a C program written decades ago compiles now with little to no modification 22:26:50 funnily I also have this experience with Lisp and ML code, functional languages change little over time 22:26:53 all my C++ from 1989 still builds and runs fine. 22:27:06 take any code snippet from the 1986 SICP lectures and they should run 22:27:08 lisp and ML haven't changed much 22:27:16 yep 22:27:42 C++ has evolved to something no one forsaw - but maintained all that backwards compatibility. Stroustrup did an amazing job. Unprecendented. 22:27:58 I do find the language extensions in Haskell a bit problematic (this is a common source of non-portability), they need to come up with a new standard to integrate them into the language 22:28:01 And it's probably got more running code than any other language as well. 22:28:28 Haskell is still primarily an academic language. Those are gonna break a lot. 22:30:18 I'm not sure, it's quite stable now, IME, GHC's base libraries have stabilized their APIs 22:30:41 (for better or for worse, there's some unification they could have done) 22:32:44 proteus-guy: lol, peak academic code moment for me was reading French comments in some Coq library 22:32:56 Stable in a programming language means over decades. Haskell is not even close. But - the changes they made over the last decade at least made it useful outside of academia. 22:34:57 what sense of stability are you talking about 22:35:02 But that's not Haskell's goal so it shouldn't be penalized for not being as stable as something like C/C++. If someone wants that then they'll have to setup a fork operating with some iso guidelines with those explicit goals. It's hard work to keep that going as you gain traction. Don't think there's a desire by the Haskell people to do that nor is there enough of a commercial user base to demand it - yet. Be interesting to see that change. Wonder 22:35:02 if it would be haskell as defined now or some variant with a different name. My guess is the latter. 22:36:20 Simon Peyton-Jones (one of the creators of Haskell) nicely put it that they want to "avoid success at all costs", since a smaller community means you can be more nimble 22:36:27 crab, if you're building a system that you don't mind throwing away/re-writing after 18 months, go ahead and use a proprietary language. But since 85% of a project's cost is post-development, it's critical that the language and its supporting tools (like core libraries and dependencies) remain stable over decades. Means the old stuff can still build and execute as-is. 22:36:49 siraben - yep - and that's a perfectly valid goal/target. 22:37:19 Forth has got SPJ/Haskell beat in that regard, however! ;-) 22:37:54 proteus-guy: #proglangdesign might be an interesting channel for you, it's on libera at least, lots of people discussing such topics from many different backgrounds 22:38:35 Ah you mean that programs in that language will be valid decades later, not that the language is decades old 22:38:54 I would have taken issue with the latter 22:39:16 crab, haha correct. 22:39:19 yeah, Haskell is older than Java hehe 22:39:27 was very confused 22:39:38 siraben - I will not go on libera. 22:39:57 crab: mathematical notation is amazing at transmitting ideas across technologies and decades 22:40:10 pick up a book from the early 20th century, all still readable 22:40:17 heck even Newton's college notebook is still readable 22:40:24 s/decades/centuries/ 22:41:18 so are many natural languages 22:41:25 but not all 22:47:34 --- quit: crab (Ping timeout: 240 seconds) 22:50:49 --- join: crab joined #forth 23:32:59 --- quit: dsmcfarl (Remote host closed the connection) 23:33:16 --- join: dsmcfarl joined #forth 23:59:59 --- log: ended forth/21.06.09