jfe has quit [Ping timeout: 256 seconds]
jfe has joined #forth
jsoft has joined #forth
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale has joined #forth
X-Scale` has quit [Ping timeout: 240 seconds]
tabemann has joined #forth
jfe has quit [Ping timeout: 255 seconds]
<tabemann> tp
<tabemann> well, I solved my flash compilation problem
jedb has quit [Remote host closed the connection]
jedb has joined #forth
jfe has joined #forth
<deesix> The weird non-deterministic bug, tabemann? What was it?
<tabemann> where it wasn't seeing the last word compiled to flash
<tabemann> after rebooting
<deesix> Yes, something like that, I remember. What's the fix?
<tabemann> don't rely on the flush-flash routine that I had written, but rather just pad the last bytes of each word to a 16-byte boundary, and let the normal auto-burning routine work
<tabemann> it also fixed another issue with a different thing as well that I was going to run into
<deesix> interesting, thanks!
<tabemann> I also got erasing to work
<tabemann> so if I fuck up what I write to flash, I can just reflash the user portion of the flash without having to flash the whole thing
<tp> tabemann, nothing to do with caching etc ?
<tabemann> no, it's just that my flush routine is broken
<tp> aha
<tabemann> but I needed to change it anyways
<tabemann> as flushing would have kept <builds does> from working
<tp> I was reading about someone who's M7 (I think) had bad flash writes but it was due to not using a special instruction in his assy lang code
<tabemann> I also just added support for a warm reboot without clicking on the reset button on the board
<tp> I also use the Mecrisp-Stellaris warm reboot for when I run my intelhex dump
<tabemann> I still have to figure out why does> isn't working though
<tp> one has to be careful with all the cortex-m lookahead,piplines and caches etc with the higher end chips
<tabemann> I haven't really run into anything funny of that sort
<tp> your Forth progress seems to me ramping up now :)
<tp> me = be
<tabemann> I wrote a file containing basic routines used for a lot of things such as CREATE
<tabemann> and aside from DOES>, it works
<tabemann> I like that I now have a working ERASE-ALL
<tabemann> so if I mess up the code I compile to Flash
<tabemann> I can just erase it all without messing up the kernel
<tp> yeah, I use the Mecrisp-Stellaris a LOT
<tp> my dev system preloads all the aids I use then places a marker in flash and I can erase back to the marker without also erasing the proven dev words
<tabemann> I need to implement MARKER at some point
<tp> that saves time so I use that one most;y
<tp> yeah, it's very handy during user code development
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<tp> tabemann, 'touch' is a peripheral on your L476 as well
<tabemann> okay, gotta go - coffee shop is closing - bbiab
<tp> cya
tabemann has quit [Ping timeout: 256 seconds]
tabemann has joined #forth
<tabemann> fp
<tabemann> hey
<tabemann> I got MARKER working
<tp> that was fast
<tabemann> I've got zeptoforth at the point that now I'm writing new functionality in Forth rather than in assembly
<tp> which is so much faster!
<tabemann> the only downside to this is that Forth code needs to be uploaded the first time you use that, and with zeptoforth that can be kind of slow
<tabemann> i.e. I have to use slowpaste 5 with screen or otherwise it corrupts the data that's inputted
<tp> was e4thcom of no use ?
<tp> i recommend you add RTS to your terminal assembly code
<tabemann> e4thcom didn't seem compatible with zeptoforth
<tp> then screen can run in hardware handshaking mode
<tabemann> I tried using it in amforth mode, because amforth uses CRLF
<tp> using EOL delays is utterly unusable imho
<tp> all you have to do is enable RTS in the assembly code
<tabemann> I don't really know how to do that
<tp> well and enable the GPIO youre going to use for it
<tabemann> after all, I am a mere programmer
<tp> hahah
<tabemann> I do not know hardware things
<tp> does your usb-3.3v dongle have CTS ?
<tabemann> I'm just using a direct USB connection to the board (yes, the DISCOVERY board is interfaced with with plain USB)
<tabemann> the stuff on the board handles both serial and st-link for me without me having to use extra hardware
<tp> but your Forth has no USB driver
<tp> so it cant be using the mcu usb ?
<tp> ahhh, you have stlink-3 or whatever ?
<tp> it uses the one usb port to program and talk serial to the board ?
<tp> well you cant have hardware flow control then
<tp> compare your Forth source upload speed to mine ?
<tp> mine is so fast I cant read it as it scrolls up the screen
<tp> so I have to have a beep on error and RED error text inserted to find it
proteus-guy has quit [Ping timeout: 256 seconds]
<tp> thats the ONLY way I can develop Forth on hardware in the same time as others use C, tho mine is quite a lot faster than theirs
<tp> in my opinion, the fastest Forth source upload time should be a priority for you
jfe has quit [Ping timeout: 260 seconds]
<tabemann> back
<tp> imagine when you have source thats 10k lines, you have to come back in 10 minutes!
<tabemann> mine is st-link 2-1
<tp> ahh yes, I avoid that like the plague
<tp> too slow, and tries to be too convient with it's drag n drop bs
<tp> which oddly doesnt work with Mecrisp-Stellaris binaries anyway
CORDIC has joined #forth
gravicappa has joined #forth
X-Scale` has joined #forth
<tabemann> oh mine works with mecrisp-stellaris when I use the st-link command line tool
pareidolia_ has joined #forth
<tabemann> I haven't tried this with "drag and drop"
jfe has joined #forth
<tp> yeah it works for me with the cli too also but it's heaps slower than stlink-v2.0
DKordic has quit [Ping timeout: 255 seconds]
<tp> one day I hope to use something else as programmer
X-Scale has quit [Ping timeout: 255 seconds]
X-Scale` is now known as X-Scale
<tabemann> well this is built into the board, unfortunately
pareidolia has quit [Ping timeout: 255 seconds]
<tp> perhaps a rpi etc
<tp> yeah same as all my discos and the nucleo
<tp> at least SWD is dead easy to use direct to a chip
<tp> which I also do
<tp> the disco/nucleos make that easy at least
<tp> you can just pull those jumpers you lost and then instead of programming the target on the disco, you can flash one externally
jfe has quit [Ping timeout: 256 seconds]
<tabemann> oh yeah, I got new jumpers - lol
<tabemann> a 50 pack of them
irsol has quit [Ping timeout: 268 seconds]
<tp> always handy
<tabemann> dammit
<tabemann> my MARKER appears to be buggy
<tp> we call that 'cornerstone' in Mecrisp-Stellaris
irsol has joined #forth
irsol has quit [Ping timeout: 255 seconds]
irsol has joined #forth
<tabemann> okay, I've gotta hit the sack
<tabemann> g'night
dddddd has quit [Ping timeout: 240 seconds]
Deep-Thought has joined #forth
dys has joined #forth
WickedShell has quit [Remote host closed the connection]
Deep-Thought has quit [Quit: Leaving]
mtsd has joined #forth
mtsd has quit [Ping timeout: 258 seconds]
gravicappa has quit [Ping timeout: 268 seconds]
mtsd has joined #forth
xek_ has joined #forth
gravicappa has joined #forth
iyzsong has joined #forth
mtsd has quit [Ping timeout: 240 seconds]
mtsd has joined #forth
john_cephalopoda has joined #forth
<john_cephalopoda> Hey
<tp> hey
<tp> how goes your Forth development john_cephalopoda ?
<john_cephalopoda> I finished my x86 assembler (written in RETRO Forth) and I can now create executables that run on Linux and bare hardware.
<tp> thats pretty darn cool!
<john_cephalopoda> I ported the Nga VM, which RETRO Forth runs on, to that assembly language, so I can run RETRO like that.
<john_cephalopoda> Keyboard input isn't implemented yet though, only text output.
dave0 has quit [Quit: dave's not here]
<tp> I've been learning Forth since 2014 on embedded and never took to forths running on a PC, preferring Perl or C etc, but Retro is the first Forth I've found to be easily useful on FreeBSD
<tp> I'm teetering on the knife edge of making my next pc utility in retro
<tp> I do tend to do a lot is Shell also
<tp> is = in
heredoc has quit [Ping timeout: 246 seconds]
<john_cephalopoda> A thing I really like about Retro is, that it doesn't do any look-ahead. You don't write "variable test", where "test" is a not yet defined word and "variable" has to look ahead to read it. Instead it does "'test var" where 'test pushes the string of that name to the stack and var takes that string to create a variable that's named accordingly.
<tp> so what is "test" previously defined as ?
<tp> I have to do "X variable test" with Mecrisp-Stellaris
<john_cephalopoda> I mean that with "X variable test" the word "variable" has to read ahead to fetch the name of the newly created variable.
<john_cephalopoda> To speak in terms of standard Forth, RETRO basically does: S" test" variable
proteusguy has quit [Ping timeout: 265 seconds]
<tp> I'm mainly a Forth user, so I haven't thought about this aspect before
remexre has quit [Ping timeout: 265 seconds]
remexre has joined #forth
<veltas> That's interesting but I don't get why that's an advantage
<tp> I learn a lot here tho just reading comments like this
<veltas> Does it reduce the complexity of the compiler/interpreter somehow?
<veltas> Yeah I have been learning a ton by being in this IRC channel
<veltas> Talking and reading
<tp> these things never would occur to me while I just make devices using Forth
proteusguy has joined #forth
<john_cephalopoda> I am not sure if there's any big advantage in doing it that way. I just think it's a nice paradigm to have no look-ahead.
<tp> john_cephalopoda, does 'no look ahead' mean less coding on the part of the designer ?
rdrop-exit has joined #forth
<john_cephalopoda> I'm not sure. It might make things slightly simpler, but that's just a guess. It's probably not significant. It's more about the way every word just uses the stack to look for arguments and isn't affected by what comes after it.
<rdrop-exit> technically, it does have to look ahead
<veltas> I think it does mean less 'parts' but not really less coding
<john_cephalopoda> rdrop-exit: How do you mean?
<tp> rdrop-exit, ! Zen Guru of Forth
<rdrop-exit> hi tp!
<veltas> Anyway I have not said anything about my 'progress' on the Z80, so here is a preview of things to come: https://pastebin.com/raw/UY1MD9np
<tp> rdrop-exit, may be important for you re new monitor on MAC : https://embdev.net/topic/284710#new
<rdrop-exit> he uses a prefix on the string
<john_cephalopoda> The string is handled as a token though.
<veltas> If someone reverse engineers and complains about me using the 'wrong threading mechanism' they are welcome to have their money back
<rdrop-exit> but there is special handling of the prefix
<tp> veltas, memory dump of your Forth so far ?
<veltas> tp: Yes a partial dump
<veltas> Of the prebuilt dictionary
<tp> veltas, showing some dictionary words :)
<veltas> I would hope it was obvious it was a dump of a prebuilt dictionary, given it has words embedded in the ascii preview
<tp> veltas, yes, it seems obvious to me, and I'm the least informed Forth system programmer here
<tp> if I see it, everyone else will for sure
<veltas> If you wanted to reverse engineer it then the words "ALIGN", "ALIGNED" and "CHARS" all do nothing, so their dictionary entries are basically 'empty' examples
<rdrop-exit> similar to how Postscript did it, special prefix characters
<veltas> I will probably put the source online when it is half-running
<veltas> Plan is to get interpreter working before implementing :
<rdrop-exit> veltas, you can make ALIGN etc... immediate so they don't compile anything either
<veltas> I could do, but I prefer the idiotic approach
<rdrop-exit> ok :)
<veltas> Oh I see what you're saying now
<veltas> Yes, that is a good idea
<tp> rdrop-exit, check out my new 'touch demo' menu
<tp> -------------
<tp> Main Menu '?'
<tp> s - Scan: LED lights on Touch and prints a '.'. Press 'm' to stop
<tp> t - print continuous Touch values. Press 'm' to stop
<tp> -------------
<tp> i - print technical Information
<tp> m - Menu
<tp> e - Extra Menu, license, credits, etc
<tp> q - Quit
<tp> i cant believe how bug free this menu strategy is
<tp> especially as it's just terminal driven
<rdrop-exit> cool :)
<tp> it makes a Forth demo so easy to use
<john_cephalopoda> rdrop-exit: Ah, I see what you mean.
<rdrop-exit> I like Jef Raskin's strategy for menus
<tp> rdrop-exit, got a link ?
<rdrop-exit> it's in his book, Humane Interfaces
<tp> ahh, thats a skill for sure
<tp> I have to bumble along there as I have zero artistic skills
<rdrop-exit> basically, you just go to any name on your screen and hit enter or click the mouse and it gets executed
<tp> 'go to' ?
<rdrop-exit> move your cursor to it or select it
<tp> i dont want to get into terminal types and knowing the cursor position etc
<tp> it looks nice but it's not simple in my (limited) experience
<tp> this has to run on any terminal, any os etc
<tp> maybe one day when I have 1/2 a clue ...
<rdrop-exit> that's no problem, you just limit yourself to lowest common denominator
<tp> well Im a tech not a programmer
<tp> and everyone else is a programmer and not a tech :)
<patrickg> the lowest common denominator would be the line oriented terminal. still nothing about cursor positions
<tp> in the system I use the user only has to read the menu and hit the number for the desired option and it immediately runs
<rdrop-exit> lowest common denominator terminal escape codes, CUP etc...
<patrickg> but I guess a line oriented variant would be to have a prompt where you can type in any word on the screen and have the system select it for you (or ask which of the various instances you're interested in)
<rdrop-exit> you only need 5 or 6 terminal escape codes, they're pretty much universal
<john_cephalopoda> I am reminded of the early Oberon operating system versions, where window titles were actually clickable, executable commands.
<tp> rdrop-exit, as usual I'll have to go and think on this new knowledge!
<rdrop-exit> Oberon was cool
<patrickg> john_cephalopoda: plan9 took up some of those ideas
<rdrop-exit> (still is I guess)
<john_cephalopoda> patrickg: Oh, cool, I'll have to check it out!
<patrickg> john_cephalopoda: the acme editor in particular
<rdrop-exit> I still have the Project Oberon book on a shelf in this room
<rdrop-exit> reading the XKB extension of X11, what a mess
<rdrop-exit> tp, here's a video on the Canon Cat
<tp> rdrop-exit, ta watching
<rdrop-exit> patrickg, the following terminal escape sequences should be sufficient for a full screen terminal Forth:
<rdrop-exit> RIS, GRCM set, CUP, SGR, DECSCUSR, DECTCEM, DECAWM
<rdrop-exit> RIS is for resetting the terminal
<rdrop-exit> GRCM set, sets the "Graphic Rendition Combination Mode"
<rdrop-exit> CUP positions the cursor
<tp> rdrop-exit, you do realise that my menu is coming from this device ?
<tp> Memory stats in bytes:
<tp> Total Flash:65536 Free:17408 Used:48128
<tp> Total Ram:8192 Free:1864 Used:6328
<tp> it's a tiny cortex-m0 with Forth on board
<rdrop-exit> Sure, terminal escape codes are just short ASCII strings
<rdrop-exit> they're from the time of "real" terminals
<rdrop-exit> as in VT-100 etc...
<tp> which probably makes them unsuitable in a time of 'microsoft' terminals on windows boxes
<tp> my existing menu is simple enough for windows users
<rdrop-exit> terminal emulators emulate terminals
<tp> ... ideally
<rdrop-exit> as long as you have a run of the mill terminal emulator, should be no problem
<tp> I'll try them here on my terminal when I have researched the concepts:)
<rdrop-exit> xterm for example, understands hundreds of terminal escape sequences, while I'm using a half-dozen that are supported pretty much everywhere
<tp> most of my users wont have xterm
<tp> they have some lame windows gui terminal
<rdrop-exit> they must have some sort of terminal emulator on Windows too
<tp> I'm now up to 170 downloads on my previous diagnostic Forth binary which had the same menuing system
<tp> Countries
<tp> Top: US, at 16%
<tp> Operating Systems
<tp> Top: Windows, at 62%
<rdrop-exit> we're talking 1970s tech that's still supported by just about every terminal emulator in the world
<rdrop-exit> IIRC Windows users often use PuTTY
<tp> anyway, my demo isnt about interfaces, it's about the stm32 'touch' controller for making touch sensitive keyboards\
<tp> useers can flash the binary and start testing different touch designs immediately
<rdrop-exit> I'm not suggesting you change your demo, I'm just saying a pretty common way of doing simple TUIs is using such sequences
<tp> the alternative for them is installing GB's of Java eclipse stuff and then trying to compile and run some demo
<rdrop-exit> I have nothing against pick-a-letter menu systems
<tp> rdrop-exit, and I appreciate your comment, you havent let me down yet ;-)
<tp> all learning is good, the firther from my comfort zone the better
<tp> -i+u
<rdrop-exit> Wait a sec, IIRC you're printing error messages in red on your terminal
<rdrop-exit> right?
<tp> yep
<tp> and beeping the terminal
<rdrop-exit> then you're already using escape sequences!
<tp> frankly, I'd be lost without those facilities
<rdrop-exit> ;)
<tp> sure
<tp> Im using *some* escape sequences
<tp> I also have my own 'stack sensitive' prompt
<tp> if anything is on the stack, my prompt turns red
<rdrop-exit> ok, what I'm saying is that with a minimal set of those sequences you can do a simple TUI
<rdrop-exit> a minimal set being around 6
<tp> actually in this case driving the cursor around would be harder than just entering a number from the keyboard I think
<rdrop-exit> (depending on what exactly you're trying to do)
<tp> I cant count on the mouse being useful
<rdrop-exit> yes, Raskin's point is that no new program is necessary, anytime you display some words you have a menu
<tp> that's true!
heredoc has joined #forth
<rdrop-exit> Oberon had a similar concept
<tp> rdrop-exit, did you see that forum regarding the dell and mac problem ?
<rdrop-exit> missed that
<rdrop-exit> do you have a link?
<rdrop-exit> thanks!
<tp> no problemo
<rdrop-exit> good to know
<tp> i thought youd want to see it
<rdrop-exit> XKB is migraine inducing, I'm putting off reading the remainder until tomorrow, my brain cells are getting scrambled
<tp> I always found it hard to follow
<tp> luckily Im just a user
<rdrop-exit> the main X11 core protocol is a breeze in comparison since 80% of it is ignorable.
<ecraven> xkb is however *very* useful as a user, if you want a bit more complex stuff
<tp> ecraven, i have looked at it a couple of times in the past for some customisation
<tp> ok, my 'touch' code seems robust, now I just need to capture some scope pics for the article :)
<rdrop-exit> I'm starting to wonder though, I only use one particular keyboard, I'm starting to wonder if I should just hardcode to that so I can ignore the bulk of XKB's complexities.
<tp> I might try and get this one into hackaday and steel myself for my inevitable 'forth rejection'
<rdrop-exit> are there any other sites similar to Hackaday that might be more friendly to esoteric tech like Forth?
<tp> no, sadly
<rdrop-exit> I'm surprised no competitor has popped up
<tp> it seems that all commercial sites, and theyre all commercial, use a formula thas related to what they can sell
<tp> so many of their articles are just cleverly disguised sales adverts
<rdrop-exit> reminds me of many of the tech mags from the 80s
<tp> kids nowdays want devices that promise 'easy' programming, fast results, lots of bling, no specialised knowledge
<tp> yeah, nothing changes much I guess
<tp> Im attracted to the tech forums like a ghoul is attracted to cemeteries at midnight I guess, just so I can see the corruption and decay and gloat
<tp> Im just amazed at how the new breed of 'makers' view design and programming, it's ghastly to me
<tp> they dont want to know about the inner working of the hardware and consider that as long as they have a API, thats all they need
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
<rdrop-exit> there doesn't seem to be much deisre for deep unsterstanding
<tp> for them the main drive seems to be ultra low cost and absolute minimum design time
<tp> thats what I see again and again
<tp> and one reason Forth is not a 'best seller'
<rdrop-exit> Forth is for a different breed
<tp> it is
<tp> i do get about one person a month who subs to my utube channel which is 100% Forth
<rdrop-exit> Sturgeon's law always applies
<tp> in a world of 8 billion thats not bad for forth, one a month ;-)
<tp> I'm up to 50 subs now!
<rdrop-exit> woohoo
<tp> hahah
<tp> I'm amazed theyre still there
<tp> just wait till my new 'touch' demo video goes up on utube, it will be a massive rush of new users, why it may jump to 51 by xmas!
dys has quit [Ping timeout: 256 seconds]
<rdrop-exit> gotta go, catch you soon
rdrop-exit has quit [Quit: Lost terminal]
<tp> bye, thanks for the chat
dys has joined #forth
dddddd has joined #forth
<veltas> tp: What is your channel?
<tp> #mecrisp
<tp> it's *very* low traffic
<tp> but it's all about Forth and hardware
<tp> veltas, do you mean utube channel ?
<veltas> Yes
<tp> lol, I thought you meant IRC channel
<veltas> Is that on freenode?
<tp> yeah
<veltas> What about your utube channel?
<veltas> And by utube you mean youtube or not?
<veltas> Is utube like a spin-off of youtube for micro stuff? i.e. mu/u tube?
<tp> thats the last video I made
<tp> it's youtube
<veltas> Nice
<tp> at least I got reasonable audio working this time
<tp> I have 11 videos and the quality improves a bit each time as I get better at it
<tp> veltas, my main site is here, its all Forth related: https://mecrisp-stellaris-folkdoc.sourceforge.io/new-projects.html#new-projects
<veltas> I like youtube tech videos
<tp> personally I usually find them way too slow
<veltas> GameHut was good when it was all about how he optimised 8-bit and 16-bit games
<tp> I much prefer docs
<veltas> Docs are better for learning
<tp> yes, and video has it's place
<veltas> But videos are good when they just give a rough overview of something or to pique my interest
<tp> for instance my first video needs to be redone as it has some terrible editing, but it's almost impossible to explain it to a non forther
<tp> i had a Arduino user here watching a demo of this system and his face was completely blank, first time I've ever seen that
<tp> he couldnt grasp the simplest part of it
<tp> my fault as the teacher but I just wasnt able to find a way to explain it that he could grasp
<tp> but it was my first, I used a old phone for the audio etc
<tp> I'm getting close to redoing it so everything is much clearer, probably show how a simple Forth project is made from design to hardware next time
<tp> but I think I'll need to use X265 encoding to get the video size right down
<veltas> That's very good by "bad video" standards
<tp> youre too kind :)
<veltas> I can hear you and the audio doesn't sound like someone has recorded it via cup+string
<tp> I've seen some outstanding videos and aim to improve a LOT yet
<veltas> And I can see everything and there aren't any horrific encoding/lossy artifacts
<tp> hahah, the phone was pretty bad
<veltas> You have set the bar high
<tp> now at least I've got the microphone and audio sorted
<tp> it needs to be high to be worthwhile for me
<veltas> I'm used to watching youtube videos where you can't read what is happening because of compression and the audio is extremely bad and they have a thick foreign accent
<tp> if someone spends a minute of their life watching it, the video has to be worthy of their time
<veltas> And they don't realise how bad their video is
<tp> thats true, some are utter junk, a waste of everyones time
<veltas> Hmmm
<veltas> It's good you hold yourself to a high standard, it's a shame many people don't
<veltas> I am tired of the 10 second intros and then the mini-vlog-post before they get to the clickbaity content
<tp> one has to present Forth in the best light as well I think
<veltas> which is not what they advertised
<tp> yeah, I'll never turn on monetise my videos
<tp> there are so few modern Forth videos, that why I started doing it
<tp> i was really hungry for modern Forth content and there was almost nothing
<tp> i mean in the embedded area, not on PC's
mtsd has quit [Quit: Leaving]
<tp> veltas, there is a STM32 peripheral called the 'TSC' it's a multi channel touch sensitive peripheral and there is not *one* single Arduino STM32 library for it
<tp> not that I can find
<tp> so you wont find any Arduino projects using it. Ive just finished a bootable Forth binary demo for that peripheral so electronics enthusiasts can play around with touch sensors
<tp> I'll do a video, a page on my doc site, and email it to Hackaday and see if they take it, but generally they reject any Forth stuff
dys has quit [Ping timeout: 240 seconds]
john_cephalopoda has quit [Read error: Connection reset by peer]
TheCephalopod has joined #forth
<veltas> tp: Good luck
<veltas> Monetise your videos by all means, just produce good quality content
<tp> veltas, I'm philosophical about it
<veltas> I won't be paying for your video anyway I have adblock
<veltas> And so do most people
<veltas> Who even watch this kind of stuff
<tp> veltas, no, if I want to make money then I'd have to produce some utterly useless time wasting drivel ;-)
<tp> veltas, my Forth was free, and so is all my Forth content, I just hope it will be useful
proteus-guy has joined #forth
<tp> I've had about 1700 views in all, so not many are interested in Forth, but I knew that
<tp> Forth is incredibly unpopular in embedded where C rules
dys has joined #forth
jsoft has quit [Ping timeout: 268 seconds]
<veltas> I work in embedded programming in industry and Forth is totally unknown, and considered a whacky old-fasioned language by those who do know it
<tp> that's it!
<veltas> Including an engineer I know who is sixty-something and used to work at a proper Forth company and wrote Forth every day, coming out of assembly
<veltas> Writing 8-bit controllers for lifts or something
<tp> I'm 60 something also and have woked on professional Forth projects in the 70's
<veltas> He worked at MPE forth
<tp> but only the hardware, I had no idea how to write Forth code
<veltas> Or worked *with* them, or was trained by them, I don't remember the details
<tp> wow, Stephen Pelc's mob
<veltas> I'll ask him if he knows them
<tp> it's great to have a professional embedded guy here!
<tp> Ive been a electronics tech all my life
<tp> and I always assisted the engineers by building the gear for them
<tp> theyd do a design, give me the schematic and I'd build it all
<tp> i find it amazing how those who have never used Forth can be so sure it's "a whacky old-fasioned language" that is write only etc
<tp> and those who think so have never used it imho, or they would never think that
<tp> they have probably read negative a article about Forth and believe it
<veltas> I think just reading a non-biased description of Forth would make you think that
<veltas> You have to really *try* it to see where it fits for you
<tp> I think I can tell articles written about Forth by people who have only loaded it on a pc, tried it for a few days then wrote an article
<veltas> That is how it would sound if I wrote such an article right now
<veltas> Since I have been using it in small programs to try it out, but have not written anything significant in it
<tp> I know in my own case I spent a couple of *years* playing around with Forth before I 'got it'
<tp> it's understandable as I think using Forth depends on more than Forth
<tp> for instance if I hadn't built my own development environment, I wouldnt be using Forth as it would just be too slow for me
<tp> my criteria was that Forth development must be as fast, preferably faster than the same development using C and GDB
<tp> or I wasnt going to use Forth
<tp> I dont mean the design time, I mean the actual flashing.uploading of source
<veltas> I think you could definitely program Forth for years without ever really learning anything about the extension features, what is 'in' the dictionary, etc
<tp> I think I use most of it, but I add far more Words than Mecrisp-Stellaris comes with
<tp> most of mine are automatically generated
<veltas> What does that mean?
<tp> do you use cortex-m in your work by any chance ?
<veltas> I have used it
<veltas> Only in C, I have only spotted assembly in a debugger
<tp> than youre familiar with how many registers and bitfields a cortex-m may have ?
<tp> here are some examples
<veltas> No... is it about 32 registers?
<veltas> I have done actual assembly for PowerPC and x86 at work
<tp> STM32F0xx 37 413 3044
<tp> thats 37 peripherals, 413 registers and 3044 bitfields
<tp> here are some others for comparison
<veltas> This is not familiar to me
<tp> STM32F7x7 93 2093 17051
<tp> in C these are all contained in the header files
<crc> I've written a bit on my interpreter design, and the lack of forward parsing in retro at http://forth.works/share/894caaba15e7a6d8d482dab807db9e33.html
<veltas> I 'worked with' such a device in that I added support code for it years after it was designed, so I don't 'know' it like someone developing their own system would
<crc> it's not in the main docs yet though
<tp> crc, cool
<tp> veltas, when designing devices with Forth and cortex-m a way to talk to all those peripherals must exist
<veltas> Okay
<veltas> Like ... drivers you mean?
<tp> veltas, naturally theyre all memory mapped
<veltas> Yes
<tp> not really like drivers
<tp> think of it more as a 'configuration'
<veltas> Well I mean any kind of software interface on top of the raw memory map
<veltas> So not like that at all then?
<veltas> This sounds very FPGA-y to me
<tp> youre a programmer I can see
<veltas> Yes I am
<tp> I'm a technician
<tp> we look at the same things a bit differently thats all
<tp> youre right of course
<veltas> Yes I can tell from your video actually
<veltas> Because of the debugger feature, that's something I would have tried to do in software, and you are talking hapily about how your debug stuff holds the CPU in reset and uses the reset signal to clear etc
<TheCephalopod> I've been working with STM32 MCUs a bit. Each got a giant manual with hundreds of peripheral registers.
<tp> I use both a software and a hardware reset probably thousands of times during a project
<tp> TheCephalopod, so true, Ive been reading them since 2014
<veltas> Sorry should not have said "holds the CPU in reset" ... s/ in reset//
TheCephalopod is now known as john_cephalopoda
<tp> veltas, no problems, I usnderstand what you mean, same as you understand what I mean when I venture into the softwware world
<veltas> I am not actually sure I do but communication is never free!
<tp> as a technician I LOVE those giant manuals, theyre the fun part of any MCU to me
<veltas> I am trying to understand, not trying to be pedantic, I came into embedded with a really weird route, from a computer science background
<veltas> Just got more interested in how stuff 'works' at the lower levels of software
<john_cephalopoda> tp: I'll soon start a job that is basically programming STM32s.
<tp> and it's hard for software people trying to embrace the hardware world I know, Ive seen it so many times
<veltas> I love big manuals too actually, especially if they actually contain needed info and it's accurate
<tp> john_cephalopoda, thats pretty cool!
<john_cephalopoda> I'm quite excited, I hope it is fun.
<tp> one problem with stm32 is that because using a arm core, the tech details are scattered all over
<veltas> crc: I will read that because I was asking about that design choice earlier, thanks for posting the link
<tp> john_cephalopoda, I've been using stm32 since 2014 and Ive found it a lot of fun, I think it's well designed and the doc is outstanding
<john_cephalopoda> Yeah, their reference manuals are really well-done.
<tp> john_cephalopoda, tho my use has been what one would call 'hobby' as I was working in another industry at the time
<tp> but before that I worked in embedded since 1974
<tp> I never really left it as I love the embedded field
<tp> john_cephalopoda, cortex-m is a massively complex area to me, it's amazing arm did as well as they have
<john_cephalopoda> I just handed in my master thesis in computer science (informatics) and I'll start working in industrial embedded things now.
<veltas> cool
<tp> i mean take the STM32F7x7 ? it has 97 on board peripherals, 2093 registers with 17051 bitfields, try and not screw up the names of all those ?
<tp> john_cephalopoda, congratulations!!! that must have been a big effort ?
<john_cephalopoda> tp: Thanks! Yeah, writing the thesis was a hard time period. A lot of setbacks because of hardware issues, but in the end it worked out.
<tp> john_cephalopoda, if youre using stm32, youll need to know about CMSIS-SVD file:///home/tp/projects/programming-languages/forth/mecrisp-stellaris/mecrisp-unofficial-doc/_build/html/register-generator.html#svd2forth
<tp> oops
<tp> sorry
<tp> I keep a internal directory and rsync it to the website
<tp> john_cephalopoda, life should be a lot less stress now :)
<john_cephalopoda> Ah, yeah, I've seen those files being used by the debugger in the Eclipse-based IDE. Good to know where to find them when the debugger doesn't know where they are. :)
<tp> that's true, they are the basis of all the hardware mapping for all the languages that use STM32
<tp> when I started in 2014 there was nothing and the Forth guys were just transcribing what they wanted to use by hand, it's error prone and everyone used different naming conventions, a mess!
<veltas> crc: It feels like the major thing that has changed here is you have moved the forward-parsing fetch from immediate words and into the word lookup
<tp> the a guy made a basic svd XML 'recipie' for XLST and I built on his work
<tp> the Windows C people had it easy as ARM made a executable to turn svd files into header files, but naturally there was nothing for Forth or Rust or Python etc
<tp> so we all had to make our own recepies
<veltas> crc: I think the major benefit I see in that document is "each word can be studied in isolation, and refactoring doesn't need to take parsing into account"
<veltas> The thing about consistency is a subjective point which I don't really know if I'd like or not without trying it
<veltas> The thing about parsing affecting refactoring isn't something I've considered so far because I've only worked with really simple Forth programs, where the structure etc. makes it really obvious where parsing is used and where simple stack-based ordering is being used
<veltas> I have no idea how that would play out in a real application
<tp> veltas, crc would, he uses Retro for everything!
<veltas> Yeah I am not trying to cast doubt, just explaining my analysis
<veltas> Which is mostly "I am too ignorant in forth to say anything about this"
<tp> veltas, welcome to the club :)
<tp> we were having a discussion here once about the effect on sea levels of the Greenland and Antartic ice melting, CRC quickly arrived at a figure using Retro for the calculations
<veltas> nice
<tp> when I observed the high level of Retro utility, I myself considered using Forth on my PC for utility programs instead of Perl and Shell
<tp> for the first time ever
<veltas> I am using Lua for my utility stuff right now
<veltas> And Bash I guess
<tp> good choices
<tp> Perl is messy but does anything, and I only use sh not bash being a freebsd user
<veltas> I am going to force myself to use gforth for a few tasks as an exercise
<tp> i see gforth as a monster but I've only used it a couple of times
<veltas> Then will see if it could possibly be useful for scripting
<tp> retro compiled in a instant here and hasnt crashed or misbehaved once
<veltas> Does retro have a cross-compiler and is it better documented than gforth's https://gforth.org/manual/How-the-Cross-Compiler-Works.html#How-the-Cross-Compiler-Works
<tp> i dont know, but I love Retro'd docs and literate programming syetem
<veltas> Is that what the ~~~ is for? Literate programming?
<tp> yes
<veltas> Nice, I thought that's what it was
<veltas> I only happen to know what that was from reading about Knuth's language work recently
<tp> i have observed that Forth is a very bad fit for C users to try and turn into C
<tp> but that Forth is a excellent fit for anyone to turn into their own unique system
<veltas> I am being boring and trying to implement Forth 2012 Core, I will try these flavours later hopefully
<tp> i cant impliment a Forth at all, Im still a user only
<tp> but as a tech, I dont have any drive to make my own Forth
<tp> I love making Forth tools tho
<tp> all the aids that make development easier
<tp> user application development I mean
<veltas> I was motivated to learn Forth because I was trying to design a language for the Spectrum
<veltas> It makes sense to give Forth a shot and see if it will float my boat
<tp> absolutely
<tp> it seems to me that the spectrum fits in a somewhat unique position now
<veltas> It has definitely won my respect already, I have enjoyed it a lot so far and it's been a really interesting dive into a different universe of programming
<veltas> (Forth)
<tp> it would be a PC if it had the horsepower and the resources, but it doesnt
<veltas> And I hope I can justify keeping using it
<tp> it may take a few years to find out
<tp> in learning Forth I found that I have also learnt more about everything else
<tp> as I learnt to use Forth, my programming improved in everything else
<tp> my Perl code started to look neat and tidy
<veltas> There is definitely a displicine needed
<tp> managable even
<tp> a month spent orth coding seemed to improve everything else as tho I had spent a month on it instead
<veltas> Hmm I think I have gotten some of that myself too
<tp> Forth started changing me, changing the way I aproached problems
<tp> it's quite interesting
<tp> I mean I started machine coding in 1980, I did a lot of it, I made and sold gear written in machine code
<tp> then I went to assembly and life was a luxury I couldnt believe compared to machine code
<tp> C made assembly seem hard
<tp> Forth instead of changing my external environment, started changing me
<tp> and I spent a long time trying not to abandon Forth because I just didnt get it, it seemed hard to do anything
<tp> but I hung in there because Forth coders I had built hardware for in the 70's had raved about it
<tp> and I had a lot of respect for them, I kept thinking I must be missing the obvious
<veltas> The nice thing in assembly we lose with higher level programming languages is overflow detection
<veltas> For some reason I've never seen that nice in a high level language, it's a royal pain in C compared to assembly where every arithmetic op sets/clears the overflow bit
<veltas> or equivalent for your arch
<tp> my user of C was always very simple in my PIC days and I used a simple C
<tp> only when I started using STM32 in 2014 did I experience Gcc for cortex-m
<veltas> I want to try writing K&R C some time, instead of ANSI C, on a serious project
<veltas> I can't tell if it's better or worse
<tp> ill take your word for it, my projects have always been small
<veltas> I have actually done some serious C programming and I know it too well and wish I knew less
<tp> my first commercial embedded project was a bottle filing machine that filled 5000 bottles a day
<tp> I used two 8085's in that and wrote the code in machine code on a hex keypad
<tp> the code was very simple, but the overall project wasnt as I also had to make special hardware, such as waterproof switches etc
<tp> they were all hand made because commercial switches didnt last
<veltas> Yeah
<tp> thats the area I work in. If someone asked me to do a complex project which was all code, I'd turn it down I think
<tp> I wouldnt be efficient
<veltas> I consider the Spectrum a PC because that's what it says on the box, and also because that's how it's used
<tp> it's a 'small' pc:)
<veltas> You don't exactly sit at an embedded computer and load different assortments of programs into it and use them interactively (well not outside of development, usually)
<tp> I have made thousands of Z80 boards in a project in the early 70's, I probably mentioned before
<veltas> The Spectrum doesn't get installed inside washing machines (although technically it could be, and I can imagine at least one coyboy has)
<veltas> Yes
<tp> sure, people used the Spectrum as a PC
<tp> in that they wrote all kinds of apps, graphics, games, anything that would run on it I imagine
<tp> we had some Z80 based computers here that were very popular with programmers
<tp> the "Dick Smith DZ80"
<tp> not to mention the Tandy TRS80
<tp> I owned a Z80 development system for a while, the 'Cromenco Z80-based S-100 bus computer"
<tp> I still have the PSU from it sitting under a workbench not 3 meters from where Im sitting right now
<tp> https://microship.com/cromemco-z-2d-review-kilobaud/ thats the one I had, the Z-2d
<tp> it had a assembler and floppy drives
<tp> actually the aluminium used in the case was too good to thro away so I have that here too
<john_cephalopoda> I like the work that went into designing those systems. Also the monitors are placed way more ergonomically than what you get today.
<tp> john_cephalopoda, they were very expensive and well made
<john_cephalopoda> I'd pay a lot of money for a really well-made computer and phone. But they keep getting flimsier.
<tp> my favourite was a tinny SWTP 6800 development system tho
<tp> but thats because I just loved 6800 assembly and the Motorola 68HC11
<tp> yes, the days of quality are long gone now
<tp> i mean, who keeps the PSU and the aluminium sides of a computer ?
<tp> i did because they are such high quality
<tp> too good to thro away
<tp> nowdays when you pull apart a usb keyboard all you salvage is the cable and a couple of cheap and nast self tappers, the rest is junk
<veltas> I do prefer having all this cheap shit but it is sad that it's basically impossible to get e.g. a "good laptop" that won't break in a year of typical use
<tp> it is cheap and nasty, but thats because the price is so low
<tp> around 1980 I tried to get a loan for $10,000 AUD to buy a Olivetti 286 PC with EGA display
<tp> that's what they cost back then
<veltas> My main home computer is a 1GB RAM ThinkPad T42 right now
<tp> EGA was horrible res
<tp> thats a small computer thesedays
<tp> my laptop is a X61s Thinkpad that's quite worn out now
<tp> I think it has 2GB
<tp> of ram
<tp> it's vintage 2001 I think
<veltas> Yeah that is probably a gen faster than mine but not in a significant way
<tp> but I'll never buy another
<veltas> I don't think 2001
<veltas> That doesn't sound right
<tp> I paid $100 for it on ebay
<veltas> 2011 maybe
<veltas> Yeah similar story here
<tp> And I have the dock as well, in fact I have 2 of each, so thats $400 for two lappies and two docks
<veltas> I went to a much later model, a T420, which I still have. It's nice but I just don't like widescreen on a laptop
<veltas> I can't get over how much nicer a 4:3 laptop feels
<tp> the LCD is horrible on my thinkpad, but the keyboard is the absolute best as I hate 'chicklets'
<veltas> Hmmmm
<tp> I do everything on a PC tho
<tp> the lappie is only for Linux and emergencies
dys has quit [Ping timeout: 256 seconds]
<john_cephalopoda> I had a T60 or T61, unfortunately the soldered-on GPU broke and it was scrap.
<tp> the X61s has fantastic keys, real keyboard keys
<tp> john_cephalopoda, yeah, all lappies die a horrible death
<tp> it's the fate of all lappies to die horribly
<john_cephalopoda> My last two laptops were DELL and both died because of a broken screen. My current one is by Tuxedo. It broke after barely 3 months and I had to send it in. Power connector was broken and they had to send me a brand new laptop.
<veltas> Laptops definitely get used and abused
<john_cephalopoda> The previous connector sparked relatively often when plugging it in, so it might have been a bad device though.
<tp> they do
<tp> eww
<tp> thats bad luck, but they are fragile
<tp> one can only shoehorn so much pc into a tiny case
<tp> I grimace when I look inside laptops
<tp> they offend my technicians sensibilities
<john_cephalopoda> If applications weren't as bloated, we could all have a RasPi in our laptop cases and it would just work.
<tp> heh, no i strongly disagree!
<tp> .. we would only need a Z80 :)
<veltas> That's right lol
<john_cephalopoda> How is opcode encoding in a Z80? Is it pretty or is it a mess of shuffled bits like AVR?
<veltas> There are legit applications of more processing power and memory like cryptography
<veltas> john_cephalopoda: Not ugly
<tp> we all have 'smart phones' that need a charge every couple of days, but once I rode a motorbike around Australia and took a palm pilot with a Dragonball cpu with me
<veltas> It's not a very orthogonal processor though
<tp> the ride took 3 weeks and I didnt charge the Pilot once
<veltas> Yeah phones are rubbish
<tp> veltas, no it's not, and thats why I never liked the Z80 like I loved the 6800
<john_cephalopoda> tp: Still better than 'smart watches' which have to be charged after half a day ;)
<tp> my phone is a old nokia N9
<tp> john_cephalopoda, I have a smartwatch, the Xiaomi Amazfit Pace
<tp> it has a color transreflective display and is just awesome!
<tp> it only needs a charge every 4 -5 days
<tp> it's the single most robust and useful bit of hitech Ive ever owned
<tp> it has wifi and bluetooth but doesnt need a phone
<tp> currently the band is broken and Im making a new one
<tp> i wore the original band out
<veltas> I miss having a phone I would charge at most once a week
<crc> veltas: re: ~~~ see http://forth.works/chapters/general/retro-unu.html for some documentation on this
<tp> the nokia is oled and uses Linux with QT, no android
<tp> so even tho the N9 has only a single core, it's plenty fast
<tp> and the battery lasts at least 2 -3 days
<crc> and http://forth.works/examples/sea-level-rise.retro.html is the example tp mentioned concerning sea levels
* crc was afk, going through backlog now
<john_cephalopoda> My phone is a Motorola moto x⁴. When I tried it, it didn't like to get along with LineageOS at all. Also the back is made of glass, which is a stupid design decision.
<tp> tho motorola make good gear
<john_cephalopoda> After the glass broke, I just glued on a cut-to-shape piece of fleece and now I can actually put it down without having it slip around.
<tp> and glass probably doesnt interfere with the antenna system like metal
<tp> must be ordinary glass, or it hit a sharp edge ?
<john_cephalopoda> Plastic or composite material would work just as well.
<john_cephalopoda> It is ordinary glass.
<tp> I tested some really thin gorilla glass I took out of a phone, it was utterly impossible to scratch
<tp> in the end i busted it because I was using so much pressure on a knife blade to try and scratch it
<tp> and it was flat on a laminex table
<tp> plastic is a bit cheap tho ?
<john_cephalopoda> My first phone was some cheap LG feature phone. It was completely made out of plastic, even the screen. I could drop it as much as I wanted and it didn't break.
<tp> I bet they soon fixed that oversight ?
<john_cephalopoda> :þ
ACE_Recliner has joined #forth
<john_cephalopoda> I got two old phones here. I wish I was good enough at electronics that I could find out how they are working internally and how to flash new software onto them.
<tp> that's very hard I think because the radio part has binar blobs
<tp> then you have low power modes etc
<tp> even those really experienced have lots of trouble unles it's their design
<john_cephalopoda> Maybe the blobs can be extracted. Still hard to deal with it though.
<tp> theyre govt mandated sadly
<tp> you know how govts hate people talking to anyone they like
<tp> the radio mfr supplies the blobs and enough info to the phone maker to be able to use them
<tp> the phone mfr doesnt know anything about the blobs or the radio chipsets
<john_cephalopoda> Hm, that's sad.
<tp> thats why there are so few 'open source' phones, it's all tightly controlled by govt and telcos
<tp> but they can only suppress technology for so long
<tp> what will they do when musk has 42000 sats with 4 antennas each orbiting the earth ?
<john_cephalopoda> I wonder if people will ever start building big wifi antennas everywhere.
<tp> communication between everyone is inevitable
<tp> they wont need them
<john_cephalopoda> I am not sure if the satellite business will really work out the way Musk wants it.
<tp> the sats are only 250km straight up, musk will sell cheap pixxa size antennas for them
<tp> i think it will
<tp> I've been doing wifi the last 14 years
<tp> depens on govt interference and a lot of things also
<tp> but I think the concept is technically sound
<john_cephalopoda> The 2.4GHz frequency is free-for-all, so there isn't that much interference possible with that.
<tp> sure, he will use a private licensed freq I guess
<tp> then again, if the antenna is pointing up and has good side rejection, maybe it wont matter ?
<tp> wifi is LOS
<tp> no one really knows the detail yet
<tp> well I dont
<john_cephalopoda> Oh, I didn't know that he wanted to use something else for uplink. But it makes sense.
<tp> i didnt infer that did I ?
<tp> Im assuming that his antenna will do both
<tp> otherwise how would it work in the ocean far from land ?
<tp> i think he will probably have a number of licensed bands
<tp> to allow up and down and overlapping areas
<tp> but that whole thing is well above my pay grade
jsoft has joined #forth
dys has joined #forth
WickedShell has joined #forth
dys has quit [Ping timeout: 255 seconds]
john_cephalopoda has quit [Read error: Connection reset by peer]
jedb has quit [*.net *.split]
Monev has quit [*.net *.split]
rprimus has quit [*.net *.split]
john_cephalopoda has joined #forth
Monev has joined #forth
jedb has joined #forth
rprimus has joined #forth
Monev has quit [Max SendQ exceeded]
Kumool has joined #forth
xek_ has quit [Ping timeout: 260 seconds]
gravicappa has quit [Ping timeout: 255 seconds]
jpsamaroo has joined #forth
john_cephalopoda has quit [Quit: Leaving]
dave0 has joined #forth