boru has quit [Disconnected by services]
boru` has joined #forth
boru` is now known as boru
Zarutian_HTC has quit [Ping timeout: 260 seconds]
Zarutian_HTC has joined #forth
rdrop-exit has joined #forth
<rdrop-exit> good morning Forthwatchers c[]
iyzsong has joined #forth
cox_ has joined #forth
mark4 has quit [Remote host closed the connection]
cox_ has quit [Remote host closed the connection]
cox_ has joined #forth
cox_ has quit [Remote host closed the connection]
cox_ has joined #forth
cox_ has quit [Read error: Connection reset by peer]
dave0 has quit [Quit: dave's not here]
dddddd_ has quit [Ping timeout: 260 seconds]
<rdrop-exit> tp, just took a look at your Forth vs C example
<rdrop-exit> %0000 RCC_CFGR_HPRE bis! \ AHB prescaler: 0xxx: SYSCLK not divided
<rdrop-exit> this line won't actually do anything
<rdrop-exit> unless there's something I'm not groking about your "bis!" word
<rdrop-exit> I'm assuming your BIS! is equivalent to my SET ( mask a -- ) and not a masked store %32! ( x mask a -- )
<rdrop-exit> Maybe I just haven't had enough c[] yet
<tp> rdrop-exit, youre 100% correct, it is utterly redundant!
<rdrop-exit> ok, thanks
<tp> that one slipped thru somehow and it's something I do now and again due to brain not fully turned on
<rdrop-exit> If I've understood correctly, your various BIS! lines will only work as intended if you're sure the reset state for those bitfields is all-zeroes, any bitfields that have non-zero presets won't behave
<tp> it's innocuous usually, and in this case utterly ineffective anyway
<tp> it comes from me reading the datasheet and just configuring the desired value, then using the default "bis!"
<rdrop-exit> that is if my assumption about what your BIS! does is correct
<tp> it is
<rdrop-exit> ok, thanks
<rdrop-exit> for the clarification
<tp> a more accurate but also un-needed config would be "%1111 RCC_CFGR_HPRE bic! \ AHB prescaler: 0xxx: SYSCLK not divided
<tp> as the reset default is RCC_CFGR_HPRE = %0000 anyway
proteus-guy has quit [Ping timeout: 240 seconds]
<tp> this is an area I'm still working on and tried a few different strategies in the past
<tp> rdrop-exit, but I'm trying hard not to invent really complex 'solutions' and that's all Ive come up with so far
Lord_Nightmare2 has joined #forth
<tp> I've learnt enough by now to realise a complex solution means I dont understand the problem
Lord_Nightmare has quit [Ping timeout: 258 seconds]
<tp> 'a problem, dimly glimpsed" ...
Lord_Nightmare2 is now known as Lord_Nightmare
<rdrop-exit> :))
<tp> "every complex solution paves the way to understanding the simple solution at the end of the path"
<tp> I guess that's another lesson that Forth teaches, that all solutions no matter how wrong *need to be tried* before they can be eliminated from blocking the clear view of the solution ?
<tp> as opposed to C (and similar) where one spends time analysing the problem and writing code before actually trying it
<tp> here is a anecdote of my work. I spent about a year designing a special jig for partial termination of a specific and widely used connector
<rdrop-exit> I often think I understand something by reading or thinking about it, but I only grok it at the gut level through experimentation
<tp> it took that long for my mind to visualise something out of nothing as no such jig exists anywhere
<tp> rdrop-exit, 100% agree
<tp> so afetr 12 months I finally decided it was time to make the jig, which is fairly involved as it required very accurate hand milling of the metal parts
<tp> and lo and behold, my initial idea was a complete fail ...
jsoft has joined #forth
<tp> but from that prototype, my second attempt, applying the facts learned from the first was a total success
<Zarutian_HTC> tp: what was this connector?
<tp> Zarutian_HTC, sorry, commercial secret
proteus-guy has joined #forth
<Zarutian_HTC> some milspec multi feed monstrosity I expect
<tp> all I can say was that my jig reduced the time substantially, while also reducing failures to 0%
<rdrop-exit> tp works for Q Branch
<tp> hahah, it's a commercial project
<rdrop-exit> is my Aston Martin ready yet?
<tp> and because it saves so much time, I can't let anyone know what it is or my competitors would just copy it
<rdrop-exit> oops wrong channel
<tp> lol
<tp> i relate the story only because it's so similar to the way Forth works in embedded
<Zarutian_HTC> and no, milspec does not mean military specification as too many peeps belieave. It is basically a connector or some such specified in mils, which is better known as thous or thousands of an inch
<tp> it's also a bit like Elon Musks development method "dont spent too much time analysing a new thing to death, build it asap and when it explodes, find out why and iterate"
<tp> Zarutian_HTC, hahahah, depends on the country
<tp> the build fast and test way is so much faster than analyse to death and take forever to test
<Zarutian_HTC> or icelandic 'hillbilly' engineering. Rig something up, test it, find out why it failed and rig a better one
<tp> I believe that's the fastest and best way
<tp> and Forth is like that in embedded
<tp> I can have motor coil energised in minutes instead of hours, and my code can be totally throw away
<Zarutian_HTC> tp: no, it doesnt depend on the country. The milspec confusion arouse from a confused clerk thinking it stands for Military Specification.
<rdrop-exit> MIL-SPEC
<rdrop-exit> Defense Specification
<rdrop-exit> A document that describes the essential technical requirements for military-unique materiel or substantially modified commercial items. MIL-STD-961 covers the content and format for defense specifications.
<rdrop-exit> at least that's what the US thinks of as MIL-SPEC
<rdrop-exit> regardless of the origins
<Zarutian_HTC> rdrop-exit: MIL-SPEC is a non existant thing. I have asked, personally, an military tech that was stationed here at Keflavík about it and told me it is an clerkical mirrage
<tp> Zarutian_HTC, i wonder if he was 'pulling your leg' ?
<tp> technicians can be bastards ...
<Zarutian_HTC> rdrop-exit: many many documents and such only refer to MIL-STD
proteus-guy has quit [Ping timeout: 260 seconds]
<tp> I once told a very annoying director who was standing over me worried about a breakdown and who kept asking 'whats wrong with it' .... "the phase locked dipthon retarder is broken"
<Zarutian_HTC> tp: the story goes that a civilian clerk at a military base that handled logistical forms and such over heard two machinists talk
<tp> it's common Star Trek technobabble and I though he would have a laugh and go away
<tp> instead I was mortified to hear his reply "oh is that serious?"
<tp> the guy had no idea what was going on, and that was the last time I allowed anyone to bother me during a important breakdown that I was trying to fix
<Zarutian_HTC> tp: one of the machinist asked the other about how he got a part up to milspec and the confusion was born in the mind of the clerk
<tp> Zarutian_HTC, I see a few scenarios there
<Zarutian_HTC> and I asked the guy not at his work but at a crowded cafe here in town that we both happened to be at
<tp> Zarutian_HTC, I know that mill-spec here in Australia apllies to specs required for military use, for instance the mill-spec temperature range is wider than the commercial one ...
<tp> Zarutian_HTC, it has noting to do with millimeters :)
<Zarutian_HTC> so, what was the cause of the breakdown in that story?
<tp> i was in my mid 20's I only remember it because the director had no idea what I said
<tp> Zarutian_HTC, diring my life I have repaired, designed and built so much gear, I can only remember the really notable ones
<tp> Zarutian_HTC, I had a guy once aske me for a quote to repair something, and when I asked him what it was he was a bit shocked and replied 'you made it for me'
<Zarutian_HTC> yeah, this mils and millimeter confusion is why mils has been replaced with thou
<Zarutian_HTC> right, you told me before
<tp> Zarutian_HTC, both terms are in use for pcb making afaik, I use then all the time
<tp> to me mils=thou
<tp> but 'mill-spec' cant be confused with 'mills' to me, perhaps it the language ?
<Zarutian_HTC> mils are thou but the former has been banished from being used at the electronics tech school, many milling and such workplaces and quite a few design shops
<tp> Zarutian_HTC, and fair enough, probably not in America tho ?
proteus-guy has joined #forth
<tp> if your country is all METRIC it makes sense until you have to work with a american blueprint in "mils' ?
<Zarutian_HTC> milspec, only one L and the coiner thought it cute to reuse the s
<tp> oops
<tp> Zarutian_HTC, you with the Internet spelling police now ?
<tp> ;-)
<Zarutian_HTC> yeb metric but only the pitches of component footprints are in thous
<tp> Zarutian_HTC, and thats because the USA uses 'imperial' and they wrote all the semiconductor specs when they invented them
<Zarutian_HTC> traces from pads, thickness of pcbs all in millimeters or microns if you hate your pcb house
<tp> if Iceland had invented transistors they could be measured in 'miliaxehandles'
<Zarutian_HTC> oh, yes 'imperial' is right. Specially when American, British and Spanish imperial units are not quite the same
<tp> Zarutian_HTC, I havent used a pcb house since the 90's, tho the Chinese ones seem very cheap, but with the prospect of war on the horizon, that may cease abruptly ?
<Zarutian_HTC> tp: nope, the lead pitch and such would be measured in piddlins
<tp> Zarutian_HTC, well they invented them very early on, and standards take a while to settle down ?
<tp> heheh, 'piddlins' ?
<Zarutian_HTC> and pons
<tp> aha
* tp waits for his 1.5 cubic feet of food shopping to be delivered ...
<Zarutian_HTC> I have used pcbs manifactured by Chinese, German, Netherland, and Icelandic pcb houses
<tp> Ive only used PCB's by australian fabs
<Zarutian_HTC> the last one is just a side biz of an milling, lathe, and electro plating place
<tp> back in the 90's there was no china we were aware of
<tp> chinas meteoric rise was unexpected, and I suspect it's fall will be as fast
<tp> in a post covid-19 world
<Zarutian_HTC> crude as hell but I didnt have access to ferrocloride etching at the time and this was needed for a repair yesterday at the time
<Zarutian_HTC> I expect to see manifacturing of many things move yet again
<tp> me too
<tp> I have 4 litres of Ferric chloride here atm
<Zarutian_HTC> for instance, visay an indian firm in origin make excelent passives in both throughhole and surfacemount
<tp> they sure do
<tp> india is a rising star for sure
<tp> they also make 'heat absorbing' SMTs
<Zarutian_HTC> it replaced a tawanese firm that been the leader for many years
<tp> i expect we will also see the reascendence of Tiawan now
<tp> they were big once
<Zarutian_HTC> the thing is, if it was economically viable and not too ackward then many manifacturer would prefer to have their plants on or be ships
<Zarutian_HTC> because there is one thing that logisticans and top management hate is pointless geopolitical interference
<Zarutian_HTC> that is, logisticans and top at manifactures
<tp> exactly
merkc0 has joined #forth
rdrop-exit has quit [Quit: Lost terminal]
rdrop-exit has joined #forth
<rdrop-exit> veltas, quite a few Forths use hashing threads/chains, especially desktop ones with tons of words. Mostly for speeding up dictionary lookup, especially during compilation.
<rdrop-exit> It may be less common with today's fast PCs, but it was quite common before.
<rdrop-exit> It comes with some extra complication when appending to the dictionary, and especially when truncating the dictionary, e.g. FORGET.
<rdrop-exit> too many "especially" :)
<rdrop-exit> lunch is ready, catch you all later, stay healthy!
rdrop-exit has quit [Quit: Lost terminal]
gravicappa has joined #forth
merkc0 has quit [Ping timeout: 246 seconds]
merkc0 has joined #forth
mtsd has joined #forth
mtsd has quit [Quit: Leaving]
mtsd has joined #forth
jsoft has quit [*.net *.split]
koisoke has quit [*.net *.split]
klys has quit [*.net *.split]
dave9 has quit [*.net *.split]
DKordic has quit [*.net *.split]
cp- has quit [*.net *.split]
jsoft has joined #forth
cp- has joined #forth
dave9 has joined #forth
DKordic has joined #forth
klys has joined #forth
koisoke has joined #forth
cp- has quit [Max SendQ exceeded]
diginet2 has quit [Ping timeout: 246 seconds]
diginet2 has joined #forth
cp- has joined #forth
mtsd has quit [Quit: Leaving]
mtsd has joined #forth
dys has joined #forth
<merkc0> : D>$ ( d -- addr len) TUCK DABS <# #S ROT SIGN #> ;
<merkc0> : N>$ ( n -- addr len ) S>D D>$ ;
<merkc0> CR
<merkc0> 25 N>$ 1 . TYPE \ gives wrong output: 21 instead of 25
<merkc0> 25 N>$ TYPE \ correctly outputs 25
<merkc0> what's a good way (that doesn't require variables) to save the resulting string from N>$ , do some other actions, then TYPE that string ?
<patrickg> N>$ probably stores in a common buffer, so the "1 ." partially overwrites that ("." is probably akin to "N>$ type" itself). if you want to save the string, you have to decide where to put it
<merkc0> okay
reepca` has quit [Remote host closed the connection]
reepca` has joined #forth
karswell_ has joined #forth
mtsd_ has joined #forth
mtsd has quit [Ping timeout: 264 seconds]
mtsd has joined #forth
mtsd_ has quit [Ping timeout: 246 seconds]
WickedShell has quit [Remote host closed the connection]
dddddd has joined #forth
xek has joined #forth
cantstanya has quit [Ping timeout: 240 seconds]
cantstanya has joined #forth
nonlinear has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 246 seconds]
nonlinear has joined #forth
gravicappa has joined #forth
karswell_ has quit [Ping timeout: 246 seconds]
karswell_ has joined #forth
karswell_ is now known as karswell
TCZ has joined #forth
TCZ has quit [Client Quit]
<merkc0> how to check if a vocabulary already exists ?
rdrop-exit has joined #forth
<tp> haha
<tp> DKordic, yeah, I remember that one
<tp> the xkcd dude is seriously twisted!
<DKordic> XD
rdrop-exit has quit [Quit: Lost terminal]
<tp> I'm finishing my third article on the use of bitfield definitions atm
<tp> this one is a beauty and will drive my point home to all ages I think
<tp> I selected (someone elses) code at random to analyse and quite coincidentally, while using it, I discovered it contained exactly the kind of ambiguity my system is designed to avoid.
<tp> who can ask for more ?
<tp> As a young technician I would read the only magazine available for electronics in this country, "Electronics Australia" and I would go straight to the 'Servicemans' regular column, which usually involved a fascinating tale of him chasing some obscure electronics fault that one literally couldn't invent.
<tp> my aim is to make my Forth articles similarity interesting to readers, a lofty aim ....
<veltas> Well you know I'll read them ;-)
<tp> :)
<tp> only if theyre interesting
<tp> boring crap deserves to be ignored
<veltas> I won't know if they're interesting until I read them
<tp> thats why I start every article with "Blond bombshell has NIPSLIP!!!!"
<boru> Is this going to be an ezine, or something more like a blog?
<tp> boru!
<boru> Afternoon, old chap.
<veltas> At this rate it's going to be The Sun
<tp> boru, it's just my old fprth notes collection that I put online years ago
<tp> valhahah
<boru> Hmm, I see.
<tp> boru, every year or so I look back at it and think 'that was a pile of old tripe!"
<boru> I know the feeling.
<tp> boru, currently Im comparing the Keil C structures built with #defines for every possible bitfield combination (and them some) to my own bitfield definitions
<boru> Do people still use Keil? My goodness...
<tp> yeah, I guess ... it's owned by Arm Holdings thesedays
<tp> in fact Arm and it's vendors have a unsettling habit of buying independent software vendors and turning their products into s**t
<boru> Well, they have to make it align with their own internal software.
* boru coughs.
<tp> boru, a lot of C noobs who wish to avoid the horrors of HAL with STM32 soon are referred to the Keil CMSIS pack so they can partake of some excellent baremetal code vastly simplified in comparison
<tp> to me the advice sounds a lot like, why get the Black Death, diarrhoea is so much more pleasant ?
<veltas> I would choose diarrhoea over the black death
<tp> veltas, me too
<tp> but Id rather choose a nice bowl of pumpkin soup with fresh bread instead
<tp> which is what forth bitfields offer imho
<mtsd> I would, of course, go for the scandinavian eel plate
<mtsd> ;)
<boru> It's a shame that sort of thing is a solved problem; semi mfrs should just publish some document which is some parseable format from their RTL which enumerates all registers and their fields.
<tp> mtsd, :)
<boru> Directly from their RTL, I mean.
<tp> boru, that's what CMSIS does for ARM, and I find it very useful as Im always transforming it into something useful
<boru> And before you say it, I still consider DAP to be awful.
<boru> Well, CMSIS is moreso the API, no?
<boru> Like a really crap version of POSIX.
<tp> Ive never used DAP, and Im not about to argue with you, I dont need to thrashed withing a inch of my life by a stout irish strap
<boru> Though using structs for arguments has some merits for future-proofing.
* boru chuckles.
<boru> Anyway, that entire ecosystem is terrible.
<tp> CMSIS-SVD is the full name, it's just a XML file of all the usual register suspects
<boru> Ah, SVD might be what I am thinking about.
<tp> mempry maps, bitfields etc
<boru> Aye.
<tp> nothing special there except theye are all there!
<tp> and from that stage one can produce whatever
<tp> here is a single sample
<tp> \ RTC_ALRMAR (read-write) Reset:0x00000000
<tp> : RTC_ALRMAR_MSK4 ( -- x addr ) 31 bit RTC_ALRMAR ; \ RTC_ALRMAR_MSK4, Alarm A date mask
<tp> it's transformed to use the Forth I like, Mecrisp-Stellaris
<tp> and depending on the MCU, it may generate 17,000+ such definitions
<tp> such are the size and complexity of STM32 MCU's thesedays
TCZ has joined #forth
<tp> that particular one has *97* peripherals!!!
<tp> I mean, OH MY GOSH!!! 97 peripherals, are you SERIOUS ????
<tp> I'm from a time when CPU's came with exactly zero peripherals ...
<boru> I'd consider memory buses and I/O pins to be peripherals.
<boru> But I am just being a pedantic shite.
<tp> we were so por we didnt have I/O pins!
<tp> poor
<tp> our pins were repossessed!
<tp> anyhow, it's past this old geriatrics bedtime so I will say goodevening all!
<boru> Catch you later man.
TCZ has quit [Quit: Leaving]
mtsd has quit [Quit: Leaving]
karswell has quit [Read error: Connection reset by peer]
jsoft has quit [Ping timeout: 256 seconds]
iyzsong has quit [Ping timeout: 244 seconds]
Zarutian_HTC has quit [Ping timeout: 246 seconds]
TCZ has joined #forth
Zarutian_HTC has joined #forth
jsoft has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
Zarutian_HTC| has joined #forth
X-Scale has quit [Quit: Try HydraIRC -> http://www.hydrairc.com <-]
Zarutian_HTC| has quit [Ping timeout: 246 seconds]
TCZ has quit [Quit: Leaving]
Zarutian_HTC has joined #forth
xek has quit [Ping timeout: 256 seconds]
WickedShell has joined #forth
X-Scale has joined #forth
TCZ has joined #forth
jsoft has quit [Ping timeout: 264 seconds]
TCZ has quit [Quit: Leaving]
gravicappa has quit [Ping timeout: 258 seconds]
gravicappa has joined #forth
xek has joined #forth
gravicappa has quit [Ping timeout: 256 seconds]
Zarutian_HTC has quit [Remote host closed the connection]
merkc0 has quit [Ping timeout: 240 seconds]
Zarutian_HTC has joined #forth
gravicappa has joined #forth
remexre has quit [Quit: WeeChat 2.7.1]
reepca` has quit [Read error: Connection reset by peer]
reepca` has joined #forth
xek has quit [Ping timeout: 256 seconds]
gravicappa has quit [Ping timeout: 264 seconds]
remexre has joined #forth
dave0 has joined #forth