00:00:00 --- log: started forth/19.10.04 00:16:27 --- join: mtsd (~mtsd@77.110.61.100) joined #forth 00:22:31 --- join: xek (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 00:25:38 --- quit: WickedShell (Remote host closed the connection) 00:50:09 c[] 01:16:40 morning rdrop-ex1t 01:16:55 Hi WilhelmVonW! 01:19:59 What's up in Forth-land? 01:20:07 Not sure personally 01:20:14 have been writing a lot of JS for work 01:20:36 very mentally tiring 01:20:43 I bet 01:21:36 I started messing with LaTeX 01:21:58 --- join: xek_ (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 01:22:54 oh yeah? 01:23:07 latex has a lot of depth to it 01:24:34 Starting on a manual for a rewrite/redesign of a Forth of mine 01:24:46 Just experimenting with it at the moment 01:25:02 Pretty happy with new look 01:25:09 --- quit: xek (Ping timeout: 268 seconds) 01:25:41 Hmm my user name is mispelled, what's up with that. brb 01:25:48 --- quit: rdrop-ex1t (Quit: Lost terminal) 01:26:43 --- join: rdrop-exit (~markwilli@112.201.170.86) joined #forth 01:26:57 back 01:30:58 I must have mistyped my username when I first logged in 01:45:40 --- join: dys (~dys@2003:5b:203b:100:a64c:c8ff:fef4:13a6) joined #forth 01:52:37 g'day forthfolks 01:52:59 Hi tp! 01:53:33 rdrop-exit, you can't beat a LaTeX user manual for a professional document :) 01:53:51 hey rdrop-exit Zen Forth Master! 01:54:34 It's kinda fun experimenting with it actually 01:55:16 plus, whats LaTeX got in common with Forth ? both are a similar age 01:55:41 TeX is fixed-point 01:56:02 that's one thing in common with most Forths 01:57:20 I never thought about the Tex source once while using it to write stuff 01:57:49 Written in Pascal IIRC, I have Knuth's book here somewhere 01:58:16 and of course postscript is also very Forth like being a stack machine 01:58:23 that makes sense 01:58:28 right 01:59:15 What's a handy website where I can post a sample image for a sneak peek? 01:59:16 i guess you and I wouldn't have any trouble with Postscript now 02:00:09 good question, I only use sourceforge for my opensource documentation projects nowdays 02:00:17 --- join: dave0 (~davezero@069.d.003.ncl.iprimus.net.au) joined #forth 02:00:36 I used to use one of the 'pastebin' type srvices a long time ago 02:00:53 I'll check it out 02:00:54 reminds me there is a FreeBSD package for using those services 02:01:25 www/wgetpaste 02:01:30 It looks like patebin is for text 02:01:39 Paste to several pastebin services via bash script 02:01:59 oh yeah it is, oops 02:02:03 I'll check on CLF, I remember someone there using a site 02:03:51 I'm trying out tinyupload.com 02:04:33 Try this: http://s000.tinyupload.com/index.php?file_id=56543896383193511291 02:06:37 got it! 02:06:41 That's a page from the documentation of the internals 02:06:49 I can tell thats Latex at a glance 02:07:32 whats the right hand column ? 02:08:09 is that some kind of cross ref ? 02:08:33 Sidenotes, I'm using to list word names related to the topic 02:09:16 The bold ones are the key words involved 02:09:35 thats something new to me 02:09:41 The muted ones are internal factors and secondary words 02:10:18 I'm planning on making them take you to the source 02:10:31 are they automatically generated ? 02:10:57 No I just pasted them in 02:11:06 via a clickable ps document ? 02:11:10 oh! 02:11:32 One of the appendices will contain all the source screens 02:12:00 just idea I'm playing with at the moment, nothing set in stone 02:12:46 I'm used to seeing notes at the bottom of the page with LaTeX 02:13:03 sorry was helping this teen in the office with Python 02:13:05 in very small print 02:13:18 the GPIOs on this Raspberry Pi Zero are not simple 02:13:36 It's like a footnote, but on the side 02:13:40 for some reason they work intermittently 02:13:48 rdrop-exit, yes 02:13:58 except for SCA and SCL lol 02:14:05 WilhelmVonWeiner, that seems odd 02:14:25 I need to get me a Raspberry Pi one of these days 02:14:31 I'll have to look up the configuration later 02:14:49 rdrop-exit, theyre ok, but I think there are better choices 02:15:24 SDA/SDL even 02:16:03 WilhelmVonWeiner, that rpi is running micropython or something ? 02:16:19 RPi is a linux machine 02:16:38 so python3 02:16:41 aha 02:17:22 It's probably something to do with pull-up/down configuration now I think about ti 02:17:25 *it 02:17:47 WilhelmVonWeiner, rpi can also be a pascal machine running pascal binaries 02:17:57 really? 02:17:58 I was thinking of using a RPi to run NetBSD 02:18:26 yeah, I was reading about a Pascal development system for it the other day 02:18:54 rdrop-exit, I run FreeBSD and Linux on my rpi's 02:19:31 plus, the Forth I use Mecrisp-Stellaris runs on a rpi under FreeBSD 02:19:32 I'm more interested in NetBSD becuase of their Rump Kernel 02:21:39 The Rump Kernel allows you to use NetBSD's device drivers without having to put a full Unix on the machine 02:23:28 There used to be a line of PCs that used the Pascal P-code VM as its OS 02:23:54 I forget the brand, it was in the 80s IIRC 02:29:51 --- quit: mtsd (Ping timeout: 246 seconds) 02:34:53 --- join: mtsd (~mtsd@77.110.61.100) joined #forth 03:28:47 Sage Computers was the brand I was trying to recall earlier 03:29:45 https://en.wikipedia.org/wiki/SAGE_Computer_Technology 03:30:32 https://www.youtube.com/watch?v=3zH5oPqjd6c 04:29:41 --- join: jedb_ (~jedb@103.254.153.113) joined #forth 04:29:55 --- quit: jedb (Read error: Connection reset by peer) 05:13:28 --- quit: mtsd (Quit: Leaving) 05:39:38 --- quit: xek_ (Remote host closed the connection) 05:40:36 --- join: xek_ (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 05:42:33 --- quit: xek_ (Remote host closed the connection) 05:43:06 --- join: xek_ (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 05:44:08 --- quit: xek_ (Remote host closed the connection) 05:44:36 --- join: xek_ (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 06:01:36 --- quit: rdrop-exit (Quit: Lost terminal) 06:10:08 --- nick: jedb_ -> jedb 06:20:01 --- join: xek__ (~xek@apn-31-0-23-202.dynamic.gprs.plus.pl) joined #forth 06:22:17 --- quit: xek_ (Ping timeout: 250 seconds) 06:38:42 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 07:14:05 --- quit: X-Scale (Read error: Connection reset by peer) 07:36:50 --- quit: dave0 (Quit: dave's not here) 08:32:48 --- join: Blue_flame (~cdadr@2409:4042:2106:bcb5:9070:dcef:2b9a:dd0) joined #forth 09:11:06 --- join: ryke (~Thunderbi@mail.homecaregiverstn.org) joined #forth 10:00:00 --- quit: ryke (Ping timeout: 240 seconds) 10:26:09 --- quit: Blue_flame (Quit: Blue_flame) 11:26:28 --- join: Mat42 (~claude@2a02:8109:9f00:3b3c:20ff:7eca:1eae:c4fd) joined #forth 12:04:38 --- quit: reepca (Ping timeout: 240 seconds) 12:09:33 --- join: WickedShell (~WickedShe@159-118-128-145.cpe.cableone.net) joined #forth 12:12:00 --- join: ryke (~Thunderbi@mail.homecaregiverstn.org) joined #forth 12:18:10 --- quit: dys (Ping timeout: 245 seconds) 12:52:18 --- quit: gravicappa (Ping timeout: 240 seconds) 13:08:00 --- join: dys (~dys@tmo-100-31.customers.d1-online.com) joined #forth 13:15:36 --- quit: dys (Ping timeout: 240 seconds) 13:17:26 --- join: dys (~dys@tmo-112-173.customers.d1-online.com) joined #forth 13:36:08 --- part: Mat42 left #forth 14:14:01 --- join: xek_ (~xek@host-89-228-118-28.dynamic.mm.pl) joined #forth 14:16:30 --- quit: xek__ (Ping timeout: 245 seconds) 14:27:47 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 15:17:45 --- quit: xek_ (Ping timeout: 245 seconds) 15:35:00 --- quit: ryke (Ping timeout: 276 seconds) 16:02:02 --- join: ryke (~Thunderbi@199.102.183.106) joined #forth 16:16:58 --- join: dave0 (~davezero@069.d.003.ncl.iprimus.net.au) joined #forth 16:19:56 --- quit: ryke (Ping timeout: 268 seconds) 16:21:48 --- quit: cheater (Ping timeout: 276 seconds) 16:23:14 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 16:28:19 --- quit: cheater (Ping timeout: 265 seconds) 16:29:06 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 16:37:38 --- join: reepca (~user@208.89.170.37) joined #forth 16:47:09 --- join: ryke (~Thunderbi@199.102.183.106) joined #forth 17:54:36 --- join: iyzsong (~iyzsong@fsf/member/iyzsong) joined #forth 18:47:14 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 18:56:22 --- join: iyzsong (~iyzsong@fsf/member/iyzsong) joined #forth 20:06:47 --- quit: dave0 (Quit: dave's not here) 20:24:24 --- quit: ryke (Ping timeout: 240 seconds) 20:25:25 --- quit: karswell (Remote host closed the connection) 20:26:54 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 20:54:54 --- join: rdrop-exit (~markwilli@112.201.170.86) joined #forth 20:56:46 hey 20:57:01 I decided to add double cells to hashforth 20:57:12 not really because I plan on using them 20:57:12 g'day tabemann :) 20:57:30 but rather so I can use them to implement fixed point arithmetic without losing significance 20:57:52 128 bit fixed point arithmetic ? 20:58:07 well 64 bit 20:58:40 128 bit is because the adjustment factor changes by that of the two arguments' multiplied for multiplication, or divided, for division 21:00:01 so like for multiplication of two 32.32 numbers by each other, I convert them to 128 bit, do the multiplications there, then divide by 2^32, then convert back to 64 bit 21:00:24 note that the division step is cheap because it's just a bitshift 21:07:45 Hi tp and tabemann :) 21:09:06 I wouldn't bother with doubles on a 64 bit Forth 21:09:39 I implemented them on 64 bit just so that I'd have same set of primitives on 32 and 64 bit 21:09:57 You only need 128 bits for the intermediate in scaling primitives 21:09:57 hi Zen Master of Forth :) 21:10:17 rdrop-exit: well that's precisely why I implemented them 21:11:03 Sure, but that's an intermediate value in a primitive 21:11:21 You don't need to implement doubles at the Forth level to have that 21:11:48 hmm 21:12:16 maybe I should implement primitives that are essentially multiply-then-bitshift and bitshift-then-divide 21:12:43 The scaling operators, i.e. */ */mod etc, take care or the 128 bit intermediate internally 21:15:06 I honestly forgot about those 21:15:33 You can also have a *hi (mulh) primitive for the rare cases when you want the high bits of a 64x64 multiplication 21:17:26 (or a mixed multiplication operator will do the job as well) 21:19:55 --- quit: iyzsong (Read error: Connection reset by peer) 21:20:16 --- join: iyzsong (~iyzsong@fsf/member/iyzsong) joined #forth 21:21:02 --- join: gravicappa (~gravicapp@h77-94-116-121.dyn.bashtel.ru) joined #forth 21:22:09 When practical use binary scaling (shifts), when inpractical use the scaling operators 21:23:34 back 21:27:28 https://en.wikipedia.org/wiki/Binary_scaling 21:30:43 In general I think doubles are overkill in a 64-bit Forth 21:32:12 back 21:32:23 In my 64-bit Forth, */ */mod u*/ u*/mod use a 128-bit intermediate production internally 21:33:42 I also have *hi and u*hi which return the hi cell of a 64x64 multiplication, for when you really need to check for overflow 21:33:55 * high cell 21:34:41 typo: internediate product (not intermediate production) :) 21:35:12 Yet more typos, I obviously need more coffee, brb 21:37:45 back 21:42:21 c[] 21:48:34 I'm not going to take out double cells now that I've added them :P but I am adding the scaling operations, because they should be faster than double cells 21:48:53 BTW, if you're implementing your hashforth system in C, 128 bits is problematic 21:49:06 __int128 to the rescue! 21:49:32 it won't compile with MSVC++ but it will compile with gcc and should compile with clang 21:53:51 I haven't looked into the compiler specific extensions, but if you want a 64x64 product or a 128 by 64 integer division, I think you have to roll your own in ISO C11 21:54:32 yeah, __int128 isn't standard 21:54:55 but personally the only compilers I care about on 64-bit are gcc and clang 21:55:04 which both support __int128 21:55:55 uint64_t int64_t are standard, but I don't think there are 128 bit versions 21:56:09 I might want to support other compilers on 32-bit, but then the biggest numbers I will care about will be 64-bit 21:57:43 brb 21:57:50 (note that gcc at least does not support 128-bit on 32-bit platforms anyways) 22:01:29 back 22:04:28 okay, I'm gonna hit the sack now - at some point tomorrow, after I complete my work for my job (working for one's work on the weekend - ugh), probably begin work on fixed point using scaling operators I've created that make use of bitshifts 22:06:04 g'night 22:06:06 scaling operators that make use of bit shifts, sounds weird 22:06:15 it's simple 22:06:41 instead of division, it uses a right shift, or instead of multiplicatiton, it uses a left shift 22:07:08 Well ya, but you don't need anything special for that 22:07:23 which is possible because for implementing binary fixed point, a multiplication will require a division by a power of two, and vice versa for a division 22:08:02 You only need scaling operators when shifts won't do 22:08:30 When shifts are enough you just use shifts 22:08:41 consider this case 22:09:00 you have 32.32 fixed point 22:09:07 multiplication results in 64.64 22:09:20 either you use double cell 22:09:35 or you use a specific operator which hides 128 from- you 22:09:50 you can use double cell with bitshifts 22:10:05 but that would be less efficient than a specialized operator 22:11:04 you could use */ which would work 22:11:16 but */ is generalized in that it uses division 22:11:17 Scaling is multiplication followed by division, you cancel out the shifts, i.e. you get a "net shift" 22:11:59 but let's say you want to squeeze out a little more performance 22:12:08 and because you know you'll be dividing by a power of two 22:12:15 a bitshift is all you need 22:12:44 well ya 22:13:20 And if you're both multipliying and then dividing by powers of 2, a net shift is all you need 22:13:44 well the multiplication isn't by a power of two necessarily 22:14:14 it's just that the factor for the decimal point is a power of two 22:14:22 and when you multiply two fixed point numbers 22:14:36 the resulting decimal point is the decimal point of the two numbers multiplied 22:14:56 assuming binary fixed point 22:15:56 the point of the division is to return the decimal point back to its original position and scale the number so it fits back with, say, 32.32 22:17:37 So why do you need special operators? Forth has scaling operators and it has shifts 22:18:30 See the chapter on fixed point in Starting Forth IIRC 22:19:23 when you say shifts, does it have an operation to multiply two numbers leading to a double cell value, then right shift that value leading to a single cell value? 22:20:02 You wouldn't do 2 shifts in that case, you would do a single net shift 22:20:56 but that's not what I'm talking about 22:22:11 shift left 16 followed by shift right 17, is the same as shift right 1 22:22:29 I'm talking about when you have two numbers, like 3.000 and 5.000 (to use decimal fixed point as an example) being multiplied to result in 15.000000, and then divided by 10^3 to result in 15.000 22:22:51 */ 22:23:18 or u*/ if unsigned 22:23:35 the special operator comes into play because we know that the division step will be a power of two for binary fixed point 22:24:03 *for 22:26:07 I thought it was being divided by 10^3 22:26:22 that was my decimal fixed point example 22:26:30 and decimal fixed point would use */ 22:28:22 this is why most fixed point uses binary except when decimal is specifically desired, because bitshifts are cheaper than division 22:29:27 So you're proposing a double to single right shift operator 22:29:45 preceeded by a 128 bit product operator 22:29:52 yes 22:31:01 I doubt that's worth the trouble for any platform that supports a 128 bit product will have a fast division 22:31:20 it's more worthwhile for 32 bit 22:31:25 on small systems 22:31:50 like this DISCOVERY board I plan on eventually getting this running on 22:32:35 I would provide the two ops rather than combining them 22:33:23 I think any use cases would be rare 22:33:41 that's what I did with double cell initially, but then I realized that double cell ops would be substantially less efficient 22:34:11 the main use case is for implementing fast fixed point 22:35:06 If you want fast fixed point you avoid both the multiplication and the division, by judiciously choosing the right unit the Chuck way 22:36:01 Reduce everything down to shifts, adds, and subtracts 22:37:28 See some of Jeff Fox's write ups on Chuck's chip design software, Okad 22:38:38 heh - I plan on porting my math routines from my previous Forth, which used floating point, to hashforth, using fixed point, and those make heavy use of multiplies and divides... 22:39:08 I see 22:39:51 they're things like sqrt, log, exp, sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh 22:41:06 The OEIS is a good resource for digging up the rational approximations you'll need 22:41:55 what I discovered when implementing those is that a lot of naive implementations do not work well at all in practice 22:42:13 they converge poorly, they have too much error, etc. etc. etc. 22:42:24 * tp is having so much fun with forth, inline-assembly and GDB it's probably illegal! 22:42:33 lolol 22:42:45 Cool tp :) 22:43:19 I posted this a while back, you might find it handy 22:43:33 : pi ( -- numerator denominator ) 22:43:33 $ 24baf15fe1658f99 $ bb10cb777fb8137 ; 22:43:46 my head is bursting with new knowledge, I've reached a new bar on my Forth path 22:44:03 Don't explode tp 22:44:13 Convergent rational approximation of pi. 22:44:16 rdrop-exit, i can't promise ;-) 22:44:23 lol 22:44:54 tabemann, we have a maths package for Mecrisp-Stellaris Forth also which uses fixed point 22:45:22 (for a 64-bit Forth) 22:46:33 The OEIS is chuck full of such things 22:48:36 interesting fact, when testing assembly for inlined machine code in Forth, one must NOT use "ldr=" as it expects a literal relative to the program counter... you need to use movs adds lsls sequences instead to load a literal in a register. 22:48:57 that was my first learning curve 22:49:35 okay, I should really go to bed now 22:49:50 Sweet dreams tabemann 22:49:57 g'night guys 22:50:09 the Mecrisp-Stellaris author had already forseen the need, and had provided a "registerliteral," Word to compute the smallest sequence for a given number 22:50:14 nighto tabemann 22:54:27 and registerliteral, makes working out delays so much easier 23:09:05 --- join: ryke (~Thunderbi@71-9-171-192.dhcp.jcsn.tn.charter.com) joined #forth 23:10:06 the good thing about this is the small source I can paste here :) 23:10:09 : .ms ( u -- ) 23:10:09 [ 23:10:09 ( start ) \ r6 already contains the TOS delay value 23:10:09 11879 0 registerliteral, 23:10:09 ( loop2 ) 23:10:10 $3801 h, \ subs r0, #1 23:10:12 $d1fd h, \ bne.n a 23:10:14 $3e01 h, \ subs r6, #1 23:10:16 $d1f8 h, \ bne.n 8 ## fine tune this with "see dl" 23:10:18 ] drop 23:10:22 ; 23:11:36 I get decently accurate 1/0 millisecond timing in 20 bytes 23:11:48 nice 23:12:18 "1000 .ms" gives me 10000 0.1ms counts 23:12:30 or 1 second 23:13:11 I use a xtal clock on a cortex-m0 to time it using the Systick interrupt 23:28:06 Gotta go, very late lunch with the wife. Catch you later tp, remember no exploding. ;) 23:28:17 --- quit: rdrop-exit (Quit: Lost terminal) 23:59:59 --- log: ended forth/19.10.04