2024-06-05 00:13:13 lf94: does a Canada have a law about selling assembled kits? 2024-06-05 00:13:26 it's not allowed in the US 2024-06-05 00:18:59 There's a BoM for it so might not be a kit 2024-06-05 00:20:46 Is that really a rule? Couldn't find info about it 2024-06-05 00:34:24 MrMobius: yeah what? didn't know that 2024-06-05 00:34:29 MrMobius: could you reference for me? 2024-06-05 00:34:48 but yeah BoM is on the author's website 2024-06-05 00:39:10 ya FCC rule in the US 2024-06-05 00:39:56 they recognize hobby electronics is important to support so kits are ok as I understand it and I think you can build up to 5 prototypes of your own device 2024-06-05 00:40:32 whether they enforce it is different. there was a case where a guy was assembling radio kits and selling the result who got fined 2024-06-05 00:44:08 Ah. I would just sell these 4 and never make more 2024-06-05 00:44:19 Really pocket change 2024-06-05 00:44:31 I think you're right about the law 2024-06-05 00:44:36 and it seems the same in Canada 2024-06-05 00:56:32 Looking it up, the issue is that an assembled kit is essentially a device and needs FCC certification 2024-06-05 00:57:01 There's an exception for FCC certification of kits, so hobbyists can sell things as kits to get around cert 2024-06-05 00:57:10 If you assemble it the exception doesn't apply 2024-06-05 01:20:04 right 2024-06-05 01:39:19 > If this is the sale of second-hand goods in a private not for business way then you would generally not be liable. 2024-06-05 01:39:32 Are assembled DIY kits considered second-hand at that point? :P 2024-06-05 01:39:57 Also yeah I'm really really not doing it as a business 2024-06-05 01:40:12 Will play 2048 on them all 2024-06-05 02:09:25 MrMobius> whether they enforce it is different. there was a case where a guy was assembling radio kits and selling the result who got fined 2024-06-05 02:09:43 i would guess because they could transmit 2024-06-05 02:10:31 maybe i missed part of the conversation, i didn't see where lf94 was talking about building anything that transmits radio 2024-06-05 02:50:52 zelgomer: they classify electronics into intentional transmitters and non-intentional transmitters. there is no non-transmitter group in electronics. lf94's devices transmit radio whether you want them too or not 2024-06-05 02:52:45 :P 2024-06-05 03:05:30 by that logic, everything is a transmitter. an extension cord is an unintentional transmitter. 2024-06-05 03:06:46 anyway, you're probably right, i don't know. screw the fcc and the us federal government criminal org. 2024-06-05 06:12:15 Anyone ever tried to do a chess engine in Forth? 2024-06-05 12:12:11 KipIngram: I seem to recall there is one floating around somewhere, I think it was from the 90s 2024-06-05 14:03:29 KipIngram: I have links to two: 2024-06-05 14:03:34 https://holonforth.com/chess.html 2024-06-05 14:03:34 https://www.quirkster.com/iano/forth/FCP.html 2024-06-05 15:16:37 lf94: 2048 sure is a nice game with variations of all power of 2 from 8 to 32768: https://poweroftwo.nemoidstudio.com/ 2024-06-05 15:36:41 I saw a funny version of 2048 where the tiles were pictures of your management chain 2024-06-05 16:09:17 yea 2024-06-05 16:09:27 Playing chess on the My4th could be cool too 2024-06-05 17:49:28 Is there a way to hide stuff in Forth for opaque pointers or abstract data types? 2024-06-05 18:49:02 deadmarshal_: i hide things by creating a vocabulary (i usually name it "private") and then unlinking it from the word list later 2024-06-05 18:54:28 zelgomer: got it thanks 2024-06-05 19:25:01 Re: transmitters, in theory anytime a charge changes velocity (at all) some form of EM wave is emitted. 2024-06-05 19:25:36 https://en.wikipedia.org/wiki/Tempest_%28codename%29 2024-06-05 19:25:39 As MrMobius noted, it may or may not be deliberate, and may or may not be significant. 2024-06-05 19:31:17 again, ianal and especially not with regard to FCC rules, but i would imagine surely there is a minimum power threshold for these sort of rules 2024-06-05 21:03:19 lf94: Now chess I do wonder if it can do! 2024-06-05 21:03:39 That seems like something it might not have the performance for 2024-06-05 21:04:31 https://leanchess.github.io/ 2024-06-05 21:07:51 hi, maybe a bit off topic, but does somebody know: on x86 computers, how is software-driven poweroff initiated? Is it some special interrupt or CPU instruction? 2024-06-05 21:08:54 https://wiki.osdev.org/Shutdown 2024-06-05 21:08:55 I mean, after the part where the OS cleans up its processes and such. How does OS send signal to make board/PS poweroff 2024-06-05 21:11:26 okay, thanks 2024-06-05 21:12:32 looks like, for ACPI, the command is simple but figuring out the addresses is quite the job 2024-06-05 21:13:29 You could try asking in #osdev 2024-06-05 21:14:40 okay, thanks. they'd probably ban me from the channel after finding out how little I already know 2024-06-05 21:15:41 was working on the project where I've got an x86 OS without a proper poweroff command, wondering if I could just generate an interrupt or something 2024-06-05 21:16:26 looks like it isn't nearly that simple, though 2024-06-05 22:04:41 lispmacs[work]: ACPI 2024-06-05 22:05:11 yeah, but you have to know the right addresses to make the right call 2024-06-05 22:06:49 I thought by chess we meant chess-playing AI, not just 2 player chess 2024-06-05 22:07:07 Of course that works on small computers 2024-06-05 22:21:49 lispmacs[work]: This looks good https://forum.osdev.org/viewtopic.php?t=16990 2024-06-05 22:23:12 https://uefi.org/specifications 2024-06-05 22:26:36 Hello, everyone! Anyone here? I've got a few questions. 2024-06-05 22:54:57 There are several of us here most of the time. 2024-06-05 22:55:28 I'm about to run a quick errand, but I'll be back shortly. Others may answer too, so go ahead. 2024-06-05 22:55:32 Brb... 2024-06-05 22:58:17 I am trying to develop a simple bit-flipping game, which takes two 3x3 binary matrices and tries to reach one from the other by flipping a row or a column. But, how do I exactly have a multi-dimensional matrix in Forth? 2024-06-05 22:58:47 I tried to use arrange arrays into a grid-like setting, but with it I can either flip the row or the column, but not both. 2024-06-05 22:59:08 So 9 bits? 2024-06-05 22:59:20 You can put that in one cell 2024-06-05 23:00:00 If I put them in one cell, how can I access them both as a row and a cell? Apologies, I'm quite a beginner. 2024-06-05 23:01:36 : ROW ( cell n -- row ) 3 * RSHIFT 7 AND ; 2024-06-05 23:03:00 What does RSHIFT do? 2024-06-05 23:03:41 Shifts a cell right by a given number of bits 2024-06-05 23:03:59 https://forth-standard.org/standard/core/RSHIFT 2024-06-05 23:07:18 When you saw flip, you mean toggle all the bits? 2024-06-05 23:07:30 Easiest way to do that is xor by the mask of the row/column 2024-06-05 23:08:00 Yeah, I was intending to use `invert` 2024-06-05 23:08:18 So xor by octal 7, 70, 700 2024-06-05 23:08:20 To flip a row 2024-06-05 23:08:30 And 111 222 444 to flip a column 2024-06-05 23:09:26 I am not sure if I follow you, sorry. 2024-06-05 23:10:21 Do you understand bitwise operations? 2024-06-05 23:12:24 I do, how to use say `5 3 AND .` which would give 1 but why do you mention the particular 111 222 and 444? 2024-06-05 23:12:40 Do you know octal? 2024-06-05 23:13:03 I am mostly familiar with binary and decimal. 2024-06-05 23:13:23 octal is convenient for binary work, especially in groups of 3 like here 2024-06-05 23:13:41 divya: Basically, such things don't get done "for you" in Forth. You have to construct them out of basic operations like veltas is telling you about. 2024-06-05 23:13:54 You can DO anything in Forth, but you get few pre-constructed things. 2024-06-05 23:14:09 divya: e.g. the numbers 0001 0010 0100 1000 in binary are 01 02 04 10 in octal 2024-06-05 23:14:25 Octal is base-8, so digits go from 0 to 7 2024-06-05 23:14:38 Each digit in octal corresponds to 3 bits 2024-06-05 23:14:49 The xor mask veltas suggested is how I'd do it. 2024-06-05 23:15:02 There are many ways to understand XOR operation, one way is it lets you choose which bits to toggle 2024-06-05 23:15:32 So if the first row is binary 111 (7 in octal), if we XOR by 7 then we flip only those first 3 bits 2024-06-05 23:16:18 Second row is binary 111000 (70 in octal), XOR by octal 70 then we flip the second lot of 3 bits 2024-06-05 23:16:48 A column might be 100100100 (444 in octal), XOR by that and you flip that column 2024-06-05 23:16:49 etc 2024-06-05 23:17:22 How would the second row have 6 bits? 2024-06-05 23:17:40 I've just thrown away the most-siginificant zeros 2024-06-05 23:17:53 So the rows are: 000000111, 000111000, 111000000 2024-06-05 23:18:03 But I just wrote 111 for first because I didn't feel like writing all those zeros 2024-06-05 23:18:08 KipIngram: I understand, that's one of the things I'm liking about Forth how you can go from low-level constructions and build upwards. But bear with me, as I'm not used to it but trying to improve slowly. 2024-06-05 23:18:36 veltas: But, the rows should have just 3 bits. I don't understand the other zeroes. 2024-06-05 23:19:01 Those numbers select which bits represent the bits of our row 2024-06-05 23:19:19 So 000000111 selects the lowest 3 bits for a row 2024-06-05 23:19:40 I say 'select' because that's how XOR works, it literally 'selects' with 1-bits which bits will be flipped 2024-06-05 23:19:44 Ahhh 2024-06-05 23:19:59 so 000000111 selects the last (3rd row)? 2024-06-05 23:20:02 This is what we call in bitwise arithmetic a 'mask' 2024-06-05 23:20:43 Well it's up to you, I personally would make 000000111 the 'first' row because the amount you 'shift' to get the value is zero 2024-06-05 23:21:12 But it's totally down to you, that inclincation of mine only comes from being quite used to bits, if you prefer to make it the third you can do that 2024-06-05 23:24:28 Okay. So I first put the 9 bits in one cell and then access them using the octal manner as you said and then do XOR on them. Hmm, I am not sure how to write it down, but I think I understand conceptually what needs to be done. 2024-06-05 23:25:49 Just hack it out and make a mess and tidy it up later 2024-06-05 23:26:25 And share it in here, and I'm sure people will help show how to improve it 2024-06-05 23:28:21 You can do it in octal or binary if you want, just set BASE to 8 or 2 2024-06-05 23:29:12 But where is the BASE set in forth? Is it a constant or something? 2024-06-05 23:29:50 It's an address of a cell 2024-06-05 23:30:00 So you can set it like this: 8 BASE ! 2024-06-05 23:30:42 And get the value like this: BASE @ 2024-06-05 23:30:47 Don't bother printing it though, my forth's broken, it always says it's 10 2024-06-05 23:30:54 Your forth is probably broken too 2024-06-05 23:31:21 Well, I'm on gForth, is that also the same? 2024-06-05 23:31:34 Dunno try it 2024-06-05 23:32:04 I'm being a bit mean really, BASE will always print 10 because you're printing the base in its own base! 2024-06-05 23:32:34 There's nothing wrong with it :P 2024-06-05 23:33:04 e.g. 2 is 10 in binary, 8 is 10 in octal, etc 2024-06-05 23:34:07 ahh, that makes sense. So I put my binary matrix as a series of 9 bits like 101110011 and then try to access the rows and columns using the octal method you proposed? 2024-06-05 23:36:06 Well you don't need to use octal 2024-06-05 23:36:17 octal was just how I presented the bits 2024-06-05 23:38:00 To go back to decimal you can use DECIMAL by the way 2024-06-05 23:38:38 Right, that part can be either octal or binary. But I am still confused as to how you can get the rows and columns. Maybe I'm just not getting it. 2024-06-05 23:39:10 Lots of ways 2024-06-05 23:42:15 You have any reference, or resource where I can try to learn this better? 2024-06-05 23:56:14 kind of tangential, but I really enjoyed studying boolean algebra. I got a lot of practice that way.