2023-06-23 10:43:03 Division by invariant integers using multiplication https://gmplib.org/~tege/divcnst-pldi94.pdf 2023-06-23 10:46:53 Looking back through my git logs, why am I so productive on Thursdays? 2023-06-23 10:48:01 Apparently this corroborates with research on the more and less productive days of the week 2023-06-23 11:01:09 That's in Hacker's Delight. 2023-06-23 11:01:20 I currently use it to do modulo 255 in my block buffer hash. 2023-06-23 11:01:48 You're looking forward to the weekend and feeling good about its imminence. 2023-06-23 11:01:59 Got hump day behind you. 2023-06-23 11:03:13 Thursday, I don't care about you 2023-06-23 15:07:22 veltas: multiply by reciprocal? 2023-06-23 16:10:02 does anyone here have a copy of: 'MOUSE, A Language for Microcomputers'? 2023-06-23 16:44:55 tried libgen? 2023-06-23 16:46:44 ah 2023-06-23 16:46:48 you might find this in archive.org 2023-06-23 16:47:05 i think they were importing byte magazine scans into the archive a while back 2023-06-23 16:47:44 i'm considering calling my forth implementation "metaforth" but is it a bit on the nose? 2023-06-23 16:48:45 unjust: its indeed in archive.org 2023-06-23 16:48:47 https://archive.org/details/BYTE_Vol_04-07_1979-07_Automating_Eclipses 2023-06-23 16:49:09 https://archive.org/details/byte-magazine-1979-07-rescan 2023-06-23 16:50:14 https://archive.org/details/byte-magazine-1980-06 has corrections 2023-06-23 16:51:01 the first url seems to be the good one? i'm having a bit of trouble figuring out which one is the washed out copy that looks worse 2023-06-23 16:51:22 ah, nevermind that, the first url is the latest scan 2023-06-23 17:11:55 drakonis: thanks for the byte article, but i'm looking for the book written by the same author 2023-06-23 17:14:18 the title makes it difficult to find a digital version 2023-06-23 17:15:08 agreed, and apparently the publisher folded soon after it was published (according to the author) 2023-06-23 17:15:29 plus its extremely obscure 2023-06-23 17:15:34 so its even harder to find anything 2023-06-23 17:18:02 it's an interesting language though, and given its similarity to forth i thought this channel might be worth asking in. (http://www.massmind.org/techref/language/mouse.htm and https://www.youtube.com/watch?v=EaunbXlDUWI sum it well enough though) 2023-06-23 17:24:54 fair enough 2023-06-23 18:34:47 You know, I don't understand why people get all bent out of shape over someone posting a meme picture in the Dresden Reddit. We do expect posts to be "topical," but in the Meme category I think a fairly loose net is appropriate. My reasoning is usually that if someone thought it was Dresden related, someone else might too. 2023-06-23 18:34:57 Some folks are just so uptight over it all. 2023-06-23 18:40:28 gordonjcp: What veltas was talking about was avoiding the division instruction. If you don't know what number you're going to need to divide by, you can't. But if you have a particular case, where you know in advance what you'll need to divide by, then there's a trick you can play to get the right answer via multiplication. 2023-06-23 18:40:39 And no, it's not reciprocal - we're talking about integers here. 2023-06-23 18:40:50 Integers modulo 2^N, where N is your word size. 2023-06-23 18:41:57 The case I used it in was needing to know mod 255 of a block number - that's how I choose which disk buffer to house it in. 2023-06-23 18:42:14 For various reasons I only had 255 buffers, not 256. 2023-06-23 18:42:40 I figured out the number I'd need to multiply by and did that with a series of shifts and adds. 2023-06-23 18:51:05 so 127 - 7 >> ? 2023-06-23 18:57:12 The number I needed to multiply by was 0x1010101. 2023-06-23 18:58:08 And after multiplying there were a few other cheap steps. 2023-06-23 18:58:54 Actually I see that I didn't do shifts and adds - I did use imul. 2023-06-23 19:02:41 gordonjcp: This is all rooted somehow in the math of finite fields.