00:00:00 --- log: started forth/20.04.11 00:05:40 --- quit: cantstanya (Ping timeout: 240 seconds) 00:28:19 --- join: cantstanya joined #forth 01:13:56 --- quit: reepca (Read error: Connection reset by peer) 01:13:57 --- join: reepca` joined #forth 01:52:51 --- join: xek joined #forth 02:05:44 --- quit: rdrop-exit (Ping timeout: 256 seconds) 02:10:43 morning 02:11:16 morning veltas 02:11:31 Figuring out my keyboard driver atm 02:11:46 At the start of my long road to interactivity 02:12:21 long road to Forth interactivity ? 02:12:31 Hmmm 02:13:36 --- quit: jsoft (Ping timeout: 240 seconds) 02:19:09 --- join: rdrop-exit joined #forth 02:24:59 --- join: rdrop-ex1t joined #forth 02:25:27 --- quit: rdrop-exit (Read error: Connection reset by peer) 02:25:45 --- quit: rdrop-ex1t (Client Quit) 02:39:10 tp: if you want a technical solution attach a gpio pin through an inverter to /reset 02:40:14 crest, for the GD32VF103 ? 02:48:43 --- join: jsoft joined #forth 02:54:18 tabemann: does thumb1 have pc relative loads? 02:59:13 tp: i'm working through the backlog 03:01:09 how large is the mecrisp header for a 1 cell constant? 03:01:51 searching the directory for substrings would be very useful without tab completion 03:02:13 e.g. which words contain gpioc 03:03:42 is it really enough to justify writing 2 cells + @ instead of field-name + @ 03:09:13 is there a good reason avoid naming fields in the task list elements etc. ? 03:11:37 tabemann: how can large constants in small functions be a problem on arm if the pc is part of the register file 03:12:07 can't you use a register + offset adressing to get pc relative loads? 03:13:06 the only problem i can see is that you have allocate it close enough to all accesses 03:14:19 --- join: iyzsong joined #forth 03:39:45 --- join: dddddd joined #forth 03:53:04 --- quit: jsoft (Ping timeout: 256 seconds) 04:19:09 --- quit: dave0 (Quit: dave's not here) 05:02:26 tp: i got annoyed enough to bend the rx/tx pins into a hook to get a reliable connection 05:03:09 excellent! 05:25:12 --- quit: xek (Ping timeout: 264 seconds) 05:48:56 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 06:04:30 --- join: xek joined #forth 06:12:38 --- mode: ChanServ set +v crc 06:27:09 --- quit: xek (Ping timeout: 250 seconds) 06:34:45 --- join: heredoc joined #forth 07:12:41 --- quit: proteusguy (Ping timeout: 260 seconds) 07:12:42 --- quit: proteus-guy (Ping timeout: 265 seconds) 07:25:44 --- join: Modulo5k joined #forth 07:25:52 --- join: proteus-guy joined #forth 07:26:08 --- join: proteusguy joined #forth 07:26:08 --- mode: ChanServ set +v proteusguy 07:26:17 Hello all - my friend is having trouble making dlls compatible with forth. Are there any requirements for this? 07:26:43 "making dlls compatible with forth" really depends on the forth 07:26:43 I know nothing about forth, so please spare newbie comments 07:27:10 He should be on IRC soon, so I'll ask him what version he's using 07:27:16 Half of us are noobs we're not going to judge 07:27:41 Maybe he should ask if he'll be on IRC 07:28:07 yes, probably 07:28:13 I'm just the messenger 07:28:33 recon if you will 07:29:04 The dlls are compiled in C++ 07:29:21 And he calls the dlls from forth 07:38:54 --- join: rogerlevy joined #forth 07:40:04 Hi, are there any VFX or SwiftForth users on here today, who happen to know about DLL's on Windows? 07:51:01 rogerlevy, its usually better to just ask your question. someone who knows might tune back in a little while 07:55:52 but not knowing anything about either of those, you might want to figure out the calling convention a program written in C or some other language uses and try to recreate that in Forth 07:56:40 maybe create a one line program in C that calls a DLL then step through with a debugger and see what it's doing 08:02:17 rogerlevy and I are trying to solve some problems with the graphics and input library Allegro 5. On Windows, it's compiled as C++ 08:04:52 --- join: jsoft joined #forth 08:05:08 and you want to do that in forth instead of C++? 08:05:36 Already been doing it for several years now :] 08:06:21 VFX and SwiftForth both have problems loading newer versions of Allegro's DLL in recent years. 08:06:29 I.E. it refuses to load 08:06:37 (bind) 08:15:22 --- quit: rogerlevy (Quit: Connection closed) 08:16:39 --- join: rogerlevy joined #forth 08:18:20 --- quit: rogerlevy (Client Quit) 08:19:03 --- join: rogerlevy joined #forth 08:32:03 Turns out the LIBRARY call succeeds, but all calls to functions within the DLL crash 08:41:46 NVM it was 64 bit , trying a 32 bit DLL now 08:48:50 Worked (y) 08:49:06 back 08:49:09 hey guys 08:50:22 crest 08:50:30 tabemann: ? 08:50:34 the problem is that, at the time a literal is compiled 08:50:49 there is no way to know where to put the PC-relative literal 08:51:24 because one does not know how long the word will be 08:51:35 unless 08:51:52 one puts the literal inline, and jumps over the word 08:52:01 how do you deal with to large conditionals? 08:52:04 but that has its own complications 08:52:17 e.d. a 10kB switch case 08:52:21 *e.g. 08:52:32 --- nick: Modulo5k -> BugSquasher 08:52:35 because PC-relative addressed constants have to be 32-bit aligned 08:52:48 yet thumb code is 16-bit aligned 08:53:20 and it has to jump over the constant that way as well 08:54:17 which is a lot of bloat 08:55:06 right now I'm just focusing on Cortex-M3/M4, and will get around to working on Cortex-M0 if I feel the need 08:56:39 also because zeptoforth seems to produce kind of big machine code, and Cortex-M0 processors typically don't have that much flash 08:57:57 --- quit: reepca` (Read error: Connection reset by peer) 08:58:31 --- join: reepca` joined #forth 08:58:38 tp: You still awake? 09:03:07 tp: is the code for your mecrisp stellaris helper functions like "words4" and "free" publicly available? 09:07:33 --- part: BugSquasher left #forth 09:15:53 My Forth can't handle a control structure that needs to jump further than 255 bytes 09:16:55 But who would ever need that, right? ;) 09:19:30 I've run into that 09:19:50 this is a reason I probably won't even support Cortex-M0 09:24:55 To be fair haven't done CASE yet, I think I will be doing a dumb walk over the OFs so you should be able to manage a much bigger switch control than 255 bytes, but each OF..ENDOF will need to be that small 09:29:53 --- quit: rogerlevy (Quit: Connection closed) 10:19:25 --- quit: reepca` (Read error: Connection reset by peer) 10:19:35 --- join: reepca` joined #forth 10:21:08 --- join: Zarutian_HTC joined #forth 10:23:36 --- quit: jsoft (Ping timeout: 240 seconds) 10:30:45 But anyway refactoring is a virtue 10:43:54 --- join: tolja joined #forth 10:48:14 --- nick: tp -> tp_ 10:52:02 --- nick: tp_ -> tp 10:54:05 --- nick: tp -> tp_ 10:54:38 --- nick: tp_ -> tp__ 10:57:38 --- nick: tp__ -> tp 11:07:38 crest, yes it's all available, people only have to ask if they cant find it on my website 11:07:50 veltas, I am awake now 11:07:53 * crest asks 11:08:29 tp: Do you have twitter? 11:08:32 crest, I saw that, I'll quickly paste them to a pastebin 11:09:13 veltas, no, I have avoided all 'social networking' this is as close as I get here on irc 11:09:14 SHUCKS 11:09:41 There are some people I can only get on Twitter which is why I joined today 11:10:09 --- join: rogerlevy joined #forth 11:10:16 veltas, I've basically got little to say to most people because I've always been very foccused on what I want to do 11:10:45 Yes that is how people seem to use Twitter, at least in random dev stuff 11:11:03 oh 11:11:15 You have a YouTube channel, it would basically be like that if you had one but for short clips and random status updates 11:11:21 That's how techy poeple seem to use it anyway 11:11:50 I know that there is a twitter underworld of people with too much spare time, but the actual interests parts of twitter are chill 11:11:55 veltas, then I'll look into it 11:12:17 I'm not trying to sell it, just explaining my perspective as someone who has also resisted twitter 11:12:38 brb, gotta paste the programs for crest 11:13:25 BTW GENERAL NOTE::: To all here, if you dont know, Freenode just removed all unused NICKS 11:13:56 Now's my chance to grab a short nick nobody will recognise me under 11:13:58 meh 11:14:05 so NOW is a good time to reaquire any old alternative NICKS that people may have stolen from you 11:15:00 Ive just recovered my old "tp_" and "tp__" that were taken after I hadnt used them about a decade ago 11:18:18 crest, words4.fs http://dpaste.com/1RGENK6 11:21:15 crest, free is in memstat.fs http://dpaste.com/16VM9VX 11:22:46 veltas over the years I've had about 20,000 SSL crack attempts on my main nick "tp" for some reason 11:23:38 What does CTYPE do? 11:24:13 ctype ( cstr-addr - - ) Prints a counted string. 11:24:36 https://mecrisp-stellaris-folkdoc.sourceforge.io/words.html 11:24:39 tp: looks like my blue pills admit having 128kB flash 11:25:01 Oh so it's COUNT TYPE ? 11:26:13 crest, do they suggest a chip type ? 11:26:41 veltas, I learned Forth with Mecrisp-Stellaris so Ive only known it as CTYPE 11:27:26 i closed the window that contained the stm32flash output and don't want to wipe the flash at the moment 11:27:35 Hmmm it refers to it as a "logical extension" of ANS forth I think 11:27:41 crest, my newbluelipp 'developer' version is nearly finished won;t be long now 11:28:01 tp: Nothing wrong with that, I don't even know standard Forth that well 11:28:05 er ... newbluelipp = new bluepill 11:28:14 tp: thanks for working on that (almost just for me) :-P 11:28:35 crest, a pleasure, I like to be useful 11:29:12 crest if you want one, someone else in the group of 42 worldwide Forth users may also 11:31:12 I was a bit sneaky with the Bluepill I admit; I tried advocating Forth on probably the worlds most popular tech forum, EEVblog but the C advocates soon massed like an angry mob 11:31:33 tp, do you have a link to that thread? 11:32:05 MrMobius, it's all over the place, I'll try and find some 11:32:45 tp: but please include the source code because it really helps us poor programmers sleep better :-P 11:33:35 MrMobius, here is one, this poster "mr scram" was persistant, spinning off new topics like this: https://www.eevblog.com/forum/microcontrollers/why-forth-users-so-agressive/msg2641056/#msg2641056 11:34:18 crest, of course, thats one of my "improvements" in the release 11:34:58 crest, up until now, it wasnt possible to automatically include the source for my precompiled binaries 11:35:02 oh hmm he's being satirical. I never saw the original thing he's making fun of 11:35:18 hes a troll 11:40:04 so I noticed there was an immense amount of confusion with C/Arduino users regarding the $2< "blue pill" board from china regarding counterfeit MCUS 11:41:21 many boards had non functional USB etc, so I decided to be sneaky and make a Forth bootable binary with menues and not mention Forth 11:42:17 it looks like this when booted: https://mecrisp-stellaris-folkdoc.sourceforge.io/stm32f1xx-diagnostics.html#main 11:43:55 it was pretty popular with Windows users and has been dl about 222 times as of today, but a recent new version has pretty much stopped that one being used now 11:45:26 this diagnostic binary booted from the usb power and the active terminal menu made it so easy to use that I think most people didnt know it ran Forth 11:46:23 in any event I no longer get replies from posters like "mr scram" or anyone else on that forum regarding Forth 11:56:01 --- quit: reepca` (Read error: Connection reset by peer) 11:56:18 --- join: reepca` joined #forth 12:11:32 hey guys 12:12:42 hi 12:13:03 hey tabemann 12:15:20 I made WORDS display words in four columns 12:16:10 it also handles the case when word are too long to fit in their column properly 12:16:54 awesome 12:17:10 I've also made an official release .tar.gz package 12:17:24 and I put it up on github and on hackaday.io 12:17:30 nice, I'll grab and try! 12:17:41 it's not the newest code though 12:17:49 it lacks the four-column WORDS 12:17:50 doesnt matter 12:17:55 oh 12:18:02 forget it then ;P 12:18:10 lol 12:19:11 my system is fully automated, I click on clone and I get the latest all in a tarball, plus the newest mods include a 'source' file with all my smaller files concatenated 12:19:13 note that the four-column words doesn't sort, because I didn't feel like dumping a record of each word out to RAM in a doubly-linked list, then implementing something like mergesort to sort that list 12:20:21 yeah, I knew sorting wouldnt be fun, and Ive decided to include a sorted wordlist as a separate txt file in my releases 12:20:57 i cant do it on the cortex-m0 I think as I only have 8kB ram 12:21:26 here is my game editor i've been building with VFX+Allegro the past month https://www.dropbox.com/s/i4a8h0c9krff1qu/2020-04-11%2015-12-41%20editor.mkv?dl=0 12:22:26 tp: yeah, it doesn't seem feasible on a system that small 12:33:58 okay, added code to WORDS to hide all those *RAM* words 12:34:30 tabemann, is that like a SMUDGE ? 12:34:57 *RAM* words are necessary to make RAM variables declared from flash work properly 12:35:22 they're used to record the maximum amount of RAM taken up by such RAM variables, so that RAM can be allocated at boot time 12:35:51 sure 12:36:33 I made it so it doesn't show words that take the form of ** 12:37:09 aha 12:37:37 note that it still shows the word **, where it to exist, allowing me to create a word for exponetiation that would be visible 12:37:45 *were 12:41:59 I wonder how I should space out releases - simply making WORDS better is not release-worthy, whereas making a major bugfix is, as is adding a major feature 12:42:38 good question 12:43:31 as long as serious users can git pull they can get the latest anytime 12:43:37 yes 12:43:46 the source code in git will always be the newest 12:43:51 so just release when you have a major update ? 12:44:09 the binaries in git, on the other hand, will be associated with a release 12:44:16 of course 12:44:42 only do major releases as binaries ? 12:44:42 --- quit: reepca` (Read error: Connection reset by peer) 12:44:54 well, any releases will be as binaries 12:44:55 --- join: reepca` joined #forth 12:45:34 e.g. if I make a bugfix, I want the binaries to include the bugfixes 12:45:50 sure 12:45:55 bugfixes will probably be more likely to result in releases than features 12:46:02 because people can do without features 12:46:02 thats pretty much what matthias does 12:46:22 whereas if someone runs into something that's broken... they'll want it fixed 12:46:38 he's very careful but occasionally releases a a bugfix with a minor release number 12:47:00 how he does all that without *any scm* amazes me 12:47:24 I probably will do most of my releases as minor numbers, but things like bugfixes and like as patch numbers 12:47:32 why??? 12:47:49 i dont know 12:47:59 he just doesnt need them he says 12:56:18 why four columns? 12:57:14 to make it easier to read than a word dump 12:57:17 back 12:57:52 crc: from comparing the new way of doing things with the old way, the new way definitely is more readable 12:58:26 * crc will implement this then 12:58:32 and four columns fits well on a 80-character wide terminal 12:59:06 e.g. with zeptoforth, which has quite a few long word names, most word names still are within 20 characters wide 12:59:37 crc, I find that Forth creators definitely dont need a columnar list as they know every Word intimately, but us noobs get lost in a huge word dump 12:59:54 * tabemann is now porting [if] - [else] - [then] to zeptoforth 13:01:09 tabemann, I find your words a bit long, for instance "led-red-on" Id name "redon" or maybe "red-on" 13:02:09 thats just my personal choice 13:02:20 that assumes word names thank ~19 characters (for an 80 column display), some of mine are longer 13:02:24 tabemann, your wording is certainly more acccurate 13:02:28 but: http://forth.works/examples/words-four-column.retro.html 13:03:07 crc you have to allow for longer names in the "word4" design 13:03:15 I'm going to take a walk because it's going to rain in about an hour 13:03:32 my four-column WORDS design takes into account word names longer than 20 characters 13:03:42 in mine a long word just uses up the next column or more until it's finished 13:03:56 that's how mine works too 13:03:59 longest names in retro on unix are 23 characters 13:04:34 mine pads all columns to match the longest name length 13:04:39 I haven't determined a longest word length for zeptoforth, but the vast majority are < 20 characters 13:04:57 I'll be back in a bit 13:05:10 same here 13:05:13 irq-spi3 irq-uart4 irq-uart5 irq-tim6 13:05:13 irq-tim7 irq-usbfs --- Flash Dictionary --- 13:05:13 72mhz u.1 u.2 u.3 13:06:17 --- quit: reepca` (Read error: Connection reset by peer) 13:06:32 --- join: reepca` joined #forth 13:08:40 my average names are 8 characters, or 5 if excluding the namespace prefixes I use 13:09:36 crc, mine can get longer because I auto create words for hardware 13:10:05 when you have 17,000+ Words to create, you can't do them manually 13:10:31 Ouch 13:10:41 that's a *lot* of words 13:10:52 here is a example 13:10:55 : SYSCFG_CFGR1_USART1_TX_DMA_RMP ( -- x addr ) 9 bit SYSCFG_CFGR1 ; \ SYSCFG_CFGR1_USART1_TX_DMA_RMP, USART1_TX DMA remapping bit 13:11:27 crc, it's a facet of these modern hitech times :) 13:12:38 crc, take for example a STM32F7x7 chip. It has 93 Peripherals, 2093 registers and 17051 bitfields all with unique names 13:13:31 crc, fortunately with Forth I can name them automatically and correctly, you should see the massive mess that C systems make of them 13:16:45 2093 registers? 13:17:18 peripheral registers 13:17:18 --- quit: reepca` (Read error: Connection reset by peer) 13:17:38 the chip itself has seperate mcu registers 13:17:39 --- join: reepca` joined #forth 13:17:53 not included in that tally 13:18:22 that seems excessive... 13:18:32 the above SYSCFG_CFGR1_USART1_TX_DMA_RMP Word is one of the 17051 bitfields 13:19:00 it's not, in fact it's awesome 13:19:20 each one represents capability 13:20:38 for instance that chip might have SIX on board USARTS 13:21:22 it will probably have 100+ GPIO pins, and each one can have up to about 50 different configs 13:22:05 this is the world I live in as a electronics tsch 13:22:08 tech 13:23:00 it's a very different one from where I work 13:24:12 * Zarutian_HTC would have something like mram or memristor based CPLDs than most MCUs 13:24:22 hopefully it throws some light on my attitudes about using forth, where they differ from the usual here 13:25:08 Zarutian_HTC, I live in a simpler world :) 13:25:41 in 13:26:35 it has occured a few times that MCU i wanted to use had placed two periphals I wanted to use on the same pins 13:26:42 Zarutian_HTC, I always refused to even look AT PLDs, FPGA's etc where proprietary software was required to program or flash them etc 13:27:41 most fpgas need propitary software, well specified cpld does not 13:27:46 Zarutian_HTC, yeah, you get that, it's a complex world. Most massive peripheral chips can't use everything at once 13:28:23 sure but the pin allocation was bonkers 13:29:01 even the mcu I use, the STM32F051 can only use a few peripherals as it only has 32 pins and 33 peripherals on board 13:30:17 Zarutian_HTC, and if you want a really versatile pin matrix choice then you get a zillion onboard analog switches and all the attendent xtalk ? 13:30:29 * crc will eventually have to deal with this stuff, but that'll be a while off 13:31:01 I thing motorola or at least someone inspired by them had the right idea of just having spi buses and provide peripheral chips on that bus 13:31:04 crc, I started with this stuff in 1974 so Im really at home with it 13:31:18 think* 13:31:35 * tp likes SPI 13:32:44 that way you can mix and match in your design 13:32:53 tp: my low level work has almost exclusively been on x86 systems so far, and I've only been back into that during the last year 13:34:30 crc, I think this is true of most X86 Forth creators, X86 is never used in embedded work 13:35:20 Zarutian_HTC, every industry has it's special needs, a STM32 MCU is made for general applications, generally not specialist stuff 13:36:00 Zarutian_HTC, and the cost of every additional part adds up in pcb design and manufacture 13:36:03 Zarutian_HTC, that sounds terrible :P 13:36:32 tp: one trick I came across was to have an shift in shift out paralel register feeding into a demux. The outputs of the demux went to the en on various, chips 13:37:39 some of the old timers on the 6502 forum still think setting up a whole system 6-7 chips to get 16 GPIO is the way to go 13:38:00 whereas you could do that with a $1 chip and more gpio and flash 13:38:01 Zarutian_HTC, luckily I dont have to worry about that stuff with a mcu with 33 - 98 peripherals on board :) 13:38:49 that way only two pins extra were needed for chip enable. One for that selection register and one through the demux 13:39:21 MrMobius, yeah, I HAD to do that a long time ago, it was awesome then, but now ??? Its like buying a Stanley Steamer to drive around in 13:40:48 I know there are a LOT of 6502 fans about, but after repairing hundreds of 6502 boards in the mid 80's I'm about over them now 13:41:21 MrMobius: depends on what you are doing. I have run a manifacture line where hundreds of gpio pins were needed and routing prevented the usual huge many pins packages 13:42:31 tp, thats cool. what kind of boards? 13:42:42 MrMobious: and spi bus is about 4 or five wires/traces 13:43:00 MrMobius, commercial video game boards 13:43:01 I2C the future 13:43:38 nice 13:43:49 veltas: sometimes i2c isnt fast enough or you get addressing collision issues 13:44:13 MrMobius, huge boards made by Atari, asteroids, armour attack etc, all vector scan graphics 13:44:54 * tp hasn't used I2C yet, prefers SPI 13:45:08 Zarutian_HTC: Yeah but usually not, and you have the I2C priority algorithm which is just genius 13:45:21 tp: Do you know much about it? It's pretty genius 13:45:56 SPI is the simplest way of doing a reliable simple serial connection to a device, I2C is like finesse 13:46:08 veltas, no, I'm apprehensive of I2C after looking at the SPI peripheral config 13:46:29 tp: re pcb design and manifacture: not so much as two layer boards are etched usually. Costs go up for more kinds of chips though 13:46:43 veltas, I will get to it tho, Im slowly working my way thru the STM peripherals 13:46:57 Cool 13:47:54 veltas, when I have a Forth project working with a peripheral I always write an article about it on my Mecrisp-Stellaris unofficial doc website 13:48:18 veltas, my last one was the stm32 'touch' peripheral 13:48:38 What kind of interface did that have? 13:48:39 tp: cost is usually the pick'n'place nest setup fee. The fewer kinds of components you have the cheaper it is. This is why one sees for instance two 1k resistors in series instead of one 2k resistor. 13:48:51 https://mecrisp-stellaris-folkdoc.sourceforge.io/touch-sensor.html#touch-sensor 13:49:21 a change of capacitence sensor, no? 13:49:29 Zarutian_HTC, sure, I do have a lot of SMT p&p experience 13:50:39 bloody hand when you can put "buttons" right in the pcb layout and not fiddle around with buttons that wear out 13:50:56 Zarutian_HTC, yes, I was expecting the 'touch' sensor implementation to be dodgy and unreliable, Imagine my surprise when I discovered the opposite 13:51:46 tp: I find these capacitive sensors interesting even though I actually *hate* using them in anything other than phones 13:52:09 Zarutian_HTC, my SMT experience was when I ran a commercial SMT assembly factory for a year up until 1990 13:52:38 Had a bloody capacitive sensor on an electric weighing scale and it would never detect my touch correctly, always resetting when it was meant to tare etc 13:52:50 Buttons are underrated 13:52:50 veltas, my experience is that they will work well on certain projects I have planned 13:53:01 I bet your ones work correctly tp 13:53:11 veltas, they sure will 13:53:18 You seem to have what Linus Torvalds calls 'taste' 13:53:23 now we just need something like cheap elwire paint or laminate then one could make a board that has one mcu as the main component and a battery as the second 13:53:33 So I could trust you to make a button not total shit like these scales ;) 13:54:28 veltas, well mine wont be for commercial products, just my own hobby gear so I dont have to worry about the usual hassles 13:55:26 veltas, but in my testing here, the touch is flawless 13:55:49 heck, I saw a four banger calculator that used cheap b&w epaper, capacitance touch and solar cell recentilyish 13:55:55 I even have some excellent new projects that use it for other utterly unrelated projects 13:56:02 tp: You're making me want to buy a blue pill and play around with it 13:56:38 veltas, they suck, I recommend a STM32 Discovery or Disco board 13:57:09 veltas have you read my Bluepill 'rant' ? 13:57:26 (it was meant to be one of these giveaway items or confrence swag) 13:57:45 https://mecrisp-stellaris-folkdoc.sourceforge.io/rants.html?highlight=rant#quick-grab-a-bargain 13:58:07 Zarutian_HTC, amazing whats possible now 13:58:33 though such a thing could be usefull for 2 factor authentication device 13:59:00 Zarutian_HTC, I have a lone STM32F051 on a pcb, I hand deadbugged it with a soldering iron the size of two chip pads. It runs Mecrisp-Stellaris with only a external filter cap 14:00:50 hmm, loose the fr4 pcb and use a vinyl cutter to make a layered 'sticker' circuit? 14:04:24 nah, I like Fr4 14:04:57 Im doing my new prototyping using teflon composite and copper rivets 14:05:10 but Im still working on that 14:08:12 Zarutian_HTC, here is that deadbug in all it's glory: https://mecrisp-stellaris-folkdoc.sourceforge.io/prototyping.html?highlight=prototyping#a-deadbugged-stm32f051-hand-soldered 14:08:58 tp: https://mecrisp-stellaris-folkdoc.sourceforge.io/_images/matrix-plague-scene-sml.jpg 14:09:20 tp why are we agent smith in this scenario? 14:09:25 hehe, yeah one of my anti C rants 14:09:28 C can be useful... 14:09:49 I came from C to Forth myself 14:10:06 but C can also be very un-useful 14:10:33 I use C to implement the virtual machine my forth actually runs on 14:10:44 veltas I was trying to convey my emotions and felt that Agent Smith captured them very well 14:10:50 (though I do maintain other options for this) 14:11:22 crc, sure, if I was going to write a fast program of the PC Id normally use C 14:11:29 tp: it works well fpr me, but only when used sparingly, and with great care 14:12:16 tp: This is a good article I am enjoying it 14:12:25 crc, my rant isnt based on C not being useful on PC's, it's based on C being a disaster when used in online embedded examples 14:12:47 veltas, cool :) 14:12:47 would something like https://www.mouser.com/datasheet/2/389/32f769idiscovery-953767.pdf be a good starting point for working with stm32? 14:13:48 tp: I also like this critique of the 6502 because that really is a garbage processor, the 'super fast' 2MHz 6502 in the BBC Micro was actually about as fast as a 3.5MHz Z80 you could get in a ZX Spectrum, a much cheaper computer 14:15:50 crc, that's a really high end mcu full of resources and very fast, hard to get something more complex 14:16:45 hmm, any recommendations for a simpler one with at least 256k of ram? 14:16:46 veltas, theyre both ancient now, tho I realise that there are many fans of both chips 14:16:55 Yeah I know that 14:17:07 I wonder if the ttmrichter you meantion is the same one I've encountered on IRC 14:17:10 mention* 14:17:27 crc, um, thats a hard question as 256kB ram is usually only found in the high end stuff 14:17:45 veltas, there is only ONE ttmrichter! 14:18:43 crc, I made a 'solid particulate' detector for the grain processing industry in 1998, and the MCU in that had 72 bytes of ram iirc 14:19:13 it was a PIC MCU with 1k of flash 14:19:39 and my firmware used maybe 800 bytes of flash and 20 bytes of ram 14:20:44 thats the areas I work in, but my $0.56 STM32F051'a have 64kB flash and 8kB ram which is IMMENSE to me 14:21:40 crc, perhaps youre looking for something like a RPI which have a lot more PC type resources, but a lot less embeded peripherals ? 14:21:42 I'll need a fair amount of ram to run retro. I've done a cut down version in 64k, but more is better fpr my purposes 14:22:15 plus one can get a small form RPI for $5 with wifi 14:22:56 tp: I have one of those already 14:23:08 ahh 14:23:40 ok, then I guess the 32f769idiscovery is probably the one for you, does it need a LCD ? 14:23:51 I don't need an lcd 14:24:11 you can probably get them in a LCD less Disco for much cheaper 14:24:16 ill have a look 14:24:31 tp: I think your article is mostly right applied to baremetal code 14:25:06 veltas, wow 14:25:08 About issues with C 14:25:29 yeah, it's very frustrating in a C oriented world 14:25:31 The stuff ttmrichter said is in a totally different direction and I'm not sure I agree with him 14:25:41 hes very polarising 14:25:48 people love him or hate him 14:26:00 I think the issues you have with C code is more to do with the programmers than the language 14:26:01 Im in the former category 14:26:20 --- quit: gravicappa (Ping timeout: 258 seconds) 14:26:33 in that case all embedded C programmers in the world are very dissapointing to me 14:26:41 *all* 14:26:52 You could write C code that doesn't abuse most of the stuff you complain about 14:27:07 Well I work in this industry and I can see what you're talking about 14:27:36 I think we find it hard sometimes to nail down the 'right' way to write maintainable code that has a good mix of baremetal secrets and maintainability. 14:27:43 Most of us don't get it right 14:27:50 veltas, i CAN SEE YOU DO 14:28:05 oops sorry caps 14:28:07 lol 14:28:31 C hides stuff, I blame C not the programmers 14:28:37 this caps gives a punch to your message 14:28:55 jackdaniel, it was a accident I assure you 14:28:56 tp: It's more like if you have a pretty hammer everything looks like a nail 14:29:21 The C 'hiding stuff' is a really good idea, for what it's for, and that is writing high-level structured systems code. It is *not* for writing drivers or baremetal code 14:29:31 Even the people who invented C mostly used assembly for that 14:29:39 veltas, I think that all of the embedded C programmers on line have no idea that their examples are deficient 14:30:23 veltas, yeah I get that, but they hide stuff *first* not later 14:31:06 I 'hide' my Forth embedded config stuff as it's ugly and Forth programmers throw up when they see it 14:31:22 event tho Ive worked on making it less ugly for years now 14:32:10 here is a small part of the config that my 'touch sensor' code uses 14:32:13 \ ------------------------------------- Config Words ------------------------------------------- \ 14:32:13 : RCC_AHBENR_TSCEN ( -- x addr ) 24 bit RCC_AHBENR ; \ RCC_AHBENR_TSCEN, Touch sensing controller clock enable 14:32:13 : NVIC_ISER_SETENA ( %bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -- x addr ) NVIC_ISER ; \ NVIC_ISER_SETENA, SETENA 14:32:13 : GPIOA_AFRL_AFRL7 ( %bbbb -- x addr ) 28 lshift GPIOA_AFRL ; \ GPIOA_AFRL_AFRL7, Alternate function selection 14:33:25 rdrop-exit believes this code is unecessary that it should be condensed and used in the main application 14:34:57 heree it is in a much more readable form: http://dpaste.com/0G52J10 14:36:29 veltas, my 'config Words' are my equivalent of the C include stuff 14:40:19 crc, this is a later MCU with 300kB + of ram the 32L496GDISCOVERY 14:40:34 tp: ah right, thanks for clearing that up 14:40:43 Was scratching my head a bit and went back to the article 14:40:51 Love that stuff about the rubbish tips 14:40:59 https://au.mouser.com/datasheet/2/389/32l496gdiscovery-1309469.pdf $126.75 ea 14:41:15 veltas, hehe, stories from my past 14:41:53 veltas, I remember that stuff like yesterday 14:42:14 veltas, when you get to my age, it's mostly memories anyway! 14:43:02 tp: thanks 14:47:11 tp: 'Tethered Forths provide the compact binary generation of The C Language PLUS the interactivity of Forth, all in the one system.' 14:47:26 veltas, yes! 14:47:30 If I understand what you mean by this, I think you could do this with a non-tethered forth 14:47:40 But the 'forth' would have to be structured quite differently 14:47:45 crc, sadly all the high end boards have extra stuff and costs 14:48:12 veltas, maybe 14:48:28 tp: it's within my budget, so that's not a big issue 14:48:44 veltas I only have experience with two 'tethered forths' so far 14:49:23 crc, at least it's well designed and decent quality, it will work no problems 14:49:51 veltas, this one is my favorite tethered forth : https://mecrisp-across-folkdoc.sourceforge.io/ 14:53:45 'However C is not interactive like Forth. If you want to test a LED, you have to write a program to turn the led on, then compile and flash that program into the target.' 14:54:15 tp: you are absolute madman for handsoldering a ball grid array like that 14:54:31 Zarutian_HTC, at age 66 ? 14:54:34 heheh 14:54:42 waaaat 14:54:46 at any age 14:54:49 lol 14:54:59 What size BGA was this? 14:55:19 64 pin, 0.5mm spacing I think 14:55:37 * veltas staggers away 14:56:07 Zarutian_HTC, it's part of my next plan for lowering hardware costs 14:56:25 veltas, I do have trouble with 0.4mm spacing BGA's 14:56:36 Should've been a brain surgeon right ;) 14:56:51 but I need to use them, so I'm working on some mechanical assistance 14:57:06 I have the hands of a brain surgeon for sure 14:57:21 my hands have always been absolutely rock steady 14:57:36 Regarding interactibity, you can absolutely do this in C and for some reason few if any C programmers will do it this way, sometimes the fact that Forth gets you to *think* with that level of interactivity and modularity it's better 14:57:47 so thats a plus, not that Im able to imagine what unsteady hands are like 14:58:20 veltas, how do you provide instant low level hardware interactivity with C ? 14:58:40 I think C actually is *simpler* than Forth in the respect that it is a compiled language, but that doesn't mean you can't load in and/or swap out C code at runtime, or write your own 'commands' and/or simple scripting into it 14:58:48 Ive used C since 1997 and Ive never seen that 14:58:48 tp: it isnt hand steadyness that I am impressed with but sheer self control 14:59:39 Zarutian_HTC, whats a life withot some self control ? 15:00:01 I definitely need MORE self control tho 15:00:57 veltas: C is more complex. Just look at a C compiler. 15:01:17 Zarutian_HTC, my next batch of rivets will be made soon as I remake the jig, I'll have some very cool pics then! 15:03:08 Zarutian_HTC: I said in that respect, I'm not going to say C is simpler in general because it is clearly not 15:03:30 But C has no notion of interpreter, or execution vs compilation, it is just a 'compilation' language. 15:03:40 Or rather 'execution' really 15:04:00 So in that regard it is simpler 15:04:26 Zarutian_HTC, I've noticed that chips like the awesome stm32L162rd https://mecrisp-stellaris-folkdoc.sourceforge.io/chips.html?highlight=stm32l162rd#x-4-5mm-chip-size-solder-balls-0-4mm-apart 15:04:44 have the essential connection on the outer balls 15:06:59 because of the horrific bga spacing and connection metalisation, theyre fragile and a bastard to hand solder, but they are PACKED with resources and dirt cheap 15:07:26 Ultra-low-power 32-bit MCU Arm® Cortex®-M3 15:07:26 384KB Flash 15:07:26 48KB SRAM 15:07:26 12KB EEPROM 15:07:26 LCD, USB, ADC, memory I/F, AES 15:07:27 Low Power, 305 nA Standby mode 15:08:08 so I'll be using one soon in a teflon composite pcb with rivets running Mecrisp-Stellaris :) 15:09:53 now hobbysists wouldnt ever consider using one of these in a conventional BGA layout, but my hand soldering and rivets to selected pins only means I can easily use one in a design that only needs a gew pins 15:10:06 -g+f 15:11:23 next I plan to try soldering to those 0.4mm BGA's with a laser 15:19:33 doesnt sparkfun or adafruit sell bga breakout boards? 15:20:28 probably but theyre not suitable for me 15:20:42 I hate 'breakout boards' 15:22:11 the whole BGA soldering process is fairly specialised, my hand soldering a few wires to only the outer balls gets around a lot of the hassles (I hope) 15:22:46 back 15:22:51 hey guys 15:23:14 always experimenting like spacex but my failures are mostly too small to see ;-) 15:23:20 hey tabemann 15:25:58 veltas: with zeptoforth, I can at the REPL issue something like led-red-on, and lo and behold, the red led turns on; to turn a red led on with C requires compiling a binary and downloading it onto the board and rebooting 15:28:08 You can dynamically load code with C, not sure about with your setup though 15:28:17 tabemann, you *can* connect to the STM32 in GDB over SWD or JTAG and change a register to turn the led on/off, but thats the only other way I know other than compiling a C program to do it 15:28:33 (or using forth) 15:28:37 GDB is awesome it's like interpreted C 15:28:49 Sorry tp 15:29:07 veltas, it's slow and complex compared to Forth in my own personal experience 15:29:14 Yes it is 15:29:30 I was saying sorry because I was being enthusiastic about something aimed at C development :P 15:29:38 And I know how much you loathe it 15:30:31 veltas, when I started learning Forth in 2014 I had been using C since 1997. I promised myself that if I couldnt make a Forth development environment that was faster than the C alternatives, then I wouldnt use Forth, I'd stay with C 15:31:20 veltas, I like C code for a PC, it's embedded C I loathe 15:32:04 veltas, dont make me paste C bit manipulation examples here! ;-) 15:33:50 veltas, by "dynamically load code with C" do you mean the usual code compile cycle with loading it into RAM on the target instead of flashing ? 15:34:20 veltas, cause thats still NOT 'interactive' 15:34:50 well it's about as interactive as a phone call to someone on Alpha Centuri ... 15:39:38 back 15:39:52 --- quit: reepca` (Read error: Connection reset by peer) 15:40:07 tp: I think veltas means using stuff like dlopen() on linux 15:40:27 which still involes a code-compile-run cycle 15:41:03 thats a area I have no expertise in, but on embedded Ive never seen any interactive C 15:41:13 and I never will 15:41:34 unless someone took a Forth and renamed it to 'interactive C' ;-) 15:41:37 I can't imagine how one could make C on embedded dynamic in the way that Forth is 15:42:08 like my led-red-on example 15:42:32 It doesn't come out the box I'm just saying C is capable of it 15:42:34 the only way I can see doing that in C is embedding an interpreter for another language, such as Forth, in hte C 15:42:37 me neither, Ive used BASIC, micropython and eLUA on embedded in addition to Forth (they all suck badly compared to Forth) 15:42:47 An example that comes to mind is the shell scripting in das u-boot 15:42:53 and oddly, people do that! 15:43:12 * tabemann at one job embedded Lua in C++ - this wasn't embedded though 15:43:35 I have embedded Lua, it's easy. Not in 'embedded' dev though either lol that would not be as nice 15:43:57 Lua is too heavy-weight to easy go on many embedded platforms 15:44:07 easily* 15:44:07 I am *here* because I suspect Forth might be 'nicer' than any of these, I don't have my answer yet 15:44:17 But I am encouraged by the endorsements here 15:44:34 mecrisp-stellaris will fit in under $4000 bytes of flash 15:44:50 That is impressive 15:45:24 zeptoforth is a little more weightly, probably because I'm not quite as good at optimizing assembly as matthias 15:45:45 Careful you don't accidentally say "$4000 of flash" because you can actually fit quite a bit in $4000 of flash lol 15:45:46 and because I made some decisions in the compiler design that made it more space-heavy 15:46:10 Especially these days 15:46:20 veltas, didnt das u-boot get hit by a depth charge and sink ? ;-) 15:46:24 when one compares it to microPython or eLua, it's very lightweight 15:46:33 tp very funny :P 15:47:33 veltas,its awesome to see you here in your early evaluation stage 15:49:09 veltas, and Forth isn't for everyone, after one accepts forth, Forth still has to accept them ;-) 15:50:40 of course the second step at using forth is to write a forth 15:50:56 * tabemann has written three of them 15:51:02 tabemann, not for techs it's not 15:51:12 tabemann: I'm in the middle of writing mine atm 15:51:48 Actually tp after reading the critique you made of some embedded Python thing I realise I need to support running Forth inside interrupts 15:52:01 what platform, language, and architecture? 15:52:05 I know real Forthers would accept no less 15:52:08 tabemann, you don't ? 15:52:34 tabemann: ZX Spectrum, Forth, Z80 15:52:51 Unless you mean by which language am I starting from which is an assembler 15:52:59 yeah 15:54:00 tabemann, support running Forth inside interrupt handlers ? 15:55:54 yep 15:56:27 lol, I didnt even realise that was a problem as Mecrisp-Stellaris always had that as long as Ive been using it 15:56:55 the things that us Forth users take for granted! 15:56:59 It's not a big problem, it just affects the code I'm writing right now 15:57:18 It should actually be quite easy to add, and I imagine in Python.. it's not. 15:57:51 well python is manifestly unsuitable for embedded. along with Ulisp and eLua 15:58:17 the reason is that you cannot have garbage collection in embedded 15:58:27 it's just 100% not allowed 15:59:05 Weirdly (?) enough this is not just a problem in embedded, it's a general issue with multitasking + GC 15:59:25 micopython is a example of programmers with zero real world embedded experience at work 16:00:22 veltas, it's not 'a problem' in embedded, it's not allowed 16:00:33 the reason is that embedded is 'real time' 16:00:59 people wonder why there is a ~kilohertz or so thing doing on in their code and not realize it's the GC 16:01:24 I may scan a special signal (for example) every 5 us and to miss one will result in total system failure 16:01:48 tabemann, yeah, heheh, micropython users mainly 16:02:33 a GC takes a few Mecrisp-Stellaris and during this time the MCU can't scan my special signal --- total FAIL 16:02:40 You can totally avoid GC actually occuring in well-written programs, but I suspect a lot of people writing Python etc in embedded don't realise this in the first place. 16:02:43 oops Mecrisp-Stellaris = (ms) 16:03:23 veltas, I think the python in embedded pople use it because it's supposed to be easy 16:03:29 Hmm 16:03:54 theyre also the people who complain about reading a suitcase full of ARM tech docs 16:04:15 * tabemann doesn't find ARM tech docs to be a problem 16:04:18 and the excuse "I dont have the time" 16:04:46 tabemann, thats because youre a closet embedded wannabe ;-) 16:04:48 tech docs haven't stopped zeptoforth from being ported to four platforms by now 16:05:20 tabemann, the spacex of cortex-m4 forths!\ 16:05:45 I should port zeptoforth to a cortex-m3 board as well 16:05:59 cortex-m0 just isn't happening though 16:06:07 tabemann, after watching your progress, I doubt there is much that can stop you 16:06:32 tabemann, thats cool, I already have a perfectly good cortex-m0 one 16:06:32 * tabemann right now is trying to figure what the issue is with his [if] ~ [else] ~ [then] 16:08:04 Isn't [then] a no-op? 16:08:12 the reason being is that it's based directly off of working code for a different forth of mine 16:08:43 veltas: it's detected by [else] to frob a counter 16:08:50 when by itself it is a no-op 16:09:08 veltas, it's a "non-op" in tabemanns case right now ;-) 16:09:10 I'm mixing up [then] with (then) 16:09:17 (then) doesn't exist 16:09:29 I think? 16:09:43 --- part: rogerlevy left #forth 16:10:32 I normally only frob a turbo-encabulator 16:11:07 and even then only if therecirculating frimfram is embogled 16:12:36 I said "frob" because one could increment or decrement a counter 16:15:00 frob - Computer Definition 16:15:00 To manipulate and adjust dials and buttons for fun. From the term "frobnicate," of course. 16:15:50 The TMRC definition was “FROB = a protruding arm or trunnion”; by metaphoric extension, a frob is any random small thing; 16:16:14 well I learnt a new word today :) 16:16:20 ^ 16:16:49 one is rarely bored on #forth! 16:17:32 Yes 16:17:56 It's one of the most active IRC channels I'm on, which I would've bet against before coming here 16:18:37 we even have music to go along with tabemanns 'frob' theme today! https://www.youtube.com/watch?v=0sI8am5gOG8 16:19:16 veltas, it can be very quiet here, but the embedded freaks have been at it a lot lately ;-) 16:19:37 shots fired 16:21:31 back 16:21:38 veltas, normally it's all pc Forth talk, which frimfram is best or is there a snark in my ? 16:26:49 --- join: dave0 joined #forth 16:43:52 back 16:44:15 tp: one thing I've found is that now that I have a working erase-all, I'm not flashing the kernel nearly so often 16:44:54 and thats a valuable word 16:45:26 when you add a cornerstone youll erase a lot less alo 16:45:41 also 16:46:38 I've got a cornerstone, but I'm currently working on basic.fs itself 16:48:46 ahh I see 16:49:21 it sucks having to reflash the kernel I agree, but now you dont need to :) 16:51:15 especially since on the F407 doing a full erase takes too much damn time 16:51:28 whereas an erase-all, which only flashes what is needed, is much faster 16:52:05 --- quit: Zarutian_HTC (Ping timeout: 256 seconds) 16:52:44 it does seem slow but I thought that was because of the 1Mb of flash compared to my 64kB ? 16:53:05 I gather your L chip is much faster for it's 1mB ? 16:53:28 my L chip is much faster despite having just as much flash 16:54:02 I'm finally improving my register pretty print so it doesnt print out the always $0 value of 'write-only' registers 16:54:09 okay, dinner time - bbl 16:54:34 ie GPIOF $14 + constant GPIOF_ODR ( read-write ) ( GPIO port output data register ) 16:54:35 GPIOF $18 + constant GPIOF_BSRR ( write-only ) ( GPIO port bit set/reset register ) 16:54:42 cay 16:54:44 cya 16:55:40 this will save a lot of flash and go into the latest 'bluepill' developer edition 17:00:59 --- join: Zarutian_HTC joined #forth 17:19:19 1.36 years 17:19:40 Is how long a 32-bit counter takes to overflow at 50Hz 17:25:50 tp: "COVID-19" is "VOID-C19" rearranged; they're trying to tell us something 17:47:12 --- join: rdrop-exit joined #forth 18:25:31 veltas: that C version 19 is crap? 18:27:20 btw, why are people still using Windows '10? Shouldnt they have upgraded to the 2020 version already instead of clutching onto the 2010 version? 18:34:52 tp: well I have come across break out boards that are basically dip socket compatible. Quite handy. 18:40:40 tp: came across https://mecrisp-stellaris-folkdoc.sourceforge.io/rants.html#index-1 and I must say: NEVER relie on MCU copy protection, ever. 18:42:39 for security related stuff use a proper hardened secure element. And if the .hex or .srec file isnt available then when the chip fails it will be hard to replace 18:43:05 s/chip/MCU/ 18:44:51 --- join: boru` joined #forth 18:44:54 --- quit: boru (Disconnected by services) 18:44:56 --- nick: boru` -> boru 18:48:39 --- join: iyzsong joined #forth 18:57:48 tp: I have a similar attitude as that chinese engineer with one exception, dont use the sane maker logo or brand as the original manifacturer 19:01:55 and please note that ALL FTDI chips are fake regradless if from original manifacturer or copycat 19:09:10 tp: if you are paying 4.525 USD for STM32F103RBT6 in a lot of 100 then somebody is ripping you off. I would expect 2.5 USD max in that size of a lot. 19:46:21 --- quit: dave0 (Quit: dave's not here) 19:47:51 tp: but this rant page of yours is pretty entertaining 20:04:49 back 20:08:06 Zarutian_HTC, wow, glad you like it, just place for me to vent about some things that bug me :) 20:11:09 regarding C code, note that C started out as a crappy replacement of pdp11 assembler 20:12:12 yeah, Ive been told that 20:13:02 though I do often look at arduino language (purpoted to be c++ code but no c++ ever is) code examples for inspiration 20:13:34 what kind of inspiration ? 20:13:55 hardware projects ? 20:13:59 for projects 20:15:14 I have looked at plenty of it as well, always when trying to get a STM32 peripheral I'm not familiar with to work, but it's very frustrating for a number of reasons 20:15:38 what kind of peripheral? 20:15:59 I have noticed that most of them are copies of copies complete with the same spelling mistakes 20:16:25 ah, the dreaded copypasta 20:16:38 wait - I thoguht arduino is plain C 20:16:41 *thought 20:16:48 what does the datasheet say? 20:16:50 yeah, it abounds with arduino 20:17:38 nope arduino is some sort of restricted c++ afaict 20:18:18 deserves its own language tag on help sites 20:18:27 Zarutian_HTC, a good example is not a STM32 peripheral (as arduino tried to wrap around STM32 fairly recently in geological time), but a external temperature sensor, the Ti LMT01 20:19:26 for this device, there is no Arduino libraries and only two projects I could google, both in C naturally 20:19:29 havent heard of it but knowing Ti it might be 1wire basef 20:19:38 based* 20:19:57 this is it: 29,56 C 20:19:58 85,09 F 20:20:29 that is, how do you interface to it 20:20:44 Ti released a datasheet for it and both the C projects are carbon copies of that reference, but they suck badly, why ? 20:21:16 the LMT01 outputs a burst of pulses which represent the temperature, abd you count them 20:21:19 because the c code was thrown together to tick a box 20:21:26 it's not any protocol 20:22:02 how many pulses? at what interval? 20:22:07 the high and low of the pulses are a constant currents 20:23:31 so, it is like pulse dialing by a rotary phone but with more digits in than just 0-9? 20:23:52 https://mecrisp-stellaris-folkdoc.sourceforge.io/project.3temp.sensors.html#lmt01 20:24:10 i would call that a protocol even it is a crude one 20:24:24 it's actually really easy to use and very accurate from the factory 20:25:27 i dont think it's complicated enough to be called a protocol, but Im a simple tech :) 20:26:03 the funny think is that both online projects used the ti ref example which is one sensor running continuously 20:26:22 well i be damned 200 degrees C operating range 20:26:58 the Forth guy (me) made his so that it can use any practical number of sensors and just poll them as required 20:28:06 as we know in the real world, temperature changes very slowly and we like our micros to do other things than be stuck reading them all the time 20:28:58 hmm, nice. Means that one could festoon a machine with these to keep track of temp on various points 20:29:22 plus the two wire constant current system makes them really easy to use over short distances 20:29:33 absolutely! 20:29:41 relatively slowly in relation to speed of an mcu 20:30:01 a planned proj is a wet and dry bulb humidity sensor, a real one 20:30:23 the main one is a proper battery charge meter 20:30:57 the LMT01 is pretty cheap 20:31:10 you see, I have some interest in robotics and am on the opinion that numerous sensor are better than few 20:31:36 I noted that there are zero arduino libraries for it, and they all use the accursed Dallas chip 20:32:06 it seem that people alway assume that the robot can move in exactly the same way every time 20:32:17 Zarutian_HTC, well you're exceedingly practical in my opinion! 20:32:34 right dallas is the one with 1wire 20:33:39 naah, just have some experience with a pick and place nachine and mechatronics 20:34:03 that bloody DS18B is ancient and very hard to drive, why do they use it at all ? I think because someone spent a lot of time writing a Arduino 'library' for it, probably Dallas as they had a million of them in stock and no one was buying them ;-) 20:34:18 however I am curious about soft robotics 20:34:29 lol even the name is a joke, it's a 3 wire device! 20:35:26 oh? I thought the used gnd and data/power for total of two wires to the device 20:35:33 Zarutian_HTC, I used to fix small manufacturers problems with P&P machines, you have to be very practical to do that 20:35:57 well they need power and ground, and the 'one wire' 20:36:12 being I2C 20:36:18 running an p&p as part of a small manifacturing line does that too 20:36:26 exactly 20:37:36 oh, 1wire is not i2c. That is two wire when they are cheap and dont want to pay philips the i2c logo fee 20:37:53 one manuf called me when their line on one machine was down to 5 units a hour with tons of rework (I cant remember exactly) but I increased the production by 50x, something like that 20:37:53 aagh 20:38:00 I need to do another release 20:38:13 I just found that 2CONSTANT was broken 20:38:18 Zarutian_HTC, oh, I2C like then ? 20:38:42 tabemann, was it a constant error ? 20:39:16 on soft robotics: there two ways to make such, fluidic (air or hydraulics) or the cap soypacket method 20:40:07 tp: search for dallas iButton 20:40:08 Zarutian_HTC, I remember I had to recalibrate the laser home position, replace many of the springs in the feeders 20:40:28 oh, these damn feeders! 20:40:44 Zarutian_HTC, no thanks, I spent many hours trying to get a DS18b to work before I switched to the LMT01 20:40:58 tp: 2CONSTANT constants were only returning one value 20:41:20 mechanically or electronically actuated? 20:41:39 yeah, the operators had no clue the streched springs were so weak the feeters were taking 50x longer to feed the parts 20:41:58 tabemann, so they were very constant ? 20:42:17 Zarutian_HTC, pure mechanical 20:42:51 it was a Yamaha mounter, the kind that would take your head off if the carriage hit it 20:43:18 tp: yeah, I recall doing the pluck springs test on feeders regularly 20:43:26 tp: they were one cell rather than two cell 20:44:08 tp: pluck a spring to see if it sounded right 20:44:25 tabemann, a easy bug! 20:44:46 Zarutian_HTC, Id feel them by hand and just replace if in doubt 20:45:11 --- quit: dddddd (Ping timeout: 265 seconds) 20:45:13 the before and after was spectacular as the machine had probably never been maintained 20:45:28 they just worked it to death 20:47:00 wait what? nobody followed the mantenance schedule give by the manifacturer? 20:47:21 Zarutian_HTC, when I ran a SMT plant we had 3 SMT p&P, a die bonder and a wire bonder, a massive solder flow line ugghh, and a nice IR reflow line anongst many other machines, I had to solve any and all technical issues. 80 production staff, 9 engineers and me 20:48:07 Zarutian_HTC, this is australia where lots just run stuff into the ground 20:48:18 --- join: jsoft joined #forth 20:48:31 tp: explains things 20:48:48 Zarutian_HTC, one of those machines was a Amistar P&P with a awesome rotary head, 17500 parts a hour 20:49:20 lol, it has a Z8000 and CP/M 20:49:58 now there is a Forth challenge, ditch the old lame Z80's and get a Z8000! 20:51:00 that Amistar was a legend, never broke down, I didnt have to do anything to it in the 12 months I was there 20:52:00 but a lot of my large stock of old SMT parts came from that machine as they bounced of the platters and landed on the floor which I swept every day and kept :) 20:52:04 I never understood the mentality of some managers. Heck I once met a tech who physically handcuffed a elbow joggling manager to his desk to be able to get work done 20:52:17 hahahahahah 20:53:20 I came onto a production floor once to find my Q&A guy rolling on the floor with a team leader, fighting over a batch delivery 20:53:29 that manager was fired by his immediate boss because he was basically a workshop hazard 20:53:41 yiu really cant get more commited people than that! 20:54:14 we techs are like that, dont *uck with us 20:54:20 --- join: Sweedish joined #forth 20:54:51 what was the fight about? batch not passing q&a? 20:55:08 --- quit: Sweedish (Client Quit) 20:55:13 yeah 20:55:16 exactly 20:55:32 I was very impressed but broke it up of course 20:55:53 and what did this team leader want? pass the batch? 20:55:58 we had a breakdown one day in the main area, 80 production people were idle while I was fixing the Dynapert P&P 20:56:31 Im not sure exacty, but Q&A and a production team leader have the opposite aims 20:57:06 the machine would stop about the same place every time and I was perplexed for a while 20:57:13 what did those 80 usually do? beside the q&a folks? 20:57:29 assembly 20:57:41 aah, i see 20:57:50 that line was inherited and the product was a nightmare 20:58:04 the client always pushing for more units a day 20:58:15 it had run for years 20:59:06 units of what? what kind of product? I think you told me a while back but i dont recall 20:59:26 one of the 3 company directors was a PITA sales type and sadly he came down and got into the 'when will it be fixed, we have 80 people standing idle" routine 20:59:50 a philips hand ironing controller 21:00:13 right that jogged me memory 21:01:00 after about 1/2 hour of this bs while I was trying to fix the machine, I finally snapped and loudly told him "either fire me right now and I walk right now, or get off my production floor" 21:01:26 he silently spun on his heels and left the floor 21:01:51 those types are annoying as hell. Best folks say, okay whatcha need to get it up and running? me out of yer hair? sure 21:01:55 80 production people were probably wondering 'how did he not just get fired" 21:02:17 do you remember what the fault was ? 21:02:29 nope sorry 21:02:39 we must have spoken about that 6 years ago ? 21:03:09 it was a DC servo commutator brush worn to it's limit 21:03:45 dont recall how long ago just that it was quite while back 21:04:03 we had no spares, so I cut the flexible copper strap from carbon brush to brush cap and extended it slightly to get it going again 21:05:01 there is always a margin of safety in the length of the standard copepr straps so the brush doesnt come out of the brush guide 21:05:27 and we were back in action 21:08:33 this was before brushless DC motors I take it 21:09:27 way before 21:10:11 but a dc motor can really deliver the HP and torque 21:11:19 that philips iron controller board was a horror from hell, I so badly wanted to redesign it for production but couldnt as it was CE ticked 21:11:52 I have one here, I might take a pic and do a rant about what never to design 21:11:56 I know, tried out a gocart that had its engine replaced by an elevator dc motor 21:12:06 hahaha 21:13:00 was fun but the cable for juice was annoying 21:13:11 I rode in a lame Mitsubishi ecar once I think it was, and made the mistake of asking the driver 'does this thing have any power?' 21:13:16 LOL 21:14:03 my face must have looked like people who ride in a Tesla and ask the same wuestion 21:14:10 -w+q 21:14:46 whenever I take the bus I hope it is an electric one as those have quite thr torque while being quiet 21:15:09 yeah, electric is awesome 21:15:37 have you seen the ecar hybrid made by Konisegggggg ? 21:15:55 1800 HP, $1,000,000 plus 21:16:37 not those slow to respond diesels. Never understood why car enthusiast wanted diesel 21:16:41 4WD etc, Anyone want to pay me $1,000,000 for a non essential organ ?? 21:17:35 the ecar is back with a vengance now, I thing that Konisegggggggg vehicle is 1.9 seconds to 60 MPH 21:17:57 a constant 1.5G up to 300 mph 21:18:34 yeah, I think it is cause of Tesla and better battery tech 21:19:13 Koenigsegg Gemera 21:19:26 new release 0.1.1 ! 21:19:31 not to mention regenerative breaking and supercap buffering 21:19:52 https://www.youtube.com/watch?v=LhD2PlvpouA 21:20:01 yeah, outstanding 21:20:13 tabemann, awesome, must get! 21:21:05 Zarutian_HTC, you could get one, add snow/ice chains to the wheels 21:21:12 would be awesome 21:21:32 it fixes 2CONSTANT, includes the improved WORDS, and includes [if]/[else]/[then] 21:21:44 I personally hate to drive most of the time. I wouldnt say no to something like that Ultra system in Brittain even if top speed is just 50 kmph 21:21:52 if it weren't for 2CONSTANT I wouldn't've made the release 21:21:54 gees, it's becoming nearly useful at this rate tabemann 21:22:10 but I felt that a buggy 2CONSTANT was worth the trouble of making a whole new release 21:23:01 because the buggy 2CONSTANT was inexplicably breaking my [if]/[else]/[then] implementation, so I felt it might cause problems for others as well 21:23:29 but if I do not have to drive and it is constant once up to speed then I do not mind the slower speed. Nor that I do nor have to find parking 21:24:15 tabemann, yeah, it would have been hard ... lifting a finger to type .1, committing and then running a script to pack it all up, I feel your pain ;-) 21:24:15 what do those words do? 21:24:28 lol 21:24:49 [if] and co 21:24:53 2CONSTANT is like CONSTANT, but it creates a constant that returns two cells rather than one 21:25:11 [if]~[else]~[then] is like if~else~then except it is at compile time 21:25:51 aah, like #ifdef kind a thing 21:25:52 WORDS displays all the words in the system - what I changed was that I made it display words in four columns, 20 characters-wide (assumes an 80 characters-wide terminal) 21:25:58 yeah 21:26:02 yeah I have one also "2constant name ( ud|d - - ) Makes a double constant." 21:27:13 I've never needed it tho 21:27:32 32 bits is pretty big in the real world 21:27:39 the last time I implemented 2constant was on a 16 bit system 21:28:28 hi guys 21:29:11 in this case I used it to store strings which I had to put together character by character, because I couldn't use s" to write them (due to containing " in the strings themselves) 21:29:29 someday I'll add strings that support escaping, but not today 21:29:30 ugg 21:34:24 --- quit: rdrop-exit (Quit: Lost terminal) 21:35:20 I am reading up on arduino and seeing how horrible it really is 21:36:03 dont do it tabemann .... run for your LIFE, save YOURSELF!!!! 21:36:52 I mean seriously - a full zeptoforth installation includes a REPL, a multitasker, an event scheduler, etc. - arduino has a setup() function and a loop() function 21:37:41 I had been under the impression that arduino was basically C with a stupid user base 21:37:48 tabemann, as youre not yet a fully fledged embedded guy, you probably have no idea just how bad Arduino is 21:38:11 no, arduino was made for "artists with no computer knowledge" 21:38:28 it was never meant for what it has become 21:39:06 what are people with no computer knowledge doing programming embedded code 21:39:58 theyre not. 21:40:06 it's a loggo kit 21:40:09 leggo 21:40:36 they plug in, load a library, plug in a peripheral and it goes 21:40:45 a 5 year old could do it 21:41:05 oh, on another note 21:41:14 I mean that, Ive had my kids assembling PCB's with components at 3 years of age 21:41:23 I can't do what I do with zeptoforth release creation completely via scripting 21:41:50 ?? one can do *anything* with scripting ? 21:43:16 because the zeptoforth_full binaries need to be manually created by downloading a kernel onto a board, loading the setup.fs on that board, using ihex to dump that board to a log, then massaging the log into a proper ihex file, then using objcopy to convert that ihex file to a binary - the important part is that each board has to be manually connected to the machine 21:43:56 even make coffee or tea if you hack the drinks automat 21:44:06 tabemann, I do that all with one script, no manual intervention needed 21:44:12 Zarutian_HTC, hehe 21:44:24 tp: umm that requires a USB cable-connection robot 21:45:03 mine is a serial system tho 21:45:23 still, the connections need to be changed for each board 21:46:00 or run simultaneously like I do 21:46:16 I have up to 4 systems running seperately here 21:53:28 this is on a laptop with three free USB ports (one is taken up by a wireless mouse/keyboard dongle), and two of my boards require single USB ports each while another requires two (because one for power and st-link and another for serial) 21:54:14 eww, nasty 21:54:31 as usual youre doing well with limited resources 21:54:42 do I have to send you a USB hub for xmas ? 21:54:58 lol 21:55:56 dont force me, Im warning you! 22:09:05 Anyone doing anything particularly cool at the moment? 22:09:23 I've been a complete slug - been off doing stuff other than Forth for like the last year. :-| 22:10:03 even slugs gotta have a rest from their gooey excretions dude! 22:10:22 --- quit: tabemann (Remote host closed the connection) 22:10:27 :-) 22:10:29 I suppose so. 22:10:35 And, crazy times... 22:12:13 amen ... 22:12:31 and that's just the C users, then you have stuff like Coronavirus 22:15:32 --- join: tabemann joined #forth 22:16:22 KipIngram: I'm getting my Cortex-M Forth, zeptoforth, into truly usable shape 22:18:15 i think you should rename it to "coronaforth" tabemann 22:19:01 right now it's at is first case level 22:19:11 well, maybe two cases 22:19:19 it hasn't infected anyone else yet 22:19:31 but look at the coronavirus 22:19:43 back in december it had infected only like one person 22:19:50 look at it now 22:20:00 I've run it and I'm still healthy ;-) 22:20:18 yeah 2000 deaths yesterday in the USA 22:23:12 and there's people who want to "reopen the economy by may", like my fearless leader 22:24:38 no one has asked the virus it seems 22:26:07 my fearless leader(s) keep printing articles about how Australia "leads the way in Coronavirus cure", "tests more people than anyone else in the world", has the best plan 22:26:16 blah blah 22:28:52 tabeman: Groovy keen. 22:29:26 I'm still sitting at just having done a "proof of concept" on metacompilation, by implementing a few primitive in metacompiled form. 22:29:34 Just got sucked off into other interests at about that point. 22:30:06 What I'm hoping to wind up with here is a block file and a small C program that just loads some range of blocks into RAM and jumps to it. 22:30:29 And once I get that, I won't be using nasm anymore - it will all be self-sustaining. 22:30:58 I'm not bothering with metacompilation myself 22:31:16 Yeah - certainly not required. I just decided I liked the idea. 22:32:27 Over my career I've found that when I "rewrite" a program it's generally much better. So this is in some senses a re-write, at least of the lower level parts of the system. 22:32:33 It will wind up cleaner. 22:37:24 KipIngram: you need to support cpu native code or is a small vm acceptable? 22:38:41 I plan a tight VM for most "straight compiled code," but also plan a profiler to identify critical code sections and an assembler to optimize those. 22:39:05 Being able to metacompile means having a way to build the primitives, so that's basically an assembler. 22:39:22 I've always felt that an assembler is fairly required. 22:39:43 Forth is fast, but it's not as fast as native code, so if you want a truly high performance system, you need to offer that ability. 22:39:55 But you also need to be able to identify where it will pay off. 22:40:18 for a fast forth one needs SRT/NCI 22:40:33 KipIngram, Forth can be as fast, even faster when it's made by a tethered system 22:40:46 I have the proof 22:40:51 I'm trying to identify an "intermediate virtual instruction set," that will let me build for x86 or ARM with high efficiency. 22:41:13 So, "native code" level, "portable instruction" level, "primitive" level, and "compiled" level. 22:41:22 even though I'm now questioning whether I should have made zeptoforth indirect threaded or even token threaded - because those would have resulted in substantially smaller code 22:41:44 like with token threading I could get away with 2 byte tokens 22:41:51 oh, well and vm with 16 primitives and call has been plenty for me. Basically a switch statement inside an endless loop 22:41:55 That's a fair argument, but if you have the ability to optimize the critical sections then the overall performance is less important. And ITC brings you certain "smoothnesses" that I want. 22:42:00 tabemann, by your 10th Forth youll have it down pat :) 22:42:10 I will have quite a few more primitives than 16. 22:42:27 But fewer portable instructions than primitives, but still more than 16. 22:42:35 I've always been fairly "performance hungry." 22:42:40 tp: I chose to go the SRT/NCI route because I felt speed was needed, because my token threaded forth is, well, kinda slow 22:42:46 I still think minimal primitive implementations are super cool, though. 22:42:52 and I mean it's kinda slow on a PC 22:43:09 so on a MCU it'd be even slower 22:43:46 I try not to be elitist about any of the options - if you can implement the critical stuff fast, then you're covered. To some extent the rest is a matter of taste, because all of them are a hell of a lot better than, say, Python. 22:44:08 well one EXT is just to do io and syscalls. But yeah around 64 portable instructions 22:44:26 If you're anywhere in the Forth neighborhood, then you're doing something interesting. 22:44:55 --- join: rdrop-exit joined #forth 22:45:08 That sounds about right - my PI count will land somewhere around 64. 22:45:10 zeptoforth is heavily written in assembly, because I needed to get it built up sufficiently that it can execute forth code inputted over serial 22:45:41 I got 16 because I was designing an smpc circuit implementation of a dual stack machine 22:46:18 hashforth had far fewer primitives because I made an assembler that generated token-threaded code (with the input code looking awfully like forth), which was then fed into the VM as an image 22:46:27 and I needed it to be as simple as possible 22:47:51 --- join: gravicappa joined #forth 22:48:17 c[] hello Forthwrights 22:49:37 hey 22:49:48 hi tabemann 22:49:53 rdrop-exit: zeptoforth is at 0.1.1 22:50:10 kudos! 22:50:51 I haven't coded anything since the lockdown started 22:51:05 sounds like the perfect time to code stuff 22:52:36 My wife is home full-time, I normally code only when I'm alone at home 22:52:44 ah 22:53:11 Zarutian_HTC - you're running your Forth on some sort of non-stancard hardware? 22:53:33 Evening rdrop-exit. Been a while. 22:53:39 Because of me, not you. 22:54:00 hi KipIngram! welcome back, it has been quite a while 22:54:15 Yeah - I got distracted by various things. 22:54:37 I'm a man of many interests, if I want to put it in a flattering way. :-) 22:54:46 Or... a man that's lazy, if I don't. 22:55:02 Me too, too many hobbies 22:55:11 KipIngram: virtual sequential boolean circuit Secure Multi Party Computation. Wouldnt call it hardware but not vm in the traditional sense 22:55:21 Well, you could debate that - diversity is a nice thing. 22:55:36 That sounds very interesting. 22:56:08 Once you start trying to be close to hardware (even virtually) you quickly home in on 16 primitives, or 32, or perhaps 64. 22:56:12 Some power of 2. 22:56:34 I once came up with a fairly nice 5-bit encoding that made implementation of a hardware stack nice and clean. 22:56:45 On a PC, I usually go for 256, since bytes are such a natural unit 22:57:16 But then 32 started to feel too tight, so I added one opcode that said "grab the next five bits, and take the functionality from a "second opcode set." 22:57:23 So a kind of "extended" instructions. 22:57:33 That got me to 63, and that was plenty. 22:57:34 An escape opcode 22:57:35 256 is what I'd do 22:57:38 Right. 22:57:41 escape opcodes are slow 22:57:50 KipIngram: got five kinds of "components" in such circuit. INput, OUTput, MEMory (really delay), AND, and XOR 22:57:53 256 definitely has a "naturalness" to it. 22:57:57 256 is enough space for what one'd need, without escapes 22:58:08 The nice thing about 32 is that you can pack three 5-bit opcodes into a 16-bit cell. 22:58:26 actually, 256 has enough space that it allows dedicated primitives for small numbers like -16 to 15 22:58:31 With a bit left over to tell you when to treat the other 15 as an address. 22:58:42 On a PC based VM I use escape opcodes for calls to the underlying platform/os 22:58:53 the problem is that decoding is expensive 22:58:57 tabeman: yes, 256 is a gorgeous plenty. 22:59:17 because then you have to mask and bitshift 22:59:36 you can always set the ones you don't yet use to throw an illegal VM instruction exception 22:59:45 whereas 256 can be fetched in a single processor instruction and then needs no decoding 23:00:22 It's always nice to have spare opcodes to customize/optimize your VM for a particular need 23:00:29 Well, with careful design you can have the 31 non-escaped instructions run fast (my goal was always two clock cycles), and then the other 32 can take longer. 23:01:12 I'm greedy - I always wanted just two levels of logic between flip flop outputs and flip flop inputs for the base instructions. 23:01:14 256 is a simple mater of fetch, bitshift so as to refer to cell size, add to jump table address, execute 23:01:36 I don't know if it's worth it on a PC, since you'll need more instructions to get something done, VMs are inherently CISCish 23:01:58 You let a third level creep in - anywhere within those "basic" ones, and suddenly you have to wait for that on ALL of them. You can avoid it, but it complicates the logic. 23:02:11 And that's like 33% decrease in clock speed. 23:02:42 with hashforth what I did is put system API call under a specialized "SYS" primitive 23:02:52 It all depends if your VM is a true VM or a prototype for a real chip 23:02:55 Or you can turn it around, and argue that avoiding that third level gives yu a 50% improvement in clock speed. 23:02:59 so system API calls aren't part of the primitive namespace 23:03:01 Just depends on which end you're starting from. 23:03:52 in the end, though, unless one is creating hardware to execute Forth, I'd say just go with SRT/NCI 23:04:39 and if you are creating hardware to execute Forth, still go with SRT/NCI 23:04:58 except one gets to create an arch that is specifically optimized for Forth 23:05:19 the instuction cycle is such high overhead on a VM, that I think one's better off with more instructions, i.e. bytecodes 23:06:08 that's why I think that aiming for smaller instructions is not the right decision unless one's doing it in hardware 23:06:24 For a target though I prefer SRT/NCI unless the space is very tight, which it very rarely is if you're using a tethered setuo 23:06:28 * setup 23:07:17 in fact space is artificially LARGE in a tether 23:07:26 brb kids are video calling 23:07:59 I use MCU's with 2kB of flash in my tether, yet they think they have 64Kb flash 23:19:54 tabeman - I think it's more open to debate, and that there is no one right answer. Certain features of Forth become easier in the ITC model (thinking primarily about CREATE/DOES> here) than in other models. And as far as performance goes, if you can write assembly for the critical sections, then the rest just really doesn't matter. Yes, it matters if you put it on a stopwatch, but the advantage becomes very 23:19:55 small. So I think 1) those exotic features, and 2) preference of the implementor - what they're more comfortable with - become criteria. 23:20:31 That said, if you LIKE SRT, then DO SRT. It's fine. 23:21:36 If you compare a well-optimized SRT application to a well-optimized ITC application (with profiler directed assembly inserts), then you're probably down to no more than a 1%-2% advantage for SRT. 23:21:54 It will still often win, but I just think it's not by enough to be that big of a deal. 23:22:23 It really just depends on how much value you attach to ULTIMATE performance. 23:22:55 Maybe a percent or two or three matters to you. Go for it. 23:24:03 I just decided a long time ago that I was content with ITC, given what I felt I could achieve with profiling/assembly, and I really haven't thought about DTC or STC since. 23:24:16 They're still super-interesting models, though. 23:25:34 Well, it's about 1:30 am here - gonna hit the sack. Nice to touch base with you gents again. Stay safe and well! 23:58:20 back 23:59:34 rdrop-exit, ZEN Guru of Forth! 23:59:59 --- log: ended forth/20.04.11