00:00:00 --- log: started forth/19.12.07 00:54:43 jsoft ping 00:55:17 pong 00:56:09 after some experementation it looks to me like arrays are flash only but buffers (even created in flash) are ram based 00:56:50 jsoft, is that your findings also ? 00:58:12 jsoft, i.e. you need to use buffers for your project, not arrays 00:59:10 because you are writing/reading the buffer during flash based program execution 00:59:44 tp, yeah already switch to buffers since approximately 2:30 am friday morning 00:59:45 :) 00:59:59 i thought so, just confirming 01:00:08 but the create thing does work when only compiletoram is used. 01:01:20 there is no 'create thing' you mean something like "create array 80 allot" ? 01:06:32 yeah the create thing 01:07:01 well I'm glad we cleared that up 01:07:45 Yes :) 01:07:57 I ate half a kg of shrimp this evening :D 01:08:22 I'd hate us to be floundering around Forth like a couple of morons unaware of and unable to communicate using precise terminology, thank God that's not us! 01:08:32 wow 01:08:58 I had more steak 01:09:11 Yeah I had some scotch fillet too 01:09:17 now I'll have a 3 day fast I think 01:09:29 Its weird, scotch fillet seems to come in like, normal steak form, and also that really thin stuff 01:09:34 wtf 01:09:43 Why a fast for ? 01:09:52 I'm trying eating once every 3 days or only when Im hungry because I lead a sedentary lifestyle 01:10:09 overweight is the driver 01:10:16 Eating when hungry is a good idea 01:10:19 :) 01:10:25 agreed 01:10:35 seems to have worked for me the last 65 years 01:10:41 hehe :D 01:11:00 so I've learned a few new things 01:11:09 What are those things 01:11:21 now I know why buffers exist and how they work 01:11:31 ditto arrays 01:11:54 mt test buffer is called 'scratchpad' 01:12:06 \ compiletoflash 01:12:06 \ 9 buffer: scratchpad 01:12:06 \ compiletoram 01:12:15 and it lives in flash 01:12:36 yet it's XT ? is in the ram space 01:12:51 scratchpad hex. 20004E0C ok. 01:13:22 \ Write buffer 01:13:23 \ $f0 scratchpad 0 + c! ok. 01:13:23 \ $f1 scratchpad 1 + c! 01:13:23 \ read buffer 01:13:23 \ scratchpad 0 + c@ hex. 000000F0 ok. 01:13:23 \ scratchpad 1 + c@ hex. 000000F1 ok. 01:14:17 oops 01:14:34 I mean 'scratchpad' reports an address in the ramspace 01:14:48 it's XT is definitely in flash 01:14:51 ' scratchpad hex. 0001677E ok. 01:15:41 what is this XT thing 01:16:26 execution token 01:16:29 I think 01:16:33 --- quit: WickedShell (Remote host closed the connection) 01:16:52 Ahh but of course 01:16:57 Those things 01:17:00 it's just the memory address that the Word is run from 01:17:42 "words" displays all the parts of each word 01:17:55 Hmm 01:18:05 Yeah I should get around to mincing with that kind of thing 01:18:16 whereas my "words4" just displays 4 columns of word names only 01:18:19 This whole thing was all rather rushed 01:18:48 amazing you built it so fast, no wonder they want you bad at 'that other place' 01:19:28 I am a trained monkey at work pretty much 01:19:39 Not really doing any pcb/proper cool shit 01:19:46 doesnt seem to have held you back 01:19:57 quite the reverse 01:20:15 Well yeah nah one must poke and prod and satisfy curiosity and scratch itches 01:20:25 must one ? 01:20:31 I reckons 01:20:48 What else is there to do.. watch TV or something ? 01:20:49 many people Ive met dont seem aware itches exist 01:21:24 Yeah it is kind of odd, that 01:21:28 or their itches are watching tv 01:21:55 --- join: rdrop-exit joined #forth 01:23:12 now I'm old I talk to a lot of old people utterly confused and lost in the world of computers and the internet. Oddly these were the same young people telling me they weren't interested in 'computers and shit' and 'didnt need them' 20 years ago 01:23:53 at the time their itches were tv, sports and beer 01:24:03 buffer: is an ANS addition 01:24:12 What is an ANS addition 01:24:23 Oh that standard thingy eh ? 01:24:34 rdrop-exit, you'd think that ANS invented everything in Forth ? 01:24:43 something that was added by ANS standard Forth 01:25:06 BUFFER: provides a means of defining an uninitialized buffer. In systems that use a single memory space, this can effectively be defined as: 01:25:09 : BUFFER: ( u "" -- ; -- addr ) CREATE ALLOT 01:25:11 ; 01:25:23 However, many systems profit from a separation of uninitialized and initialized data areas. Such systems can implement BUFFER: so that it allocates memory from a separate uninitialized memory area. Embedded systems can take advantage of the lack of initialization of the memory area while hosted systems are permitted to ALLOCATE a buffer. A system may select a region of memory for performance reasons. A 01:25:29 detailed knowledge of the memory allocation within the system is required to provide a version of BUFFER: that can take advantage of the system. 01:25:32 It should be noted that the memory buffer provided by BUFFER: is not initialized by the system and that if the application requires it to be initialized, it is the responsibility of the application to initialize it. 01:26:26 Hmm 01:26:35 Note: all of the above is a quote from the ANS standard 01:26:38 Well initializing things is not really a drama is it 01:26:59 I'm usually befuddled by the ANS explanation 01:27:19 I don't care for ANS myself, I ignore most of it 01:27:25 doe they mean RAM by "uninitialized" ? 01:27:30 -e 01:28:03 they mean that there's no guarantee about what's in it when you boot up 01:29:03 presumably to contrast with something that gets it's initial value from ROM/Flash 01:29:48 or the reset routine 01:33:10 rdrop-exit, so what do you get up to on the daily? Are you a forth nerd at work ? 01:33:21 I'm retired 01:33:57 Work is only a distant memory 01:34:06 Lucky bugger :) 01:34:36 I just take it easy 01:34:54 :) 01:35:07 Nice stuff :) 01:36:01 Right now I'm doing a full rewrite of an old Forth 01:36:42 at a very leisurely pace 01:36:51 redocumenting as I go along 01:37:08 Nerd :P 01:37:22 Nah thats cool 01:37:42 I'm enjoying it :) 01:44:46 When I'm done with my revamp, I will likely focus on umbilical assembly for RISC-V 01:46:36 --- join: ryke joined #forth 01:49:43 rdrop-exit, awesome, please dont hesitate to bug me if I can be of assistance as Im working with RISC-V atm 01:49:57 I am not entirely sure what that all means, but sounds constructive :) 01:50:28 jsoft, youre working with Cortex-M ARM atm 01:50:34 in the stm32f051 01:50:58 Yeah? 01:51:03 RISC-V is another type of microprocessor 'architecture' 01:51:21 as in what arm is ? 01:51:22 thats all 01:51:40 yeah, ARM stands for 'advanced Risc Machines" 01:51:53 and was first used in the BBC 'acorn' 01:52:06 tp, I'm sure I'll take you up on that at the moment. Initially my focus will be on understanding the ins and out of their draft debug standard. 01:52:13 Hmm I was not aware of this informations 01:52:33 replace "at the moment" with "eventually" 01:52:43 rdrop-exit, ... always the consummate professional Zen Fort Guru! 01:53:31 you flatter me :) 01:53:31 Hmm 01:53:41 lol\ 01:53:50 jsoft, ARM is unique in that the Architecture design is all they do, ARM then license their designs to various chip makers who add their own peripherals as ARM is only the "core" 01:54:28 STM add their own peripherals, as do NXP or Microchip and so on 01:54:49 Microchip do arm now ? 01:54:51 it's the same with RISC-V except the design is 'open' so anyone can use it 01:55:03 Microchip have done arm for a decade 01:55:08 Really? 01:55:14 with the "SAM" series 01:55:17 yeah 01:55:18 Ooooh 01:55:24 Oh ok, Never new that 01:55:28 lol, new 01:55:38 I am an england brofessor over here 01:55:41 jsoft, there are so many 'things' to learn! 01:56:17 Nah I've actually only ever used 8 bit pics. They seem to be mighty fine for for everything I have wanted to do with them 01:56:42 ARM is somewhat unique in that it has a method to 'turn on/off' peripherals and hence save power, so ARM became synonymous with 'low power' mcu's 01:57:39 Only really used an ARM for a DSP thing. Essentially I was on a course as part of work, and some egg smugly said that 'you need to spend years at university to make a digital filter'. And so I got drunk that evening and wrote a low pass filter on an F0 discovery, and then a week later made an F7 based thing with an oled display where different filter types can be selected. 01:57:49 Im not sure if 'low power' was just a byproduct of ARM not having their own peripherals and providing clocks that can be turned on/off to the chip makers 01:58:25 But yeah, if I can get a grip of the L0 series, I think I might replace my current batch of 8 bit pic based sensor boards 01:58:31 but youre using a ARM for your clock also 01:58:46 Well yeah I guess that too 01:59:12 nothing wrong with PIC, I have a couple of hundred PICS in stock 01:59:21 Yeah I don't find anything wrong with pic 01:59:27 but, I like this mecrisp thing 01:59:45 And it would be nice to develop future low power projects using forth 01:59:53 but I never use them now because my own STM32 development environment shits on anything PIC 02:00:01 Yerp 02:00:11 Yeah nah this forth thingy is quite the shiny thing 02:00:32 there is a *excellent Forth for PIC, it's called "flashforth" 02:00:32 Its quite fun to develop in 02:00:48 made by Michael Nordstrom 02:00:48 Yeah I remember you mentioning that, except there was some limitation to it, cant compile to ram or something 02:00:59 that's it 02:01:09 Yeah I like this compiling to ram business 02:01:22 it's very handy and I use it all the time 02:01:45 I only compile to flash when Words are tested and debugged 02:01:52 Yeah 02:02:16 thats the essence of Forth, being able to "talk to the machine" 02:02:17 and I load about 20 "development aid" Words at the start of each project 02:02:28 all into flash 02:02:36 rdrop-exit, absolutely 02:03:05 this same feature is what the micropython people love 02:03:26 micro python eh 02:03:37 albeit at the cost of another 200kB flash and a M4 02:03:42 that sounds like a bit of a gumby development environment 02:03:53 it's actuallt damn slick 02:04:15 --- join: dys joined #forth 02:04:16 Is it? 02:04:19 Is it nice and fast ? 02:04:21 for instance they have a flawless *full screen* editor that would make rdrop-exit jealous 02:04:44 what do you mean a full screen editor 02:05:02 it's speed is the same interactively, but no, in execution it's at least 30x slower than Forth on the same hardware 02:05:11 only if it uses Wordstar key bindings ;) 02:05:15 haha 02:05:23 rdrop-exit, it's really slick 02:05:39 Yeah 02:05:50 Nah I think I will pass on micropython 02:05:59 jsoft, the cursor can be moved all around the code ON the mcu and edited 02:06:10 Ok that's spiffy 02:06:12 But meh 02:06:17 oh, Forth is TONS better 02:06:40 but I see the attraction kids have for micropython 02:06:50 My goal is zero footprint on the RISC-V 02:06:59 nice 02:06:59 zero footprint ? 02:07:07 How does that work 02:07:10 Zero flash ? 02:07:14 youll be on a par with mecrisp-across on msp430 then ? 02:07:44 except I won't need external tools, like gnu-whatever 02:07:45 no, rdrop-exit means the host Forth will not need any code on the target 02:08:16 Not need any code.. I still dont get it 02:08:28 rdrop-exit, thats only needed to compile Mecrisp-Stellaris which comes with the binaries anyway 02:08:41 jsoft, I plan to leverage the debug interface to lay down code on the target as needed 02:09:03 Talk to me like am a 2 year old 02:09:08 rdrop-exit, are we giving out prizes for drunken Kiwis that don't get stuff tonight ? 02:09:09 I still don't get what you are getting at 02:09:14 lo 02:09:27 jsoft, I have been ... ;-) 02:09:32 l:P 02:09:56 jsoft, you have to up your game to keep up with rdrop-exit ! 02:10:06 They're working on a standardized debug infrastructure and interfacing standard for the RISC-V 02:10:20 I am missing something obvious here. 02:10:22 rdrop-exit, it's not set in stone yet ? 02:10:35 What is the difference between flashing the uC and using this debug interface gizmo 02:10:40 jsoft, rdrop-exit is talking about his 'tethered Forth 02:10:53 And what is tethered forth 02:11:01 To the RISC-V my development host on the PC will be seen as a debugger by the RISC-V chip 02:11:12 jsoft, https://mecrisp-across-folkdoc.sourceforge.io/index.html 02:11:38 through the debug interface I can lay down and test code, write to flash, etc... 02:11:52 My Forth is on my PC 02:12:06 talks to the target via a serial tether 02:12:18 a tethered Forth would suit me fine in 90% of my uses 02:12:57 In theory I should be able to talk to the RISC-V and develop on it without using any external tools 02:13:05 Oh I see, so there is no compiler on the actual target? 02:13:08 (interactively) 02:13:12 corrext 02:13:15 Ahh right 02:13:20 Right 02:13:21 correction: correct 02:13:25 lol 02:13:31 :)) 02:13:50 Hmm 02:14:00 Nerd :P 02:14:38 I don't need to start by flashing a hex file using external tools, I want to talk to a board right out of the box 02:15:10 as they used to say, plug n' play 02:15:15 --- quit: ryke (Ping timeout: 265 seconds) 02:16:03 tp, it's a draft standard at the moment 02:16:26 but I'm sure major parts of it are already implemented in some products 02:16:28 in the case of mecrisp-across I can plug in a virgin blank MSP-430 and it will immediately work 02:16:51 I started looking at the MSP-430's, they are quite the fancy pants aye 02:17:12 that's the idea, no need for gnu-tools or any other tool chain 02:17:28 Im just a user, I only know how to operate mecrisp-across, I don't know the full details of how it works 02:17:53 jsoft, MSP430 is unique to me in a couple of ways 02:17:53 magic, of course 02:18:23 1) MSP430 is 16 bits, and has the nicest Assembly one could ask for 02:19:34 2) MSP430 have tightly integrated peripherals, unlike cortex-m where low power modes take a month to learn, MSP430 is a single command to achieve low power 02:20:21 3) MSP430 comes in DIP packages which some people love 02:20:45 4) MSP430 is very low power, probably among the lowest of the low 02:21:39 4) MSP430 uses a robust flashing mechanism, fast and flawless, unlike SWD which I think isnt as robust 02:21:48 er make the last one 5) 02:22:10 ok, done 02:22:11 downsides are I hate the Ti documentation 02:22:35 and MSP430 are more expensive than stm32f 02:30:23 Sometimes development time is more costly 02:30:36 Do you play chess tp ? 02:30:57 How about a nice game of Thermo-Nuclear War? 02:31:26 A strange game. The only way to win is to have another vodka 02:31:30 jsoft, I do 02:31:36 :) 02:31:41 tp, fancy a game? 02:31:48 jsoft, but Im pretty usless at chess 02:31:54 tp, yeah same, but its fun 02:32:01 jsoft, nah, I live to design 02:32:12 What is this? Chicken noises? 02:32:14 :D 02:33:53 Id rather have a good game of "iourbanterror" 02:34:37 i prefer to see my opponent blown to bits by a grenade Ive just lobbed into a window of the roome hes trying to snipe me from 02:35:11 urban terror eh? 02:35:31 well I havent played it in years but it's the only game that would tempt me 02:35:57 I've laughed so much playing it that I rekon Ive added 2 years to my life 02:36:02 What is involved in setting it up ? 02:36:21 apt-get install iourbanterror 02:36:26 oh really? 02:36:33 Sounds like a chore :P 02:36:39 I'm assuning you use a debian based Linux > 02:36:42 ? 02:37:09 There must be some 3rd party repo for that 02:37:10 yeah, pretty difficult, 3 kiwi IT people could probably manage it in a couple of days tho 02:37:32 lol, it's in my FreeBSD repo 02:37:54 psearch urban 02:37:54 Oh 02:37:54 games/iourbanterror Quake 3 engine modified for Urban Terror (based on ioquake3) 02:37:54 games/iourbanterror-server Quake 3 engine modified for Urban Terror (based on ioquake3) 02:37:54 games/quake3-ut Quake III Arena mod: Urban Terror 02:37:54 games/urbanterror-data Standalone realism based mod originally for Quake III Arena 02:38:11 it has the best game play ever! 02:38:29 it's built for gameplay, not weapons realism 02:38:51 man have I has months of fun playing it 02:39:08 ARe you keen for a game then? 02:39:21 there are a ton of online servers you can join, or you can install your own which I recommend 02:39:48 yeah, i'll install it and play, but we arent ready to join a free online server I think 02:40:01 if youre not up to scratch they will kick you 02:40:07 Really? 02:40:13 yeah 02:40:14 Do you have your own router ? 02:40:17 Are there bots ? 02:40:22 Can you host a game ? 02:40:32 yep, yep, maybe 02:40:50 I used to host a server 02:41:19 and played with my friends until we got good enuf to join the main game servers, it was awesome 02:41:20 Perhaps not tonight, but if you can organise one, on your own pc or whatever, we should have a game some time 02:41:28 ok, it's a deal 02:41:42 there are some great servers in NZ 02:42:11 once you install the game it will search for servers and give you a list 02:42:29 Im keen 02:42:35 I'll play that if you join lichess 02:42:48 I used to set up a 'practice room' and play there for a few weeks to get people up to speed 02:43:01 Chess is awesome, and they have chess puzzles on there which are quite fun to do when you have a spare 10 minutes or wahtever 02:43:10 nah, Id rather program than play chess, no deal! 02:43:32 Sounds like you have been eating too many vegetables :P 02:43:52 at 65 I have nothing left to prove ... except that I can get out of bed unaided ;-) 02:43:59 :D 02:44:14 nah, just a few vegies, no carbs 02:44:54 Nah cool though 02:44:57 Im keen 02:45:03 vegies arent the problem anyway, it's "highly processed carbs" that are killing people 02:45:26 I personally don't get affected too much by vegies 02:45:32 vegies have tons of fibre which makes them lo-gi 02:45:44 It think fiber is not required at all 02:45:52 I can tell, but I admire self confessed meateaters! 02:46:17 jsoft, I agree, but I like some vegies anyway 02:46:28 you drink alcohol, I eat vegies. 02:46:38 :) 02:46:41 we all have our own vices ;-) 02:47:24 I always have some small amount of vegies with my MEAT! 02:48:03 and I only eat kangaroo or beef rump etc, no processed meats 02:48:16 no processed foods 02:48:35 I have never tried kangaroo 02:48:39 and I grow 90% of the vegies I eat 02:48:51 I actually don't mind gardening eh 02:48:58 it's exactly like beef, just more chewy and zero fat 02:49:13 Zero fat? Cant be eating too much if it then I guess 02:49:14 kangaroo is the highest protein of any meat 02:49:24 I need my fat 02:49:31 we all need out fat! 02:49:34 our 02:49:53 so just have some other fat with the kangaroo, problem solved 02:50:03 I would suppose so 02:50:07 Oi have you tried duck fat? 02:50:13 no 02:50:13 Thats quite interestings 02:50:25 You owe it to forth to try duck fat 02:50:34 hahah, we are off topic again! 02:50:37 :D 02:51:05 * tp manages to duck that line of discussion 02:51:15 Oooh I see what you did there 02:51:34 so how is your Forth project going ? 02:51:41 what remaining to do ? 02:51:44 Its already done 02:51:48 finished ? 02:51:50 Yes 02:51:56 tells the time etc ? 02:52:05 It was done as of 5am on thursday 02:52:16 after you give it to your friend, do we get a pic of the clock front ? 02:52:33 xtal added etc ? 02:52:38 Hardware wise, it needs a crystal. So I will just make a new pcb, better laid out even, and release that, perhaps on hacker news or whatever as you suggested 02:52:45 then ist NOT done! 02:52:49 forth is 02:52:54 oh ok 02:52:58 fair enuf 02:52:58 you said forth project :P 02:53:17 well all *my* Forth prokects involve hardware 02:53:41 to me Forth IS hardware 02:53:56 is all about hardware I mean 02:54:24 Ill see about installing a URT server tomorrow 02:54:58 I have a few friends who have been after me to do that so they can blow me to bits or die trying also 02:55:05 :D 02:55:21 Well it sounds like operation pick on tp is in the works :D 02:55:29 caution ... it is *very* addictive 02:55:39 hah, I can handle it 02:56:31 it's crazy actually, once you get good enough you can join teams online and after playing with a team for a while you get to know them, even tho you have never spoken 02:56:47 you even develop unspoken strategies working together 02:58:12 Sounds good 02:58:23 oh, the game comes with a built in server and bots to practice on 02:58:40 so set that up and get the hang of it 02:59:27 teams also play 'capture the flag' 02:59:53 Yep done that kind of game before 03:00:04 Its cool aye, online stuff like that 03:00:09 it's a heap of fun in the right team 03:00:16 it's truely awesome 03:00:59 the game maps (locations) are really well done, places like Ridyah .. 03:01:14 or old established european towns 03:01:43 I havent played for over 5 years 03:09:07 --- quit: rdrop-exit (Quit: Lost terminal) 03:11:20 --- join: jedb joined #forth 03:12:30 --- quit: jedb_ (Ping timeout: 268 seconds) 03:44:35 --- quit: dne (Remote host closed the connection) 03:47:02 --- join: dne joined #forth 04:23:41 --- quit: nonlinear[m] (Quit: killed) 04:23:43 --- quit: siraben (Quit: killed) 04:23:44 --- quit: alexshpilkin (Quit: killed) 04:24:09 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 04:37:24 --- join: Guest16939 joined #forth 05:20:31 --- join: jimt[m] joined #forth 05:20:31 --- join: nonlinear[m] joined #forth 05:20:31 --- join: siraben joined #forth 07:36:22 --- quit: dave0 (Quit: dave's not here) 08:20:00 --- quit: X-Scale (Ping timeout: 240 seconds) 08:22:39 --- join: X-Scale` joined #forth 08:23:07 --- nick: X-Scale` -> X-Scale 08:26:23 --- quit: dys (Ping timeout: 268 seconds) 08:33:29 --- join: dddddd joined #forth 08:44:55 Hi [[https://xkcd.com/256/][IRC Isles]]. 09:08:49 --- join: gravicappa joined #forth 11:19:24 --- quit: gravicappa (Ping timeout: 252 seconds) 11:44:49 --- join: ryke joined #forth 12:14:48 --- quit: begin (Quit: ) 13:02:25 --- quit: Jookia (Quit: Jookia) 13:04:18 --- join: Jookia joined #forth 13:23:37 tp, are you around sir? 13:23:53 I got qemu installed on Ubuntu but cant find it from the command line 13:25:17 do I have to cd into some directory first? 13:44:25 MrMobius, bak 13:45:05 MrMobius, which qemu have you installed ? 13:47:25 --- join: dave0 joined #forth 14:04:29 --- quit: tabemann (Ping timeout: 250 seconds) 14:09:15 I tried apt-get install qemu 14:11:10 seems to have worked but typing qemu or qemu-static-arm results in command not found 14:13:56 MrMobius, try "apt-cache search qemu" 14:14:10 then you will get a list of available packages to install 14:15:24 MrMobius, you want to install the "qemu-user-static" package 14:16:01 or whatever Linux names their qemu static package 14:16:41 ok cool 14:19:49 woohoo, im to a forth prompt 14:20:07 wtg! 14:21:21 now all the arcane secrets of the Mecrisp-Stellaris will be revealed to you in their naked glory! 14:21:37 only took about 4 hours 14:21:45 hopefully the next 10 minutes are worth it 14:21:56 well youre hamstrung by windows, so it's to be expected 14:22:07 it's a 5 minute job on Linux 14:23:21 you're complaining that it took you 4 hours to dig a hole with a windows shovel that I can do in my unix backhoe in 5 minutes ;-) 14:24:06 at least now you have a vm running linux, you can run Linux apps in a few minutes 14:25:07 --- join: tabemann joined #forth 14:25:29 yes this is amazing. running everything at ~10% speed 14:26:16 hahaha 14:26:18 hmm, when the stack is empty and I push 5 for example, why does it put a 0 on the stack when 5 is in TOS? 14:26:56 how many items are shown in the stack counter ? 14:29:52 1 14:30:42 and this disassembly is all thumb code, right? 14:30:54 yes 14:31:41 i have no idea why there is a extra number shown in the stack display, but it's never on the stack itself as shown by the stack counter 14:32:28 in fact that number is usually "42" as that's what's loaded at bootup to replace random junk 14:33:04 woops, I guess Ctrl+C doesnt copy in the terminal... 14:33:10 Mecrisp-Stellaris is just a port of "mecrisp" which matthias wrote first for the MSP430 14:33:29 lol, no, that probably killed Mecrisp-Stellaris ? 14:33:37 yep :) 14:33:44 trying to copy the output to show you 14:33:45 timeout: 265 seconds) 14:33:45 [16:24] I am a backend dev and react was super easy to get into 14:33:45 [16:24] *** funeral quit (Ping timeout: 268 seconds) 14:33:45 [16:24] react's doc is also pretty great: https://reactjs.org/docs/getting-started.html 14:33:45 [16:25] *** m1dnight_ (~m1dnight@78-22-11-99.access.telenet.be) joined 14:33:46 [16:25] I should probably go through js crash course as well 14:33:46 [16:26] any recommendations? something really fast, that doesn't tell me what a variable is. I know half a dozen languages already 14:33:47 [16:26] to be honest, even for internal use, it is kind of nice to turn a simple program into a webpage, and have it accessible in any OS, on any computer, laptop or phone. so maybe I should learn it < that's what I use it for as well 14:33:48 [16:27] *** dan101 quit (Ping timeout: 250 seconds) 14:33:55 woops thats not what I meant to paste 14:34:04 0_0 14:34:06 sorry admins 14:34:08 yeah, coppy and paste with a VM is always a pain 14:34:56 ya and looks like copying in the VM does not copy it to the windows clipboard 14:35:05 spoiled on my windows VMs at work I guess 14:35:19 I don't use VM's so youll have to Google to find out how it's done in your case 14:36:07 another option is to SSH from windows into the Mecrisp-Stellaris running on your VM 14:36:11 no worries. just muscle memory switching out of a VM window :P 14:36:32 that way you do it from Putty under windows or whatever 14:37:05 what does the *> mean in Stack: [1 ] 0 TOS: 5 *> when I do .s? 14:37:32 it's just the default stack legend 14:37:52 I change mine to ".s [0 ] 118785 ok." 14:38:25 I guess the "*>" is a kind of psuedo prompt 14:38:55 I never liked it so remove it from a new Mecrisp-Stellaris release 14:39:41 neat 14:40:04 the advantage of a open Forth :) 14:40:25 and there is no way to get it to generate msp430 code for me to disassemble if im doing this on qemu? 14:40:55 there is 14:41:29 see https://mecrisp-across-folkdoc.sourceforge.io/index.html 14:42:15 I've not done it, but it should work in qemu-static as far as generating a msp430 binary 14:43:00 that site is mine also and the pictures are of my gear running Mecrisp-Stellaris Forth on a MSP430 14:43:27 any hint on what to look for here? 14:44:16 mecrisp-across is a tethered Forth for msp430 14:45:01 and i can run that with qemu-arm-static? 14:45:17 you should be able to 14:45:35 you wont be able to use 'target' mode 14:46:17 but host mode allows you to compile binaries for the msp430 target on ARM 14:47:23 and it has the same linux system calls that lets mecrisp-linux work on qemu? 14:48:19 well mecrisp-across is just a Word that runs on Mecrisp-Stellaris 14:48:59 thats the beauty of it 14:50:08 the 'mecrisp-across' Word will run on the exact Mecrisp-Stellaris youre running now 14:50:37 thats pretty slick 14:50:37 but youll lose all target hardware dependent stuff 14:50:40 yeah 14:51:35 hmm word not found 14:51:45 nevertheless mecrisp-across will run on Mecrisp-Stellaris and generate machine code for the msp430, but you cant actually test it live on a MSP430. 14:53:05 you can however write Forth code, compile it into a binary with mecrisp-across and then flash that to a actual MSP430 with the Ti hardware 14:53:25 i just want to generate msp430 assembly and look at it but not run it 14:53:40 sure 14:53:47 well you can do it that way 14:54:09 how do you see the contents of a word in forth? not the disassembly 14:54:18 a word youve written i mean 14:54:18 youll need the mecrisp-across distribution 14:54:37 you cant 14:54:50 holy moly 14:54:58 the dissasembler output is assembly with Mecrisp-Stellaris 14:55:02 what if you made a mistake? have to type the whole thing in again? 14:55:07 whole word 14:55:13 think about it 14:55:27 Mecrisp-Stellaris runs on small embedded chips 14:55:44 fair enough 14:55:49 what about on PCs? 14:55:55 there is no room to save the source as well on the small flash memory available 14:56:18 on a pc you have the source code already, no need to reconstruct it 14:57:04 but you have a very good point 14:57:44 the 'traditional' method of typing source into a serial terminal for upload to the on-forth chip has always sucked 14:58:12 I dont use that method except for occasional interactive tests 14:59:09 ya. not a criticism. just never used forth before 14:59:17 other than messing around 14:59:21 I write all my source in a editor, and when I click on the 'make' button, 1. the source comments are stripped, 2. the bare source is uploaded to the target at 460800 baud with hardware handshaking 14:59:53 so execution just starts at the beginning of the source or is there a word it starts with? 15:00:02 MrMobius, I think it's a very valid criticism myself, it was one of my first Forth criticisms :) 15:00:30 it starts at the first character of the source 15:00:38 makes sense 15:00:49 MrMobius, wow, I thought you were a long term Forth user! 15:00:56 what about on mecrisp where you have a defined a bunch of words? 15:01:00 not at all 15:01:31 I started learning and lost interest when I found out how slow stack operations on are the architectures im interested in 15:01:39 thats why the optimization stuff is so interesting 15:01:41 Mecrisp-Stellaris comes with a ton of predefined words which are viewed with "words" entered in the terminal 15:01:44 maybe its not so bad afterall 15:02:11 right but I mean if I define 3 words then flas the msp430, where does it start executing? 15:02:14 MrMobius, there are some really SLOW forths around 15:02:32 it starts at the first word you flashed 15:03:03 slow is not necessarily bad if it speeds up your development I think 15:03:04 so basically all dependencies must be uploaded first 15:03:22 I think slow is terrible in embedded 15:03:26 yikes. sounds like you would need to write it in a file first then for anything serious 15:03:36 absolutely 15:03:59 well, Im NOT a programmer, Im a electronics tech, so I have no idea what *real* programmers do 15:04:30 in my case without my editor based Forth development system, I'd still be using C 15:04:59 hmm, all the bleating about interactive programming makes it sound like you are defining words at the prompt and periodically run the whole program while it has all the words in memory or something 15:05:04 MrMobius, there are other traditional methods tho 15:05:08 although I could see how you cant do that on a little mcu 15:05:34 the Forth interactivity is definitely why I use Forth 15:06:27 MrMobius, traditionally thats what people did, they worked on a word until it worked, then they loaded it into ROM 15:06:44 and the whole program was made word by word 15:06:58 basically I still do that 15:07:23 by definition a "Word" is only 3 - 5 lines long 15:07:51 long words are avoided at all costs and if a Word can be refactored it is 15:07:51 sounds reasonable 15:08:26 back 15:08:28 hey guys 15:08:40 hey tabemann ! 15:09:30 hi! 15:09:44 tp, awww, no see or list on mecrisp-across :( 15:10:39 MrMobius, there are 'on screen editors' for some Forths which enable active full screen editing of the source in the mcu 15:11:38 MrMobius, just run the binary thru your favorite msp430 dissasembler ? 15:16:01 gross 15:16:17 there is a disasm word 15:17:16 it's been several months since I last used mecrisp-across 15:18:19 ( from my notes) See The Compiled Words; While in Target Mode, the contents are in Forth, rather than Machine Code 15:18:35 ill figure it out 15:18:41 see off 15:18:41 : off 15:18:42 00006394 : 0000 : $00000000 15:18:42 000063A0 : 0000 : $00000021 15:18:42 000063AC : 0000 : c! 15:18:44 000063B8 : 0000 : ; 15:18:46 ok. 15:18:59 but you cant run target mode via qemu-static 15:19:12 so how does it work when you do something like see word? is that a special syntax that takes an argument rather than the stack? 15:19:25 "see see" 15:19:55 will dissasemble the "see" word 15:20:25 what I mean is the thing you are seeing is no on the stack but it comes after see if typed in 15:21:05 ahh, "t-listing" in host mode does dissasemble the target binary 15:21:30 correct 15:21:51 "see +" will dissasemble the "+" word 15:22:12 this is backwards compared to the usual operation 15:22:33 I think because it has to handle characters 15:22:58 is there a name for those types of words so I can read about them? 15:23:19 because if you did it this way " + see " it would think that you were executing the '+' Word first 15:23:40 what type of words ? 15:24:09 if you mean "see" type of words, I have no idea 15:25:43 ya I get how see works I was just curious if you can create those types of words or what else they entail 15:26:04 ok cool I got the MSP430 disassembly 15:26:56 whats the difference in host and target mode? 15:29:11 in target mode the PC terminal seems to be connected to a Forth running on the MSP430 15:29:41 I can do anything I like, turn gpio's on/off read registers and so on 15:29:53 it's a bit of a brain twister 15:30:31 why wouldnt you always want to be in target mode then? 15:30:51 I know the PC terminal is connected to the Ti Connected Launchpad board, and that it is connected to the MSP430 target via jtag, but after some development I'd swear I'm talking to the MSP430 directly 15:31:18 because host mode allows compiling a binary for the target 15:31:46 hmm 15:32:03 after all, once the target program is finished and the target tether severed, there is only the binary 15:32:25 there is no Forth on the target at any time 15:32:49 it seems like you could combine them into one mode 15:33:02 is there a reason you would want a word to behave differently on the two systems? 15:33:10 I'm not the designer, most of it is magic to me 15:33:20 fair enough. just curious 15:33:24 thats a great question 15:33:41 aparently the host emulates the target 15:34:01 I did notice entering 1,000,000 in host mode just puts it on the stack. I suppose you could do 32 bit math in host mode if thats useful 15:34:10 and in fact, 'target' mode is about 20x slower that real Forth on the target would be 15:35:19 hmm, maybe so you dont wear out the flash on the msp430? 15:35:23 your question is very pertinent because the last addition to mecrisp-across was 'pictured numerical output' sfter I made a request for it 15:35:54 oh lol you cant compile more than once without erasing all the code from target mode 15:35:57 what in the hell 15:36:13 I havent used it yet, but it seems I have to tell the host that I want 'pictured numerical output' from the target, or the host 15:36:13 pictured? 15:36:33 it's a Forth term 15:36:50 means 'formatting the printed output' 15:37:13 it's a bit like 'printf' for C 15:37:17 MrMobius: you print numbers with <# # # # #> # is a digit 15:37:47 and commands like "hold" 15:38:23 MrMobius, 'pictured numerical output' allows me to write words that do this: 15:39:58 You're a numerical output 15:40:35 USART2_DR. 15:40:35 USART2_DR (read-write) $0000000D 15:40:35 3|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1| 15:40:35 1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0 15:40:35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 15:41:10 jsoft, least I have a output, you're all input ;-) 15:42:07 jsoft, https://mecrisp-stellaris-folkdoc.sourceforge.io/buffers.html#buffers 15:42:32 jsoft, I finished my buffers/arrays pages as promised 15:43:19 neato 15:43:26 very minor gripe but with stack pointer in r4 add.w @r4+, r6 ... sub.w #2, r4 could be optimized to just add.w @r4, r6 15:44:40 is that msp430 assembly ? 15:44:46 yep 15:45:28 did "t-listing" work for you then ? 15:45:49 oh I should try. I was looking at disimage after crosscompile 15:46:11 looks like you have to delete all your words though every time you crosscompile though 15:47:07 so it appears that mecrisp-across host mode works fine on windows running debina in a vm, running qemu-arm-static running mecrisp-linux running the mecrisp-across word ! 15:47:21 t-listing shows forth not assembly 15:47:42 yo dawg I heard you liked emulators 15:48:41 it turns out writing flash is harder than I originally planned due to having to go back and flash prealloted pages after the fact 15:48:41 to inspect the generated Machine Code; disimage 15:49:26 tp, index 9 is out of bounds 15:49:29 MrMobius, oh, I must have made a composite listing for "t-listing' then 15:49:49 index 8 is the last 15:49:59 jsoft, mine wasn't ? 15:50:10 tp, right but if you do disimage you lose everything and have to type it all back in. is there some linux magic to input a text file into a terminal as if you had typed it? 15:50:20 tp, lies, shenanigans, and trickery! 15:50:33 tp, how can you allocate 9 bytes, and then access 0-9 ( 10 bytes ) 15:50:56 jsoft, didnt you just answer your own question ? 15:51:20 tp, you use 9 buffer: scratchpad 15:51:21 because byte 9 is the 10 byte 15:51:36 wot 15:51:51 I showed readin bytes 0 - 9 in the writeup, no errors there 15:52:01 by fluke, most likely 15:52:20 i get my errors in RED along with a LOUD BEEP so I cant miss them 15:52:24 Nah cmon, do I have my head up my arse here or what.. 1 buffer: doofer allocates 1 byte, right ? 15:52:42 9 buffer: doofer allocates 9 bytes 15:52:51 why are you saying it allocates 10 bytes 15:53:05 wure 15:53:10 sure it does 15:53:17 :| 15:53:18 what? 15:53:26 are you a Roman Centurion ? 15:53:40 romans had no notion that 0 was 'a thing' 15:53:51 thats to _access_ the array or whatever 15:53:58 exacty 15:54:06 to access the thing 15:54:16 you use 9 buffer: scratchpad 15:54:20 thats _9_ bytes 15:54:23 nope 15:54:23 not 10 15:54:24 okay, I'm gonna head out - coffee shop is closing - will be back on later 15:54:30 cya tabemann 15:54:34 laters on 15:54:39 what is it with people and coffee 15:54:48 coffee is life 15:55:06 lol 15:55:06 dont worry tabemann, jsoft and I will probably still be arguing when you get back 15:55:19 Hehe 15:55:20 ryke, damn straight! 15:55:32 Nah cmon you 15:55:58 why would 9 buffer: thingy allocated _10_ bytes 15:56:07 allocate, I mean 15:56:38 9 scratchpad> hex. 000000F9 ok. 15:56:40 I bet you $0.50 that you are writing into address space outside of that you allocated 15:57:13 take HERE from before the buffer allocation, then take HERE after the allocation and subtract 15:57:17 do you see any "thing is out of bounds" error ? 15:57:27 tp, ok, if you go 9 buffer: scratchpad, and then 9 buffer: potato, and then try and write the '10th' byte, I bet it interrupts the potato 15:58:39 --- quit: tabemann (Ping timeout: 240 seconds) 15:59:18 `HERE 9 buffer: scratchpad HERE SWAP -` 15:59:19 Don't make me take my f0 out again tp :P 15:59:34 bets OFF! 15:59:38 $FA 10 >scratchpad ok. 15:59:38 10 scratchpad> hex. 000000FA ok. 15:59:56 thats even worse, thats two bytes out 16:00:04 ok, there is a slim chance that jsoft is not wrong ;-) 16:00:16 :P 16:00:43 * jsoft sips on remaining vodka from last night 16:01:02 tp, what is this mecrisip thingy on linux anyway 16:01:36 jsoft, i think its a kind of potato chip 16:01:46 MrMobius, ahh it all makes perfect sense now 16:01:56 * jsoft throws a baboon at MrMobius 16:02:03 jsoft, you can run Mecrisp-Stellaris under Linux without a F0 16:02:24 tp, what is the thing I should be duckduckgoing 16:02:32 yummy crisp American barbeque mecrisp chip! 16:02:34 mecrisp linux.. thing ? 16:02:41 yeah 16:03:00 jsoft, no need to stroke the duck 16:03:04 I can tell you 16:03:11 but first .... 16:03:36 but first, we feast! 16:03:42 kindly send 1 $billion to my paypal account to show your gratitude 16:03:46 lol 16:03:54 Ya got me again 16:04:22 jsoft, 'apt-get install qemu-user-static' 16:05:06 Its downloading at a medium pace 16:05:10 ok now what 16:05:23 has to go thru the Hobbit Gateway 16:05:40 You're a gateway to buffer overflows 16:05:42 :P 16:05:49 go to your Mecrisp-Stellaris disto 16:06:07 buffer overflow stops here! 16:06:08 the .bin or whatever it is you mean ? 16:06:21 the tarball you uncompressed somewhere 16:06:30 yeah where did I put that though? 16:06:50 next to the Bourbon ? 16:06:58 ahh there it is 16:07:00 and now what 16:07:21 mecrisp-stellaris-2.5.2/linux 16:07:23 yay linux magic: cat program.txt | qemu-arm-static mecrisp-stellaris-linux-with-mecrisp-across 16:07:54 MrMobius, there is a file handling API in there I think 16:07:59 --- quit: ryke (Ping timeout: 250 seconds) 16:08:15 tp, now what 16:08:45 jsoft, in a terminal run "terminal-qemu" 16:09:13 Oh there we go 16:09:22 hmm 16:09:35 Ok so how do I shove code at it from a file 16:09:43 assuming you paid every time I answered, whan can I expect my 5 $billion ? 16:10:25 jsoft, one way is the way that MrMobius just did it 5 lines above 16:10:36 oh wow. this does constant folding between words. v impressive 16:11:13 When nz currency has inflated my $1 by [calculating] 5x10^9 percent 16:11:55 How do I go #i file.fs 16:12:10 jsoft, interesting tidbit, it took MrMobius 4 hours to do under windows what just took you 5 minutes under Linux 16:12:22 yeah well. Windows. 16:12:34 Thats why I switched back to linux, because forth 16:13:03 Only reason I went to windows again in the first place was because of altium designer 16:13:06 ok, so I can expect full payment in 3 million years when the NZ penny you just banked for me matures to 5 $billion ? 16:13:26 altium HAHAHAHAHAAHAHAHAHAH 16:13:46 we used to call it Protel when it was made in the apple orchads of Tasmania 16:13:48 No I can expect 2 * 9 billion from you, as you have overrun the buffer by two bytes so far, and the buffer is 9 bytes in size 16:14:28 tp, not my choice, the peoples needed me to make the things in altium 16:14:39 damn those peoples 16:14:48 Yeah what are those peoples up to 16:14:57 And they still fucked it up. 16:15:18 there just is no understanding those peoples 16:15:30 I started work on the code for said hardware made from said pcb design, from some brofessional, and capacitors are in the space of where batteries go, etc 16:16:05 ahh, glad we got that cleared up 16:16:09 Ayway, I don't know how to interact with this linux stelarris thing interactively with files and such 16:16:38 jsoft, knowledge is power and money, so if you want me to tell you, first .... 16:16:58 Hey, You have fake news on the interweb page 16:16:58 tp, not true sir. took 4 hours to get linux running on windows and longer than 5 minutes to get working on linux 16:17:07 you should pay ME for fact checking it! :D 16:17:51 MrMobius, why, you can see it only took 5 minutes for jsoft ( and lets face it, hes not the brightest bulb in the room ;-) 16:18:02 Awww this guy aye 16:18:06 what does 1 mean in 1 variable foo? this tutorial doesnt show it needing anything on the stack... 16:18:19 Giving me the cheeky insults whilst his buffer overruns run wild 16:18:36 1 is the initial value of foo 16:18:49 lol 16:18:54 :) 16:19:05 MrMobius, hey, random question here.. what would you suppose allocating a buffer of 9 bytes might do 16:19:06 whats a buffer overrun between mates! 16:19:38 jsoft, MrMobius doesnt know, it took him 4 hrs to get mecrisp running! 16:20:04 tp, yes but he had a 24 hour handicap by using windows, so he is doing well 16:20:16 MrMobius, ignore jsoft hes just a troll trying to trick you! 16:20:49 MrMobius, jsoft comes from New Zealand, and so do Cave Trolls 16:21:05 tp, oh yes, tricking him by advanced questions like 'I reserve 9 bytes, how many bytes have I attempted to reserve?' 16:21:43 MrMobius, now "jsoft" has exactly the same number of letters as "troll", see what I mean ? 16:21:48 You know you are not allocating 10 bytes in your documentations 16:22:03 bwahahah 16:22:20 Nah serious, cmon man, suss it out! 16:22:36 oh ... ok 16:22:53 if you must use the sacred 'serious' word! 16:23:41 Well, you went to all the effort as you always do, to document things, and made a random mistake (I think), so we cant have it all go to waste and mislead any future confused person 16:24:06 so wrote `HERE 9 buffer: scratchpad HERE SWAP -` 16:24:23 hey reread my disclaimer on the site! 16:24:37 Im a forth beginner myself :) 16:24:43 Yeah ? 16:25:07 But here is another absolute virgin to forth saying you are off by one! :D 16:25:16 HERE hex. 2000038C ok. 16:25:50 9 buffer: buffer1 ok. 16:26:13 HERE hex. 200003B0 ok. 16:27:38 $200003B0 $2000038C - . 36 ok. 16:28:38 4 * 9 = 36 16:28:47 jsoft, hmm, take up 9 bytes of memory unless it has a header for length or something or adds a byte for a 0 terminator 16:28:59 hence we have storage for 10 bytes! just as I said! 16:29:13 16:30:07 mecrisp keeps seg faulting :( 16:30:18 now its frozen 16:30:58 MrMobius, you are running it on loonux? 16:31:02 jsoft, I think it's pretty clear that if you $200003B0 $2000038C - . and multiply by PI, then subtract your birthdate and add the Summer Solstice equinox, you will see that it is in fact TEN BYTES ! 16:31:13 tp, lol 16:32:01 MrMobius, when is it segfaulting ? 16:32:09 I cannot be arsed plugging my f0 in, as I already have another project I am working on pluged in 16:32:21 but I reckons you need to re-check that documentations 16:32:34 jsoft, and youre limited to 1 serial dongle ? 16:32:56 Whgich I am quite happy you work on, by the way, as I used it whilst losing my forth virginity 16:33:13 tp, I have one area I shove my projects on my desk 16:33:52 ahh i know! you live in Bilbo Baggins house and room is at a premium for cave Trolls there ? 16:33:52 tp, and if I start shoving other projects there, then I no longer have my tunnel vision thing 16:35:01 jsoft, doing my best sir 16:38:33 jsoft, with qemu you can run short tests like my buffer stuff without plugging anything in ? 16:39:19 hmm, I just realised that "jsoft" has the same number of characters as "bilbo" !!! 16:39:49 jsoft, still working on your precioussssssssss ? 16:40:46 tp, the desk in question; https://imgur.com/a/XP6eFBw :) 16:40:59 again minor but mov.w @r1+, r0 should be ret in the disassembly and mov.w #260h, r4 then sub.w #4h, r4 could be mov.w #25C, r4 16:44:18 jsoft, pretty nice! 16:44:38 MrMobius, you sound like a MSP430 assembly guru! 16:45:07 jsoft, planning to plane the edge of the desk to a bevel, looks a bit sharp ? 16:45:28 jsoft, but much neater and nicer than mine 16:45:55 tp, Nah I am prolly going to be moving in 2 months 16:46:10 tp, it was a quick 3 or so hour desk build 16:46:18 still be on irc after that ? 16:46:24 yerp 16:46:31 I need my interwebs 16:46:33 wow, you do everything really fast 16:46:36 excellent 16:47:34 ahh I know how to tell how many bytes I can store! 16:47:41 in the buffer 16:47:55 Ill flash another 9 byte buffer 16:48:08 it will go right after the first one 16:48:18 Right 16:48:35 tp, hehe not a guru 16:48:48 but lots of things left to improve in the Register Allocator 16:49:04 very impressive so far 16:49:26 MrMobius, the msp430 RA you mean ? 16:49:41 the arm RA may be different ? 16:50:14 MrMobius, plus the arm RA has a extra 'optimiser word' 16:50:52 ya some obvious things I think you could check for 16:51:28 MrMobius, obvious to you 16:51:32 like saving a register to the stack before loading a value into the register then popping the saved value off without using it 16:51:44 tp, true. making an optimiser is not easy 16:52:05 MrMobius, I'm not a software guy, I just use Mecrisp-Stellaris 16:52:54 MrMobius, I'm sure matthias koch would love to hear from you re suggested improvements. I think it's a lonely life as a Forth writer 16:53:56 hes pretty bored doing space hardware atm, so I'm sure he would look forward to a distraction 16:54:37 maybe 16:54:55 or more likely tell me he already knows but its not easy to optimize the things ive found so go away :P 16:55:51 hahah, he's *extremely* polite and even suffers fools like me in a gentlemanly way, so I doubt it 16:56:46 is forth still bieng used in space? 16:57:00 of course 16:57:39 Also potato harvesters 16:57:44 there were 8 Forth controlled experiments on the Philae lander 16:57:48 The forefront of modern tech 16:58:26 tp, could you use this to make a library binary that you combine with another binary and jump into the library then back out? that might explain saving uninitialized registers to the stack 16:59:00 MrMobius, way above my pay grade, sorry. 17:00:09 Your.. an uninitialized register stack jump 17:00:15 space is a special case, no one doing space is interested in the latest "self optimising 47 gigabyte flash multi MCU with embedded windows" or whatever 17:03:38 There is heaps of room in sapce 17:03:40 space 17:03:46 Even room for your buffer overflows tp! 17:04:31 it's Mr Buffer O Verflow to you pal! 17:04:41 :) 17:04:46 I met a guy today who told me about making navigation systems for satelites that he patented and NASA uses now. he had never heard of forth 17:05:48 MrMobius, they may be low earth satellites ? 17:08:00 deep space is another field entirely as I understand it 17:08:47 where rad hardened MCUs are default and must have a track record of reliability under those conditions 17:09:30 I wonder if there are F0's in space 17:09:55 nah 17:10:01 not in deep space 17:10:05 tp, probably so 17:10:36 MrMobius, why do you think so ? 17:12:06 --- join: rdrop-exit joined #forth 17:13:09 tp, I mean about the low earth satelites. he said something about working on cubesats before that 17:13:15 c[] (-_-)zzz 17:14:32 good morning Fortheros 17:15:07 good morning Zen Forth Guru! 17:15:24 hi Master Technician (tm) 17:17:46 rdrop-exit, we have being having a productive discussion about buffers, buffer overflows and tethered Forth optimisations ! 17:18:08 wow, busy morning 17:18:20 --- join: tabemann joined #forth 17:19:38 yep 17:24:11 hey guys 17:24:25 hey tab 17:24:30 hi tabemann 17:24:35 jsoft, Address: 0001676C Link: 00016790 Flags: 00000140 Code: 0001677E Name: scratchpad 17:24:35 Address: 00016790 Link: FFFFFFFF Flags: 00000140 Code: 000167A2 Name: scratchpad2 17:25:06 I just realized a limitation imposed on zeptoforth - there has to be a limit on how many nested IFs or BEGIN-WHILEs are permitted 17:25:30 why? 17:25:53 tp, here is one of the cases I was wondering about https://controlc.com/4c9f782d 17:26:01 because I need to leave 16-byte blocks unwritten so they can be updated later before they are written to flash 17:26:47 rdrop-exit: because I cannot go back and practically rewrite blocks of flash without putting unnecessary wear on the flash 17:27:07 (especially since I can only erase 2K of flash at a time) 17:27:43 you lost me 17:28:13 or I lost you :) 17:28:36 I have to rewrite IF and WHILE statements because I don't know their destinations when they are specified 17:29:01 #forth ... home of the lost Forthians 17:29:25 but I cannot rewrite flash 17:29:56 at least without reading the entire 2K page into RAM, erasing that page, modifying the stored data, and rewriting it all 17:30:18 which is horrifically inefficient 17:30:31 and puts unnecessary wear on the flash 17:31:02 so the more sensible approach is to buffer partially specified pages in memory and only write them to flash when they're completely specified 17:31:17 but that means I need to allocate some amount of memory for this 17:31:39 and that amount of memory determines how many IFs or WHILEs that are unresolved that are permitted 17:32:28 note that the last instance of "pages" referred to 16 bytes at a time, not 2K at a time, so this is still a much smaller amount of memory that we're dealing with 17:34:31 I figure that a total of 16 buffers is adequate 17:36:54 --- quit: dave0 (Quit: dave's not here) 17:36:56 note that here a buffer is 16 bytes of data + 8 bytes of of header 17:37:01 *of header 17:38:08 your jumping through a lot of hoops 17:39:50 nothing is forcing you to write to flash before you are ready to write to flash 17:40:30 do whatever you want in RAM, transfer to flash when ready 17:41:22 jsoft ping 17:42:20 MrMobius, yeah, Im sure cubesats etc use whatever they wat 17:42:22 want 17:42:23 tp, ok mystery solved. if stack size is variable, mecrisp just copies each register to the next one 17:42:44 tp, pong 17:43:18 rdrop-exit, MrMobius is doing a deep dive into the optimisations of mecrisp-for-msp430 17:43:38 cool 17:43:40 jsoft, $F9 9 >scratchpad 17:43:51 --- quit: tabemann (Ping timeout: 268 seconds) 17:43:56 jsoft, 9 scratchpad> hex. 00000009 ok. 17:44:19 jsoft, 0 scratchpad2> hex. 0000002A ok. 17:44:34 jsoft 17:45:19 Address: 0001676C Link: 00016790 Flags: 00000140 Code: 0001677E Name: scratchpad 17:45:20 Address: 00016790 Link: 000167B4 Flags: 00000140 Code: 000167A2 Name: scratchpad2 17:45:45 tp, where is the docs again? 17:46:04 https://mecrisp-stellaris-folkdoc.sourceforge.io/buffers.html#buffers 17:46:27 : main 3 4 P1IN 5 = IF 6 THEN * P1OUT ! ; doesn't fold any constants 17:46:39 but I think it's probably way better than unoptimized forth 17:47:49 that looks buggy 17:47:56 tp, nah still wrong 17:48:11 you are getting away with it because its allocating 24 bytes for whatever reason 17:48:39 jsoft, perhaps alignment requirements ? 17:48:55 tp, what happens if you allocate only 1 byte 17:49:08 probably you get 16 bytes ? 17:49:09 what addresses does that come up with 17:49:18 tp, looks like that Forth's dictionary is combined 17:49:32 jsoft, you have a Mecrisp-Stellaris running under Linux 17:49:32 rdrop-exit, those docs are an off by one error eh 17:49:42 tp, its an annoying mecrisp 17:49:57 jsoft, youre a annoying mecrisp 17:50:01 tp, :P 17:50:29 youre annoying mecrisp 17:50:32 jsoft, prove your own assertion, thats usually how it's done :) 17:50:57 its simple really. Allocating 9 bytes means 9 bytes, not 10. 17:51:09 --- join: ryke joined #forth 17:51:21 jsoft, we expect a report in full, complete with proof, references and signed by your mum as true and accurate 17:51:36 Ok, for a small price of 24 billion, sure 17:52:07 jsoft is correct, you're buffer is only 9 bytes wide 17:52:14 * your 17:52:15 anything less just isn't up to the high #forth standards and will be rejected with prejudice 17:52:39 your 9 + is accessing beyond the buffer 17:52:50 ... some people will say anything with a promise of $24 billion! 17:53:01 kaching kaching 17:53:06 lol 17:53:56 ok, the tide of public opinion seems to be against me, but they were like that with Plato and Galileo as well! 17:54:04 * tp will be strong! 17:54:04 lol 17:54:07 the argument to buffer: should be the #bytes not the highest index 17:54:27 No one expects the Spanish Inquisition! 17:54:53 now that's assuming that matthias followed the spec ? 17:55:08 not the Spanish Inquisition! 17:55:27 rdrop-exit, so whats happening ? 17:55:36 where is my 9th byte going ? 17:55:37 The spec says buffer is equivalent to create allot on a non-embedded system 17:55:58 but this is embedded and create wont work 17:56:15 probably in the padding before the next word 17:57:02 we have only just survived a big cry-fest by rsoftie when he found that create doesnt run in ram on embedded 17:57:16 from flash 17:57:42 Hey I found out at 2:30 am on friday, and fixed it 30 minutes later.. I had to fight you to convince you :P 17:58:01 rdrop-exit, perhaps a 32 bit buffer is reserved at a minimum ? 17:58:11 You're a 32 bit buffer 17:58:34 if it's a combined dictionary then your memory looks like this: 17:58:39 jsoft, whyd it take you 30 minutes ? were you asleep ? 17:58:52 I was drunk 17:59:05 jsoft, I should think so, slacker! 17:59:11 But why did you take a day of convincing!? :P 17:59:28 Were you sober or something? :P 17:59:47 because Im old, a day if convincing is the "rapid response path" for me 17:59:48 brb 17:59:56 lol 18:00:09 I'm always sober, Ive never been drunk or even tipsy 18:00:25 See theres your problem :P 18:00:36 yeah I know, too late to change tho 18:00:45 Is the booze store closed ? 18:00:48 :D 18:01:12 Well, I need to eat somethning 18:01:13 I'll have to take the shame of my life of sobriety to the grave with me 18:01:23 do this: 18:01:47 rdrop-exit, k 18:01:48 4 buffer: test 18:02:06 I have two buffers in flash already 18:02:14 here test - 18:02:25 i did that before 18:02:34 what dis you get? 18:02:57 HERE hex. 2000038C ok. 18:02:58 9 buffer: buffer1 ok. 18:02:58 HERE hex. 200003B0 ok. 18:02:58 $200003B0 $2000038C - . 36 ok. 18:03:32 not that 18:03:40 it was suggested by MrMobius 18:03:52 4 buffer: test here test - hex. 18:03:59 oh ok, please continue 18:04:21 4 buffer: test here test - hex. 00000004 ok. 18:04:29 voila 18:04:58 4 bytes for a 4 buffer ? 18:05:02 0 - 3 ? 18:05:06 yes 18:05:23 why didnt jsoftie suggest that! 18:06:17 thanks for the proof oh great Zen Forth Guru! 18:06:29 my pleasure 18:06:30 I will now modify my webdoc! 18:09:06 I will now get another expresso! 18:09:28 * espresso 18:11:23 your earlier test didn't work because the dictionary is combined 18:12:21 (i.e. you're including the header's bytes in your calculation) 18:12:37 (and any padding for alignment) 18:12:44 In conclusion, change ya documentation tp! :P 18:12:56 Thanks for the docs though, They are handy 18:14:25 i have changed them already, I thanked you and noted that you owe me 1 $billion for the entire 42 people who read my doc to see! 18:14:45 :D 18:14:50 rdrop-exit, thanks for explaining that :) 18:15:12 my pleasure 18:15:46 anything to prevent the next AU/NZ war 18:16:12 we are allies, we are only alowed to throw pies at each other 18:17:49 Would ye look at this beefcake horse https://www.youtube.com/watch?v=gWRscujkPxU 18:18:12 What a machine 18:18:40 wow 18:19:02 \ 4 buffer: test here test - hex. 00000004 ok. 18:19:03 \ here 4 buffer: test1 here swap - hex. 0000001C ok. 18:19:03 \ $1C 4 - . 24 ok. 18:21:01 that horse is so big I felt a draft as it walked by 18:21:15 lol 18:21:22 Its cool though aye 18:21:32 rdrop-exit, so does that mean there are 24 bytes in a header ? 18:21:38 you're confusing it with a Budweiser Clysdale 18:21:40 I've ridden draft horses before, not that stocky but prolly as tall\ 18:21:49 Gumby bastards they are 18:21:55 jsoft, if youre into horses I guess 18:22:05 Horses are awesome 18:22:17 i prefer my horses controlled by a hand twistgrip throttle 18:22:22 depends on the Forth, might be: 18:22:23 As much fun as motorbikes, if not more in close quaters 18:22:31 Yeah I love motorbikes too 18:22:47 But imagine a motorbike with a brain and attitude 18:22:51 I've ridden before, Ive hunted kangaroos from horseback and shot them 18:23:01 |(padding)|header|(padding)|4 bytes| 18:23:03 Hahahah the is so auzzie 18:23:37 on a non-embedded SRT Forth you could have: 18:24:07 |(padding)|header|(padding)|code|(padding)|data 18:24:15 all sorts of possibilities 18:24:17 rdrop-exit, 9 buffer: scratchpad 18:24:28 Address: 0001676C Link: 00016790 Flags: 00000140 Code: 0001677E Name: scratchpad 18:25:13 jsoft, ex police horses, they were unfazed by my .44 mag pistol 18:25:59 --- join: iyzsong joined #forth 18:26:18 do a hexdump at 1676c 18:26:44 $1676c dump16 00016760 : 0018 0066 00C2 00F2 0000 0006 0070 0047 00C8 0000 0000 0000 0090 0067 0001 0000 | .f....pG .....g.. | 18:27:31 more pls 18:28:14 $1676c 40 dump 18:28:14 00016760 : 0018 0066 00C2 00F2 0000 0006 0070 0047 00C8 0000 0000 0000 0090 0067 0001 0000 | .f....pG .....g.. | 18:28:14 00016770 : 0040 0001 000A 0073 0063 0072 0061 0074 0063 0068 0070 0061 0064 0000 0047 00F8 | @..scrat chpad.G. | 18:28:17 00016780 : 0004 006D 0044 00F6 000C 0066 00C2 00F2 0000 0006 0070 0047 000C 0000 0000 0000 | .mD..f.. ..pG.... | 18:28:20 00016790 : 00B4 0067 0001 0000 0040 0001 000B 0073 0063 0072 0061 0074 0063 0068 0070 0061 | .g..@..s cratchpa 18:28:29 yhx 18:28:39 thx 18:28:48 pleasure 18:30:58 rdrop-exit, here it is done properly http://dpaste.com/21BXTRX 18:31:53 pls try this scratchpad 9 $ff fill 18:32:05 and do the dump again 18:32:30 k 18:32:53 What are all these numbers and things 18:32:57 What are you two up to 18:33:19 muahaha 18:33:20 jsoft, how mych you willing to pay ? 18:33:39 scratchpad 9 $ff fill ok. 18:33:39 $1676c 40 dump 18:34:54 http://dpaste.com/2KSJA2S 18:35:01 thx 18:35:28 pleassure 18:36:07 nerds. 18:36:26 0 scratchpad> hex. 000000FF ok. 18:36:26 9 scratchpad> hex. 00000009 ok. 18:36:26 8 scratchpad> hex. 000000FF ok. 18:36:56 jsoft, unpaid debtor. 18:37:02 hehe 18:42:08 jsoft, you owe me 5.5 $billion now ... interest is a bitch! 18:42:29 but cause Im such a nice technician, I wont charge the usual late payment fees 18:43:50 i think I know why rdrop-exit is probably going WTF? right now 18:44:06 ;) 18:44:25 the data is stored in ramspace, the dunps are of flashspace 18:44:47 hence the very suspicious lack of $FF in the dump 18:45:29 right, that's ok 18:46:09 scratchpad hex. 20004E0C ok. 18:46:58 plus the hexdump is showing bytes as 4 hex digits 18:47:15 which is weird 18:47:24 http://dpaste.com/1D0NXNG 18:48:57 it's displaying ceell size ? 18:49:00 -e 18:49:40 00016770 : 0040 18:50:14 the 0040 is one byte 18:50:25 --- join: f-a joined #forth 18:50:32 So we can deduce that things are happening, numbers are fying around, and its time for lunch ? 18:51:06 $00016770 @ hex. 730A0140 ok. 18:52:30 is that l337 speak 18:53:25 oh yeah d00d3 w3 ar3 s0 7337 ! 18:53:31 ( ͡° ͜ʖ ͡°) 18:53:47 hahahah, thats the BEST FACE I've seen yet! 19:06:19 rdrop-exit, I see what you mean now 19:06:23 it is a bit odd 19:09:38 Link Field 4 bytes: 90 67 01 00 19:09:38 Flags 2 bytes: 40 01 19:09:38 count 1 byte: 0A 19:09:38 name 10 bytes: scratchpad 19:09:38 padding (terminating null?): 1 byte 00 19:09:40 code 15 bytes: 47 F8 04 6D 44 F6 0C 66 C2 F2 00 06 70 47 0C 19:09:43 padding 3 bytes: 00 00 00 19:11:08 doubt it's a terminating null, since that's more of a PC Forth thing 19:12:00 --- join: WickedShell joined #forth 19:13:48 I can't be sure about the final 3 bytes of padding, you'd have to assemble the code field to see 19:13:52 --- quit: ryke (Ping timeout: 252 seconds) 19:20:02 if you do another buffer using a 9 letter name you'll be able to verify if the 00 byte after the name is significant to him or just padding for alignment 19:23:06 do his docs give details of memory layout? 19:23:59 The meanings of the flags would be interesting to know. 19:25:16 That's were the interesting differences between Forths lie (in the flags) 19:27:38 --- quit: f-a (Read error: Connection reset by peer) 19:28:15 In my case the headers stay on the host machine 19:28:49 Is anybody out there? :) 19:30:19 yes I am, sorry eating lunch 19:30:28 bon appetit! 19:30:38 bb shortly 19:30:48 np 19:30:50 I find it difficult to eat and talk:) 19:31:41 I'm going to take the dogs on a short walk, catch you later 19:31:52 --- join: f-a joined #forth 19:33:29 no problemo 19:35:09 Just a note before I go, that seems like a lot of code, so maybe I misunderstood something 19:35:12 ciao 19:35:18 o/ 19:35:19 whois rdrop-exit 19:35:22 :P 19:35:47 hes is yje Zen Forth Guru of course! 19:44:41 --- part: erkin left #forth 20:12:56 --- quit: iyzsong (Read error: Connection reset by peer) 20:13:16 --- join: iyzsong joined #forth 20:16:13 back 20:16:21 welcome back! 20:16:26 thanks! 20:16:43 steak, tomatoes and eggs consumed 20:16:50 nice choice 20:16:58 cool, I haven't had lunch yet 20:17:10 I was asking "how do you find good tomatoes in winter" then I felt stupid 20:17:12 f-a, I've run out of Scandanavian Eels ;-) 20:17:30 f-a, yep, it's our summer here 20:17:57 they were what passes for tomatoes here, all watery and hydroponic 20:18:07 btw, your scratchpad example page, I use a different approach usually 20:18:16 not much like 'real' tomatoes 20:18:31 rdrop-exit, what do you use ? 20:18:56 10 buffer: things 20:19:00 I'm not sure I have a 'approach' I'm mostly ad-hoc 20:19:13 : thing ( # -- a ) things + ; 20:19:30 $ff 5 thing c! 20:19:39 5 thing c@ 20:20:07 rdrop-exit, but the thing takes two paramaters ? 20:20:15 data and index 20:20:34 just one, the index 20:20:42 isnt the data a parameter ? 20:20:58 it is, but of c! 20:21:09 oh! 20:21:22 I see :) 20:21:29 ;-) 20:21:50 yours is definitely better 20:21:56 I'm changing my page! 20:22:02 :)) 20:22:14 no so much 'better' as more correct and logical 20:22:21 which is definitely better 20:22:38 glad you like it 20:25:10 hmm I cant have "scratchpads' 20:25:23 --- join: tabemann joined #forth 20:25:26 thigamabobs 20:26:08 i think scratchpad is a special and ambiguous case 20:26:28 a buffr normally holds 'things', is that your point ? 20:26:57 yes, I usually use plural for the buffer, singular to fetch/store to a particular 20:27:08 makes perfect sense 20:27:30 I don't like to bury addresses 20:27:45 i had never used a buffer before yesterday so I'm still new to this 20:28:17 I do the same with create and similar words 20:29:21 the "creation" words I use are non-standard but the principal still applies 20:31:39 i used a code I found in the Mecrisp user contributed source 20:31:44 -a 20:33:11 everybody has their own style, Forth's very flexible 20:34:46 is "#" Forth shorthand for index ? 20:34:47 If it was a buffer of cells, I would do: 20:35:04 10 cells buffer: thingamabos 20:35:29 ah yes 20:35:29 : thingamabob ( # -- a ) cells thingamabos + ; 20:35:43 -1 5 thingamabob ! 20:35:51 5 thingamabob @ 20:36:21 * thingamabobs not "thingamabos" 20:36:32 I'm a terrile typist 20:38:02 yes, I use # as a shorthand for index 20:38:29 back 20:38:33 hey guys 20:38:35 sometimes also as a shorthands for number of 20:38:41 hi tabemann! 20:42:10 rdrop-exit, I knew what you meant :) 20:42:19 lunch beckens, catch you all later 20:42:38 cool, ciao! 20:42:51 --- quit: rdrop-exit (Quit: Lost terminal) 20:46:10 tabemann, we had a nice discussion about Mecrisp-Stellaris bufers 20:46:13 buffers 21:19:56 back 22:24:15 --- join: gravicappa joined #forth 22:35:31 --- quit: proteusguy (Ping timeout: 268 seconds) 22:48:11 --- join: proteusguy joined #forth 22:48:11 --- mode: ChanServ set +v proteusguy 22:49:47 --- join: dave0 joined #forth 23:00:18 --- quit: gravicappa (Ping timeout: 276 seconds) 23:30:19 --- quit: f-a (Ping timeout: 240 seconds) 23:32:30 --- join: f-a joined #forth 23:44:49 --- join: gravicappa joined #forth 23:59:59 --- log: ended forth/19.12.07