2024-05-31 04:15:04 some Einstein chap had something going on about relativity. 2024-05-31 08:31:40 KipIngram, cool, is that similar to solomon-reed algorithm? 2024-05-31 09:27:41 Al2O3: -3 2/ . 2024-05-31 09:31:50 I think old gforth at the very least has some weird stuff going on to achieve the same rounding towards negative infinity 2024-05-31 09:32:23 C99+ and x86 IDIV round towards zero so they're not doing the obvious implementation 2024-05-31 09:32:47 For their / 2024-05-31 09:33:01 New gforth might use IDIV, don't know. 2024-05-31 09:38:53 The standard refers to these as floored and symmetric division I think 2024-05-31 09:39:06 It's not specified in standard which / is, the same was true of C90 2024-05-31 09:39:37 But this is IMHO archaic, I doubt anyone wants it to do something other than what most CPUs are doing, assuming we want simple implementations 2024-05-31 09:40:19 But the point is that 2/ is always 'floored', which usually doesn't match your IDIV 2024-05-31 09:40:31 So 2/ is not the same as 2 / on most native forths 2024-05-31 09:42:49 You can get a specific one with FM/MOD and SM/REM 2024-05-31 09:43:31 SM/REM is exactly IDIV 2024-05-31 09:57:43 veltas: i'd expect 2/ to be the arithmetic shift right instruction (SAR on x86) 2024-05-31 09:59:11 i read somewhere that knuth advocated floored division 2024-05-31 10:01:14 https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf 2024-05-31 10:01:50 That's right, arithmetic shift right / signed shift right as I call it 2024-05-31 10:02:26 It's best to think of it as an arithmetic shift 2024-05-31 10:04:46 Knuth is an oddball generally, that's his opinion 2024-05-31 10:04:58 :-p 2024-05-31 10:05:00 Very smart guy though 2024-05-31 10:05:41 And a brother in Christ 2024-05-31 10:07:16 Eh 2024-05-31 11:13:28 i didn't know the RECURSE word in Forth, according to GPT without RECURSE Forth won't be Turing complete -- do you agree? 2024-05-31 11:13:37 Lol no 2024-05-31 11:14:00 It's not turing complete anyway for same reason C isn't, but if we pretend we have infinite addresses it is 2024-05-31 11:14:23 GPT is totally wrong about their reasoning 2024-05-31 11:14:47 C isn't Turing complete? 2024-05-31 11:14:58 Technically not because the model implies limited memory 2024-05-31 11:15:11 but with limited memory every lang is not TC! 2024-05-31 11:15:14 No real computer is 'turing complete' because it implies infinite memory 2024-05-31 11:15:23 Or unbounded memory 2024-05-31 11:15:39 But that's got nothing to do with RECURSE 2024-05-31 11:15:40 well, but if we wipe out that condition? 2024-05-31 11:15:49 Of course it's turing complete 2024-05-31 11:16:12 If lambda calc is t complete most normal prog langs are too ^^ 2024-05-31 11:16:26 even game of life is TC 2024-05-31 11:16:34 Hard to imagine anything simpler 2024-05-31 11:16:36 Right 2024-05-31 11:16:48 Because game of life doesn't have anything like a fixed size of allowed indices 2024-05-31 11:16:51 C does 2024-05-31 11:16:56 Because it's honest about the hardware 2024-05-31 11:17:04 And so does Forth 2024-05-31 11:17:21 veltas, i see your point, thanks 2024-05-31 11:20:58 https://en.wikipedia.org/wiki/Total_functional_programming 2024-05-31 11:21:12 "These restrictions mean that total functional programming is not Turing-complete." 2024-05-31 11:22:22 Again nothing to do with RECURSE 2024-05-31 11:23:56 Turing completeness isn't necessarily something you want, it's just aproperty of certain systems 2024-05-31 11:25:51 It's an abstract idea 2024-05-31 11:26:13 Concrete languages like Forth and C fail because they're more honest about the real hardware that runs it 2024-05-31 11:26:29 And it's not a useful or important idea in this sense, to distinguish programming languages 2024-05-31 11:27:14 It's a mathematical tool 2024-05-31 11:28:50 yeah, i see 2024-05-31 11:28:57 What it does for one thing is encapsulates abstract arbitrary problem-solving machines. And some problems can be shown are undecidable even with these abstract machines. 2024-05-31 11:29:08 We don't presume that any individual 'physical' computer can actually solve *any* decidable problem, or do so in reasonable time 2024-05-31 11:29:30 Or rather I mean can solve 'all' decidable problems 2024-05-31 11:29:39 Obviously they can solve some decidable problems :) 2024-05-31 11:33:33 The interesting thing about these abstract machines initially was that they are equivalent, that is that you can create a simulator for each in the other; turing machines, lambda calculus etc. 2024-05-31 11:33:46 And that we can show even with these powerful abstract machines there are unsolvable problems 2024-05-31 11:34:08 And proving this turned out to be much easier than anyone thought 2024-05-31 12:46:53 rendar: if you didn't have recurse, you can get around it in a few ways. probably most straightforward would be like variable (foo) : foo ." hello" cr (foo) @ execute ; ' foo (foo) ! 2024-05-31 12:47:49 True 2024-05-31 12:48:05 Also defer 2024-05-31 12:48:19 Also recursion isn't even necessary for turing completeness 2024-05-31 12:48:28 I don't know why GPT made that link 2024-05-31 12:48:34 zelgomer, yeah 2024-05-31 12:48:37 Well I do know why 2024-05-31 12:48:38 Because GPT doesn't understand anything :P 2024-05-31 12:48:42 because it's a dumb parrot yeah 2024-05-31 12:48:51 my Forth version is always inlined, it hasn't a call stack, so i don't know if i can implement RECURSE 2024-05-31 12:48:55 It knows much and yet understands none 2024-05-31 12:49:56 I've had to say this more than I'd like but inline-only forth gives terrible performance 2024-05-31 12:50:21 If you don't want a call stack then use link variables at least 2024-05-31 12:50:38 link variables? 2024-05-31 12:51:02 https://devblogs.microsoft.com/oldnewthing/20240401-00/?p=109599 2024-05-31 12:51:12 Like a link register 2024-05-31 12:51:25 But one is needed per function 2024-05-31 12:51:31 i see, but my Forth won't produce any asm coe 2024-05-31 12:51:33 code* 2024-05-31 12:51:34 This allows call/return without inlining and without a stack 2024-05-31 12:51:41 It has nothing to do with asm 2024-05-31 12:51:41 it will produces opcodes for my specialized VM 2024-05-31 12:51:48 You can do this in a VM 2024-05-31 12:52:02 ok 2024-05-31 12:54:05 Or does this use an implicit stack in your VM? 2024-05-31 12:54:09 implicit return stack 2024-05-31 12:54:22 I mean do you have call/return opcodes in your VM? 2024-05-31 12:54:35 The Forth version in the Jupiter Ace allowed recursion without the recurse word, I am guessing the currently (being) defined word wasn't marked as hidden. 2024-05-31 12:55:04 There was some horrible hacky way people used to do it before RECURSE 2024-05-31 12:55:20 The current def wasn't usually visible because it was useful to extend previous defs 2024-05-31 12:55:33 And also because on error you don't want a broken def visible 2024-05-31 12:55:51 The word 'smudge' comes to mind 2024-05-31 12:57:00 I think some forths probably put smudge in : 2024-05-31 12:59:42 «Also, : will HIDE the new word, and ; will REVEAL it (by setting and clearing the "smudge" bit in the name)» https://www.bradrodriguez.com/papers/moving6.htm 2024-05-31 13:00:11 "Why smudge?" https://groups.google.com/g/comp.lang.forth/c/olO-VHXJa1Q 2024-05-31 13:01:38 Also, this came up in the search for smudge https://www.jimbrooks.org/archive/programming/forth/FIG-FORTH_internals.php 2024-05-31 13:40:45 rendar: We used to use Reed-Solomon, but we use a different one these days. It is similar, yes. I can't quite recall the name currently. 2024-05-31 13:43:01 I was quite impressed when I learned how many bit errors there could be in a block such that we could still correct all of them on the fly as the data fows through that FPGA. 2024-05-31 13:43:50 Our entire data path is all hardware. Software engages for some pathological situations, but most of the time it's all hardware. 2024-05-31 13:46:06 That was an obsession of the guy that owned the company that this office used to be before getting acquired. 2024-05-31 13:46:32 He wanted the software doing as little as possible. 2024-05-31 13:47:50 I can understand that, software is terrible :P 2024-05-31 15:41:28 KipIngram, interesting... why did your company change from Reed-Solomon? 2024-05-31 16:00:50 WHere can I read some of Chuck Moore's Forth code? 2024-05-31 16:01:30 It's in the bible 2024-05-31 16:10:20 written on the subway walls 2024-05-31 16:10:24 and tenement halls 2024-05-31 16:13:58 And public toilets 2024-05-31 16:14:08 I found this link, though I can't read it myself, due to blocking cloudflare: 2024-05-31 16:14:11 https://retrocomputingforum.com/t/first-forth-sources-12-pages-1968-for-ibm-1130/1243 2024-05-31 16:15:53 this page also gives some links to Moore's publications: 2024-05-31 16:16:00 https://www.forth.com/resources/forth-programming-language/#refs 2024-05-31 16:18:56 there's https://github.com/ForthHub/cmFORTH 2024-05-31 16:24:33 Damn Chuck wrote some... not easy to understand forth 2024-05-31 16:25:02 it probably made sense for him at the time 2024-05-31 16:44:50 cmforth kills me. he wrote words like "trim clip prune" just so that he could string those together and think it "reads like english," but those names tell you absolutely nothing about what they do 2024-05-31 16:45:33 the "well written forth reads like a natural language" is a fallacy imo 2024-05-31 17:03:54 zelgomer: thanks, that's my gist too 2024-05-31 17:04:16 he may be the father of forth but the way some of this is written is just kinda odd 2024-05-31 17:04:23 mustve been a big solo programmer i guess 2024-05-31 17:04:31 What does this mean? the { ... } ? { : ADDRESS ( n - a) } 30 + 8 TIMES 2* ; 2024-05-31 17:04:36 What is it doing I mean 2024-05-31 17:05:36 lf94: I think that's switching between host and target systems 2024-05-31 17:19:57 Helps to read the shadow blocks e.g. the documentation https://github.com/ForthHub/cmFORTH/blob/master/cmforth.txt 2024-05-31 17:20:04 i.e.* 2024-05-31 17:21:26 This is easier to read https://github.com/ForthHub/cmFORTH/blob/combined/cmforth.fth 2024-05-31 17:27:54 the { } is actually a really cool development. i've expanded on it in my forth. every vocabulary has two threads, and word search follows a variable called context. when context is 0, then only the host thread of each vocab on the vocab stack is searched. when context is nonzero, then for each vocab, it searches the target thread first, and if it isn't found then it searches the host thread. 2024-05-31 17:28:43 and then my { and } just toggle context between 0 and -1 2024-05-31 17:31:10 so i have a lot of code to set up a target image space abd then words that look like { : create } ... { ; } ( similar to the cmforth example above), and then eventually it gets into application code for the target where contexr is already -1 before the file is loaded, so now i use { } to escape target compilation and use the host env, like for defining macros and such 2024-05-31 17:32:40 i think my { } is more complicated than the cmforth version, but i think it has to be, because he was meta compiling for the same machine, where i'm actually cross compiling 2024-05-31 17:32:51 Makes sense 2024-05-31 17:37:11 i really saw the beauty of it when i started putting it in my assemblers. to be able to write : foo, 1234 { , } ; and that does the right thing if you want it to cross-assemble (where there's a , on the target vocab) or assemble for the native host (in that case there's no , in the target vocab and it falls through to the host's ,), it's just so nice 2024-05-31 17:41:16 Is this forth available for free download? 2024-05-31 17:48:33 not right now. i want to put together a nice small example of what i'm doing and share it, but i haven't decided on a good way to go about that yet. 2024-05-31 17:49:20 I just let it all hang out 2024-05-31 17:49:46 where, though? 2024-05-31 17:50:21 the sharing it is the part i haven't figured out 2024-05-31 17:50:36 GitHub 2024-05-31 17:50:55 my grand scheme is that i'm not developing a forth you download and use to compile your projects, but more of a design pattern for building your own forth project from scratch 2024-05-31 17:51:04 Or on your website or a million github clones 2024-05-31 17:51:15 The source is the first thing I'm interested in 2024-05-31 17:51:23 So if you can't download the result I won't care 2024-05-31 17:51:40 But I'm sure lots of people get annoyed by source-only online repos 2024-05-31 17:51:59 But if you need the same forth to build it providing an image makes sense 2024-05-31 17:52:21 There are a few chicken and egg problems there I think 2024-05-31 17:53:28 the chicken (or the egg?) is a small forth vm for your build environment implemented in less than 1000 loc 2024-05-31 17:53:37 of c 2024-05-31 17:55:05 I would expect to receive the payload image and the C source in a downloadable distribution 2024-05-31 17:55:13 And maybe the blocks converted to text as well 2024-05-31 17:56:55 Sometimes it's fun trying to decipher peoples' 'mess' 2024-05-31 17:57:27 it's all text files, the build vm is designed to run on an os with a filesysyem 2024-05-31 17:59:23 anyway, fuck github. that's not what i want to do. i don't have my own website, but maybe that should change. 2024-05-31 18:00:30 Squeak Smalltalk has its VM written in Smalltalk but it can generate a C version in order to bootstrap 2024-05-31 18:00:49 lol i had considered that too 2024-05-31 18:01:02 I rent a cheap digital ocean droplet for the website now 2024-05-31 18:01:20 Was on oracle but didn't like the threat of being kicked off randomly and would rather pay for a little support 2024-05-31 18:01:20 eventually it occurred to me that self hosting is an albatross 2024-05-31 18:01:42 at least it isn't relevant to my goals right now 2024-05-31 18:02:02 I have spent basically no time on my website veltas.co.uk 2024-05-31 18:02:19 so i'm making no effort whstsoever to self host or automatically regenerate bootstrapping source 2024-05-31 18:02:23 So if you want tips on spending no time on your website you can ask me 2024-05-31 18:02:49 I've started about 30 articles for it and finished one very short one 2024-05-31 18:03:17 I was in process of writing up about the s-expressions thing I wrote the other day but that will probably die before I publish it because I got into some exception weeds 2024-05-31 18:05:06 veltas: part of my problem is that this is an identity i've made some effort to keep anonymous, so i have to decide: am i going to give up some notion of anonimity, or am i going to try to keep it, or am i going to release what i've done with a non-anonymous online presence (which would pretty much blow this id since i've talked about it) 2024-05-31 18:05:47 zelgomer actually started as my nick on i2p irc 2024-05-31 18:06:06 There are anonymous file sharing sites but you might not be able to rely on them long term 2024-05-31 18:06:27 Upload anonymous on file sharing sites and crypto-sign it 2024-05-31 18:06:57 And then I can upload to my site 2024-05-31 18:07:22 You can probably rely better on file sharing sites than me though 2024-05-31 18:07:29 i feel like you're missing the point 2024-05-31 18:07:49 i don't just want to upload code. i want to write about it. 2024-05-31 18:08:08 Blog in the blockchain! :P 2024-05-31 18:08:40 I don't see what writing has got to do with this 2024-05-31 18:08:56 Has writing got something to do with your anonymity 2024-05-31 18:11:54 i think it's that i'm not interested in just dumping my work onto some free hosting service. i think it means i need my own website. 2024-05-31 18:11:58 I love doing embedded work, I feel like we're the only people who actually 'get' the computer 2024-05-31 18:13:46 Maybe a tor website or something 2024-05-31 18:14:29 I think for anonymous distribution then signing+hashing and relying on mass distribution is the way to go 2024-05-31 18:15:07 Apparently there are anonymous blogging sites https://techwiser.com/5-best-anonymous-blogging-platforms-that-are-free-and-secure/ 2024-05-31 18:15:24 yeah could be good 2024-05-31 18:15:33 Being on 'the web' usually means giving up your anonymity, but being on someone else's website..... 2024-05-31 18:16:21 Microsoft took my pseudoanonymity one day when they replaced my name with my email on all my comments on the MSDN blog site 2024-05-31 18:16:39 But I've never assumed I'm not ultimately responsible for my presence online 2024-05-31 18:16:55 And I'm not interesting enough to fuck with IRL 2024-05-31 18:19:04 Still annoyed me though, lots of big tech companies have zero regard for people's privacy 2024-05-31 18:19:25 I try not to think about it 2024-05-31 18:23:48 I keep thinking about making a little computer 2024-05-31 18:24:09 How little? 2024-05-31 18:24:28 too small is too easy to misplace 2024-05-31 18:26:15 https://shop.m5stack.com/products/m5stack-cardputer-kit-w-m5stamps3 2024-05-31 18:26:40 Well I just mean a small box 2024-05-31 18:26:53 With USB or whatever for keyboard/mouse, some sort of display adapter 2024-05-31 18:27:17 Like a raspberry pi 400 or something 2024-05-31 18:27:34 Maybe not with their specs 2024-05-31 18:27:52 With a Forth OS, RISC-V or something neat like that 2024-05-31 18:27:59 Totally outside of my skillset though 2024-05-31 18:29:59 I'm not crazy, the font on this page is too big right? https://milkv.io/mars 2024-05-31 18:31:29 It's larger than average maybe, it looks OK 2024-05-31 18:31:40 I had to zoom to 50% for it to look normal 2024-05-31 18:31:50 Everything's getting bigger 2024-05-31 18:38:09 not everything :( 2024-05-31 18:51:09 some of the other pi brands are pretty good 2024-05-31 18:51:51 one of mine was $42 with 2gb ram and I put a tiny SATA SSD in it. definitely better than r pi 2024-05-31 18:51:59 5 is a terrible approximation for pi 2024-05-31 20:09:56 I saw a Mathologer video last night about 4 as a value for pi. I regarded the "justification" as mathematically faulty, though. They started with a square containing the circle, and then "stair-stepped the corners infinitely many times. After a while you can't tell it from a circle anymore, but the problem I saw was that it still had horizontal and vertical pieces rather than pieces that became parallel 2024-05-31 20:09:59 to the circle. 2024-05-31 20:10:22 That felt... fraudulent to me. 2024-05-31 20:20:12 https://indianacapitalchronicle.com/2023/03/13/pi-from-the-sky/ 2024-05-31 20:26:26 four simultaneous days! You have been educated stupid! 2024-05-31 20:27:09 they're equating taxicab distance with distance across a continuous plane, because it visually converges but never actually converges 2024-05-31 21:20:04 pi is just tau halves 2024-05-31 21:29:49 tau is overrated 2024-05-31 21:46:57 Right - that's exactly what they're doing, and I felt that the "precise" way to call it out was to observe that the normals to the approximating surface never converge with the normals to the real surface. 2024-05-31 21:47:16 Whereas they do when you do it properly, like Archimedes did. 2024-05-31 22:07:20 rendar: The new method offers superior error correction. 2024-05-31 22:07:40 It's BCH now. 2024-05-31 22:07:50 oh! 2024-05-31 22:07:57 https://en.wikipedia.org/wiki/BCH_code 2024-05-31 22:07:59 i see 2024-05-31 22:08:06 thanks KipIngram! 2024-05-31 22:11:09 Every time we read a code block, we get a current error count on it. We monitor that (during normal host reads and also with a "sweeper" that works through the entire drive every couple of weeks). If it rises above a threshold we set, we pre-emptively re-write the corrected page to a new location, resetting the error count to zero. 2024-05-31 22:11:42 That's why you can't turn these systems off and leave them just stitting there for a long time - if too many errors accumulate in a page we can no longer correct them all. 2024-05-31 22:13:02 They keep trying to push more and more bits per cell into these flash chips - we're currently at four, which requires slicing the full cell voltage range into 16 sub-ranges. That lowers noise margin and makes the overall thing "less reliable." But we still have to deliver enterprise grade data integrity. 2024-05-31 22:13:10 I joke that we make armor out of toilet paper. 2024-05-31 22:15:29 with enough toilet paper... 2024-05-31 22:15:31 https://www.ancient-origins.net/weird-facts/paper-armor-0018034 2024-05-31 22:35:18 zelgomer: so, how "good" any solution is for sharing is a very context-dependent question 2024-05-31 22:35:49 oops, I was backscrolled a little bit 2024-05-31 22:36:03 still don't see this covered but maybe I missed something 2024-05-31 22:36:34 anyway, a very bare-bones way to share a git repository is to put it in a web-accessible folder somewhere 2024-05-31 22:36:38 https://idiomdrottning.org/hosting-git-repos 2024-05-31 22:37:18 this can be done in a very low-context way, consistent with maintaining pseudonymity 2024-05-31 22:38:22 if it's FOSS, you can also use https://repo.or.cz/ 2024-05-31 22:38:42 git commits can leak timezone and maybe other metas 2024-05-31 22:38:49 yup 2024-05-31 22:41:00 but then you can leak timezone information by participating in IRC ;-) 2024-05-31 22:41:27 more to the point, one might look into taking care with GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE, GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_COMMITTER_DATE 2024-05-31 22:45:47 In the context of starting with small Forths, I've most recently looked for Forth mentions in #reproducible-builds (oftc) but I don't remember looking for talk about reproducible builds here in #forth 2024-05-31 22:45:55 derp, ##forth 2024-05-31 22:46:07 cf, https://github.com/oriansj/stage0/blob/master/stage2/forth.s 2024-05-31 23:48:39 If I were trying to be anonymous I'd try to have my time zone set wrong anyway.