00:00:00 --- log: started forth/20.05.22 00:19:27 --- quit: xek_ (Remote host closed the connection) 00:20:28 --- join: xek joined #forth 00:23:42 --- join: xek_ joined #forth 00:26:08 --- quit: xek (Ping timeout: 246 seconds) 00:30:04 --- quit: xek_ (Remote host closed the connection) 00:30:44 --- join: andrei-n joined #forth 00:31:17 --- join: xek joined #forth 00:36:01 --- quit: cantstanya (Read error: Connection reset by peer) 00:43:29 --- join: cantstanya joined #forth 01:10:06 --- quit: reepca (Remote host closed the connection) 01:10:19 --- join: reepca joined #forth 03:35:16 --- join: dddddd joined #forth 03:55:25 --- join: TCZ joined #forth 04:04:39 --- quit: tolja (Remote host closed the connection) 04:20:50 --- join: iyzsong joined #forth 04:45:24 --- quit: _whitelogger (Remote host closed the connection) 04:48:27 --- join: _whitelogger joined #forth 04:55:29 --- quit: rdrop-exit (Quit: Lost terminal) 05:14:56 --- quit: Zarutian_HTC| (Ping timeout: 256 seconds) 05:48:34 --- join: Zarutian_HTC joined #forth 05:48:34 --- quit: Zarutian_HTC (Client Quit) 06:23:23 --- join: X-Scale` joined #forth 06:24:00 --- quit: X-Scale (Ping timeout: 265 seconds) 06:24:03 --- nick: X-Scale` -> X-Scale 06:28:09 --- quit: TCZ (Quit: Leaving) 06:38:10 --- quit: X-Scale (Ping timeout: 272 seconds) 06:39:08 --- join: X-Scale` joined #forth 06:39:27 --- nick: X-Scale` -> X-Scale 07:12:54 --- quit: dave0 (Quit: dave's not here) 07:22:52 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 07:58:16 --- quit: jsoft (Ping timeout: 265 seconds) 08:17:39 --- quit: dys (Ping timeout: 260 seconds) 08:31:11 --- quit: dddddd (Ping timeout: 264 seconds) 09:05:26 --- quit: andrei-n (Quit: Leaving) 09:05:48 --- join: andrei-n joined #forth 09:13:31 --- quit: andrei-n (Quit: Leaving) 09:13:53 --- join: andrei-n joined #forth 09:14:17 --- quit: andrei-n (Remote host closed the connection) 09:23:36 --- join: andrei--n joined #forth 09:45:15 Is there actually a standard forth word that lets you implement the divison required for # ? 09:47:10 I need to be able to do a division + remainder like: ( ud n+ -- ud n+ ) giving result of dividing and remainder 09:47:19 Or better 09:48:30 The standard division stuff for double integers is signed (not equivalent under division) or won't fit in the result in general 10:09:19 --- quit: andrei--n (Quit: Leaving) 10:09:51 --- join: andrei-n joined #forth 10:10:13 u/mod ( u1 u2 - - u3 u4 ) 32/32 = 32 rem 32 Division u1 / u2 = u4 remainder u3 10:10:14 mod ( n1 n2 - - n3 ) n1 / n2 = remainder n3 10:10:31 any of those useful ? 10:11:31 Thanks tp but no those are single cell integers 10:12:14 um/mod ( ud u1 - - u2 u3 ) ud / u1 = u3 remainder u2 10:12:22 Unless I am being maths dumb and there is a mathematical way of using that to do larger division 10:12:26 ud/mod ( ud1 ud2 - - ud3 ud4 ) 64/64 = 64 rem 64 Division ud1 / ud2 = ud4 remainder ud3 10:13:24 m/mod ( d n1 - - n2 n3 ) d / n1 = n3 remainder r2 10:13:24 d/mod ( d1 d2 - - d3 d4 ) d1 / d2 = d4 remainder d3 10:13:24 d/ ( d1 d2 - - d3 ) d1 / d2 = d3 10:14:07 ud/mod is perfect, not standard. I am going to implement UD/MOD or a variant of UM/MOD that doesn't lose precision 10:15:56 what about fixed point ? 10:16:16 d+ ( df1 df2 - - df3 ) Subtraction of two fixpoint numbers 10:16:21 oops 10:16:44 f/ ( df1 df2 - - df3 ) Division of two fixpoint numbers 10:18:05 Floating point right? 10:18:57 My base system will not contain floating point words, that's an elective or a build option 10:19:21 But # is a core word (and rightly so), it's just annoying that they don't define a standard word that's suited for doing the calculation! 10:19:30 no, fixed point 10:19:44 I won't support fixed point in the base system (if at all) 10:20:14 I only use fixed point, I'll never use floating point 10:20:26 Yeah I've noticed hardware uses fixed point a lot 10:20:43 almost exclusively, for one thing it's more accurate 10:21:04 Is it now? :) 10:21:16 it's crazy, I have more accuracy on a stm32 than on my pc 10:21:21 sure 10:21:26 And also found that most people don't understand the standard C functions for correctly loading/storing fixed point into floating point so that has caused issues in reviews 10:21:47 Where people are like "er what is this function and what is happening here?" 10:21:57 well thats C for ya :P 10:22:08 It's not C it's just people who don't understand floating point 10:22:56 The double precision floating point numbers you get on modern PCs are capable of accurately representing all the fixed point numbers I've come across sampled from hardware 10:22:58 it's a confusing topic for those that havent researched the precision of floating point vs fixed point I agree 10:23:30 I think it's C 10:23:45 Forth people tend to understand the difference 10:24:14 But yes obviously if the size(mantissa)+1 is shorter than a fixed point numerator or divisor then you will lose accuracy going to floating point 10:24:15 C people have the same unquestioning trust in floating point as they do in their compiler 10:24:40 My experience is that people are very mistrusting of floating point and treat it like a magic box that sometimes gives weird inaccurate results 10:24:47 then there is also the fact that you cant represent 0.1 accurately in binary anyway 10:25:08 oh ok, well you'd have a lot more exposure there than me 10:25:40 If you understand how it works and what's guaranteed then it's better, you start knowing that floating point works well but it's not a "cure all" to accuracy because nothing is 10:25:52 It's like everything in programming, you need to actually understand it 10:26:04 my understanding is that there are two issue with floadting point. 1) lack of precision, 2) the usual decimal to binary issues 10:26:08 agreed 10:26:24 and Forth people understand the differences in my experience 10:26:49 perhaps because (in many cases) they actually write their systems 10:27:30 Usually if you expect accurate decimals the solution is to change units 10:27:39 i.e. in currency store cents 10:27:49 we do have words that utilise the F4 floating point processor, but they were user submitted and came years after the default Mecrisp-Stellaris which uses fixed point 10:28:01 i've recently developed the opinion that there is no valid use case for floating point 10:28:13 cmtptr: I wouldn't use anything else for computer graphics 10:28:26 See: Playstation 1 wobbling because it uses fixed point graphics 10:28:39 sure Veltas, but we tend to call that system 'scaling' in Forth 10:28:42 Actually it doesn't use fixed point, really it uses integers, so that is not fair 10:28:59 Yeah it's more like 'scaling' as you say 10:29:18 fixed point is integers. they're the same thing, you just have an implied divisor built into your arithmetic 10:29:36 cmtptr, how about to sell MCU's with a FPU against your competition without it ? 10:29:42 what "wobbling" are you talking about? i never owned a playstation 1 10:30:00 tp, well yeah, once we start talking about marketting there's a use-case for everything 10:30:06 because some moron out there wants it 10:30:12 and it's a sin to let a fool keep his money 10:30:19 cmtptr, thats the only use case I can think of also 10:30:42 cmtptr: Look at footage of the Playstation 1, when things move they kind of 'snap' to positions in 3D space, although it is a bit subtle, eventually it is very noticable 10:31:06 veltas, you just had 100Hz noise in your video ;-) 10:31:25 My video? 10:31:42 veltas, I assume you had a PS1 ? 10:32:09 Anyway I am not here to argue about fixed point, scaling, etc, that's all totally fine and has its purpose. I will probably have limited support for fixed point arithmetic since I'm on an 8-bit machine anyway 10:32:13 tp: No I didn't 10:32:17 veltas, that's a precision problem. we solved that decades ago by adding more bits 10:32:58 Adding more bits doesn't solve it because 3D graphics usually comes with the requirement you can zoom in and out without getting huge errors in your calculations 10:33:33 does it? there's usually a near and far clipping plane, so you know the bounds of your scene 10:34:31 Not 'zoom' necessarily but get close to a wall and I don't expect the wall to start jumping around weirdly on my screen 10:35:34 yeah, so your near clipping plane is the worst case scenario for that. design your units with that in mind 10:37:20 the alternative is that you use floats for spacial positioning, which then is weird because things start getting different precision the further they are from an arbitrary origin point in space 10:37:45 the only reason you tend to not notice it is because GPUs and games today have floats with more than enough bits to hide it 10:38:17 cmtptr, do PSx have much higher precision FP units than X86 ? 10:38:27 I have no idea 10:38:45 but I will say that doom used fixed point and I never noticed this wobbling that he's talking about there 10:38:55 X86 is actually quite a high precision but you are not going to be calculating on your CPU anymore 10:39:57 Doom doesn't have the most general-purpose graphics engine 10:40:48 well, that's true 10:41:08 look, it was good enough for granddad, and it's good enough for me! 10:41:14 Talking of noise.... 10:43:37 which of these is right ? 10:43:39 9.12 / 7.13 10:43:40 1.27910238429172510518 10:43:40 1,27910238411277532577514648437500 10:44:08 the lower one is from Mecrisp-Stellaris, the first one is from this pc using (BC) 10:45:08 cmtptr, I played tons of doom and never once noticed wobbling either 10:46:23 1.27910238429172510518934081346423562412342215988779803646563814866760168302945301542776998597475455820476858345021... 10:46:34 --- quit: xek (Quit: Leaving) 10:47:03 According to Wolfram Alpha so I am assuming that is infinite precision, don't let me down WA 10:47:09 veltas, did you just do that in your head ? 10:47:27 I could do it on paper 10:47:48 But I'm randomly inaccurate :P 10:50:52 i should try that on a M4 with FPU 10:50:55 --- join: jsoft joined #forth 10:51:22 I'll do the test when I'm next working on tabemann's Zeptoforth 10:51:30 as thats made for a M4 10:53:33 tp: If you want fixed point to shine then choose a scenario where you are using almost all the bits in the fixed point, and add them together or multiply if they're both near 1 10:53:41 Then it will be more accurate 10:53:58 If that sounds very specific and not useful in general then you have just realised why people use floating point 10:55:12 veltas, thats a bit general 10:55:31 Fixed point is a better fit for sensors where you know the accuracy in advance, and it's simpler to expose via a binary register 10:55:36 veltas, there are billions of embedded devices in daily use that dont use fp 10:56:10 They're not doing general-purpose scientific calculations though, are they? If you know the terrain you can get fixed point to work just fine for your small device. 10:56:37 veltas, which is because small embedded devices dont have FPU's and it's too costly to implement in software 10:56:47 Giving a sensor more arbitrary control of the decimal point is useless because the accuracy is roughly fixed 10:56:50 Yeah 10:57:15 --- quit: Guest38566 (Quit: leaving) 10:57:24 --- join: WilhelmVonWeiner joined #forth 10:57:27 veltas, did the HP scientefic calculators have FPU's ? 10:57:45 I'm pretty sure they didnt 10:57:56 No, but they were meant for general-purpose scientific calculations 10:58:16 And floating point is better at that than fixed point, as you just saw with that simple example 10:58:45 And it doesn't matter that it's slow because 'slow' for a manually entered calculation is usually under 1 second, acceptable for a calculator 10:59:38 So now we've talked about floating and fixed point, my question is: do *you* have a point? :P 11:00:20 veltas, no, I only do embedded work 11:00:48 veltas, and my hardware does not have a FPU 11:02:39 Some mechanical and physical calculations in embedded computers probably do require floating point, very rare though, especially if what you do is linear and with limited accuracy anyway. 11:03:04 I imagine GPS probably needs floating point in there somewhere 11:03:52 GPS doesn't work properly without special relativity calculations if I remember rightly 11:05:17 veltas, can you clarify for me, are you claiming that floating point has some special feature that makes it more accurate than fixed point ? 11:06:02 Yes the special feature is being able to choose what scale the mantissa represents dynamically 11:06:28 veltas, it seems to me that when one designs something they study the required precision and then implement a system that provides that ? 11:06:52 So in general it tends to be more accurate, even though fixed point can be more accurate in specific instances. 11:07:44 I'm not saying it's always more accurate because obviously it isn't, there are situations where it is less accurate 11:15:27 --- join: tolja joined #forth 11:18:41 tp: You might find this interesting https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimals-of-pi-do-we-really-need/ 11:21:01 HP scientific's definitely didnt have FPU 11:21:27 the wikipedia article on the Saturn processor used in the later scientific and most of the graphing models is really interesting 11:21:38 You can tell when you press = and it freezes in front of you calculating the answer for about 0.3s 11:21:48 native BCD with up to 15 digits iirc. assembly instructions set the number of decimals 11:22:06 x86 has native BCD 11:22:17 Well, 'native' 11:22:28 heh, not sure what youre calculating but any built in function on one of those HPs will be a lot faster than 0.3 seconds 11:22:55 I don't know trigonometry or something 11:23:43 Z80 has a BCD adjustment instruction, and it only works with 8-bit calculations, so it has 'support' in a sense but it's rubbish 11:24:30 I personally think BCD is kind of cool but pretty useless in practice 11:26:28 its not rubbish at all 11:26:40 I mean in comparison to plain binary 11:26:46 it would take you at least 5x more cycles to do the correction otherwise 11:27:14 0 90 FOR I I SIN NEXT takes about 2 seconds on my simulated hp 48gx running at authentic speed 11:27:39 so more like 0.02 seconds for trig including loop overhead 11:28:16 BCD makes sense for a general purpose machine. some problems need BCD and just about anything that can be done in binary will also work in BCD so it makes sense to use that for everything 11:28:44 bcd is the only way to obtain hi precision decimal calculations iirc ? 11:29:01 its not more accurate 11:29:10 it just rounds the same as a human does 11:29:34 like if you do 1 million $0.01 transactions into a bank account you need it to be $10,000 exactly 11:30:14 you would eventually get rounding errors in binary adding a small number like that repeatedly 11:31:10 yes 11:32:06 of course you could also have your mantissa in binary but limit it to some power of 10 like having it 32 bit and limiting it to 999,999,999 but then you have to contantly check and adjust 11:32:26 ahh 11:32:37 hence the appeal of the "rubbish" decimal correction 11:34:23 > t = 0; for i = 1, 1000000000 do t = t + 0.01 end; print(string.format("%.2f", t)) 11:34:28 9999999.83 11:35:11 > t = 0; for i = 1, 1000000000 do t = t + 1 end; print(string.format("%.2f", t/10)) 11:35:15 100000000.00 11:41:32 whereas they would be identical if you did the calculation in BCD 11:41:43 ........ 11:42:25 on the other hand, if you replaced the 0.01 with something you had calculated that doesnt divide evenly by 10, you would have the corect answer in binary but the wrong answer in BCD 11:44:57 lets all just use scaling with integers ? 11:45:30 bbl, freezing here, warm bed beckons! 12:10:21 --- join: dddddd joined #forth 12:30:48 --- quit: jsoft (Ping timeout: 258 seconds) 12:34:14 --- join: Zarutian_HTC joined #forth 13:03:08 --- quit: reepca (Read error: Connection reset by peer) 13:03:25 --- join: reepca joined #forth 13:12:15 --- quit: reepca (Read error: Connection reset by peer) 13:12:37 --- join: reepca joined #forth 13:34:32 --- join: jsoft joined #forth 14:19:53 --- quit: andrei-n (Quit: Leaving) 14:33:17 --- quit: malyn (Quit: "") 15:24:01 --- quit: reepca (Remote host closed the connection) 15:24:13 --- join: reepca joined #forth 15:34:52 --- quit: gravicappa (Ping timeout: 256 seconds) 17:17:15 --- join: rdrop-exit joined #forth 17:55:40 --- join: dave0 joined #forth 17:59:00 --- quit: phadthai (Ping timeout: 272 seconds) 18:01:11 --- join: phadthai joined #forth 18:10:24 --- quit: phadthai (Ping timeout: 272 seconds) 18:11:29 --- join: phadthai joined #forth 18:20:29 --- join: boru` joined #forth 18:20:32 --- quit: boru (Disconnected by services) 18:20:34 --- nick: boru` -> boru 18:44:47 "Forth provides the tools for operating in a customized programming environment." 18:44:48 -- M.G. Kelly & N. Spies 18:45:04 good morning Forthwrights c[] 19:24:35 --- quit: jsoft (Ping timeout: 264 seconds) 19:37:17 --- quit: rdrop-exit (Quit: Lost terminal) 19:45:34 --- join: rdrop-exit joined #forth 20:39:29 --- join: jsoft joined #forth 20:52:25 "People like Steve Jobs say that the way to get simplicity is greater complexity. 20:52:28 Well, they don't put it quite that boldly. What they say is this, if we have intelligent enough systems and big enough systems, we can make them very easy to use. I have this stupid idea of simplicity via simplicity -- and for many applications it works." -- Jef Raskin 20:56:18 it's enver simple enough for the stupid user :) 20:56:24 s/enver/never/ 20:56:42 :)) 21:00:04 "if it doesn't sing and dance at a single click, it's not ready for release -- phadthai" 21:01:53 sorry for my midnight humor 21:02:18 np 21:02:46 Day changed to 23 May 2020 21:02:57 I'm spending my lockdown going through old books and magazines, having a blast 21:03:06 cool 21:03:37 I've honestly been isolating too much and had pizza in a backyard with some people tonight, it was good, yet hopefully not too dangerous 21:04:39 I'm in Montreal where the health-services curve is approximately at the limit 21:05:09 The lockdown is tougher on our two dogs than it is on me. It's given me a chance to go through boxes and boxes of forgotten literature. 21:05:30 my mom almost died from it around 1th may, but fortunately ICU services and equipment were still available and she seems to be slowly recovering 21:06:21 (still in a hospital though) 21:06:34 wow, you have my sympathy, hope she recovers quickly 21:06:40 many thanks 21:07:10 no longer in ICU and considered stable which is encouraging 21:07:50 excellent, there was a 95 year old laday here recently that recovered fully after a month 21:07:57 * lady 21:07:58 at some point day after day updates were difficult to query, especially when sedation and oxygen were raised more and more with the ventilator etc 21:08:24 spectacular, about the 95yo lady 21:08:33 my mom is around 75 21:09:32 mine's 88 and lives by herself on the other side of the world, I call her weekly to check on her (real phone, she's not a computer user) 21:09:49 ok 21:10:24 it's the age my grandmother died, after complications from osteoporosis and ensuing depression, unfortunately 21:11:16 "It's important to remember that Forth is very much like a macro assembler for a two stack machine. It really is very low level but because it allows the development of application specific languages it can be brought up to high-level very quickly." -- Jeff Fox 21:12:20 she was still autonomous and proud of it, until she fell because of a broken bone, then was on proud recovery, when learning that her other hip was also about to break if not being careful... so she moved to a decent elderly home, but about a year later wouldn't accept food etc 21:12:55 I guess this is quite off-topic heh 21:12:57 nice quote 21:14:16 I'm intermittenly posting quotes as I come across them going through the stacks of books, magazines, and printouts. 21:14:31 just to end the sad story, although I was one of her main visitors along with my sister, at some point she seemed to either be mad or to not recognize us the last few times we visited, that was quite difficult for us to deal with at our young age back then 21:15:28 soon after she died, although rather "peacefully"... natural gradual slowing of breath in her sleep 21:15:42 sad, my grandmother died very shortly after a broken hip 21:16:36 lunch is on the table, bbiab, stay healthy 21:16:56 so we visited hours before the last breath, I remember her breating deeply every 30 seconds or so 21:17:50 s/breating/breathing/ 21:19:34 some visitors believed, or hoped, that she might still hear so we had a turn with opportunity to privately talk 21:19:55 I couldn't say anything personally so just watched in silence 21:20:29 bon appetit 21:20:38 actually I'll have some leftover pizza too heh 21:23:15 --- quit: dddddd (Ping timeout: 258 seconds) 21:26:38 Well whats all happening in forth world today? 22:09:42 --- quit: Zarutian_HTC (Quit: Bye) 22:24:12 jsoft, https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/STM32F0-Discovery-TouchSensor-377b5b56c2.tar.gz nmy new Forth project release tarball 22:24:27 brb, shopping before it's too dark here 22:32:30 You're a tarball 22:32:35 :P 22:32:52 I think its time to delve into stm32lx territory 22:33:14 It kinda seems the msp430 stuff is well behind the stm32lx stuff 22:33:21 Except in simplicity 22:42:40 --- join: dys joined #forth 22:43:06 --- join: gravicappa joined #forth 22:49:09 --- join: andrei-n joined #forth 23:38:01 bak 23:38:26 jsoft, it's almost impossible to compare MSP430 and STM32 23:38:36 it's like oranges and apples 23:40:36 How so 23:47:09 you tell me the difference between a apple and a orange and I'll tell you the difference between a MSP430 and a STM32 ? 23:59:53 jsoft, anyway, dont get a "L" get a "G" 23:59:59 --- log: ended forth/20.05.22