<Zarutian_HTC> hmm... I am now wondering about satellite stuff.
<Zarutian_HTC> tp, from where you are do you think you could "see" the satellite TELSTAR 18V ?
* Zarutian_HTC wanted to downlink Blockstreams broadcast but he lives outside the footprints (see https://blockstream.com/satellite/ )
<tabemann> back
<tp> Zarutian_HTC, I've no idea, probably not
<tp> Zarutian_HTC, I have no satellite gear, and Australia uses AUSSAT, a geo sync some 64,000km round trip
<tp> Zarutian_HTC, you need to wait for SpaceX's multiple sat leo constellation, that will be awesome
iyzsong has joined #forth
<tabemann> now I'm wondering what to do next with zeptoforth
<tp> tabemann, do you have 'pictured numerical output' yet ?
<tabemann> no I don't
<tabemann> I don't know how that works, TBH
<tp> you cant use my svd2forth register pretty prints if you dont
<tp> you know it's just a print formatter like the C "printf" stuff, but very powerful ?
<crest> tabemann: there is a global buffer for formatted output
<crest> you reset it with <#
<crest> add one digit to it with #
<tabemann> yes
<crest> this works by divding the double word on the stack by the base
<crest> #> finishes the conversion and drops the double word
<tabemann> I... don't yet have support for double worods
<tabemann> *words
<crest> replacing it by the address and length of the buffer
<crest> in between <# and #> you format your numbers
<tabemann> because I don't know how to multiply or divide double words
<tabemann> because Thumb-2 has no double word multiply or divide instructions
<tp> I dont have support for double wo-rods either, am I missing out ? whats a single wo-rod do anyway ?
<crest> but does it have a 32x32->64 multiply?
<tabemann> *word
<Zarutian_HTC> crest: dont forget #s and that word that allows you to add chars to the buffer
<tabemann> crest: nope
<crest> Zarutian_HTC: and hold for fixed stuff like units
<tp> tabemann, then maybe add support for doubles ?
<crest> doesn't #s just repeat # until the number is zero?
<tabemann> tp: the problem is that I don't know how to implement multiply and divide for doubles
<crest> (if you want to get fancy)
<crest> if you have just 32x32->32 split the number into 16bit parts
<crest> do it just like you would do multiplication with pen and paper
<crest> just that your base is 2^16 instead of 10
<crest> do you remeber the annoying multiplication tables you had to learn in school?
<tp> yes
<crest> well the cpu multiplication instruction is just such a table (it's implemented differently)
<crest> every 16 bit multiplication fits into a 32bit register
<tp> tabemann, dont listen to crest ... just use the floating point peripheral on your mcu!
<tp> ;-)
<tabemann> lol
<crest> tp: because?
<tp> crest, easier ?
<crest> he just wants 64 bit multiply not true bignums
<crest> does the fpu have 32x32->64 multiplier?
<tp> i know, my comment was in jest
<tp> probably
<tp> being a M4
<crest> normally ieee754 fpus contain just 56 bit multipliers for the mantissa
<tp> ahh!
<tp> actually Im a fixed point lover
<crest> if you have a fast fpu and no 32x32->64 multiplier you can certainly speed up large bignum operations by using larger limbs
<tp> 27,75 C
<tp> 81,94 F
<tp> temp at my desk at 10:36 am
<crest> because all realworld multiplications algorithms have superlinear runtime
<crest> last year there was a new breakthrough in multiplication algorithms
<crest> they claim to have beat n*log(n) long thought to be the lower bound for multiplication
<crest> but it only beats the existing algorithms for number with > 2^100 *digits*
<crest> as in larger than 10^2^100
<crest> which is insane
<tp> yeah
<tp> not that useful on a cortex-m
<crest> the algorithm may be fast but you could still bruteforce most 128bit ciphers in less time
<tabemann> back
<tabemann> I have another question
<tabemann> what about 64-bit division?
<tp> tabemann, didn't you learn your 64 bit tables at school ?
<tabemann> lol
X-Scale has quit [Ping timeout: 256 seconds]
[X-Scale] has joined #forth
[X-Scale] is now known as X-Scale
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
* tabemann is going to buck the ANS people can make his <# # #> use single words
<tabemann> partially because while the Karatsuba algorithm seems simple on the surface but is too complex in practice
rdrop-exit has joined #forth
<tabemann> hey
<rdrop-exit> c[] good morning tabemann
<tabemann> does anyone here know how to do doubleword division on a machine without a 64-bit divide instruction?
<dave0> hi tabemann
<tabemann> hey
<dave0> i have code for that, but it's slow cos i goes a bit at a time
<dave0> lots of shifts
<dave0> is that okay?
<dave0> ah divison.. one sec
<dave0> tabemann: 64 bit dividend divided by 64 bit divisor to give a 64 bit quotient and 64 bit remainder ?
<tabemann> yes
<dave0> gimme a minute
<rdrop-exit> double by single is probably more useful
<rdrop-exit> e.g. 64 by 32
<tabemann> double by single would probably work for me actually, since I'm dividing by BASE
<dave0> it's for amd64 and you will need to modify it to use 64 bit registers
<dave0> also it's for gnu as in intel mode
<tabemann> this is for Cortex-M4
<dave0> that's arm?
<dave0> you'll have to port it :-(
<dave0> i'm quite sure i tested the algorithms (with brute force)
<tabemann> yes, Cortex-M4 is ARM
<rdrop-exit> I have 64 by 32 => 32 in C if you like
<rdrop-exit> sorry I mean 128 by 64 => 64 in C
<tabemann> are you using __int128? ;)
<rdrop-exit> I have without
<rdrop-exit> let me figure out how to paste it somewhere
<dave0> rdrop-exit: if you like command line (netcat/curl/wget) i use https://paste.c-net.org/ for binary files and termbin.com for text
<dave0> this is what i used just then for PaddleMorse: curl --upload-file um.zip https://paste.c-net.org/
<dave0> and for text: nc termbin.com 9999 < file.c
<rdrop-exit> I used this pastebin thingie
<dave0> cool
<tp> I use wgetpaste :)
<rdrop-exit> I use different ones every time, I keep forgetting which one I prefer
<tp> forgetfulpaste ?
<rdrop-exit> ;-)
<dave0> rdrop-exit: aha you don't use bit-shifts
<tp> and octal ;-)
<dave0> you estimate with a smaller division and fix it up to the true quotient
<dave0> that's faster
<rdrop-exit> I forgot to paste in the U64 etc defines
<rdrop-exit> #define U64 uint64_t
<rdrop-exit> No warranties explicit or implied BTW
<Zarutian_HTC> gn
Zarutian_HTC has quit [Quit: Bye]
cantstanya has quit [Ping timeout: 240 seconds]
cantstanya has joined #forth
dddddd has quit [Ping timeout: 240 seconds]
<tabemann> cI've found a problem with the use of the Karatsuba algorithm
<tabemann> it doesn't take into account carries
<rdrop-exit> Karatsuba is for huge numbers, I don't think you need it
<rdrop-exit> ah wait, maybe I'm confusing it with another algorithm
<rdrop-exit> I provided you with a MULH in that paste
<dave0> tabemann: you have to worry about negative numbers too :-/
<tabemann> dave0: oh, I'm taking negative numbers in question
<rdrop-exit> the MULH gives you the high order bits of a product, it'll work with either signed or unsigned
<rdrop-exit> since it's a macro
<tabemann> rdrop-exit: I'm only using one stage of Karatsuba
dave0 has quit [Quit: dave's not here]
<rdrop-exit> Have a look at the MULH, it's based on that
WickedShell has joined #forth
<rdrop-exit> the ARM assembler provides a MULH macro if I understood this page correctly
<rdrop-exit> bbiab
webchat9 has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
_whitelogger has joined #forth
rdrop-exit has quit [Ping timeout: 264 seconds]
rdrop-exit has joined #forth
xek has joined #forth
gravicappa has joined #forth
mtsd has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
dys has joined #forth
rdrop-exit has joined #forth
mtsd has quit [Quit: Leaving]
mtsd has joined #forth
rdrop-exit has quit [Ping timeout: 264 seconds]
rdrop-exit has joined #forth
mtsd has quit [Quit: Leaving]
mtsd has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca` has joined #forth
dddddd has joined #forth
dave0 has joined #forth
mtsd_ has joined #forth
mtsd has quit [Read error: Connection reset by peer]
mtsd_ has quit [Client Quit]
WickedShell has quit [Remote host closed the connection]
webchat9 has quit [Quit: Leaving]
mtsd has joined #forth
diginet2 has quit [Quit: diginet has left the building]
diginet2 has joined #forth
Kumool has quit [Quit: FreeZNC - Visit us! Server: chat.freenode.net Channel: ##bnc4you]
Kumool has joined #forth
rdrop-exit has quit [Quit: Lost terminal]
reepca` is now known as reepca
mtsd has quit [Quit: Leaving]
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
<crest> rdrop-exit: the link looks like arm64 documentation to me
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
<tp> crest, how does that layout look ? http://dpaste.com/32P85R2
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
<tabemann> someone pointed me at some code for implementing D* and DU/MOD.... but it turns out the code is probably proprietary since it is part of SwiftForth... ugh
<crest> tp: about as readable as possible with limited amount of plaintext
<tp> crest, ta
<crest> maybe pad with spaces instead of leading zeroes
<tp> tabemann, what about the Mecrisp-Stellaris code ?
<tabemann> tp: hadn't thought of that
<tp> crest, hadn't thought of that
<tp> :)
<tp> crest, I have a dim recollection that I did the 8 char printout for a reason
<tp> crest, but for the life of me I cant recall
<crest> take a look at line 3
<tabemann> I need to get off to work
<tabemann> bbl
<tp> crest, in any event it's a generated number, changing it wont save code space in the chip
<tp> cya tabemann
<crest> tp: sure but it might improve readabilty
<crest> why pad the index in decimal with leading zeroes?
<tp> i'll set my subconscious to work on it soon when Im asleep!
<tp> theyre hex
<tp> but same question I guess
<crest> line 3 counts in decimal unless you suddenly have $15 pins per port
<crest> * $16
<crest> how many columns are you prepared to use?
<crest> 64? 80? 120? even more?
<tp> I think just the default 80
<crest> because the longest line in your example is just 64 so you could add little more whitespace to make it easier to read
<tp> youd think so :)
<tp> but the Mecrisp-Stellaris print formatter is limited to 64 chars
<crest> okay
<tp> I cant generate any more than that, I tried everything initially
<crest> in that case you did the best layout possible within the 64 byte buffer
<tp> yeah, it does the job at least
<tp> any formatted register is better than none imho
dys has quit [Ping timeout: 256 seconds]
<crest> it's readable but very dense (visually)
<tp> yeah
<tp> i manually label registers for the f051 like this
<tp> RCC_APB1ENR RW $00000000
<tp> I I A S W T
<tp> U
<tp> C D P 2 2 R P W I T T T
<tp> E A W C C T I D M I I I
<tp> C C R 2 1 2 2 G 1 M M M
<tp> E E E E E E E E 4 6 3 2
<tp> N N N N N N N N E E E E
<tp> |3|2|2| |2|2| |1| |1| |1| N N N N
<tp> ~|0|9|8|~|~|~|~|~|2|1|~|~|~|7|~|~|4|~|~|1|~|~|8|~|~|~|4|~|~|1|0
<tp> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
<tp> and add them as I get to them in a project
<crest> nice but to much work
<crest> *too
<tp> actually it's pretty fast
<tp> I use gvim in replace mode
<crest> but it requires manual work for each new chip
<crest> unless you can extract the names from the xml files
<tp> and the effort is worth it when running up a infamiliar peripheral, it's either this or have a PDF taking up space on the screen
<crest> it's very useful
<crest> but takes time
<tp> yeah, It could be automated but way beyond my skills
<tp> such a program would be handy for the other chip users who just get a simple default legend
<tp> in my case, doing the legend is also educational for peripheral introduction
<tp> I take the names from the datasheet, but never thought about taking them from the SVD
<tp> ah well, zzz time here
<tp> catch ya on the morrow!
dave0 has quit [Quit: dave's not here]
<crest> tp: your output looks good enough
guan has quit [Ping timeout: 245 seconds]
guan has joined #forth
TCZ has joined #forth
TCZ has left #forth ["Leaving"]
dys has joined #forth
<veltas> : 0<> 0= 0= ;
<DKordic> Law of the Excluded Middle? ;)
<veltas> Quite so :D
dys has quit [Ping timeout: 240 seconds]
nonlinear has quit [Read error: Connection reset by peer]
nonlinear1 has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
Croran has quit [Ping timeout: 260 seconds]
jsoft has quit [Ping timeout: 265 seconds]
Croran has joined #forth
pareidolia_ has quit [Ping timeout: 265 seconds]
pareidolia has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
Zarutian_HTC has joined #forth
TCZ has joined #forth
Zarutian_HTC has quit [Ping timeout: 256 seconds]
dave0 has joined #forth
Zarutian_HTC has joined #forth
gravicappa has quit [Ping timeout: 256 seconds]
WickedShell has joined #forth
TCZ has quit [Quit: Leaving]
<veltas> There are definitely some things Forth seems to do nicer than C-style languages
<veltas> I like the way that you can chain together binary ops
<veltas> Like in C you might have min(max(t, 1), 100) to keep t within 1 and 100
<veltas> And in Forth it's: 1 max 100 min
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
reepca has quit [Ping timeout: 258 seconds]
reepca has joined #forth
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` is now known as X-Scale
<tabemann> I got a solution to D* and DUM/MOD... but the problem is that DUM/MOD requires UM/MOD, and I don't have an instruction for that
<dave0> tabemann: were you able to translate my amd64 code for um/mod ?
TCZ has joined #forth
<tabemann> I don't need code for UM*, because I realized there's a Thumb-2 instruction that can be used for it, 32x32+64 multiply/accumulate
<tabemann> I'll take a look at your code for UM/MOD though
TCZ has left #forth ["Leaving"]
<dave0> aah cool.. that will be way faster
TCZ has joined #forth
TCZ has quit [Quit: Leaving]
TCZ has joined #forth
<tabemann> unfortunately I can't read AMD64 asm
<tabemann> maybe I'm too used to ARM/Thumb asm
<dave0> fair enough
<dave0> i can't read arm :-p
<dave0> i could write it in c if you want, it will just take a while