<DKordic> veltas: Why not?
<veltas> Space is why not
<veltas> And so I am sticking to conventional stuff
<veltas> I thought I'd ask since it's not in Forth 2012
<veltas> I am tempted to add it just because I already tripped up trying to 'think' with only < and >, I am too used to having <= and >=
<DKordic> ToS is the first Argument so "1 0 -" is correct, and the other one like in GForth is twisted.
<veltas> What?
<MrMobius> : <= swap > ;
<DKordic> " 1 0 - -1 = "
<veltas> MrMobius: wrong
<veltas> But well intentioned
<DKordic> GForth has "-" swapped for no good reason. Although it is at least documented, as an excuse for RPN.
<veltas> So 1 2 - becomes 1?
<veltas> I did not realise this when I used GForth! That is nasty
<veltas> MrMobius: My > is : > SWAP < ;
<dave0> but shouldn't it be 2nd - TOS ? so 5 3 - 2 * p gives 4 ? when you convert infix to postfix ?
<veltas> Are you in every channel?
<dave0> (5 - 3) * 2 ==> 5 3 - 2 *
<DKordic> In GForth, and I guess most Forths, " 1 2 - -1 = ".
<veltas> DKordic: That is what I thought was correct
<veltas> So what are you saying is correct?
<DKordic> I disagree.
<veltas> It makes a lot more sense if the expression doesn't change order, you just put the operators "on the right"
<dave0> veltas: i'm not a stalker if that's what you mean ;-p
<veltas> Nah more like "it's a small world after all" on IRC
<DKordic> " 0 - " should be " negative ".
<veltas> Okay DKordic that is your opinion
<veltas> I much prefer the one where maths is more readable though
<dave0> : negate 0 swap - ;
<veltas> That is an idea
<veltas> I have that in assembly right now, will be nicer and shorter in forth
<DKordic> I do not care about ""maths"" nor ""readable"" nor ""readable maths"" ;) .
<MrMobius> veltas, wrong but well intentioned :P
<veltas> What is wrong about it?
<MrMobius> your > is true when both are equal
<veltas> If both are equal < will be false
<MrMobius> not just when a > b
<veltas> I think you're confusing SWAP with INVERT somehow
<veltas> Like < is literally just > written the other way around, hence SWAP
<dave0> i think this is right : <= > =0 ;
<veltas> Yes that too
<MrMobius> lol
<veltas> 0= but yes
tabemann has joined #forth
<dave0> oh right haha
<veltas> What is the OOP sequel to Forth called?
* dave0 <== still a newbi
<dave0> e
<veltas> Is it Forth 1+ ?
tabemann has quit [Client Quit]
<veltas> Me too dave0 I know what it's like
<veltas> dave0: That has got my NEGATE down to 15 bytes from 25 bytes
<dave0> lol cool !
tabemann has joined #forth
<dave0> someone here has an interesting word like (a b flag) where it returns a if flag is true, else it returns b
<dave0> you could make it branchless
<dave0> or constant time, so you could use it in crypto
<dave0> i saw some assembly code in openssl to do that.. copies a or b to r depending on a flag
<veltas> Very cool
<veltas> Weirdly it helps to have branchless code in Z80 as well, if timing matters, because branches usually take longer than passes
<tabemann> back
<tabemann> hey guys
<veltas> Hello
<tabemann> busy testing zeptoforth on stm32f407 to see if it spontaneously reboots again
<tabemann> even though tp said that he had been running it on his for hours withoug any problem
rdrop-exit has joined #forth
<tabemann> hey
<rdrop-exit> hi tabemann
<rdrop-exit> need coffee brb
<tabemann> I think I've discovered a problem with the f407 when it's clocked too fast, namely that it randomly reboots
<tabemann> the weird part is that tp doesn't get this problem with zeptoforth and I do
<tabemann> tpbsd
<tabemann> it seems I've solved the problem - by slowing down the clock
<tpbsd> tabemann, my unit has been on since we last talked here, no resets
<tabemann> weird
<tabemann> at 168 MHz mine was regularly resetting
<rdrop-exit> dave0, negate is "not 1+" in 2's complement
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<rdrop-exit> hi tp
<tpbsd> rdrop-exit, Zen Forth Guru!
tabemann has quit [Ping timeout: 240 seconds]
<rdrop-exit> dave0, or equivalently "1- not"
tabemann has joined #forth
<tabemann> back
<tabemann> last thing I saw was <rdrop-exit> dave0, negate is "not 1+" in 2's complement
<rdrop-exit> dave0, or equivalently "1- not"
<rdrop-exit> tabemann, there's a site that has the Forth IRC log
<rdrop-exit> in case your chat program is losing lines
<tabemann> okay, for what got lost:
<tabemann> my thought is your machine provides more power to the board than mine
<tabemann> so at 168 MHz it was occasionally having brownouts
<tabemann> on my machine
<tabemann> because now at 120 MHz it's not rebooting anymore
<tpbsd> tabemann, mine is powered by two usb psu's, you may be right
<tpbsd> tabemann, Ive removed one psu, now it's powered by a usb3.3v dongle
<tpbsd> tabemann, I've just measured the current drawn by the entire boar, it = 0.09 A
<tpbsd> thats only 90 mA
jsoft has joined #forth
<tabemann> interesting
<tabemann> why would mine be unstable at 168 MHz while yours is not?
<tpbsd> hmm I reset the board and my dinky USB power meter now shows 0.17 A
<tabemann> are you running the code with my sleep in place?
<tabemann> search task.fs for "sleep" (without quotes)
<tpbsd> by comparison my M0 running at 75 Mhz (overclocked) board draws 0.02 A
<tpbsd> just loading basic.fs atm
<tpbsd> tabemann, how do I compile basic.fs into flash ?
<tabemann> the kernel + basic.fs does a spinwait
<tabemann> tpbsd: when you load it it should do it itself
<tabemann> the first non-comment, non-blank line in basic.fs is compile-to-flash
<tpbsd> it doesnt compile into ram by default ?
<tabemann> no
<tabemann> it's essentially everything you'd want to have which isn't in the kernel and isn't stuff like systick, interrupt USART, multitasking, or extra peripheral drivers (e.g. LEDs)
<tpbsd> oops, sillme I should have checked!
<tabemann> so naturally it'd compile itself into flash
<tabemann> what, have you been reloading basic.fs every time you power cycle?
<tpbsd> and it is, I can reboot and "words" is still there
<tpbsd> yeah
<tabemann> that's a good way to eat up flash quickly
<tabemann> basic.fs is pretty large these days
<tpbsd> It didnt give me a heap of 'redefined' warnings
<tpbsd> 20k
<tabemann> that's because zeptoforth currently doesn't have those
<tpbsd> no problemo
<tpbsd> it's going well at this early stage!
<tpbsd> I meant it more as Im so used to seeing 'redefined' so I just assumed ....
<tabemann> I should make a mechanism to compress code compiled to flash by omitting a lot of the padding optionally
<tpbsd> I havent loaded task.fs as yet
<tpbsd> how do I erase flash to get rid of all the many basic.fs ?
<tabemann> unfortunately I don't have erasure implemented for the f407 yet
<tabemann> so basically you have to st-flash erase
<tpbsd> ah ok
<tpbsd> I should have thought of that myself!
<tpbsd> tabemann, I see "sleep" is commented out in task.fs
<tpbsd> I havent loaded task.fs as yet
<tabemann> okay, so task.fs will do a busy-wait
<tpbsd> do you want it loaded ?
<tpbsd> do you want the sleep uncommented ?
<tabemann> the reason to have it commented is that I was having IO problems with sleep in place
<tpbsd> i know
<tpbsd> you want me to try it ?
<tpbsd> why did you mention it above ?
<tabemann> I was asking because if it did work for you, having sleep in place might reduce power usage
<tpbsd> oh ok, easily done
<tabemann> and I didn't know if you had it in place or not
<tpbsd> not yet, I'll try it now
<tabemann> it likely will fail to load source files after loading task.fs with that in place
<tpbsd> hey that was cool!
<tpbsd> the sleep command was run, power dropped to 0.07A and when I hit enter it woke up and gave the prompt, but then halted wi*** exit status: 0 **"th "
<tpbsd> so looked good, just raised a exception on retirning from sleep I guess
<tpbsd> reboot and then running "sleep" results in it staying asleep
<tpbsd> so youre pretty close I think
<tpbsd> so real power usage for the whole board is 0.17 A or 170 mA
<tpbsd> which is pretty high
<tabemann> back
<tabemann> I added code compression
<tabemann> and got basic.fs down to 13K
<tabemann> exit status: 0 isn't an error message zeptoforth produces
<tpbsd> so where did it come from ?
<tabemann> sounds like an error from sleep
<tabemann> zeptoforth doesn't have numeric error codes
<tpbsd> sleep produces a error on th terminal ???
<tabemann> errors in zeptoforth are actually all functions that, when called, produce a human-readable error message
<tpbsd> : handle-waiting-tasks ( task -- ) ok
<tpbsd> dup task-active @ 1 < ok
<tpbsd> ok
<tpbsd> ok
<tpbsd> dup start-task @ = if ok
<tpbsd> ok
<tpbsd> over task-wait @ or ok
<tpbsd> ok
<tpbsd> over task-systick-delay @ -1 <> ok
<tpbsd> ok
<tpbsd> systick-counter @ 3 pick task-systick-start @ - unable to parse: systick-counter
<tpbsd> ok
<tpbsd> 3 roll task-systick-delay @ u< and or stack underflow
<tpbsd> ok
<tpbsd> if not compiling
<tpbsd> ok
<tpbsd> sleep
<tpbsd> *** exit status: 0 ***
<tpbsd> but zeptoforth produces the "*** exit status: ***" ?
<tpbsd> the 0 comes from the MCU ?
<tabemann> that's probably because the usart2 clock isn't awake in low power mode
<tabemann> which would be a bug
<tpbsd> ah yes, I thought that might be the case
<tpbsd> easy to fix tho
<tabemann> also, you forgot to load systick.fs
<tabemann> you need to load that before task.fs
<tpbsd> oh!
<tpbsd> Ill try that all again then
<tpbsd> I'm using Picocom, I cant run e4thcom on FreeBSD
<tabemann> and now I know why usart2 isn't waking up - the systick wasn't active to wake it up
<tpbsd> ill erase and reload everything
<tabemann> so there's a bug in how usart2 is configured
<tabemann> but systick at least partially masks it
<tpbsd> ok
<tpbsd> brb
<tpbsd> what files should I load and in what order ?
<tabemann> back
<tabemann> look at src/stm32f407/forth/setup.fs
<tpbsd> ok
<tabemann> it's not really a forth source file as much as a bunch of directives for e4thcom
<tabemann> aside from the (useless on F407) cornerstone at the end
<tpbsd> oh ok
<tpbsd> setup.fs is fine for what I need
<tpbsd> tabemann, do you have a list of zeptoforth compiler error warnings ?
<tpbsd> or a grep suggestion to find them ?
<tpbsd> tabemann, should it reboot after loading systick ?
<tpbsd> ['] systick-handler systick-handler-hook ! ok
<tpbsd> SYST_CSR_TICKINT SYST_CSR_ENABLE or SYST_CSR bis! ok
<tpbsd> ; ok
<tpbsd> ok
<tpbsd> ok
<tpbsd> ok
<tpbsd> ok
<tpbsd> ok
<tpbsd> \ Reboot ok
<tpbsd> ok
<tpbsd> reboot
<tpbsd> *** exit status: 0 ***
<tabemann> back
<tabemann> yes
<tpbsd> i just realised I can look in the source, <doh> Im a bit dumb today
<tpbsd> must be the zeptovirus
<tabemann> you're not dumb at all
<tpbsd> well done tabemann !!!
<tpbsd> 0.07 A quiescent and all working
<tpbsd> thats impressive
gravicappa has joined #forth
<tpbsd> the actual cpu power will be a lot less as I'm measuring the whole board atm
<tpbsd> I'll dig out my shielded multimeter measuring gear later and determine the power with better accuract
<tpbsd> one problem measuring the power is all the RF on the board which affects a sensitive moiving coil meter
<tpbsd> ok
<tpbsd> : happy ." only 0.09A ! cr ; unable to parse: only
<tpbsd> oops
<tpbsd> : happy ." only 0.09A ! " cr ; ok
<tpbsd> happyonly 0.
<tpbsd> : happy1 ." only 90 mA " cr ; ok
<tpbsd> ok
<tpbsd> happy1only 90 mA
<tpbsd> : happy2 cr ." only 90 mA ! " cr ; ok
<tpbsd> only 90 mA !
<tpbsd> happy2
<tpbsd> ok
<tpbsd> hmm
<tpbsd> : happy3 cr ." Zeptoforth is asleep and the F4 Disco is only using 90 milliamps " cr ; ok
<tpbsd> Zesco is only usin
<tpbsd> happy3
<tpbsd> ok
<tabemann> back
<tpbsd> tabemann, no I'm not dumb, but I'm dumb today :)
<tpbsd> very impressed here tabemann, you have the basics working with terminal and sleep
* tabemann is messing around with interrupt priorities to no avail
<tpbsd> we have some interrupt words
<tpbsd> : interrupt-priority ( c irq# -- ) \ $00 is highest
<tpbsd> $E000E400 + c!
<tpbsd> $E000E400 + c@
<tpbsd> : interrupt-priority@ ( irq# -- c )
<tpbsd> ;
<tpbsd> ;
<tpbsd> thats for a F0
<tabemann> interrupt priorities are more complex than that on the F407
<tabemann> okay, it should now properly set interrupt priorities
<tabemann> but I must go to bed, so g'night
gravicappa has quit [Ping timeout: 265 seconds]
WickedShell has quit [Remote host closed the connection]
_whitelogger has joined #forth
rdrop-exit has quit [Read error: Connection reset by peer]
rdrop-exit has joined #forth
gravicappa has joined #forth
reepca has quit [Ping timeout: 265 seconds]
rdrop-exit has quit [Read error: Connection reset by peer]
rdrop-exit has joined #forth
gravicappa has quit [Ping timeout: 256 seconds]
_whitelogger has joined #forth
gravicappa has joined #forth
rdrop-exit has quit [Ping timeout: 264 seconds]
rdrop-exit has joined #forth
xek has joined #forth
mtsd has joined #forth
proteusguy has quit [Remote host closed the connection]
nonlinear has quit [Ping timeout: 256 seconds]
proteusguy has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
rdrop-exit has joined #forth
nonlinear has joined #forth
rdrop-exit has quit [Read error: Connection reset by peer]
rdrop-exit has joined #forth
_whitelogger has joined #forth
rdrop-exit has quit [Ping timeout: 240 seconds]
dave0 has quit [Ping timeout: 258 seconds]
dave9 has quit [Ping timeout: 258 seconds]
dave0 has joined #forth
dave9 has joined #forth
iyzsong has joined #forth
jsoft has quit [Ping timeout: 240 seconds]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 260 seconds]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 260 seconds]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
iyzsong has quit [Quit: ZNC 1.7.1 - https://znc.in]
dddddd has joined #forth
mtsd has quit [Quit: Leaving]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
dave0 has quit [Quit: dave's not here]
rdrop-exit has joined #forth
rdrop-exit has quit [Ping timeout: 256 seconds]
rdrop-exit has joined #forth
tabemann has quit [Ping timeout: 256 seconds]
rdrop-exit has quit [Quit: Lost terminal]
jsoft has joined #forth
jsoft has quit [Ping timeout: 260 seconds]
Zarutian_HTC has joined #forth
actuallybatman has quit [Ping timeout: 264 seconds]
actuallybatman has joined #forth
crab1 has joined #forth
<crab1> Hiya folks
<jackdaniel> o/
<crab1> what's up?
<jackdaniel> corona, clim and a can of beer, nothing forthy I'm afraid :)
<crab1> nothing forthy at my end either, I need to parse JSON though :(
<crab1> I hate JSON
<crab1> also I'm getting months old statements in the mail
* jackdaniel recommends a can of beer
<crab1> I can't drink beer :(
<jackdaniel> underaged or the health issues?
<crab1> I have celiac disease, and beer has gluten from wheat
<jackdaniel> that must be annoying for you
<crab1> yeah
<crab1> I am also underage but
<crab1> that doesn't mean I don't drink ;)
<jackdaniel> hey, nobody said "xor"
<crab1> It sucks too because before I was 16 I had no issues and had the opportunity to eat/drink whatever I wanted, and then that was taken away
<jackdaniel> life brings more dissapointments with time
<jackdaniel> but also plenty of joy, no worries :)
<crab1> Hopefully, there are lots of disappointments
xek has quit [Read error: Connection reset by peer]
Zarutian_HTC| has joined #forth
Zarutian_HTC| has quit [Read error: No route to host]
Zarutian_HTC has quit [Read error: No route to host]
Zarutian_HTC has joined #forth
gravicappa has quit [Ping timeout: 265 seconds]
WickedShell has joined #forth
dne has quit [Remote host closed the connection]
dne has joined #forth
dave0 has joined #forth
Keshl has quit [Read error: Connection reset by peer]
Keshl has joined #forth
crab1 has quit [Read error: Connection reset by peer]
dave9 has quit [Quit: dave's not here]
dave9 has joined #forth
crab1 has joined #forth
<crab1> Good evening forth folks
<Zarutian_HTC> good evening. Been looking for the name genarator code used in Final Fantasy ?V or VII? on the GameBoy
<Zarutian_HTC> had an old bookmark but have lost it and expect it to have succumbed to linkrot
<Zarutian_HTC> it basically took in prng seed and came back with a name string
<Zarutian_HTC> trying to google or duckduckgo for it only turns up the GB roms and irrelevant search noise
<Zarutian_HTC> I probably have to dig through the disassembly of those roms to find it again
<Kumool> Zarutian_HTC: have you looked in romhacking.net?
<Zarutian_HTC> nope but I will
<Zarutian_HTC> now in fact
<Kumool> everything is there
<Kumool> or umm, that other website I forgot about
<crab1> Hm I've never played with that stuff
<crab1> too proprietary for me :(
<Kumool> Zarutian_HTC: https://tcrf.net/
<Kumool> bless tcrf
<Kumool> crab1: everything that's fun is proprietary
<Kumool> theres no FFV for the gameboy though
<crab1> "everything that's fin is proprietary" how
<crab1> s/fin/fun
<Zarutian_HTC> Kumool: you sure?
<Kumool> greed crab1, greed
<crab1> greed is no fun
<Kumool> greed is fun for the instantiator I guess
<crab1> Maybe for a time, but it probably doesn't remain fun
<Kumool> Zarutian_HTC: and I'm not sure of anything, if however you had found a name generator and the bastard didn't release it in github or romhacking, f that guy
<Kumool> crab1: video games are mostly propietary, which are quite fun
<crab1> greed is usually rooted in like fear or feelings of insecurity so it can't be too much fun in the end
<Kumool> for when having fun, means just that and not having a headache
<Zarutian_HTC> the issue was that github had not existed at the time when the person had extracted the generator from the rom
<Kumool> Zarutian_HTC: sourceforge probably did
<Zarutian_HTC> not sure if romhacking existed back then
<crab1> how long ago was this?
<Kumool> gosh, is it in some geocities websites or some sort of yahoo group then?
<Zarutian_HTC> the thing is, the extracted name algo had been translated into simple javascript
<Kumool> that's nice
<Zarutian_HTC> i am currently going thriugh rom maps of the ff
<Zarutian_HTC> s
<Zarutian_HTC> just mad at meself for not saving that thing on my computer
<Kumool> why do you want it btw?
<Kumool> its weird to want a name generator for gameboy
<Zarutian_HTC> function naming to annoy the crap of a frenimy of mine
<Kumool> also why ask here? go to like, the romhacking discord or some emulator channel
<Zarutian_HTC> eh, it was part of the text compression used
<Zarutian_HTC> I am thinking about porting the thing to Forth too ;)
<crab1> which forth(s)
<crab1> do most of yall use
<Zarutian_HTC> and I wasnt actually asking just saying what I was up to ;þ
<Kumool> ah
X-Scale has quit [Ping timeout: 258 seconds]
<Kumool> :)
<Kumool> well, nevertheless, the people there are more helpful... well, they'll at least know more there
<Zarutian_HTC> crab1: a moddified and ported eForth
X-Scale` has joined #forth
<crab1> I need to write a forth for use with 9front
X-Scale` is now known as X-Scale
<Zarutian_HTC> Kumool: naah you actually were helpfull by pointing out romhacking
tabemann has joined #forth
<crab1> welcome
<Kumool> crab1: is 9front worth using?
<crab1> in a lot of ways, yes
<crab1> but it's gonna take some work to make it my main system
<crab1> It doesn't have: Matrix(messaging platform), Most languages I'd like to use, Can't do online banking as far as I can tell, not sure if I have any way to screencast, doesn't support playback of any video format
<crab1> and that's just a few of the missing things I make use of on a regular basis
<Kumool> basically useless
<tabemann> hey guys
<crab1> browsing pages without javascript works no problem, my hardware is mostly supported, email is easy, a lot is there
<crab1> tabemann: hi
<Kumool> better use a vmware or something
<crab1> Kumool: I don't like to do that
<Kumool> neither do I
<crab1> I want a consistent interface
<Kumool> how about the community? is it still a bunch A's and D's?
<crab1> I have had mixed results with the community, I think there are a couple bad apples but most of them seem nice