00:00:00 --- log: started forth/19.11.22 00:00:28 memory status of a RISC-V ship 00:00:30 free (bytes) 00:00:31 FLASH.. TOTAL REPORTED: 131072 USED: 105272 FREE: 25800 00:00:31 RAM.... TOTAL PRESET: 20000 USED: 1152 FREE: 18848 00:00:40 ship = chip 00:00:52 ok sweet PA1 doing the toggle dance 00:01:46 i was reading EEVblog the other day, somone has a gpio toggling at 250 MHz on a superfast mcu clocking at 600MHz 00:02:06 Yeah... thats a bit excessive 00:02:09 the waveform looked pretty sawtooth tho 00:02:41 100mA at 600Mhz vs 3 ma for your F051 at 8Mhz 00:03:02 I dunno, I have no need for 600 Mhz, letalone 250Mhz right now 00:03:03 12 mA at 48 MHz iirc 00:03:18 same here, 8mhz is plenty for what I do 00:03:23 --- join: mtsd joined #forth 00:03:34 Im running at 48Mhz so there is lot of room for the bit banging 00:03:37 but I like 72Mhz for fast terminal data 00:04:24 yeah, and the f051 clocks reliably at 96 Mhz, I ran one at that speed for 12 months including at ambient 46C and it's still fine 00:05:00 cant flash data at that speed tho, but can run from flash and ram no problem 00:09:29 That is an outrageous overkill for my situation 00:09:59 Meanwhile, back in noob land, bit shifting loops are being pondered :P 00:10:22 sure, it was a experiment to see how fast the f051 would go 00:10:56 and double max speed no problem seems typical of stm32 00:11:18 I plan to run a F4 at 250MHz soon 00:11:43 jsoft, how long have you been learning Forth ? 00:13:12 I done a F7 @ its normal 218 Mhz thing for DSP duties. Some tutor at work said that you need many years of uni study to make a DSP filter, so I made one while drunk on an F0 that night, and a WAY better one with an F7 on a custom PCB for future classes a few weeks later 00:13:20 tp, about a week and a half 00:13:31 tp, but in total, about 4 hours 00:13:36 perhaps 5 now 00:16:00 wow! 00:16:13 Ive been at it since 2014m on and off 00:16:37 Yeah ok, but you are actually productive, and I am still tripping over myself 00:17:19 Forth takes time, it's incredibly broad in scope and will do anything I can imagine 00:17:33 I am wanting to make a digital clock with 60 RGB led's in the shape ( which happens to be a circle ) of a car companys logo he likes 00:17:56 sorry, he being a work mate who is moving positions 00:18:15 jsoft, not 4 circles interconnected ? ;-) 00:18:40 tp, a filthy audi? 00:18:44 hehe 00:18:44 :P 00:18:55 Nah, a Holden 00:19:12 aha 00:19:28 https://duckduckgo.com/?q=holden+logo&t=canonical&iar=images&iax=images&ia=images 00:19:30 so how will you drive the 60 leds ? 00:19:36 tp, with an F0 00:19:57 tp, I will likely need a level shifter, but yeah, with an F0 00:20:08 I've owned a few holdens myself 00:20:21 Auzzie ? 00:20:29 yeah, NSW 00:20:33 Filthy Auzzie. 00:20:35 :P 00:20:46 Nah, I like holdens 00:21:00 a filthy Audi owning auzzie 00:21:03 heheh 00:21:32 A work mate at work owns a BWM M5 or something, some BWM gizmo thing anyway. It sounds fucking awesome. Some V8 thing 00:21:52 I always thought BMW's were gay, but this thing looks and sounds boss 00:21:53 they are pretty damn fast, 480 HP at the gearbox 00:22:03 but tend to brake stuff 00:22:06 break 00:22:28 beemers are more powerful than youd believe 00:22:40 no such thing as a sedate beemer 00:23:09 all German cars are fast 00:24:04 I had a doctor whose M5 swallowed water at a river crossing, $30,000 AUD in *engine* repairs alone 00:24:10 I dunno, i've been in some shopping trolly BMW's 00:24:28 eww, Im surprised to hear that 00:25:00 I never have, the beemers Ive been in have allways impressed me 00:25:09 anyway 00:25:38 why not get a large flatpack cortex-m and drive each led driver individually ? 00:25:55 Because why 00:26:02 some have 180 pins and tons of IO 00:26:10 Not enough pins 00:26:32 60 leds = 4 ports 00:26:40 RGB 00:26:43 some have 6 or more poets 00:26:47 oh ... 00:27:01 ok, thats sorted then :) 00:27:16 how about one mcu per color ? 00:27:19 heheh 00:27:23 lol no 00:27:33 $3 a mcu 00:27:34 How's about one mcu and bit banging? :D 00:27:57 whats a heap of shift registers going to cost ? 00:28:11 $0, don't need em 00:28:39 ahh theyre already serial! 00:29:11 those RGB serial things 00:29:25 Wxxxx whatever 00:29:37 Yes 00:30:33 Just need a mighty solid buck converter with lots of bulk capacitance, good to go 00:31:04 lots of amps ? 00:31:20 ~3.5 Amps max 00:31:25 like stupid max 00:31:36 No reason to go that far max 00:31:44 thats not much as power goes 00:31:52 mains powered ? 00:31:53 So will prolly work in a 5A or something buck converter 00:32:03 Yeah prolly a wall wart 00:32:04 ahh buk, dc powered ? 00:32:26 I am half thinking 2x 18650's as well 00:32:40 But prolly not 00:32:43 and use the systick and a interrupt to control the timing for the leds ? 00:32:58 I will use the RTC as the clock source 00:33:11 they have fairly tight timing iirc ? 00:33:14 Not mapped that out proper yet, but something something RTC 00:33:59 so rtc for the time, but you need a realtime fast data pulse for the leds ? 00:34:05 I dunno, I imagine a busy loop going 'wtf is the time' and filling the mystery array ( which I still have not grokked ) with the proper values, bit banging them out, rince, repeat 00:34:22 tp, PWM is done in each led automagically 00:34:42 So pretty much 'o 00:34:49 sure, via a data byte for brightness ? 00:34:59 pretty much 'oi, 50% duty cycle please' and it just does that 00:35:07 makes sense 00:35:35 So 4320 bits, * 2 per update 00:37:00 the array is just a base with a index that you write to or read from 00:37:07 it's thats simple 00:38:30 the create or allot words just name locations for the data 00:38:35 I am sure it will be that simple, but its one of those 'need to do it' then *click* things 00:38:45 yeah, much of Forth is like that 00:38:46 You know what I mean 00:38:53 absolutely 00:39:09 the interactivity allows you to play with it 00:39:27 This forth shit has really tickled my tickly thing though 00:39:57 I've watched a few videos, read a few bits and bobs on it, including some of your stuff 00:40:46 cool 00:40:49 I am not yet fluient/productive in it, but it certainly seems very very very powerful 00:41:03 Like especially the interactive part 00:41:05 it's as powerful as your imagination 00:41:11 and the 'no ide' part is very nice 00:41:27 So it's just vim for me 00:42:03 sure, my first Forth "flashforth" ran a home made board from a android tablet with a terninal ap on it 00:42:12 that was the entire hardware 00:42:20 :) 00:42:40 but it's grown since then into what i really wanted 00:42:59 Forth enables everything according to your requirements 00:43:07 plus OSS unix 00:43:53 so just to recap a array 00:43:57 create 7seg $3f , $06 , $5b , $4f , $66 , $6d , $7d , $07 , $7f , $6f , 00:44:45 that creates a array called "7seg" which has 10 numbers 0 - 9 for a LED 7 segment display 00:45:15 index 0 returns the code to light up '0' on the display 00:45:28 index 1 returns the code to light up '1' on the display 00:45:31 and so on 00:45:46 I fetch the codes like this 00:46:28 : code 7seg swap cells + @ ; 00:47:00 so " 0 code" returns $3F 00:47:37 so " 1 code" returns $06 00:48:24 cells just means get the 32 bits of the address 00:49:18 hmm thats the wrong explanation 00:50:26 it simply adds "cells" to the parameter you supply and then fetches the data from that memory location 00:51:10 as cells is 4 * 8 for the full 32 bits 00:51:27 so a cell = 4 00:52:20 cells ( n - - 4*n ) Calculate size of n cells 00:53:59 if you saved 'halfwords" like this "create half $f h, $6 h, .... ; 00:57:45 Name Bits Description Example 00:57:46 Word 32 00:57:46 Cell 32 00:57:46 Half Word 16 00:57:46 Byte 8 01:04:26 All right allow me half the night to digest that 01:04:59 no problemo 01:05:35 if your data was 8 bits you could save it like this:- 01:06:10 "create byte $f c, $6 c, .... ; 01:16:59 back 01:17:14 hey tp, you don't need the swap in your code 01:18:03 cells 7seg + 01:19:11 okm ill try it! 01:19:16 welcome back! 01:19:52 thanks, unfortunately I have to run off again, dogs are demanding a walk, catch you later 01:23:19 no problemo 01:23:31 I do need the swap because this is the way it works 01:24:01 for index 0 "7seg 0 cells + @ hex." 01:24:26 7seg 0 cells + @ hex. 0000003F ok. 01:24:44 the index must come after the array name 01:33:37 anyone know who wrote that? 01:33:42 wrong window sorry 01:41:12 --- join: dys joined #forth 02:15:29 I don't know what you mean tp 02:15:44 cells 7seg + @ 02:17:57 OH! 02:18:12 somehow, ages ago I screwed this up 02:18:36 you dont understand it because Ive totally screwed it up! 02:18:53 we all have brain farts 02:18:56 it was my very early days 02:19:23 this was one of my first projects and drobe a 7 seg LED display 02:19:38 cool 02:19:45 it worked with the swap and I never went back to it 02:20:14 it's great to finally understand what was happening 02:20:23 thanks for pointing it out! 02:20:38 no problemo 02:21:19 That's one nice thing of doing a rewrite and a user manual, I'm running across all my old brain farts 02:21:22 I'm doing a page on arrays atm to illustrate the components 02:21:44 cool 02:22:40 I like the plural method for arrays 02:22:41 lol, hopefully my bad info regarding the data retrieval hasnt set jsoft back 02:23:22 I've got the character, halfword and cell storage correct at least 02:24:00 rdrop-exit, so when retrieving a char, one has to grab the whole word and mask out the desired character ? 02:24:58 rdrop-exit, so when retrieving a char, one has to grab the whole 32 bit word and mask out the desired character ? 02:25:06 oops sorry duplicate 02:25:10 not really, although I think some ANS folks do it like that with Unicode 02:25:35 My chars are bytes, so for a character array I just allot or comma bytes 02:26:02 I have b@ b! b, 02:26:10 sure, but then you get 4 bytes packed in a 32 bit word 02:26:30 assumuning you have lots of bytes to save in the array 02:27:04 ahh, the cpu should be able to address each byte 02:27:29 yes I don't allot cells for bytes, unless I happen to process them a cell's worth at a time 02:27:31 a 32 bit word is just 4 bytes concatenated ? 02:27:54 yes but the order depends on the endianess of your platform 02:27:56 data is still saved in 8 bit bytes at the lowest hardware level ? 02:28:00 sure 02:28:38 a 32 bit cpy is going to do four memory accesses for a 32 bit cell > 02:28:41 cpu 02:28:45 ? 02:29:06 no 02:29:09 or have some funky bus 02:30:03 If the machine is only word addressable, and only has word-width loads and stores, then you're forced to pack and unpack bytes if you want to manipulate bytes individually 02:31:27 depends on the machine ? 02:31:55 If the machine offers you byte sized loads and stores, and that's what you want for that particular data, e.g. strings, then you can do that 02:31:55 pack and unpack bytes = masking operations ? 02:32:17 yes, shit-or shift-and type operations 02:33:02 got it 02:33:03 :) 02:33:07 tp, lol no, I have just been distracted by alcohol 02:33:17 jsoft, just as well! 02:33:17 If you're dealing with strings of bytes, than doing b@ b! b, is convenient, no need to pack/unpack 02:33:45 I have a c@, c! c, 02:33:49 no "b" 02:34:34 jsoft, I'll have a page up by tomorrow some time showing how the different data sizes work on Mecrisp-Stellaris 02:34:43 That's what it's usually called in standard Forth, I prefer b@ b! b, since a character does not necessarily correspond to a byte 02:35:17 I prefer b myself also 02:36:11 on a 64-bit system I have b@ 16@ 32@ @ 02:36:23 @ would be 64-bit in that case 02:36:53 tp, that would be awesome :) 02:37:50 I also have @ and ! for weird widths that I only use in special circumstances, such as 40@ 56@ etc... 02:38:58 rdrop-exit, anything is possible in forth! 02:39:10 sure is :) 02:40:53 With 64 bits cpus you can do some really interesting stuff, since that's already 8 bytes on the stack 02:41:50 You can deal with strings of 8 bytes or less right on the stack instead of in memory 02:42:15 gives you some funky options compared to traditional Forth 02:42:42 --- join: iyzsong joined #forth 02:42:44 But not in ANS since all that's kind of abstracted away 02:43:44 sometimes I treat strings as 64 bit numbers instead of as traditional strings 02:44:16 I'll try to find an example 02:45:20 blinking box cursor 02:45:27 steady underline cursor 02:45:35 blinking underline cursor 02:45:43 steady box cursor 02:46:19 1 02:46:19 2 0 constant blinking 02:46:19 3 $ 10000 constant steady 02:46:19 4 02:46:19 5 : box ( blink -- style ) $ 7120315b1b + ;inline 02:46:22 6 02:46:24 7 : underline ( blink -- style ) $ 7120335b1b + ;inline 02:47:24 those hex numbers are actually escape sequences 02:47:37 ok 02:48:57 I use escape sequences for colors 02:49:33 they're normally manipulated as character strings, but on a 64-bit system you can treat them as numbers like I'm doing here, so by adding $ 10000 to that turns the blinking on or off for that sequence 02:49:52 mine are char strings also 02:50:25 so now I can easily construct phrases such as the above "blinking box cursor" 02:51:11 you could do that also if each word was a mishmash of code 02:51:13 ? 02:51:36 ahh, not so easily! 02:52:00 I see, very Zen of you! 02:52:38 I wanted to be able to factor into words that would form phrases rather then having words such as "blinking-box-cursor", I can just do combinations or 3 factors into phrases 02:52:58 to do this kind of thing requires a full understanding of the processes 02:53:31 yes, I would like to attain this level of clarity before I did 02:53:33 die 02:55:12 you bad to break the problem down into ordered sequences as a box or underline is always steady or blinking 02:55:43 the steady is acutually optional since it's just a zero 02:55:57 but I like to be explicit 02:56:20 this is strong ansii-foo 02:56:37 ansi 02:57:34 I'm only using two cursor attributes, blinking/steady underline/box, there would ber much more payoff in a system that supports a lot more cursor attributes 02:58:23 you have really taken 'Thinking Forth' to heart havent you ? 02:59:03 On a spartan system like mine, such techniques don't make a difference really, but on systems with tons of combinations, having separate factors that work together in phrases is a big deal 02:59:17 ahh awesome, Matthias just emailed me the "cutdown" 45mB version of the RISC-V toolset 02:59:27 helps you manage the combinatorial explosion 02:59:46 that's service for you! 02:59:50 yes, I read that philosophy in Thinking Forth 03:00:18 Thinking Forth is full of gems that not enough Forthers take to heart 03:00:43 i dl 1.2GB of the riscv-gnu-toolchain today and it wsnt complete! 03:01:09 they should put it on torrent if it's that big 03:01:28 it is a awesome book, after 2 readings I think I get maybe 50% of it, the easy 50% 03:01:58 problem was it would time out then have to redo that section 03:02:10 all over again 03:02:28 i probably dl 2GB 03:02:28 I don't agree with everything in it, but some of the advice is very good 03:02:36 and it still was not complete 03:02:52 well it's pretty old, and some is a bit rushed I think 03:03:16 but unless you highly factor your code, most of the advice won't work 03:03:17 but I learn things every time I re read it 03:03:49 last time I read it I understood the advantage of removing the IF statement when possible 03:04:06 I began to get the concept of rdrop 03:04:13 especially on modern architectures, branchless code can pay off 03:04:30 I'm still assimilating the concept tho 03:04:57 in my slow world a 1Mhz cpu is way too fast 03:05:01 I use branches when there is a big cost differential between the branches, if not I try to minimize branches 03:05:18 code cost is never a factor for me 03:05:56 so it's always been a low priority, but the concepts are interesting 03:06:23 by cost I mean the amount of work that needs to be done is not balanced 03:06:32 now I have the toolset I can modify the assembly code to make the Forth comms faster and with hardware handshaking 03:06:56 cool 03:07:03 balanced agains what ? 03:07:22 speed of branching is uneven ? 03:07:27 each other 03:07:44 you aim for a even time to execute a branch ? 03:07:52 one way or the other ? 03:08:16 If there's balance I try to avoid branching 03:08:43 If there's a large imbalance I use branching 03:10:59 thats too Zen for me 03:11:34 I mean one must branch or not branch is how I see it 03:12:09 I'll try to think of an example (not now too tired) 03:12:32 same here 03:12:41 Im all zrrayed out 03:12:44 arrayed 03:12:50 :)) 03:12:57 my mind is in disarray 03:13:03 very good! 03:13:11 :) 03:13:18 ah i have a branch-less example! 03:13:25 ok! 03:13:41 dave has been looking into "Thinking Forth" ? 03:13:49 : >lower ( char -- char) dup [char] A - 26 u< 32 and + ; 03:14:23 nope :-( i think i downloaded it but never read it 03:14:56 0 source ASCII - Classification - Alphabetic 03:14:56 1 03:14:56 2 : lower-case? ( x -- -1|0 ) byte a byte z between ; inline 03:14:56 3 : upper-case? ( x -- -1|0 ) byte A byte Z between ; inline 03:14:56 4 03:14:58 5 : lower-case ( x -- x' ) dup upper-case? bl ~ ;inline 03:15:01 6 : upper-case ( x -- x' ) dup lower-case? bl ~ ;inline 03:15:04 7 03:15:06 8 : ~case ( A-Za-z -- a-zA-Z ) bl xor ; 03:15:09 9 03:15:11 a : alpha? ( x -- -1|0 ) bl or lower-case? ;inline 03:15:34 wait I'll get the doc 03:15:37 mine is completely undocumented :-) 03:15:46 rdrop-exit, you really must get automatic inlining ;-) 03:15:46 0 shadow ASCII - Classification - Alphabetic 03:15:46 1 03:15:46 2 lower-case? Is a lower case ASCII alphabetic character? 03:15:46 3 upper-case? Is an upper case ASCII alphabetic character? 03:15:46 4 03:15:49 5 lower-case If is an upper case ASCII alphabetic character 03:15:51 6 convert it lower case, otherwise return . 03:15:54 7 03:15:56 8 upper-case If is a lower case ASCII alphabetic character 03:15:59 9 convert it upper case, otherwise return . 03:16:01 a 03:16:04 b ~case Case toggle. Toggle the case of an ASCII alphabetic 03:16:06 c character. 03:16:09 d 03:16:11 e alpha? Is an ASCII alphabetic character? 03:16:14 don't want it, I only want inlining when I explicitly request it 03:16:35 you seem to want it a lot :) 03:17:02 luck of the draw in this case 03:17:14 i optimized >lower because it appears in some inner loops 03:17:36 I'm going to parse my log and see if rdrop-exit wants inlining more often than not, and raise a automatic inlining petition accordingly ! 03:17:49 : ~ ( x1 x2 x3 -- x ) and xor ;inline 03:18:23 There are cases where even though the code is short you don't want to inline 03:18:53 like if it plays with the return stack? 03:19:07 or is that okay? 03:19:10 " grep rdrop-exit #forth.log " } grep inline | wc -l " 03:19:37 " grep rdrop-exit #forth.log | grep inline | wc -l " 03:19:54 yes if it plays with the return stack, there are some times where you want it to also inline, sometimes you don't 03:20:18 even Forth is a compromise ? 03:20:38 I've done some words with return stack manipulations in them that were intended to be inlined 03:23:06 rdrop-exit, out of the 3666 lines you've typed since I've been here, only 36 contained the word "inline" ... a totally useless metric for you :) 03:23:38 :))) your IRC-log-foo is very strong 03:23:43 hehe 03:23:49 from my days in COLAQ 03:23:53 -Q 03:24:27 dinner is ready, catch you in a day or two. Keep on Forthin' 03:24:40 catch you and thganks for all the tips! 03:24:50 :) 03:24:56 --- quit: rdrop-exit (Quit: Lost terminal) 03:24:58 Ive learbt HEAPS tonight 04:33:53 --- quit: mtsd (Quit: Leaving) 04:40:47 --- join: gravicappa joined #forth 05:21:50 --- quit: gravicappa (Remote host closed the connection) 05:22:10 --- join: gravicappa joined #forth 05:44:07 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 06:10:15 --- quit: dys (Ping timeout: 245 seconds) 06:23:59 --- quit: ryke (Ping timeout: 240 seconds) 06:27:48 --- join: dddddd joined #forth 06:33:15 --- join: dys joined #forth 07:25:28 --- quit: dys (Ping timeout: 250 seconds) 07:33:22 --- join: dys joined #forth 07:41:04 --- quit: tabemann (Ping timeout: 250 seconds) 08:06:53 --- join: karswell joined #forth 08:14:52 --- join: WilhelmV1nWeiner joined #forth 08:20:36 --- join: f-a joined #forth 08:21:22 --- quit: gravicappa (Ping timeout: 250 seconds) 08:27:37 --- quit: WilhelmV1nWeiner (Quit: leaving) 08:27:46 --- join: WilhelmV1nWeiner joined #forth 08:29:04 --- quit: WilhelmVonWeiner (Disconnected by services) 08:29:23 --- quit: WilhelmV1nWeiner (Client Quit) 08:29:31 --- join: WilhelmVonWeiner joined #forth 08:35:48 --- join: gravicappa joined #forth 08:37:34 --- quit: dys (Ping timeout: 246 seconds) 08:46:56 --- join: reepca joined #forth 08:49:13 --- quit: yunfan (Ping timeout: 240 seconds) 08:54:46 --- quit: dave0 (Quit: dave's not here) 09:21:01 --- quit: WilhelmVonWeiner (Quit: leaving) 09:22:09 --- join: WilhelmVonWeiner joined #forth 09:23:12 --- quit: f-a (Quit: bb) 09:37:39 --- join: ryke joined #forth 10:30:21 --- nick: Keshl_ -> Keshl 11:29:29 --- join: WickedShell joined #forth 11:35:43 --- join: f-a joined #forth 11:46:39 --- quit: gravicappa (Ping timeout: 240 seconds) 12:28:01 --- join: TonySidaway joined #forth 12:31:55 good morning Forthlings 12:32:33 ciao tp 12:33:03 hello tp 12:33:43 I came across what I thought was a good idea on CLF, namely colour the "OK." prompt according to the stack contents. For instance if stack has one item, color the prompt red, otherwise blue 12:34:10 hi f-a and crc 12:34:18 I no longer have an ok prompt 12:34:26 I have a blue prompt now 12:34:29 you trust your inner stack? 12:34:54 f-a Im trying to find peace with my inner stack ;P 12:35:06 * crc knows what's on his stacks :) 12:38:01 I must write a rant about 'anti truisms' i.e. "the check is in the mail", "the pigs have been fed and are ready to fly", "good code is self documenting" and "I know whats on my stack" ;-) 12:39:35 I always know whats on my stack until I get a million 'Unhandled Interrupt 00000003 !' messages scrolling up the screen 12:41:49 I don't have interrupts... 12:44:21 because I only do small embedded devices I have lots of interrupts 12:46:31 yup, different worlds 12:48:23 yes but still have Forth in comon 12:48:41 common 12:50:31 indeed :) 14:24:25 tp, I think "I'm trying to find peace with my inner stack" may resonate with many people. That's not just a Forth thing. Great observation. 14:26:32 TonySidaway, you read it here first :) 14:49:39 --- quit: f-a (Ping timeout: 240 seconds) 14:51:48 --- join: f-a joined #forth 15:07:22 Forth is a constant stream of inspiration it seems 15:11:39 --- quit: ryke (Ping timeout: 240 seconds) 15:40:24 --- quit: f-a (Quit: leaving) 16:17:02 --- join: dys joined #forth 16:21:27 ok this forth thing is just stupid enjoyable to develop with 16:21:51 it is so so handy using the interactive thingy 16:21:54 :D 16:26:21 Wait 16:26:30 jsoft, so right, it's addictive 16:26:31 --- join: tabemann joined #forth 16:26:35 how do I do a loop where i starts at x, and goes to zero ? 16:26:54 x 0 do loop 16:27:32 hmmm 16:27:40 I thought I already tried that 16:28:04 that's not what jsoft was asking 16:28:32 yeah that incriments i 16:28:37 what jsoft meant was 0 x do -1 +loop 16:28:54 Oh I see 16:29:03 weird 16:29:25 I usually just look that kind of stuff up in the manual. I went through the "if it's Wednesday, I must be coding in C" phase long ago. 16:29:28 thanks tabemann 16:29:40 : test 0 10 do i . -1 +loop ; ok 16:29:40 test 10 9 8 7 6 5 4 3 2 1 0 ok 16:31:29 tabemann, no, thats not what jsoft was saying ... jsoft was saying "hey guys, I'm too lazy to read a book on forth, can you guys do my Forth for me?" ;-) 16:31:32 right ok so the 0 10 do is really just the conditional / initial stuff, its expecting the loop part to do the addition or whatever ? 16:32:09 tp, im reading stuff on forth, I did not see any decriment stuff on the pages on loops I was looking at 16:32:10 I think jsoft is Australian, the heat has made his brain lazy like mine 16:32:28 I am Kiwi, A far superior nationality :P 16:32:35 so true! 16:33:23 I hope youre not a 7 foot tatooed giant Maori after my last comment (note the ;-) 16:33:49 Kiwis may be cooler, but I thought that was just a matter of latitude. 16:33:56 hahah 16:34:02 lol 16:34:28 they are very friendly, nothing is trying to kill them everyday like here in Australia 16:34:55 I had a kiwi girlfriend once, she was a beautiful person 16:34:57 you even have dropbears where you live 16:35:05 haha dropbears 16:35:39 the idea of a fanged koala landing on my head dissuades me from ever moving down under 16:36:26 jsoft, everytime I think that Forth can't do something I find that I'm not only wrong but I'm MASSIVELY wrong 16:37:17 if there is anything that it can't do, you can always build it on top of it 16:37:21 tabemann, how about the fact that you will have no practical right to self protection ? wanna trade in being a "citizen" so you can be a "taxpayer" ? 16:37:55 Im not complaining tho, even if it's hot and dangerous here, it's the land I know so well 16:38:43 you don't have regular mass shootings though 16:39:00 whereas here in america, they're so frequent that they're barely reported anymore 16:39:16 exactly, I'm about to make a word that colors the prompt red if the stack has anything on it 16:39:45 thats true, we only have irregular mass shootings 16:39:50 Billy Connolly used to have a Kiwi girlfriend. Now she's his wife. 16:40:02 Pamela! 16:40:15 the lovely Pamela Stephenson 16:42:18 I'm tempted to write a keyboard for Android that doesn't occasionally shots 16:42:24 All this talking about food has me hungry 16:42:48 show you a huge array of animated nonsense. 16:43:18 TonySidaway, I recently discovered 'HackersKeyboard' or wahtever for andriod 16:44:28 When did keyboards stop being first and foremost about squirting a string of ASCII/Unicode characters at the target? 16:45:09 TonySidaway, Unsure. 16:45:14 when they started being on touchscreens, as people have a hard time hitting keys right on a touchscreen 16:45:48 Hey if I an looking at each bit in a byte or whatever, and that byte has been given on the stack. For each comparison, I should just do a dup beforehand you reckon? 16:45:49 so autocorrect and such were introduced (even though some applications already had them on PCs, but hey were not a general thing) 16:45:55 I've used Hackers' Keyboard in the past. Maybe I'll give it another go. 16:47:07 jsoft: if you're testing the byte multiple times, and each test operation consumes a byte... 16:47:48 (as in Forth it is standard for a word to consume all its arguments) 16:48:11 jsoft, it depends on whether you intend to do something destructive to a stack value that may be examined later on. 16:49:01 tabemann, don't use the word "consume", jsoft is already hungry enough ! ;-) 16:49:18 Nah Im just checking if I am missing something obvious 16:49:40 jsoft: in short you want a dup before each test except for the last one 16:49:52 because each test will consume the byte 16:50:05 jsoft, I have always had mental terminology problems with the right term to describe what happens to data on the stack when it is used 16:50:31 tabemann, yeah I need a drop at the end in this cas.e 16:50:51 nah, just don't dup before the last case 16:51:05 the last test will consume the byte, so you won't need to drop it 16:51:10 jsoft, a drop at the end is very common 16:51:22 if it's something like a loop though 16:51:27 im doing it in a loop, 16:51:30 a final drop isvery common 16:51:37 ahh cool 16:51:42 if you're doing it in a loop, drop at the end 16:51:49 yep thats what I ended up with 16:51:52 awesome 16:52:13 jsoft, your biggest Forth bugs will probably be leaving stuff on the stack 16:52:32 that silently kills programs in wiers ways 16:52:36 wierd 16:52:39 yeah 16:52:40 ok 16:52:58 if only there was some kind of interactive way to test each word 16:53:04 for ages I had ".s" as the last term in my words 16:53:16 jsoft, there is 16:53:27 tp, :P 16:53:43 All right 16:53:45 jsoft Im making one right now that colours the prompt RED if there is anything left on the stack 16:54:03 im just going . after testing a word 16:54:03 I wrote code in my forth implementation which when enabled allows not only each word to be printed as it is executed, but also the state of the stack to be printed as well 16:54:07 I wish I'd had that when I was first learning Forth 16:54:34 The non-consuming if and whatnot: isn't that a fairly recent thing? Coloforth has a number of non-consuming words and this strategy seems to have gained popularity since Coloforth. 16:54:34 tabemann, yeah, some forths so have that but it makes it a bit wordy ;-) 16:55:21 so = do 16:56:04 TonySidaway, Fickleness oF Forth Fashion ? 16:56:19 i meant Colorforth, sorry. 16:56:25 tp: I use it sparingly because it slows down hashforth considerably and it also floods the terminal with text, such that if not used judiciously it prints far too much to be practical to look thorugh 16:58:05 tabemann, yeah, thats my observation with Forths that print out the stack with every entry 16:58:34 I think a color prompt has potential for stack info without being wordy 16:58:52 color definitely allows more, with less 16:58:59 I've gotten good enough with Forth thought that it has been a long time since I've ever needed to use that 16:59:17 tp, definitely sounds like a good signal. 17:00:42 tabemann, you programmers can do that! I'm just a electronics tech! 17:01:04 yes, master technician 17:01:06 I think Forth learners need all the help they can get 17:01:19 hahah, it's true, Im a awesome technician 17:02:15 for instance, jsoft saved himself a HEAP of issues by using the e4thcom terminal on Mecrisp-Stellaris 17:02:18 I bet many programmers can't do what you can do 17:02:47 like the legions of web programmers 17:03:03 tabemann, Forth programmers ? I could find out, I'd only have to ask 42 people because thats the number of people using Forth in the World ;-) 17:03:31 lol 17:03:53 Im willing to accept that I can make working hardware projects in 1/100the the time it takes a Arduino user 17:04:39 or 1/1000000 if the don't have a "library" to download 17:04:49 tp, do you just go #i file.fs ih e4thcom ? 17:05:21 jsoft, or #include, I cant recall as I havent used e4thcom in a couple of years 17:07:53 Well this is cool. Got my sendbit stuff done, got my sendrgb stuff done 17:08:08 now just need to loop through all the cells and thats me, talking to x amount of leds 17:08:15 --- quit: TonySidaway (Quit: TonySidaway) 17:08:16 okay, I'm going to start work on uhashforth 17:08:33 jsoft, fats work for a Kiwi! 17:08:37 fast! 17:08:40 :P 17:09:07 tabemann the brave! 17:09:09 tp, yeah I got terribly distracted last night, ended up yarning to a mate till 5:30 am 17:09:30 jsoft, grog does to a feller I hear 17:09:41 Yeah nah first I have heard of it 17:09:48 lol 17:10:10 I was programming until 1am myself 17:10:47 Accidentally somehow ended up in a strip club with the lads on wednsday night, there till 4:30am, work at 9. Not sure how that happened 17:10:52 It was all for science, mind. 17:11:21 the Police came around to arrest me, they heard that a electronics technician was impersonating a programmer ;-) 17:11:23 First time in a decade I have been to one of those, it was hillarious seeing the young guys all smitten 17:11:33 Hah :D 17:12:34 "no ossifer, I have no (hic) idea how that lovely young strippers bikini top got stick between my teeth" 17:14:57 jsoft, you realise that now you have felt the true power of the Forth, things will never be quite the same again ? 17:15:48 Over to the dark side ya reckons 17:16:33 no, you came FROM the dark side 17:16:34 I really think I aught to purchase an outrageously large steak for dinner 17:17:04 jsoft, program for a living ? 17:17:39 tp, electronic stuff 17:17:48 jsoft, spend big on a scotch fillet, don't be a sheepstake 17:17:58 scotch fillet? phhht 17:18:04 ribeye mate 17:18:27 jsoft, ahha, wow youre the second hardware guy here then! 17:19:29 Hmm 17:20:04 69 programmers and 2 hardware guys 17:21:06 jsoft, thats why it goes quiet here when we crap on about hardware 17:21:40 jsoft, if you want to talk Mecrisp-Stellaris on hardware, head over to #mecrisp so we wont annoy the programmers here 17:22:17 #mecrisp is all about hardware and Mecrisp-Stellaris, it's the quietest channel on freenode 17:23:37 back 17:24:07 tabemann, where did you go though ? 17:24:13 tp, noted 17:24:15 no, I like hearing about hardware 17:24:39 I've been working on setting up a repository for uhashforth 17:25:24 tabemann, yeah, like I love hearing about Uma Thurman ... but I'll never get any 'hands on experience' there either ;-) 17:25:48 right now it's just copying over code from the hashforth repository 17:26:28 tabemann, the Brave ! you are about to enter a Zone of sight and sound which is unknown to you .... 17:27:47 tabemann, a zone where NV memory starts at 2kB for everything 17:28:45 thats the zone of assembly compiled binaries, or tethered forths 17:29:26 or you can target those MCU's with massive 64kB flash like I use, for onboard Forth ;-) 17:30:21 --- join: pierpal joined #forth 17:31:21 welcome pierpal from the home of the worlds best motorcycles! 17:34:19 wait, what is this about motorcycles 17:34:31 Does Australia make motorbikes ? 17:35:31 back 17:35:49 jsoft, no but *.it does 17:43:23 Nah .uk does 17:45:01 my first bike was a Triumph Tiger 90 17:45:15 back in the 60's 17:45:33 the bike itself was made in 1937 17:46:13 I am a fan of the street triples, and also the thruxton 17:47:00 but nowdays I ride this : http://s000.tinyupload.com/?file_id=24625854179034628093 17:47:02 Also have you seen these hillarious motorbikes? I want one: https://www.youtube.com/watch?v=2W0BEYGh3C8 17:56:05 --- join: iyzsong joined #forth 18:25:42 I'm wondering how to load an image into a device running uhashforth 18:26:31 because an unloaded device running unhashforth will have no ability to access the outside world 18:27:10 so the only way to do so is to make the initial image part of the binary that is loaded into flash initially 18:29:20 but unless I put the initial image into an arbitrary address in flash, how does the runtime know where to find it - but that is wasteful, since unless the runtime takes up all the space alloted to it, there will be space left over 18:35:33 --- join: dave0 joined #forth 19:06:12 --- quit: tabemann (Ping timeout: 265 seconds) 19:12:12 Awesome, the led driving thing is working mean.. after some head scratching I disocovered there was noise on the signal line due to the bodgy prototype wire nest, and now its working sweet :) 19:12:32 purdgy rgb leds :) 19:12:36 purrdy even 19:31:31 --- join: X-Scale` joined #forth 19:31:49 --- quit: X-Scale (Ping timeout: 265 seconds) 19:32:27 --- nick: X-Scale` -> X-Scale 19:41:31 --- quit: oxford (Ping timeout: 260 seconds) 19:42:36 --- quit: pierpal (Read error: Connection reset by peer) 19:45:33 --- join: oxford joined #forth 19:47:02 jsoft, sweeet 19:48:38 Hey where did you say that RTC example stuff was tp ? 19:49:55 in the same Mecrisp-Stellaris directory for the f052 you use 19:50:08 under "andrew palm" 19:50:22 in the Mecrisp-Stellaris release 19:50:46 Ahh ok, thanks 19:51:23 oops under "rtc" 19:51:35 it was written by Andrew Palm 19:51:56 --- join: tabemann joined #forth 19:53:53 jsoft, it's not example stuff, it's a actual ready made library 19:54:06 hes saved you about a week! 19:54:28 tp, probably right :D 19:54:37 Awesome 19:54:50 the RTC isnt trivial like so many peripherals 19:55:15 haha your clock should be finished in a few hours 19:55:52 Nah i've got to do some more playing around with the led stuff 19:55:55 andrew is a great guy, a retired mathematician in his late 60's 19:55:56 And also make the hardware :D 19:56:02 Nice 19:56:39 he made the RTC code for a battery powered geolocator 19:57:20 the geolocator attempted to fix the LAT/LON position using time and sunlight 19:57:51 and the light intensity sensor was a LED 19:58:04 hows that for different ? 19:59:17 That's pretty different :D 20:01:11 How tricky would it be to port this C code to Forth? https://github.com/siraben/mini-haskell/blob/master/blynn.c 20:01:27 It's a graph reduction machine for lazy functional languages. 20:01:51 jsoft, Forth people do stuff diferently because we are in touch with our inner stack ;-) 20:02:10 AFAIK I haven't found an implementation of a graph reduction machine in Forth yet, thinking of writing one myself. 20:02:24 Implementing a garbage collector might be a little tricky. 20:18:20 --- join: pierpal joined #forth 22:28:37 --- quit: WickedShell (Remote host closed the connection) 22:44:55 --- quit: Jookia (Quit: Jookia) 22:51:20 --- join: ryke joined #forth 22:58:41 --- quit: dys (Ping timeout: 265 seconds) 23:12:24 forth is quite interesting aye 23:13:54 I was pondering, hmm i need a word to set to set red, green, and blue PWM (0-255 in three bytes of a cell), and I was 'hmmm how do I juggle the stack around easily to do that, by taking in red green and blue from the stack and anding them together, then it dawned on me to just make 3 seperate words which set each color 23:14:25 set-red, set-blue, set-green, and then set-rgb which uses those first three.. no stack juggling, just stragiht anding 23:14:45 It seems simple but it kind of forced me to choose the simplest option. 23:18:42 jsoft, I usually have to go thru 3 iterations of my solution before arriving at a reasonable on 23:18:45 one 23:19:13 I find the key is just to write SOMETHING because then ideas will come 23:48:46 Once you have a working (or almost working) implementation, it's easier to pick it apart and make decisions to improve it because you don't have to visualize the problem as much 23:48:55 Since at least part of it is in front of you 23:49:15 ryke, so true 23:49:18 I feel that that's true for any language not just forth 23:49:33 I'm sure youre right 23:49:45 But maybe especially true for forth. It's probably subjective 23:49:51 * ryke shrugs 23:49:53 it's also true when making mechanical things 23:50:26 I thought about a special connector terminating jig for at least a year going thru dozens of ideas in my mind 23:50:41 when I built it, my best idea was crap 23:50:55 the finished device was nothing like my plans 23:51:08 it developed into a awesome thing 23:51:52 if just built *something* as soon as I had the idea, Id have finished 12 months earlier 23:52:07 ok, colored prompt done :) 23:52:52 my prompt is "ok." like all forths, in my case black letters on a white background 23:53:23 now if the Stack >0 the "ok," prompt is red until the stack == 0 23:53:54 thats the end of my having to check that the stack is clean with .s 23:54:09 --- join: gravicappa joined #forth 23:59:59 --- log: ended forth/19.11.22