IRC Log - 2025-05-28 - ##forth

Channel: ##forth
Total messages: 327
Time range: 04:36:27 - 23:59:49
Most active: tpbsd (148), xentrac (101), MrMobius (23)
04:36:27 ##forth <deadmarshal_> I mean, in J you have to tell it on what rank of array to do operation on, but in APL it is less explicit and just does it. idk about K
08:14:47 ##forth <tpbsd> hiall, g'day crc :) tp here
08:15:22 ##forth <tpbsd> announcing we now have a readline wrapper and command completion for mecrisp-stellaris !
09:28:49 ##forth <xentrac> tpbsd: congratulations!
09:30:55 ##forth <tpbsd> xentrac, thanks, but Jim Morris did the design, I only applied it and wrote some support stuff :)
09:30:55 ##forth <tpbsd> at least now Mecrisp-Stellaris has a decent readline and Word completion, it's really great to use as Mecrisp-Stellaris was pretty basic
09:31:36 ##forth <tpbsd> even tho Crest wrote a excellent SWD connected terminal for it (no clock or usart issues)
09:51:19 ##forth <xentrac> that's excellent!
09:53:40 ##forth <veltas> tpbsd: Hi Terry, hope you're doing well
09:54:46 ##forth <veltas> That's great news, readline stuff is great
09:55:01 ##forth <veltas> I'll have a look tonight
09:55:33 ##forth <tpbsd> hiya veltas.I'm good thanks, I hope youre doing well also
09:56:34 ##forth <tpbsd> I'm a recent Neovim convert, and have made a couple of plugins, all Forth support stuff of course
09:57:39 ##forth <tpbsd> last time I was here, this ch was on Freenode iirc, how time flies !
09:57:42 ##forth <xentrac> can you script Neovim in Forth yet?
09:58:28 ##forth <tpbsd> xentrac, I'm a electronics guy, so I don't know, but anything is possible I guess
09:59:21 ##forth <tpbsd> Im not a programmer really, but I have to program a little to support my embedded Forth habit
10:00:56 ##forth <tpbsd> whilst I'm 100% Forth on embedded, I'm ok with Lua etc for the PC side, or even Retro :)
10:17:54 ##forth <veltas> You might be interested in https://github.com/veltas/forth-vim which is just my attempt at better syntax highlighting for Forth
10:18:06 ##forth <veltas> I imagine it's better to play with it a little for each person's needs / dialect
10:18:16 ##forth <veltas> For vim anyway
10:18:27 ##forth <veltas> I assume it's compatible with neovim? No clue about neovim
10:22:22 ##forth <tpbsd> veltas, neovim has a excellent syntax highlighting strategy, they use a proper parser
10:22:58 ##forth <tpbsd> vim uses grep for highlighting I read
10:24:48 ##forth <tpbsd> veltas, neovim uses the "treesitter parser" for more advanced highlighting
10:26:23 ##forth <tpbsd> veltas, and then we have the so called 'language Server Protocol" servers which are just amazing and do command completion, snippets, help etc
10:27:38 ##forth <tpbsd> veltas, sadly only one Forth LSP exists and it was made for the Helix editor. LSP's were designed by Microsoft and are supposed to be compatible but I havent been able to use that one as it wont talk to me yet
10:29:43 ##forth <tpbsd> veltas, your forth-vim looks very detailed
10:41:23 ##forth <tpbsd> veltas, here is a pic I just made of a lua LSP at work in neovim, you can see how comprehensive this thing is as it's realtime, not a compiler etc :https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/lua-lsp-2.png
10:45:39 ##forth <veltas> The ultimate syntax highlighter is the actual Forth, if you build in some 'colours' for words, because Forth has a contextual grammar after all
10:45:58 ##forth <veltas> So any parser is an approximation, short of running the code
10:46:20 ##forth <tpbsd> good point
10:46:30 ##forth <veltas> But the forth.vim I've written is just a better and less crappy approximation than what comes with vanilla vim
10:46:44 ##forth <veltas> Sounds like it might not be appropriate for neovim
10:47:07 ##forth <tpbsd> yeah the vim syntax highlighter covers every language known from a -z I think
10:48:14 ##forth <tpbsd> veltas, your highlighter wouldnt run in neovim as they use the treesitter parser and it's not compatible with vim I'm pretty sure
10:52:08 ##forth <identity> tpbsd: iirc you can still use vim syntax highlighting packages in neovim
10:53:15 ##forth <tpbsd> identity, ah ok
11:01:10 ##forth <tpbsd> veltas, I just made this pic on my system of the neovim default highlighter the 'treesitter' parser for your viewing pleasure :) https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/nvim-treesitter-forth.png
11:05:23 ##forth <xentrac> tpbsd: using a proper parser doesn't seem like a good idea for syntax-highlighting Forth ;-)
11:06:47 ##forth <tpbsd> xentrac, youd have to take that up with the designers, Im only a electronics guy using Forth to make my hardware work
11:19:34 ##forth <tpbsd> for those that understand this kind of stuff, here is the doc for the Python TreeSitter : https://tree-sitter.github.io/py-tree-sitter/classes/tree_sitter.Language.html
11:23:09 ##forth <xentrac> for Python it's a fine idea
11:25:06 ##forth <tpbsd> ok, I'll bite :) why doesnt it seem like a good idea for syntax-highlighting Forth when grep like methods are usually used (as in vim) ?
11:26:07 ##forth <xentrac> oh, just because the Forth parser is totally programmable
11:26:43 ##forth <xentrac> you can define your own immediate words that parse chunks out of the input using whatever delimiters they want with word
11:27:16 ##forth <xentrac> so you might as well just use regexps
11:27:44 ##forth <xentrac> unless you're going to trace the execution of a Forth system as it compiles your source code ;)
11:28:25 ##forth <tpbsd> I only do that when my Forth source is causing exceptions etc
11:28:34 ##forth <tpbsd> which is probably a lot
11:28:43 ##forth <xentrac> I mean, you could do it automatically in order to get syntax highlighting information
11:29:55 ##forth <tpbsd> xentrac, youre talking about a pc hosted Forth I assume ? I only use tiny mcus for forth, the PC has to supply the terminal and intelligence in my case
11:30:55 ##forth <tpbsd> I realise that this ch is all about PC hosted forths, thats why I havent visited in a few years, your Forth and my Forth are very different
11:31:38 ##forth <tpbsd> mine has like 8k of ram and 64kb of flash, it can only perform a dedicated and small device function, always standalone
11:31:57 ##forth <tpbsd> no usb etc
11:34:38 ##forth <xentrac> not necessarily, no
11:34:50 ##forth <xentrac> I think MCU-hosted Forths are a lot more interesting actually
11:35:46 ##forth <xentrac> but what I mean is that if you define a word : vec3 create , , , ; and then you use it like 3 4 12 vec3 foo what you want to know from the syntax highlighting is that foo is being defined there
11:36:31 ##forth <xentrac> maybe it would even be useful to know that it's defined as a vec3
11:37:05 ##forth <xentrac> to figure that out you need to trace the compilation process and observe that the characters "foo" are being consumed by create (which is being called from vec3)
11:38:16 ##forth <xentrac> there are lots of ways you could conceivably do that, including doing the compilation process on the PC and just downloading the compiled dictionary to the board, tracing the compilation over OCD or similar, or running the compilation in an emulator
11:38:26 ##forth <xentrac> but that kind of analysis is fundamentally beyond tree-sitter's capabilities
11:38:43 ##forth <tpbsd> is it beyond a LSP's capability ?
11:39:40 ##forth <tpbsd> I do know that this level of software is definitely beyond *my* capability :)
11:40:33 ##forth <xentrac> no, an LSP server can totally provide the editor with that information; kind of the whole point of LSP is really to enable editors to talk to compilers
11:42:19 ##forth <tpbsd> xentrac, so perhaps use a LSP to provide the highlighting then ?
11:42:56 ##forth <tpbsd> sadly, there is only one and it's basic I believe, and I dont know how to install it in neovim
11:43:18 ##forth <tpbsd> as it was made for a different editor, one with no plugins
11:44:06 ##forth <tpbsd> it seems plenty of programmers dont want to mess about with a editor to make it useful, but Im ok with that, not being a real programmer myself
11:44:22 ##forth <xentrac> the LSP probably needs to encapsulate the Forth system you're actually using
11:44:31 ##forth <tpbsd> I must try that other editor sometime
11:45:04 ##forth <tpbsd> yeah, because 'once you know one Forth ... then you only know *one* Forth' ;-)
11:46:13 ##forth <xentrac> well, I mean, if you have something in your compilation early on that errors out in the wrong Forth, that kind of thing
11:46:21 ##forth <tpbsd> I mean, Im a simple noob class Forth user myself, but I wont use anything else for embedded except mecrisp_Across or assembly now and again
11:46:43 ##forth <tpbsd> yeah, idealy it should be able to adapt easily
11:46:56 ##forth <xentrac> yeah
11:49:06 ##forth <tpbsd> xentrac, do you know the Gema text replacement prog ?
11:50:52 ##forth <tpbsd> Ive used it to build a system where I use labels for mcu register fields, and the system replaces them with their register absolute address on the way to the mcu. The source is untouched
11:52:16 ##forth <xentrac> is it like the C preprocessor?
11:53:25 ##forth <tpbsd> I really dont know, I had the impression that C preprocessor is very complex
11:55:01 ##forth <tpbsd> the main thing with Gema is that I feed it huge text files of text replacement config which I generate from the MCU manufacturers XML System View Description file using XSLT
11:55:35 ##forth <tpbsd> so the whole process is automatic, it just needs a SVD for the specific MCU
11:56:11 ##forth <tpbsd> it's been working perfectly for a couple of years now, so I will release it as soon as I can tidy it all up etc
11:56:39 ##forth <tpbsd> it basically removes all 'magic numbers' from the Forth code
11:56:58 ##forth <tpbsd> replacing them with CMSIS-SVD nomenclature
12:00:50 ##forth <xentrac> I'm not familiar with CMSIS-SVD at all
12:01:20 ##forth <tpbsd> thats cool, what I do is very obscure and niche
12:01:27 ##forth <xentrac> the C preprocessor is commonly used for that purpose though
12:01:33 ##forth <tpbsd> ahh
12:01:42 ##forth <xentrac> it does have some tricky aspects
12:01:53 ##forth <tpbsd> I found Gema fairly easy to grok, took me a few months tho
12:01:59 ##forth <tpbsd> I bet it does
12:02:48 ##forth <tpbsd> gema is a general purpose text processing utility based on the concept of pattern matching. It reads an input file and copies it to an output file transforming the data as specified by the patterns defined by the user.
12:03:03 ##forth <xentrac> like for example
12:03:09 ##forth <xentrac> #define ARDUINO_MODEL_USB_PID 0x0038
12:03:21 ##forth <tpbsd> if your interested in it : https://sourceforge.net/projects/gema/
12:03:28 ##forth <xentrac> causes the identifier ARDUINO_MODEL_USB_PID to be replaced thereafter with the hex number 0x0038
12:03:46 ##forth <tpbsd> thats easy to see
12:04:19 ##forth <xentrac> which is handy for things like register addresses and bit masks
12:05:09 ##forth <tpbsd> sure
12:05:17 ##forth <tpbsd> btw: The CMSIS System View Description format (CMSIS-SVD) formalizes the description of the system contained in Arm Cortex-M processor-based micro controllers, in particular, the memory mapped registers of peripherals. The detail contained in system view descriptions is comparable to the data in device reference manuals.
12:05:19 ##forth <xentrac> thanks for the reference to Gema! I'll take a look; it sounds like it could be interesting
12:06:09 ##forth <tpbsd> I really found it incredibly useful and after I broke my brain on it and gave up all hope, everything was much easier ;-)
12:06:39 ##forth <xentrac> haha
12:06:57 ##forth <tpbsd> one problem I have with parsers is when they generate no output because of my brain dead patterns
12:07:18 ##forth <xentrac> Unix has a lot of general purpose text processing utilities based on the concept of pattern matching
12:07:32 ##forth <xentrac> I think the Unix people designed the C preprocessor after burning their fingers a lot on some of the older ones
12:07:33 ##forth <tpbsd> so once I learned to not take being totally ignored personally, that got easuer also ;-)
12:07:40 ##forth <xentrac> haha
12:08:25 ##forth <tpbsd> however if I had to master REGEX or die, I'd say 'just kill me now!'
12:09:51 ##forth <tpbsd> I was going to look into the newish Java parser as it seems to inform whats happening instead of the 'cold shoulder treatment' but I couldnt bring myself to inflict Java on my users
12:10:52 ##forth <xentrac> I've been thinking about a new text pattern matching system I call the Monkey's Paw
12:10:52 ##forth <xentrac> with some improvements over regexps
12:11:10 ##forth <tpbsd> so Ive stuck with Gema. Using Gema is like being made into a Necromonger (Croicles of Riddick) the pain goes away after a while
12:11:32 ##forth <tpbsd> chronicles
12:11:52 ##forth <tpbsd> xentrac, that sounds really complex
12:12:53 ##forth <tpbsd> xentrac, have a look at Gema first, try it out perhaps
12:13:51 ##forth <tpbsd> xentrac, gema can also do multi-line replacements !
12:14:06 ##forth <xentrac> so for example a Monkey's Paw pattern is <s: <t: <v: [a-z]+> | <n: [0-9]+> | "(" <s> ")"> (<op: "+" | "-"> <t>)*>
12:14:44 ##forth <xentrac> which matches integer arithmetic expressions of sums and differences with properly balanced parentheses
12:14:48 ##forth <xentrac> and variables
12:15:16 ##forth <tpbsd> is that the matching config only ?
12:15:25 ##forth <xentrac> yeah
12:15:54 ##forth <tpbsd> Gema has a lhs and a rhs config
12:16:07 ##forth <xentrac> you can include "semantic actions" too but the example gets to be longer than one line :)
12:16:20 ##forth <tpbsd> whats on the left gets replaced by whats on the right, a '=' separates them
12:16:41 ##forth <xentrac> yeah
12:17:18 ##forth <cleobuline> 7 hours to calculate 1 859433 << 1 - PRIME? .
12:25:09 ##forth <cleobuline> forthBot: MILLI 1 859433 << 1 - PRIME? . MILLI SWAP - . ." 1 859433 << 1 - est premier "
12:25:20 ##forth <tpbsd> hahah, oh wow. I'm running a Mecrisp-Stellaris SWDCOM terminal in a python wrapper in the Neovim terminal and it's working!!!
12:25:39 ##forth <tpbsd> Im talking to Mecrisp-Stellaris Forth in the mcu flash
14:36:34 ##forth <cleobuline> forthBot: WORDS
16:22:45 ##forth <MrMobius> speaking of PC vs MCU forth, ive wondered about having a tiny interpreter on the MCU and interpreted code on an SPI EEPROM
16:23:32 ##forth <MrMobius> so it could poduce it's own optimized code like mecrisp but only write the relevant part to it's own flash
16:27:14 ##forth <xentrac> tphey, that's fantastic!
16:27:19 ##forth <xentrac> oops
16:27:22 ##forth <xentrac> too late!
16:27:39 ##forth <xentrac> MrMobius: like the BASIC Stamp?
16:28:05 ##forth <MrMobius> could be. I dont know how the BASIC Stamp works
16:28:14 ##forth <MrMobius> I did get one for free once but never did anything with it
16:29:28 ##forth <MrMobius> wikipedia seems to say the interpreter is on the MCU
16:29:42 ##forth <xentrac> http://www.mcmanis.com/chuck/robotics/stamp-decode.html Chuck McManis’s teardown of the Parallax BASIC Stamp #microcontrollers firmware, with its variable-bit-length instructions and operands.
16:31:22 ##forth <MrMobius> "BASIC programs are compiled into tokens on the PC and then serially downloaded into the EEPROM on the stamp board."
16:32:32 ##forth <MrMobius> I was thinking of bytecode on the EEPROM that implements a Forth prompt and compiler. Compiled programs, however, are written to the MCU's flash as optimized machine code so you dont need the EEPROM after youre done programming
16:33:50 ##forth <MrMobius> so instead of a full forth taking up most of the room on the MCU, it's just a very small interpreter and the rest is free for machine code
16:37:57 ##forth <xentrac> I see
16:38:20 ##forth <xentrac> it might depend a bit on how small of a microcontroller you're talking about
16:40:29 ##forth <xentrac> the PY32F002B is 8.51¢, 24 kibibytes flash, 3 kibibytes SRAM
16:41:07 ##forth <xentrac> I think it's fairly straightforward to get a Forth prompt and compiler into 4 kibibytes, and you might be able to make it in 2
16:48:03 ##forth <MrMobius> Mecrisp needs about 20K IIRC to produce optimized machine code
16:48:17 ##forth <MrMobius> it would be nice to use it with msp430s which have max 16k flash in dip
16:49:00 ##forth <MrMobius> Im sure you can interpret the EEPROM code in 1K or less
16:49:21 ##forth <MrMobius> and probably like 100 bytes if you copy little snippets of machine code into RAM
16:51:32 ##forth <xentrac> yeah, I meant a threaded-code compiler, not a native-code compiler
16:52:00 ##forth <MrMobius> right. you could do that but then no need for the EEPROM. I was just thinking of a way to get optimized machine code without a tethered board
16:54:05 ##forth <xentrac> it's an interesting question\
16:55:20 ##forth <MrMobius> ya interesting especially if youre trying not to use much RAM
16:55:43 ##forth <MrMobius> since you would hopefully write things to a scratch space in EEPROM as you optimize but not change them after writing
16:56:04 ##forth <xentrac> the freedom Forth affords the programmer makes an optimizing compiler more difficult, I think. the compiler really wants to know the stack effects of the words it's compiling
16:58:14 ##forth <MrMobius> exactly. that's how mecrisp does it
17:00:49 ##forth <xentrac> I mean that's step 1
17:01:09 ##forth <xentrac> it's hard to do much if you can't do that
17:02:14 ##forth <xentrac> I know this is heretical but maybe Lisp would be a better fit if you want an optimizing native code compiler running on the microcontroller itself
19:03:14 ##forth <MrMobius> bu then id have to write lisp code :)
19:27:15 ##forth <skvery> Mecrisp is very fast.
19:28:34 ##forth <skvery> The Forth library is pre-assembled, so it is jyst a list of subroutine calls in the end.
19:42:48 ##forth <forthBot> 1
19:42:48 ##forth <forthBot> 26258789
19:42:49 ##forth <forthBot> 1 859433 << 1 - est premier
19:42:49 ##forth <forthBot> USERNAME .S . + - * / MOD DUP DROP SWAP OVER ROT >R R> R@ R@UL R!UL = < > AND OR NOT XOR & | ^ ~ << >> CR EMIT VARIABLE @ ! +! DO LOOP I WORDS LOAD CREATE ALLOT ." CLOCK BEGIN WHILE REPEAT AGAIN SQRT UNLOOP +LOOP PICK CLEAR-STACK PRINT NUM-TO-BIN PRIME? FORGET STRING S" "S 2DROP IMAGE TEMP-IMAGE CLEAR-STRINGS DELAY EXIT CONSTANT MICRO MILLI ROLL DEPTH APPEND
20:28:32 ##forth <cleobuline> forthBot: 26258789 3600000 / .
20:28:32 ##forth <forthBot> 7
20:40:38 ##forth <vms14> I have the word SEE
20:40:40 ##forth <vms14> https://i.imgur.com/c2T2nry.png
20:40:50 ##forth <vms14> but it cannot show the code of a colon definition xd
20:40:55 ##forth <vms14> only primitives
20:41:53 ##forth <vms14> drop is actually the get function
20:43:28 ##forth <vms14> I could make it show colon definitions, but they are actually that subroutine shown and I'm not going to add metadata for now nor expose that @code array
20:52:29 ##forth <MrMobius> hmm, I wonder if having some buffer before and after the stack and checking for under/overflow every so often is faster than a circular stack
20:53:42 ##forth <MrMobius> since if you check every 5th instruction, you only need enough buffer on either side for the worst case that 5 instructions can do
20:54:47 ##forth <MrMobius> it just wouldnt catch briefly going out of bounds then back in but circular stacks dont either
20:58:13 ##forth <MrMobius> maybe ORing the most extreme address each primitive uses and ANDing it with another. highest bits will show out of bounds if stack is aligned
22:28:32 ##forth <forthBot> Environment for cleobuline inactive, freeing...
22:40:30 ##forth <tpbsd> MrMobius, I took your advice and joined liberia ##forth, I caught up with some people I know and had a good time, theyre a great bunch!
22:41:16 ##forth <tpbsd> oops wrong ch!
22:41:56 ##forth <tpbsd> Im still half asleep :)
22:50:32 ##forth <MrMobius> tpbsd: welcome! I saw your messages before but you had left
22:51:56 ##forth <tpbsd> MrMobius, I'm on cellphone Internet and I disconnect it at night when I sleep to save quota
22:52:13 ##forth <MrMobius> ah makes sense. no more starlink?
22:52:31 ##forth <tpbsd> I can leave it connected when I resub to Starlink
22:53:44 ##forth <tpbsd> no, not atm, I blew my budget building a pc especially for AI and now have to tighten my belt for a while. Starlink is $139AUD a month, cell is $39/month
22:54:45 ##forth <tpbsd> MrMobius, I really like starlink, it's a step up from cell, never any bandwidth issues and it's unlimited
22:55:59 ##forth <tpbsd> MrMobius, my starlink terminal is mounted outside on the wall and waits patiently for resub!
22:56:42 ##forth <tpbsd> I can do it in 2 minutes and Im on as soon as the fee is paid, it's excellent
23:04:39 ##forth <xentrac> tpbsd: hey, that's fantastic!
23:04:48 ##forth <xentrac> (the SWDCOM terminal)
23:05:11 ##forth <tpbsd> xentrac, it is awesome and 100% stable
23:06:15 ##forth <xentrac> MrMobius and I were speculating after you left about on-device optimizing native-code compilation
23:06:33 ##forth <tpbsd> xentrac, but there is one small problem (I think) it looks like neovim :terminal lacks USB 'backpressure', so there is no flow control and the Forth chip chokes when compiling
23:07:14 ##forth <tpbsd> xentrac, so I'll be trying some workarounds today
23:07:21 ##forth <xentrac> no flow control?
23:07:28 ##forth <xentrac> maybe flow control is just misconfigured
23:07:47 ##forth <tpbsd> looks like as it chokes when uploading large source files
23:08:12 ##forth <tpbsd> xentrac, there is no mention of flow control in their docs
23:08:39 ##forth <xentrac> hmph!
23:09:01 ##forth <tpbsd> I'm guessing they havent faced that issue as yet
23:09:17 ##forth <tpbsd> expecially USB 'backpressure'
23:09:52 ##forth <tpbsd> Im using SWD (JTAG) for the terminal, not a on chip usart
23:10:16 ##forth <tpbsd> and it's very fast, about equiv to 1Mbaud +
23:11:38 ##forth <tpbsd> in fact it's so fast uploading that one cant read the terminal as it uploads, so I had to add a beep on error so if I hear a beep I know the upload failed
23:12:07 ##forth <tpbsd> and Ive the slow one!, Crest runs his with a STLINK3 at 25Mhz
23:13:00 ##forth <tpbsd> but it needs a STM32H7xx series chip at 280MHz to keep up while compiling
23:15:15 ##forth <xentrac> yeah, I'm just wondering if SWD has some kind of flow control. or maybe multiple forms of flow control
23:15:35 ##forth <xentrac> or SWDCOM rather
23:16:23 ##forth <xentrac> an extra diode and capacitor isn't that many extra passives
23:20:28 ##forth <tpbsd> xentrac, SWDCOM has USB 'backpressure' flow control
23:21:38 ##forth <tpbsd> xentrac, which it needs because a USB/SWD interface is always used, usually one of the $2 Chinese ones
23:22:17 ##forth <tpbsd> or a STM Stlink V3 which only STM make as far as I know
23:22:59 ##forth <tpbsd> I have 4 of them but havent tried them yet because they use the minature connectors
23:23:53 ##forth <tpbsd> besides, I always develop on the STM32F051 Cortex-M0 which has a max clock of 48MHz
23:24:31 ##forth <tpbsd> so a STlink v2 is all I need for max upload speed with that chip
23:28:57 ##forth <xentrac> the STM32 and clones are pretty astounding little machines
23:30:20 ##forth <tpbsd> xentrac, Im 70 years old and have been doing embedded since the 70's and Ive never seen such cheap and amazing mcu's
23:37:49 ##forth <xentrac> there are cheaper ones out there than the STM32
23:38:33 ##forth <xentrac> AFAICT the PY32F002 is not an STM32 clone, but it's still a 48MHz ARM, and it's 9.01¢
23:39:18 ##forth <tpbsd> xentrac, id happily pay $40 for a single mcu, Im from the 70's !
23:39:43 ##forth <tpbsd> xentrac, the price of a mcu is utterly irrelevant to me
23:39:55 ##forth <tpbsd> it's my time thats limited and valuable
23:40:58 ##forth <tpbsd> xentrac, have you seen my Mecrisp-Stellaris documentation site ? https://mecrisp-stellaris-folkdoc.sourceforge.io/
23:41:27 ##forth <tpbsd> it goes back to 2014 when I started learning Forth and using STM mcus
23:41:27 ##forth <xentrac> surely you can think of something useful to do with 500 MCUs, especially if you can get them reflow-soldered with a pick-and-place machine
23:41:58 ##forth <xentrac> it's a very nice site with awesome projects
23:42:24 ##forth <tpbsd> xentrac, well it's a hobby now as Im long retired, and living in Australia means it's hard to get reliable supply, so I hoard instead
23:42:38 ##forth <xentrac> that reminds me, is it feasible to detect CO optically?
23:42:50 ##forth <tpbsd> sure
23:43:02 ##forth <tpbsd> it's complex tho
23:43:07 ##forth <xentrac> what wavelengths do you use? do you have to do it photoacoustically?
23:43:15 ##forth <tpbsd> I used to calibrate CO machines
23:43:24 ##forth <tpbsd> I know then very well
23:43:44 ##forth <xentrac> cheap MCUs favor hoarding because you can buy 1000 for US$90
23:43:45 ##forth <tpbsd> you use infra red, basically a very bull filament
23:43:52 ##forth <xentrac> dull?
23:43:58 ##forth <tpbsd> oops yeah
23:44:06 ##forth <tpbsd> chery red
23:44:23 ##forth <xentrac> and then detect a narrow absorption line?
23:44:35 ##forth <tpbsd> you need a chopper wheel, a thermo sensor like they use in alarms
23:44:49 ##forth <xentrac> like a PIR proximity sensor?
23:45:02 ##forth <tpbsd> yeah, a filter is used, it's made of some salt crystals, you cant see thru it
23:45:11 ##forth <tpbsd> exactly like one of those
23:45:21 ##forth <xentrac> hmm, I wonder which salt
23:45:53 ##forth <tpbsd> I never knew that, the machines were made in Australia by 'repco', but there are american and japanese ones
23:45:57 ##forth <xentrac> it's easy to make CO for qualitative calibration testing, I think, with charcoal and damp brick
23:46:07 ##forth <xentrac> (burning charcoal)
23:46:22 ##forth <tpbsd> or a car engine with no cat
23:46:23 ##forth <tpbsd> ;-)
23:46:26 ##forth <xentrac> what's the difficulty with reliable supply in Australia?
23:46:33 ##forth <xentrac> car engines are a lot more expensive than charcoal
23:46:39 ##forth <tpbsd> distance and suppliers
23:46:45 ##forth <tpbsd> true
23:47:08 ##forth <tpbsd> we had very expensive bottles of calibrated CO, parts per million
23:47:34 ##forth <xentrac> haha
23:47:40 ##forth <tpbsd> such a machine is very reliable and accurate for CO measurement
23:48:04 ##forth <xentrac> I'd be happy to just have an alarm if the CO level in my house went over 1000ppm, ±50%
23:48:25 ##forth <tpbsd> you also have the 'figaro' line of CO sensors just used for detection of CO in underground carparks etc
23:48:51 ##forth <tpbsd> ahh, then you dont need a $4000 gas analyser!
23:49:10 ##forth <tpbsd> some of the 'figaro' sensors would do
23:49:23 ##forth <tpbsd> I made up a heap of such sensors for a carpark once
23:49:57 ##forth <xentrac> yeah, something like that
23:50:09 ##forth <tpbsd> Im guessing you could make up something with the right led and a pump etc
23:50:53 ##forth <xentrac> evidently they aren't available in my country: https://listado.mercadolibre.com.ar/figaro-sensor#D[A:figaro%20sensor]
23:51:12 ##forth <tpbsd> talk to Matthias Koch (the mecrisp* dev) as hes big on ramen sensors and a chemist
23:51:20 ##forth <xentrac> oh cool!
23:51:35 ##forth <tpbsd> he would be the very best source there
23:51:37 ##forth <xentrac> I feel like a chopper wheel, nichrome filament, and PIR sensor should be quite DIYable
23:51:44 ##forth <tpbsd> me too
23:51:48 ##forth <xentrac> but exotic salts might not be
23:51:50 ##forth <tpbsd> and a air pump
23:52:19 ##forth <tpbsd> yeah the world is nuts
23:52:23 ##forth <anthk_> where?
23:52:23 ##forth <xentrac> sodium hydroxide, MEK, HCl
23:52:28 ##forth <xentrac> Argentina
23:52:55 ##forth <anthk_> ah, sodium hydrox might be legal to fetch in Spain
23:53:23 ##forth <anthk_> that's just a common agent to produce soap
23:53:28 ##forth <tpbsd> some gang characters fought with machetes in Melbourne recently, so now theyre banning machetes
23:53:56 ##forth <xentrac> hahaha
23:53:58 ##forth <anthk_> caustic soda it's uber common
23:54:06 ##forth <tpbsd> theyre not banning gang characters ...
23:54:19 ##forth <xentrac> back to medieval times: only the nobility are allowed to carry swordsw
23:54:23 ##forth <anthk_> every granma from a village knows how to use that
23:54:27 ##forth <anthk_> xentrac: not true
23:54:39 ##forth <anthk_> tons of people had small swords and knife
23:54:47 ##forth <anthk_> knives/daggers
23:54:57 ##forth <xentrac> oh, sure, there were places where peasants were permitted swords in medieval times
23:54:59 ##forth <tpbsd> anthk_, xentrac is correct in general
23:55:04 ##forth <xentrac> but there were lots of places where they weren't
23:55:22 ##forth <tpbsd> look at japan ? only samurai were allowed to carry swords
23:55:27 ##forth <anthk_> still, peasants got several ways to use weapons
23:55:35 ##forth <tpbsd> anyone else would be killed if they did
23:55:40 ##forth <xentrac> with a sword
23:55:42 ##forth <xentrac> now the samurai are called "police"
23:55:43 ##forth <anthk_> clubs, field farming tools, and so on
23:55:49 ##forth <tpbsd> yeah, hidden daggers etc
23:55:50 ##forth <anthk_> heh, that reminds me of Dragon Ball
23:56:00 ##forth <anthk_> goku it's the peasant with a bo-ken (stick)
23:56:07 ##forth <anthk_> against vegeta, some space samurai
23:56:16 ##forth <veltas> deep
23:56:27 ##forth <tpbsd> hey veltas :)
23:56:29 ##forth <xentrac> yeah, Musashi supposedly won lots of duels armed only with boken
23:56:36 ##forth <veltas> Hi Terry
23:56:42 ##forth <anthk_> well, that's true, the Saiyan armor from DB it's a copycat from the Samurai ones
23:57:03 ##forth <veltas> This is a very good example of Forth on MCU vs C https://mecrisp-stellaris-folkdoc.sourceforge.io/peripherals-c-vs-svd2forth.html
23:57:20 ##forth <tpbsd> it seems that martial arts were developed because peasants were not allowed swords etc
23:57:50 ##forth <anthk_> indeed
23:57:54 ##forth <anthk_> Karate
23:57:59 ##forth <anthk_> tons of poses are from archery
23:58:00 ##forth <xentrac> technically I think samurai were strictly modern, not medieval
23:58:19 ##forth <xentrac> I'm not sure the Shaolin monks were technically peasants
23:58:39 ##forth <anthk_> church
23:58:46 ##forth <tpbsd> veltas, Im glad you like it :)
23:58:53 ##forth <anthk_> another branch of feudalism
23:59:18 ##forth <anthk_> brb, switch back from emwm to cw
23:59:20 ##forth <anthk_> cwm
23:59:37 ##forth <tpbsd> veltas, Ive moved on since then with my 'Plang2' system for Mecrisp-Stellaris
23:59:49 ##forth <xentrac> I'm not sure exactly what the historical development of gong fu was