<joe9>
veltas, why not flashforth? I have an amd64 port of it. But, it still has some bugs that I need to work through.
<joe9>
But, this is native to 9front though.
<veltas>
Okay well that's why then :)
<veltas>
I'm afraid I don't run 9front
lispmacs has quit [Read error: Connection reset by peer]
dave0 has quit [Quit: dave's not here]
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
Zarutian_HTC has quit [Remote host closed the connection]
sts-q has quit [Ping timeout: 245 seconds]
sts-q has joined #forth
inode has quit [Remote host closed the connection]
gravicappa has joined #forth
dzho has quit [Ping timeout: 260 seconds]
dzho has joined #forth
WojciechK has quit [Ping timeout: 260 seconds]
f-a has joined #forth
hosewiejacke has joined #forth
jedb has quit [Remote host closed the connection]
jedb has joined #forth
jedb_ has joined #forth
jedb has quit [Ping timeout: 265 seconds]
jedb__ has joined #forth
jedb_ has quit [Ping timeout: 256 seconds]
jedb__ has quit [Ping timeout: 276 seconds]
inode has joined #forth
dave0 has joined #forth
f-a has quit [Ping timeout: 245 seconds]
f-a has joined #forth
f-a has quit [Quit: leaving]
f-a has joined #forth
f-a has quit [Quit: leaving]
tech_exorcist has joined #forth
tech_exorcist has quit [Quit: tech_exorcist]
tech_exorcist has joined #forth
hosewiejacke has quit [Ping timeout: 276 seconds]
hosewiejacke has joined #forth
dave0 has quit [Quit: dave's not here]
Zarutian_HTC has joined #forth
shmorgle has quit [Quit: [TalkSoup] via NEXTSPACE]
shmorgle has joined #forth
Zarutian_HTC has quit [Ping timeout: 256 seconds]
Zarutian_HTC has joined #forth
gravicappa has quit [Ping timeout: 265 seconds]
gravicappa has joined #forth
<nihilazo>
https://ttm.sh/ut4.fs I'm really unsure about the way I'm handling changed? etc in this, I'm not sure what the better way would be. Currently I'm storing a value and if it's changed as two cells with the change flag after the value, which is fine except I have one value that takes two cells itself and I have to put those in cells 0 and 2 with the change flag being in cell 1, which feels inelegent.
<nihilazo>
I could put the change flag in cell 0, but then accessing the value would require using 1 cells + a bunch
hosewiejacke has quit [Ping timeout: 276 seconds]
<inode>
one way could be to have the words like CHANGED? accept an additional parameter to indicate how many cells to skip from addr
<inode>
guessing you might end up wrapping it as : membercost-changed? membercost 1 changed? ;
<nihilazo>
the additional parameter idea works
<nihilazo>
thanks
<nihilazo>
I have another question but it's not directly forth related and rather just rellated to working in a terminal so I'm not sure where is best to ask it
<inode>
otherwise have an array of changed-flags where each variable in question is associated with a particular index
<inode>
it doesn't hurt to ask off-topic stuff, someone here might be able to help
<nihilazo>
is it possible to detect a key being pressed rather than typed, ignoring key repeat etc, in an application that runs in a terminal? Like, the physical key press
<inode>
do you want to get the event without any noticable output to the tty?
<inode>
at least before you've decided what to do with it frist
<inode>
i'm guessing you want to put the tty into raw mode
<nihilazo>
so if the terminal is in raw mode, I get the keystrokes directly rather than them going through the terminal's line stuff, but I think then I still get key repeat? because it's done in the OS before it gets to the terminal I think. don't know
<nihilazo>
wait, am I in raw mode already if I can get single keystrokes? I'm already doing that
<nihilazo>
or is it not doing single keystrokes and the program is just eating the first character of the cooked input
<inode>
i don't see anything in your shared code to change your terminal settings, so i'm guessing you're in cooked mode
<nihilazo>
yeah the only terminal setting I'm changing is hiding the cursor
<nihilazo>
I'm not sure how to enter raw mode. Everything I can see seems to be making use of a C library
<inode>
you'll probably need to make the calls to tcgetattr and tcsetattr through ffi yourself
<inode>
i don't think gforth has any bindings for termios stuff
<nihilazo>
oh ok
<nihilazo>
time to learn how, and if, ffi works
<inode>
actually the manual says stdin already should be in raw mode
<inode>
key-file ... "Read one character n from wfileid. This word disables buffering for wfileid. If you want to read characters from a terminal in non-canonical (raw) mode, you have to put the terminal in non-canonical mode yourself (using the C interface); the exception is stdin: Gforth automatically puts it into non-canonical mode."
<nihilazo>
huh
<nihilazo>
that makes sense I guess, given that I can read single keystrokes in from stdin
<nihilazo>
so that only leaves the question of key repeat which I might need to filter out manually
<mark4>
or just make things large enough for any cell size/
<mark4>
nihilazo: yes it is, you would use the poll call
<mark4>
and pollfd's
<nihilazo>
poll call? (sorry I know nothing about terminals)
<mark4>
i have some example code you might like to see in my ucurses