00:00:00 --- log: started forth/19.12.06 00:00:22 jsoft, you mean the hermetic sealing ? 00:00:38 ahh the wire bonding 00:01:07 yeah same kind of thing tho the neopixels probably have thicker wire due to the current drawn 00:01:37 they all get bonded with the 'wire bonder' knitting machine, clackety clack! 00:02:00 --- quit: ryke (Ping timeout: 265 seconds) 00:13:33 ok. 00:13:34 so 00:13:39 i've got me wee f0 up 00:13:40 now then 00:13:52 leds . 17888 ok. 00:14:40 thats the memory address of the leds array base 00:14:55 0 cells leds + . 17888 ok. 00:15:04 best examined this way "leds hex." 00:15:07 and there ya go. 00:17:11 no 00:17:20 there ya dont go 00:17:39 how's that then 00:18:05 its the same address 00:18:20 for a start you want the value STORED at the address 00:18:32 not the address itself 00:18:43 i'm not trying to read it 00:19:02 I was saying, that writing to leds directly, is the same as writing to leds with in 'index' of 0 00:19:13 unless I am missing something captain obvious 00:19:41 ie, it writes a cell to the base address, which is the first element in the 'array' 00:19:49 X cells * array + @ hex. 00:20:13 yes, and 0 * anything is zero 00:20:35 your first clue was the Unhandled interrupt 00:21:02 thats Mecrisp-Stellaris telling you that youve screwed up :) 00:21:29 it's telling you that youre 'far, far away from OK" 00:21:30 so your saying your example there, should work, say if I replace X with 0, 1, 2 or 3, or whatever 00:21:46 yep, if youve saved per cell 00:21:51 so 1234 1 cells * array + ! 00:21:58 OR 00:22:01 note: cell = 4, thats all it means 00:22:07 so 1234 0 cells * array + ! which is just array 00:22:20 so 1234 0 cells * array + ! is the same as 1234 array ! 00:22:37 Or do I have proper up my backside 00:23:30 i dunno how to create it except this way "Create Array of Cells 00:23:30 create array $3f4f1234 , $06075678 , $5b558765 , $66664321 , 00:23:30 " 00:24:12 mm ok. 00:24:30 to access that array 00:24:35 And you have written to such an array before? 00:24:53 : =cells 4 * array + dup hex. @ hex. ; 00:24:59 sure 00:25:10 ok well it must be doing something different than the alloc stuff 00:25:14 I did a write up on it recently after we spoke about arrays 00:25:15 I will try it 00:25:42 so "0 =cells" returns $3f4f1234 00:26:09 actually that word returens both the memory address and the data 00:26:26 0 =cells 200003A4 3F4F1234 00:26:47 where 200003A4 is $200003A4 and is the address 00:27:44 sadly I cant show you my nice and neat array page because "Sourceforge Project Website Temporarily Offline" 00:27:59 --- quit: WickedShell (Remote host closed the connection) 00:28:50 the simple version that doesnt print the memory address is ": =cells 4 * array + @ hex. ; 00:29:14 ok 00:29:18 so how do I write to it 00:29:36 that I dont know, I'm a beginner myself 00:29:43 nya haaa 00:29:50 see, it does the same thing as my one 00:29:56 shame the SF website is offline 00:29:58 sorry, not my one, the alloc one 00:30:03 thats the ticket 00:30:19 test my version until youre sure it works 00:30:27 then switch in yours 00:30:40 it will be really simple Im sure 00:30:56 Forth has removed all the wichery from programming for me 00:31:06 leds hex . 45E0 ok. 00:31:07 array hex . 4720 ok. 00:31:07 potato hex . 20001E48 ok. 00:31:21 potato is made using the X buffer: potato thing 00:31:27 and I _can_ write to taht 00:31:32 and looks like a memory address to me 00:31:40 yes. 00:31:45 2000xxxx is in the RAM area 00:31:49 Yerp 00:32:12 And so that brings it back to the conclusion from 2 hours ago that its 'allocating' or wahtever you want to call it, an array in flash 00:32:18 i havent yet looked at buffers 00:32:45 And thats the reason its not working when under 'compiletoflash' and the unhandled interrupt 03 happens 00:32:45 "creating" 00:32:51 mm 00:32:57 You know what I mean though aye 00:33:09 no, I'm not sure you do either 00:33:15 :) 00:33:24 potato is foobar 00:33:58 and neither leds or array are a 'cell' were the meant to be ? 00:34:00 my understanding of it is that it is that it stores the name of leds, array, or whatever, in the dictionary, and then the next free address is the amount of bytes 'allocated' 00:34:15 and so the next thing stored in the directionary will be array address + array size 00:34:16 no 00:34:26 there is no auto indexing 00:34:53 the next word in the dictionary I mean 00:35:16 --- join: dys joined #forth 00:35:37 it allocates a name to a memory address, and marks the word length as the length of the reserved number of bytes etc 00:35:48 isnt that what I just said ? 00:35:55 in other words? 00:36:11 I'm not sure, Im confused 00:36:17 Hmm. 00:36:47 my understanding of it is that it is that it stores the name of leds, array, or whatever, in the dictionary, and then the next free address is the amount of bytes 'allocated' 00:37:09 perhaps the next free address is the amount of bytes 'allocated + 1 ? 00:37:25 or 4 or whatever alignment is used ? 00:37:37 no, because the size will have that + 1 in it.. zero based... 00:37:47 I think we agree in principle 00:38:01 so say the address is 0, and then I allocate 1 byte. the next byte's address will be 1 00:38:05 oh, ok, good point, you did maths 101, I was asleep that day 00:38:33 But yeah, anyway this whole thing was something I ran into last night 00:38:39 And fixed it with buffer: :) 00:39:40 i havent got around to buffers yet 00:40:02 I do use arrays tho 00:40:27 remember that pot replacement device I mentioned ? 00:40:32 yeah I was rocking mighty fine with 'arrays' in ram, but it just did not work in compiletoflash :) 00:40:40 tp, the pot replacement device? 00:40:43 it uses a lookup table which is a array 00:40:52 sorry, refresh my memory ? 00:41:03 hmm, I may have been speaking to someone else 00:41:36 i have a Forth device that replaces a unique and expensive pot with a industrial servopot 00:41:46 it does this using a digipot 00:42:31 and the relationship between the servopot and the digipot is controlled by an array, so yeah I do use arrays 00:42:32 Yeah I've used digipots before in a 4-20mA current sensor project 00:42:45 Is it just reading the array though ? 00:42:56 Like a lookup table essentially ? 00:42:57 this is much smarter than that, my design is worth at least 1 $billion 00:43:02 lol :D 00:43:08 --- join: mtsd joined #forth 00:43:17 sure, array is a perfect lookup table 00:43:34 Yeah, perhaps you have not run into the write into the array thing yet? 00:43:38 Hello everyone 00:43:42 o/ 00:43:44 mtsd, ahh yes, hello there! 00:43:59 mtsd, What have you been eating today ? 00:44:00 mine works perfectly in flash, it's self booting and fully tested 00:44:08 tp, writing to the array ? 00:44:10 hey mtsd and dys 00:45:03 jsoft, i create the array in the word before it's compiled to ram or flash 00:45:09 inc the data 00:45:13 ahh yeah 00:45:22 it works the same either way 00:45:25 So not writing to it during.. erm.. run time 00:45:27 so different to yours 00:45:59 So what is this digital pot business thingy anyway ? 00:46:05 no, but tell ya what, I'll look into it right now 00:46:18 i could tell you but then ... you know ... 00:46:24 tp, hah :D 00:46:25 Hi jsoft, just had breakfast so far. :) 00:46:35 Id have to grab the 92fs and do the deed 00:46:44 mtsd, what was that though ? 00:47:46 The usual. Oatmeal, bread and butter. Now at the office, having a cup of coffee 00:48:47 jsoft, everyone know it's a nice Scandinavian eel fried with butter and mushrooms stolen from their last raid to England ? 00:49:01 A Scandinavian eel 00:49:09 I have not heard of that before 00:49:23 that does sound interesting 00:49:41 hahaha, nice one tp 00:49:42 Well ate about a kg of meat and eggs and meat today 00:49:56 Its was glorious, in addition to glorious 00:49:59 in one of the "longboats" 00:50:21 tp, what is the typical australian breakfast? Lizard grilled on a stick over the fire? ;) 00:50:25 jsoft, same, tho only 400gm of rump, eggs and some vegies 00:50:38 tp, terrible. Ditch the vegies ya weirdo! :D 00:50:38 Like they show in crocodile dundee.. ;) 00:50:50 mtsd, usually a pie, sausage roll or Kentucky Fried Chicken ;-) 00:51:06 or may Macdonalda 00:51:06 Sounds great :) 00:51:11 Macdonalds 00:51:11 I love KFC 00:51:26 we are a nation of fatso's mtsd :( 00:51:36 We usually have oatmeal, or yoghurt, with sandwiches for breakfast here. 00:51:51 mtsd, I eat much like jsoft, steak and eggs mainly 00:52:10 Swedes only eat bacon and things like that for breakfast when we stay at a hotel, or go abroad 00:52:14 actually probably so do a lot of ausies, especially in winter 00:52:39 otameal and yoghurt would also be popular here 00:53:08 sandwiches, not so much for breakfast, perhaps lunch 00:53:19 Even though the traditional swedish foods are quite heavy. From a time where people worked the fields and forests, and had to think of ways to conserve food for the winter 00:53:28 mtsd, what is in the sandwich ? 00:54:16 My sandwiches are simple. Just butter and cheese. Hard cheese, not the soft stuff you can spread. Sometimes ham or a slice of sausage 00:54:45 sounds very healthy, sadly all Australian bread has a lot of sugar, so I dont eat it 00:55:18 I also only eat HARD cheese, that soft stuff is for girls and new zealanders 00:55:38 Good man, tp. 00:55:48 Hard cheese is the right type 00:55:51 Eh shuddup tp :P 00:56:00 yeah, and very tasty, no plastic 00:56:02 tp, actually my favourate cheese is tasty 00:56:14 whic is a crumbly bastard of a mess, but very... tasty. 00:56:48 yeah, I like it with lettuce and butter 00:56:56 (cause I dont eat bread) 00:57:22 Butter, cheese and ham is a nice combination. In my opinion 00:57:30 in fact Id go and have some right now but dont have any! off to the shops tommorow! 00:57:52 butter, cheese, tomato and ham is also very nice I think 00:58:47 hmm, our security guy isnt locking up tonight, probably because he lives rignt in the middle of the latest out of control fire! 00:59:41 jsoft, frid eggplant was YUM! 01:00:06 400g rump and 2 eggs, plus a couple of leaves of fresh spinach 01:00:26 This conversation is starting to make me hungry.. 01:00:35 if that meal was any nicer, theyd arrest me for eating too well 01:02:09 mtsd, salivating at the thought of fried eel and mushrooms ? 01:03:18 I can already hear mtsd's chef at his local lunch bar saying "you want WHAT for lunch?" 01:03:22 --- quit: mtsd (Remote host closed the connection) 01:04:38 --- join: mtsd joined #forth 01:05:11 jsoft, have a gander here ? https://mecrisp-stellaris-folkdoc.sourceforge.io/arrays.html#arrays 01:05:40 i demonstrate how to save and fetch cells, halfwords, and characters 01:06:17 Fried eel.. yum! 01:06:31 and I show how it all works in a nice logical easy to understand way. Please send minimum donations of 1 $billion dollars via paypal to show appreciation. 01:07:06 I have actually eaten eel. Smoked though, not fried. You can find it at traditional christmas dinners here 01:07:12 wow 01:07:50 Ive caught eels on a hand fishing line, very agro they are, with many ling sharp pointy teeth 01:07:55 long 01:08:25 You have to eat small pieces at a time and try to forget the fact that it looks like a snake 01:08:45 i guess they were objecting to the hook stuck in their throat from when they stole my bait that was clearly marked "snapper only" 01:09:15 mtsd, I love snake, octopus whatever 01:09:30 I dont mind it being long and thin 01:09:39 Never tried snake. Octopus is good though 01:09:48 I only object to eating Quail, a lot of work for almost no meat 01:10:21 Like smaller fish. Also much work for little meat 01:10:25 I havent either, tho I was nearly on a snakes lunch menu once or twice 01:10:39 yeah, agreed 01:11:04 octopus is awesome, shame theyre so smart tho, I almost feel guilty eating one 01:11:28 mtsd, I eat kangaroo regularly 01:11:35 and beef 01:11:51 hardly every bacon but I love it 01:12:01 -y 01:12:22 I like this talk of meat. 01:12:33 Yes, let's talk more about meat :) 01:12:35 Its seriously the business, the best food to be eating IMO. 01:13:07 --- join: rdrop-exit joined #forth 01:13:14 Bacon is common here. 01:13:21 Yeah bacon is glory 01:13:39 and here, but I try not to eat it too often as I love it too much 01:13:41 I like using bacon like butter, so I cook bacon in a frying pan, then use the fat to cook eggs 01:13:49 yum! 01:13:55 cant beat bacon fat! 01:14:09 Pigs have given us meat up here for ages. Even mentioned, and highly regarded, in the old Norse religion and legends 01:14:10 spread on crispy bread! 01:14:15 bread = carbs 01:14:18 cant be having carbs 01:14:29 mtsd, how old is the norse peoples ? 01:14:38 yeah, so I dont 01:14:45 but I still love bread 01:15:10 Well, the areas was christened around 800-900 AD. But there is a long tradition from before that time 01:15:26 jsoft, my vegies probably = 5 grams carbs, no potatoes etc 01:15:48 mtsd, I think... Hong Kong used to be among if not the highest consumer of meat, as in they smashed pork back a lot. Also correlated with very long lives apparently. Not so much now, as people are starting to eat non-animal based things 01:15:59 tp, why veggies at all ? 01:16:04 so my nation of australia is only about 2800 years behind yours ! 01:16:08 tp, taste ? 01:16:31 jsoft, I like vegies and have access to a local garden 01:16:42 Well fair enough then 01:16:44 yeah, I love spinach and so on 01:16:53 c[] Hello Knights of the Forth 01:17:08 greetings oh Zen Forth Guru! 01:17:09 rdrop-exit, hello there you wild beast of a person you 01:17:20 I think the oldest written material comes from the 13th century, somewhere 01:17:33 Hello rdrop-exit! 01:17:42 :) Hi guys! c[] 01:18:03 rdrop-exit, youre just the guru we have been looking for! 01:18:24 =8-O run away, runaway! 01:19:03 (the Knights of Forth are not very brave) 01:19:16 Rune stones are older than 13th century though 01:19:28 What even is a rune stone 01:19:29 we are but humble basket weavers seeking the path to Forth enlightenment ... 01:19:38 lol basket weavers 01:19:42 lol 01:19:43 :)) 01:20:03 That would kinda be thereputic I reckon, weaving a basket 01:20:15 Could use it for putting... I dunno.. meat in or something 01:20:18 I'm a lot braver when I'm holding my Beretta 92fs! 01:20:30 Very popular in asylums I hear (basket weaving) 01:20:31 hahahahaha 01:20:55 one of my most relaxing times was washing the laundry 01:21:46 I had a old 'wringer washer' of my mums and after washing, folding the wet laundry then feeding it thru the wringer was very peaceful 01:22:00 soap on, soap off 01:22:26 it was my favorite plave to meditate as I wrung and tried to keep my fingers out of the rollers 01:23:09 a good balance of peace and quiet, and possible ear splitting screaming as the rollers squished my fingers 01:23:14 tp, I loved those washing machines! I always tried to jam it up 01:23:17 tp, as a kid 01:23:20 hahah 01:23:29 tp, I'd like grab a massive clump of clothes, or anything, and shove it through it 01:23:33 and forced the roller latch to pop open ? 01:23:37 Yeah :D 01:23:48 Those were cool though 01:23:48 and your little sister too ill bet 01:23:57 All male siblings matey 01:24:22 oh, ok... and your 12 younger brothers too Ill bet ? 01:24:27 Nah 01:24:50 I was in an old as house 01:24:52 it had like a 01:25:06 like a big brick fireplace thing, and a copper tub in it, and that was for washing 01:25:17 we never used it for that, but yeah, old school as 01:25:38 i had my machine at age 35 after a divorce when I had to hang up the firearms and learn womanly things like washing, cleaning and cooking 01:26:30 yeah they'd put logs under the tub and make a fire, and while the water boiled stir the clothes around in the tub 01:26:36 Righ 01:26:38 Right 01:26:42 we had one whan I was young 01:26:45 I like old school stuff 01:27:06 my mum would grate soap to put in it, no laundry powder back then 01:27:19 Yeah people used to make their own soap too! 01:28:02 I remember seeing mum grating yummy cheese one day and knowing there was no way shed let me have any before the meal, I raced past and grabbed a handful and swallowed it ! 01:28:10 sadly .... 01:28:18 it wasnt cheese 01:28:25 soap :( 01:28:30 last time I did that 01:28:55 she must have had a fit of laughter 01:29:10 lol 01:29:30 anyone eaten soap ? it's really yummy, you should try it some time! 01:30:19 honestttttt ! 01:31:47 Said with your best honest face trying to hide a grin, I am sure :P 01:32:04 as he weaves another basket 01:32:11 hehe 01:32:27 ok, it sucks, like eating slime 01:32:27 --- quit: SysDsnEng (Quit: SysDsnEng) 01:33:24 think of it as eating swamp monster drool 01:33:45 yes, because we all have that reference to go off 01:33:48 :P 01:34:32 yes you do 01:35:27 ok imagine you have accidentally plunged your arm down a Dolphins blow hole, and it's all covered in slime ... 01:35:37 that's like eating soap 01:35:38 lol 01:35:49 Man you have outrageous frames of reference 01:36:15 i like to make my points relevant and meaningful 01:36:48 communication ... thats the name of the game! 01:37:16 and I dont even drink! 01:40:11 --- quit: tp (Remote host closed the connection) 01:40:12 --- join: SysDsnEng joined #forth 01:41:17 --- join: tp joined #forth 01:41:17 --- quit: tp (Changing host) 01:41:17 --- join: tp joined #forth 01:41:44 i think I discovered the 'die and vanish' hexchat hotkey 01:43:04 tp, the whatter ? 01:43:08 oh 01:47:23 is it firefox's 01:47:56 no 01:48:17 hexchat is a gtk widget irc client 01:49:02 you're a widget 01:49:18 --- quit: mtsd (Ping timeout: 265 seconds) 01:49:31 no i mean is the key firefox's key 01:50:31 i dont use firefox 01:50:50 i use a firefox based browser called palemoon 01:51:13 is it palemoon's key ? I don't know 01:51:37 jsoft, I tend to fidget 01:51:52 jsoft, at least I'm no midget 01:51:57 Im a midget 01:52:01 Well, at least short 01:52:09 only 6'2 ? 01:52:19 Nah man, Im like 01:52:32 I dunno 165 or 170 or something like that 01:52:36 cm 01:52:48 what a shrimp! Im 178 or so 01:52:50 around the waist? 01:52:55 heheh 01:52:58 yeah 01:53:43 rdrop-exit, old pal, old mate ? 01:54:00 what the way to specify the data size in this array ? 01:54:03 create array 80 allot 01:54:23 say a cell where cell = 4 bytes 01:54:31 80 cells allot 01:54:55 and if characters ? 01:55:05 80 c, allot ? 01:55:19 80 allot is 80 bytes 01:55:24 yeah 01:55:43 so thats character size i get it 01:55:53 how about halfwords (4 bytes) 01:56:05 80 h, allot ? 01:56:07 not sure about character size with ANS stuff 01:56:16 80 2* allot 01:56:29 it's not 80 4* allot ? 01:56:37 ah ok, it's sinking in 01:56:50 sorry, if your halfwords are 4 bytes then 01:56:58 80 4* allot 01:57:12 but presumably you'd define a halfwords word 01:57:17 so you could do 01:57:18 I know all this stuff of course, Im asking it on jsoft's behalf 01:57:23 80 halfwords allot 01:57:44 I don't bother with halfwords and such 01:57:59 ahh i get it, very straightforward 01:58:19 we do becuse we are very efficiency oriented 01:58:36 and because we only have 500 bytes of flash 01:58:44 -) 01:58:46 ;-) 01:59:09 That's not what I meant 01:59:33 If I'm alotting 80 x 16-bits I just do 01:59:38 80 2* allot 02:00:41 tp, wait, whats this ? 02:00:42 you also need to make sure you align the dictionary to your needs before allotting 02:01:35 create normally aligns to a cell boundary 02:03:32 --- join: mtsd joined #forth 02:05:06 rdrop-exit, that whole thing you and tp helped me with has come to a success :) 02:05:24 kudos jsoft! 02:05:50 remember us in your will 02:06:10 :) 02:06:11 rdrop-exit, not the final thing, but https://www.youtube.com/watch?v=BobbJYqroYw 02:07:10 it's alive!! 02:07:34 cool 02:07:43 Yeah thats kinda of not even the end thing 02:07:47 But its a clock now 02:07:53 With a cool metal logo on the front 02:08:02 awesome 02:08:11 My first forth project! :D 02:09:09 snoopy dance 02:15:56 --- quit: SysDsnEng (Quit: SysDsnEng) 02:39:32 --- join: iyzsong joined #forth 03:03:35 --- join: smokeink joined #forth 03:13:35 his will better have at least 1 $billion in it! 03:16:56 Quite right Dr. Evil, one biiiilion dollars, muahaha 03:17:38 all mineeeeee! 03:17:54 get yer own 1$billion I saw it first! 03:18:36 rdrop-exit, Forth keeps making concepts that I once thought complex, simple 03:18:57 Forth, the great simplifier 03:20:28 rdrop-exit, Im pretty sure that Mecrisp-Stellaris aligns the dictionary automatically anyway 03:21:00 I'm sure you're right 03:21:09 Mecrisp-Stellaris is like Gcc, it's so clever you don't even need to know anything ! 03:22:00 so it's like Arduino? 03:22:12 i can and will do some tests now that youve mentioned it :) 03:22:18 hahaha, gahhh 03:22:28 touch'e 03:22:37 I've been outclevered ... again! 03:22:50 muahaha 03:23:02 oh oh that evil cackle 03:24:12 sometimes you might want to manually align to a boundary greater than a cell 03:24:57 this whole cell alignment is a new concept to me 03:25:23 Forth has protected me from such dark places 03:26:16 In most Forths a cell just corresponds to a machine word 03:26:23 I've been storing and fetching stuff with Forth, blissfully ignorant of cell boundaries 03:26:34 yes 03:28:04 which is 4 bytes in the case of cortex-m 03:28:48 and 'cell' just means 4* 03:28:59 as we said earlier 03:29:19 that would be 'cells' 03:29:19 so why would you want to align to a boundary greater than a cell ? 03:29:23 oops 03:29:30 'cell' would just be 4 03:29:33 youre right of course 03:29:50 oh! 03:29:56 you mean a number of cells ? 03:30:15 you may want to align to two cells for instance ? 03:30:18 like for example aligning to a kilobyte boundary 03:30:19 or 10 03:30:52 i had to do that recently when calculating iHex extended addressing 03:31:32 /mod of the address was what I used 03:32:09 so now I can calculate extended addressing to 2 gb 03:32:44 --- quit: mtsd (Ping timeout: 265 seconds) 03:32:54 when I get it tidied up Ill paste the link here to get your comments once more :) 03:33:53 you can usually avoid /mod by using AND instead 03:33:59 it's looking nice and neat, it has a 'rightness' about it 03:34:20 cool 03:34:23 for all I know, Mecrisp-Stellaris has replaced it with and anyway 03:35:10 I'm looking forward for a day when I actually make decent code that Mecrisp-Stellaris doesnt have to automatically 'improve' 03:35:58 I don't like to rely too much on optimizers doing the right thing 03:36:14 the 'thinking Forth section on using AND to remove more complex words was very interesting 03:36:48 Im not yet at that stage where Im relying on that, I'm far too ignorant to suspect any opts are going on 03:38:31 judicious choice of alignment can help you to tune space/performance tradeoffs 03:39:44 --- quit: tp (Remote host closed the connection) 03:40:23 --- join: tp joined #forth 03:40:23 --- quit: tp (Changing host) 03:40:23 --- join: tp joined #forth 03:41:04 wb 03:41:06 I discovered the kill irc client key is "B" 03:41:10 ta 03:41:23 i must avoid pressing that key! 03:42:46 I don't know any details of the IRC program I use, just logging in, and typing away 03:43:18 I should learn more about it one day 03:43:55 doesnt judicious choice of alignment involve using the right datatypes, perhaps halfwords ? 03:44:10 all depending on requirement ? 03:46:54 that too, but I was more thinking of when you align a buffer on a particular boundary to simplify address calculations 03:49:09 whether worthwhile depends on the specifics of the platform too 03:49:11 normally the buffer would just go in the next available dictionary address ? 03:50:17 yes, or the next cell aligned address of the dictionary 03:51:19 you don't have to place a buffer in the dictionary though, depends 03:52:00 align ( - - ) Aligns dictionary pointer 03:52:00 aligned ( c-addr - - a-addr ) Advances to next aligned address 03:52:58 I've seen people using align and I've copied and tested their code and it worked without align, so I was wondering what it was doing 03:53:23 right, I think those are the standard ones, mine are slightly different 03:53:29 thats where I surmised that Mecrisp-Stellaris may be aligning automatically anyway 03:55:11 well it's zzz time here, thanks for the tips as always rdrop-exit, they are very helpful and good Forth advice is hard to find if all 42 users of Forth in the world are busy at the same time 03:55:39 g'night! 03:55:41 Still 42? Good to hear no one passed away this week. 03:55:46 lol 03:55:51 g'night tp! 03:57:51 --- quit: rdrop-exit (Quit: Lost terminal) 04:01:47 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 04:24:18 --- join: mtsd joined #forth 04:35:34 --- quit: dys (Ping timeout: 250 seconds) 04:39:55 --- quit: smokeink (Ping timeout: 265 seconds) 04:44:56 --- quit: mtsd (Remote host closed the connection) 04:45:17 --- join: mtsd joined #forth 04:50:58 --- join: dys joined #forth 05:22:28 --- quit: mtsd (Quit: Leaving) 06:45:08 --- quit: dys (Ping timeout: 250 seconds) 07:26:40 --- quit: jsoft (Ping timeout: 240 seconds) 07:33:59 --- quit: begin (Quit: ) 07:40:22 --- join: dddddd joined #forth 07:41:02 --- quit: tabemann (Ping timeout: 250 seconds) 08:07:06 --- join: erkin joined #forth 08:07:13 Hello 08:08:01 I'm trying to solve Advent of Code as an excuse to learn Forth but I'm running into some difficulties with file operations. 08:08:37 I'm trying to read a file line by line with GForth and I end up with... well, slightly malmorphed data. 08:09:46 As far as I can tell, the canonical way to read a file line by line is doing read-line in a loop and saving each line to a buffer. 08:12:22 When I do `line-buffer max-line fd read-line throw` then `line-buffer count type` to inspect the data, I'm getting, say "443653" in place of "144365" 08:13:14 (where `create line-buffer 9 allot` and `filename r/o open-file throw to fd`) 08:23:59 Wait, the final 3 was my mistake but I think it just discards the first character of each line. 08:33:35 Very strangely, read-file and slurp-file don't run afoul of this problem. 09:00:21 --- quit: dave0 (Quit: dave's not here) 09:34:54 I'm not familiar with gforth's file i/o :( 09:49:02 I'm looking at day 6 of the advent of code; not sure how I want to go about solving this one 10:30:59 --- quit: Jookia (Remote host closed the connection) 10:31:27 --- join: Jookia joined #forth 11:09:14 --- join: WickedShell joined #forth 11:20:52 --- join: begin joined #forth 11:32:00 --- quit: gravicappa (Ping timeout: 250 seconds) 12:40:04 working on the advent of code puzzles makes me want better support for various data structures (lists, graphs, associative arrays); so it's probably a good time to begin working on them... 13:39:06 --- join: jsoft joined #forth 13:52:05 Good morning peoples 13:52:37 morning, man from the frozen eastlands 13:53:12 seen any Cave Trolls lately ? 13:53:17 good afternoon jsoft 13:53:54 afternoon crc 13:55:04 tp, I saw one in the mirror 13:55:34 hahah, damn 13:55:37 :D 13:56:01 Oh wait, whats this? A bourbon 13:56:08 Cant let that go to waste. 13:56:10 jsoft, how goes the array ? 13:56:49 tp, lol, im not doing any work on it, I only got the discovery up and going to have a nerd fight with you :D 13:56:57 cool 13:57:14 I vaugely remember you talking to rdrop-exit about such things though 13:57:23 I've made a array, imaginatively named "array" 13:57:45 it's created in ram and I can see it when I list the words 13:58:41 ram words are right at the top of the word list before the --mecrisp blah -- line 14:00:43 tp, so is this all using the um, compiletoram shenanigans ? 14:00:51 Or the compiletoflash shenanigans 14:01:23 compiletoram atm, but it wont make any difference 14:01:42 at least to the creation of the array 14:01:50 tp, thats what I thought 14:01:53 and I can easily test that 14:01:59 easily test it then :P 14:02:10 it will store the array in ram 14:02:13 sorry, flash 14:02:31 your issue is writing or reading from the array once the array is created from a word in flash ? 14:02:54 no I don't create it from a word 14:03:08 I have it at the top of a .fs file 14:03:15 outside of a word I guess.. if thats the right term 14:03:32 well, you load a file which creates the array 14:03:44 yeah, I think we are on the same page there 14:04:08 you load the file which has 'compiletoflash' at the top of the file 14:04:13 yeah. 14:04:22 ok, I'll do that now 14:04:51 According to my scientifically calibrated hunch, the array will have an address in flash 14:09:34 and youre right 14:09:42 the array has been created in flash 14:10:26 luckily I do know how to create a array in ram, from flash 14:10:37 How do you do that ? 14:11:00 please let me know when you have transferred 1 $billion dollars to my paypal account and I'll tell you 14:11:04 lol 14:11:07 This guy :D 14:11:23 Nah nah, the cheque's in the mail :P 14:11:38 Thats a weird thing too, cheques 14:11:38 it's a great line, some troll from nz gave me the idea just the otehr day 14:12:16 :D 14:12:20 youll love this method, I first saw it used by the jeelabs guy 14:12:30 let me get my notes 14:14:21 : init 14:14:22 s" $1000 buffer: buffer1" evaluate 14:14:22 s" $2000 buffer: buffer2" evaluate 14:14:22 s" $3000 buffer: buffer3" evaluate 14:14:22 ; 14:14:50 what happens here is the word "init" is run at boot when found in flash 14:15:08 thats the 'turnkey' method used by Mecrisp-Stellaris 14:15:26 lol filthy :D 14:15:46 when init runs above it creates buffers 1 -3 in RAM 14:16:04 ok that makes sense 14:16:20 I like the buffer thingy :) 14:16:37 Ive verified this with matthias and it's the ONLY way to create these kinds of things in ram 14:17:03 it should work fine with arrays also 14:17:51 Wait 14:18:00 what do you mean its the only way to create these things in ram 14:18:06 from flash 14:18:13 I done it via just 123 buffer: derp in a .fs file 14:18:24 not in init, not with the s" shenanigans 14:18:41 i dont know the correct term to describe "buffers and arrays" 14:18:53 to replace the "things" word above 14:18:55 well its just a bunch of memory 14:18:59 sure 14:19:18 its the only way to create "a bunch of memory" in ram 14:19:20 the point being the name after buffers: points to ram addresses 14:19:24 yeah 14:19:51 but it does not need that evauluate thing from what I have seen 14:21:25 does anyone have a name to describe the "bunch of memories" such as arrays or buffers ? 14:21:46 hehe 14:22:12 Hey you know how stm32 has 'usb' support, what even is this usb support 14:22:19 is it just a usb usart thingy ? 14:22:33 no 14:22:38 what is it ? 14:22:48 I don't know much about usb 14:22:49 we have USB for the stm32f103 14:22:57 and what does it do 14:23:38 and it's a proper USB driver which allows a serial connection thru a usb cable (plus power) 14:23:56 Right.. a usart? 14:23:59 the pc sees a "ACMxxxx" modem type device 14:24:08 or uart or whatever 14:24:10 serial thingy 14:24:17 no, it's usb only 14:24:30 yeah but I mean its actuing like a usb serial device over usb 14:24:38 it uses the USB peripheral on the stm32f103 14:24:55 Yeah I get that part, but I was just wondering what it was actually doing over usb 14:25:11 USB is just a serial protocol 14:25:37 it's doing talking to Mecrisp-Stellaris over USB 14:25:40 :) 14:25:48 So ok, it removes the need to have a seperate usb serial TTL gizmo 14:25:55 just a straight usb connection and bingo 14:26:01 thats right 100% BUT 14:26:15 dun dun dunnn 14:26:28 now you use e4thcom 14:27:25 and e4thcom is very good as it syncs comms by using the "ok." end of line terminator 14:27:54 so e4thcom should also work just fine via the USB driver 14:28:45 in my case, because I use hardware handshaking the USB facility on a STM32F103 (blue pill or olimex) is of no use 14:29:19 tp, ahh yes, handshaking... thats a point 14:29:27 however ... the USB driver uses something called "backpressure" which is apparently how USB manages flow control 14:29:47 and what does that mean 14:30:05 BUT ... backpressure requires a few milliseconds delay at EOL 14:30:53 A few milliseconds to do what 14:31:09 I dont know much about it, but when I tested it with gnu screen where I just HAMMER the serial line at 460800, 'backpressure' didnt work at all resulting in the target "locking up" 14:31:36 A few milliseconds to give the USB "backpressure" thingy time to work 14:31:37 erm ok 14:32:45 matthias has asked me to look at porting the USB driver for the STM32F103 over to the GD32VF103 as it uses the same peripheral 14:33:21 What even is the GD32Vf103 14:33:28 it's a challenge I cant resist 14:33:40 Shoul'd be done by lunchtime then? 14:34:15 the GD32VF103 is a RISC-V core with the STM32F103 peripherals and busses made by Gigadevices a Chinese company 14:34:19 hahah 14:34:40 all that will be done by lunchtime is that 400g rump steak in my fridge 14:34:48 Awwwww yes 14:35:05 I've got 3... something stakes in the fridge 14:35:20 this is the chip https://mecrisp-stellaris-folkdoc.sourceforge.io/gd32vf103.html#gd32vf103-longan-nano 14:35:28 I have 5 :) 14:35:55 but I really want some hard cheese and tomatoes with my steak today 14:36:10 What do you mean by hard cheese 14:36:29 cheddar thats 'cured' for 18 months + 14:36:36 maybe 24 months 14:36:40 What do you call 'tasty' cheese 14:36:58 Like we have cheese here called 'tasty', and its quite brittle/hard 14:37:08 And also tastes super awesome 14:37:16 'tasty' is labelled over many cheeses so Ive no idea what it means 14:37:22 Hmm 14:37:36 Do you like salt ? 14:37:47 the hardness of a cheddar cheese depends on the time it has spent curing 14:37:59 sure, who doesnt need salt ? 14:38:12 :) 14:38:15 they used to pay roman soldiers in salt one I read 14:38:40 Its quite interesting. I've always loved salt, and ended up reading a bit about it a few times now. Its actually really good for you, and very very essential 14:38:46 so soft limp cheaper cheddar has probably just been made at the factory 14:39:08 yeah, I think we all know that instinctively 14:39:10 Its weird how there is/was some very 'oh salt bad' agenda for a while 14:39:28 it's a crazy world 14:39:33 It is. 14:53:49 --- join: ryke joined #forth 15:13:24 so back to a experiment creating a array in ram from a flash based Word after mcu reboot 15:13:44 2 hrs to steak lunch! 15:17:07 :D 15:20:44 jsoft, I'm making a page on my doc site detailing creating a array in ram from a flash based Word today so you can check on my results in a few hours if you like 15:21:10 for now I'm off to buy some hard cheese! 15:22:35 tp, champion :) 15:32:40 --- quit: ryke (Ping timeout: 240 seconds) 15:39:46 --- join: [1]MrMobius joined #forth 15:42:28 --- quit: MrMobius (Ping timeout: 250 seconds) 15:42:29 --- nick: [1]MrMobius -> MrMobius 15:58:43 --- join: ryke joined #forth 16:54:09 --- join: rdrop-exit joined #forth 17:09:08 c[] 17:09:36 g'day Zen Forth Guru 17:09:59 good morning Master Technician (tm) 17:10:23 got woken up early by construction work in the building |-( 17:10:32 always lovely 17:10:42 jackhammers ? 17:11:24 regular hammers, although across the street they're also putting up a new hotel, tons of noise from there as well :-( 17:11:39 --- join: tabemann joined #forth 17:11:43 grrrr 17:11:45 a hotel across the street! 17:12:04 new chinese hotel 17:12:24 there's always tons of construction in the neighborhood 17:13:07 as you said once 'very busy place' 17:13:13 malls, hotels, office and condo buildings 17:13:21 never stops 17:13:37 where do you keep your ferrari ? 17:13:52 You mean Volvo 17:13:59 yeah ;-) 17:14:19 I'm not a car person 17:14:22 I had a 244DL station wagon once, my ex wife still has it 17:14:38 I have a 850 17:14:55 it was a industrial version of the station waggon made for business 17:14:55 I haven't driven in 25+ years I think 17:15:01 wow 17:15:30 I havent driven in a couple of years myself, last time was a little Toyota rental 17:15:49 I wanted a motorcycle+sidecar but my wife won't "allow" it 17:15:57 but I do have a car I love, it's been off the road for about 5 years in storage here 17:16:10 but like you Im a motorcyclist 17:16:37 bikes are what I like to travel on 17:16:56 hey guys 17:17:13 hello tabemann, how's zeppoForth 17:17:17 tho my Audi car is awesome to drive, but as it's a 1994 model it has a number of minor problems that I may never get around to fixing 17:17:28 hey tabemann 17:17:35 rdrop-exit: I'm learning Thumb assembly quickly 17:18:14 I'm wondering whether I should license it as GPL3 since a lot of the code is inspired by Mecrisp-Stellaris, even though it's my own characters typed in 17:18:40 tabemann, jsoft and I have been discussing ways to initiate a array in ram, from flash 17:18:58 I don't look at other people's code when I implement 17:19:04 the way I've figured out how to do it for zeptoforth is to keep two HERE pointers 17:19:23 i look at Mecrisp-Stellaris code a lot trying to understand how to use it 17:19:30 one is the primary HERE pointer, always into RAM 17:19:44 the other is the compilation HERE pointer, which is either into RAM or into Flash 17:20:01 Mecrisp-Stellaris compiles into ram or flash 17:20:28 here points to whichever memory is in use with 'compileto' 17:21:03 and we have a "compiletoram?" 17:21:14 systems vary when it comes to cross-compilation, especially since ANS doesn't cover it 17:21:17 to determin which mode it's in 17:22:29 what I figure is this 17:22:37 does mecrisp-stellaris follow the draft cross-compilation spec? 17:23:06 I've no idea 17:23:11 when the compilation pointer points to RAM, when the HERE pointer is incremented it is also incremented, and likewise when it is incremented the HERE pointer is incremented 17:23:33 when the compilation pointer points to Flash, it is independent of the HERE pointer 17:24:22 You're target memory map might be more complicated than just Flash+RAM 17:25:14 actually, forget about it - there is a ROM pointer and a HERE pointer, and a selector for compiling between the two 17:26:46 the standard has 3 spaces, code+constants, unitialized, initialized 17:26:49 multiple discontiguous sections of RAM or Flash? 17:27:42 does anyone follow that other than maybe gforth? 17:27:51 yes, e.g. two different Flash 17:27:57 follow what? 17:28:08 the standard has 3 spaces, code+constants, unitialized, initialized 17:28:46 about multiple discontiguous regions, well, I'll cross that river when I get to it 17:28:53 I don't know if Gforth follows it, it was drafted by Forth Inc and MPE I think (not sure) 17:29:05 right now I just have to worry about two regions, RAM and Flash 17:29:13 just a sec 17:30:25 https://www.mpeforth.com/arena/XCtext5.PDF 17:30:33 https://www.forth.com/downloads/ANS/XCpaper.pdf 17:31:36 the first one is their draft standard wordset for cross-compilation 17:32:10 the second one is a paper describing the whole thing 17:33:49 Target memory space can be divided into multiple sections of three types, shown in the table below. 17:34:21 CDATA, IDATA, UDATA is what they call them 17:34:51 those seem to be relevant to loading an image onto a target system 17:35:20 whereas this is compilation on a host system that just happens to have a dichotomy between RAM and Flash 17:36:05 you mean a target system 17:36:17 it would be nice to be able to compile to a serial eeprom etc 17:36:31 some external memory 17:37:24 they're not just relevant to loading 17:38:15 rdrop-exit: I mean a target system, because zeptoforth will be running directly on the Cortex-M system 17:38:29 also relevant to a target resident system that can modify itself 17:40:41 zeptoforth will need to be aware of the memory map of the system it's running on 17:40:45 the problem with CDATA versus IDATA versus UDATA is that on a host system it will be incrementally compiling code and building up layers of memory usage, so you can't delineate CDATA versus IDATA versus UDATA ahead of time except if they line up neatly with predefined memory regions (RAM versus Flash) or if one has pre-sectioned off parts of memory ahead of time 17:41:01 rdrop-exit: that will be compiled in 17:41:09 *assembled 17:44:20 it all depends on how much your forth can modify itself 17:44:52 (while resident on the target) 17:45:57 If you're forth can modify what it will do at boot up for example, you'll need to deal with that 17:48:37 you need to decide what needs to be done on your PC host, and what can be done by the resident Forth on the target 17:50:14 in this case the Cortex-M machine is the host 17:50:21 the PC is only a terminal 17:50:24 At one extreme of the spectrum you have an tethered Forth on the PC and almost nothing on the target, at the other extreme you have a powerful resident Forth on the target 17:50:47 ok 17:51:45 So you'll need to decide what the resident Forth can handle on its own, and what will require you to load a new image on the target 17:54:35 I'm probably going to go with making the resident Forth powerful enough that it can compile (basic) code on its own, and which will be able to accept code written in a limited Forth off the bat, which can then be compiled to flash 17:55:37 of course most of the resident Forth will be written in what is essentially SRT/NCI code except that it was compiled by a human 17:56:55 I could always use thumbulator to do this, and then spit out a flash image 17:57:26 --- join: dave0 joined #forth 17:57:28 which could then be used by the user as a more complete Forth 18:00:07 So you'll have to deal with the differences between flash, initialized RAM data, and unitialized RAM. 18:01:18 That's what they're trying to standardize with their CDATA, IDATA, UDATA types of memory sections 18:02:59 what I'm going to have is flash and uninitialized RAM; the boot code, including a user-settle boot hook, will do the job of initializing RAM 18:03:06 *settable 18:04:35 wait a second, RAM cannot be allocated at compile-time for Flash 18:04:57 because what if RAM had already been allocated earlier during execution at compile-time for RAM 18:05:07 and then the machine is power-cycled 18:05:17 what had been compiled into RAM is gone 18:05:40 you can always ignore their standardized abstractions, and deal with things explicitly at a lower level 18:05:41 but any RAM allocated at compile-time for Flash would be stuck where it is 18:06:14 you lost me 18:06:36 okay, I have a solution 18:06:48 cool :) 18:06:53 a certain set of variables are allocated at the bottom of RAM, like the HERE pointer 18:07:04 --- join: iyzsong joined #forth 18:07:19 but any further RAM is allocated dynamically after bootup each time the device is booted 18:10:11 you have RAM that needs to be initialized to specific values, and RAM that doesn't 18:10:46 That's their IDATA and UDATA section types 18:13:26 basically they (Forth Inc. & MPE) have tried to iron out the differences between their systems with regards to cross-compilation words 18:14:17 and anything that deals with the target memory map 18:17:35 --- join: smokeink joined #forth 18:21:41 I find those two documents much more interesting than the ANS standard as they deal with the important issues, while the ANS standard is largely ignorable 18:24:05 hah, found a means of finding words from the end of flash 18:24:48 first go backwards in flash until a block of memory that is not all 0xFF bytes is found 18:25:14 then find the last halfword in that block which isn't all 0x00 18:25:17 why do you need this? 18:25:34 rdrop-exit: so I can find where my flash dictionary ends 18:26:49 ? 18:27:50 when I build up my flash I can do it 16 bytes at a time but I can only erase it 2K pages at a time, which makes storing a single variable in flash storing where the flash dictionary ends, well, highly impractical to say the least 18:28:36 so I need some way of finding the last word in flash 18:28:49 which does not rely on storing its location in a variable 18:29:44 why don't you want to store the location? 18:30:40 because it'd require updating the same location in flash over and over - and remember I can only erase 2K pages at a time, so each time I wanted to update it I'd have to save the whole page, erase it, rewrite it but with the new value 18:30:59 and flash isn't meant to be *constantly* rewritten like that anyways, SSDs aside 18:31:45 nobody is forcing you to constantly rewrite it to flash 18:31:55 I can't save it in RAM! 18:32:05 because that defeats the point 18:32:18 the point of saving it is when the device is power cycled 18:32:39 I will have a pointer in RAM during normal operation 18:33:30 but I still need a means of finding the last word in the flash dictionary on powerup 18:39:20 your worried about losing power while writing to the dictionary? 18:39:50 or I should say extending the dictionary. 18:41:18 dammit I hadn't even thought about that scenario! 18:41:31 writing a single 16 byte block of flash is atomic to my knowledge 18:41:46 but when a word spans multiple 16 byte blocks 18:42:01 my pointer at the end to the start of the word may not get written properly 18:43:27 but this should probably be considered to be a scenario which is outside the realm of norrmal operation 18:43:44 you shouldn't be scribbling on the Flash continuously 18:43:45 as then the user can always just reflash the device with zeptoforth 18:44:19 rdrop-exit: oh I'd only be scribbling on the Flash when the user compiles new words to flash 18:45:44 I would have a separate word to save to flash 18:46:18 I'd probably copy mecrisp-stellaris and have compile-to-flash and compile-to-ram 18:47:37 I'm not familiar with mecrisp-stellaris 18:48:37 tp talks about it all the time! 18:48:49 * tp me ? 18:48:57 yes 18:49:02 It's the only Forth I use 18:49:04 I know about it, but I haven't looked at it 18:49:44 there isnt another cortex-m Forth that is usable imho 18:50:17 there may be a tsunami of cortex-m forths around the corner but they havent arrived yet 18:51:00 i mean OSS forths of course 18:52:52 The Office of Strategic Services had excellent Forths 18:53:53 they would have as Forth is a 'secret weapon' 18:57:34 okay, I have imposed a restriction on flash-compiled words - they must be smaller than 4K in size 18:57:43 *64K 18:59:06 4 k for a single word? that's humungous! 18:59:33 64K for a single word? that's gargantuan! 18:59:53 64 k? =8-O 19:00:11 Surely you jest, Mr. Tabemann 19:00:57 I figured I didn't want to devote a full 4 bytes to just a word length when the vast majority of words would probably be < 1K 19:01:10 --- join: X-Scale` joined #forth 19:01:33 anyways, I need to go - the coffee shop is closing 19:01:36 I'll bbl 19:01:48 --- quit: X-Scale (Ping timeout: 250 seconds) 19:02:07 --- nick: X-Scale` -> X-Scale 19:02:14 The vast majority of words should be a few dozen bytes 19:03:43 What do you mean by "devote a full 4 bytes to just a word length"? 19:05:17 What "word length" are you speaking of? 19:06:34 --- quit: tabemann (Ping timeout: 276 seconds) 19:24:27 --- quit: ryke (Ping timeout: 268 seconds) 19:42:07 --- quit: dave0 (Quit: dave's not here) 20:02:40 --- join: tabemann joined #forth 20:27:45 rdrop-exit: few dozen bytes including dictionary? 20:27:51 or few dozen words 20:28:54 It's a question of what one means by a forth "word" 20:29:07 for example 20:29:24 create things 100 allot 20:29:37 --- quit: smokeink (Remote host closed the connection) 20:29:44 the word is things 20:30:03 it has a header that contains "metadata" about it 20:30:17 it has some code that pushes an address 20:30:46 but the 100 bytes alloted are not a part of the word things 20:31:03 the word things just pushes their starting address 20:32:26 in this case the header may be let's say a dozen bytes 20:32:35 the code would be a few bytes 20:36:04 (the details vary depending on the threading model) 20:38:56 (and the platform of course) 20:42:29 back 20:43:48 wb tabemann 20:43:57 ty 20:57:27 --- join: dave0 joined #forth 21:00:53 btw Jookia, just to be specific on my bytecoded PC-based Forth, the header of things would be 13 bytes, the code would be 5 bytes, possibly followed by padding for alignment. 21:08:41 Sorry, the code would be 6 bytes 21:31:34 bbl 21:31:40 --- quit: rdrop-exit (Quit: Lost terminal) 21:49:01 --- join: gravicappa joined #forth 22:01:20 --- quit: gravicappa (Ping timeout: 240 seconds) 22:19:42 * jsoft is back from town with snacks! :D 23:56:24 --- quit: dddddd (Ping timeout: 268 seconds) 23:59:59 --- log: ended forth/19.12.06