<joe9>
is anyone interested in the felix forth amd64 native on 9front? I seem to have it running ok. i can host it if you want to try.
mirrorbird has joined #forth
mirrorbird has quit [Ping timeout: 272 seconds]
<joe9>
is there a way to output hex numbers with .?
<f-a>
maybe base-execute ? idk much about numbers sorry
<crc>
HEX . DECIMAL
<crc>
Change the `base` before displaying works on most Forths I've used
<joe9>
thanks.
<joe9>
crc, that worked. Thanks.
<remexre>
joe9: btw if you want strict haskell, you can pass the compiler -XStrict; it's scoped to the module, so shockingly little code breaks
<remexre>
(assuming it wasn't using laziness)
<joe9>
remexre, i screwed around with strict too. This was a few years ago when they were rolling out strict more.
<joe9>
and, it just was not worth the hassle. The binary sizes are huge.
<joe9>
i had no way of profiling it as there were so many layers
<joe9>
Every layer was a different learning experience.
<joe9>
It was easier to do it in C and sock it to a learning experience.
<remexre>
...huh, I haven't really ever checked binary sizes when I'd used it, but I can't imagine it having a huge effect; it's just equivalent to using bang-patterns everywhere, isn't it?
<joe9>
remexre, and, the stack builds are big.
<remexre>
can't speak to that, I use cabal exclusively :)
<joe9>
just not worth the effort. when the whole plan9 system can be built in lesser time than installing haskell.
<joe9>
not with forth, it is even simpler than C.
<joe9>
and, anything serious, the types would get convoluted.
<remexre>
yeah, forth's fast enough that I haven't bothered implementing a REPL in mine, it's fast enough to rebuild the whole forth system and bundle a file with it, plus boot that in a VM lol
<joe9>
I want to read some strings from a syscall (error string). i am new to forth. I am not sure what buffer would be ideal to use.
<joe9>
I can use the tib, but, it would clobber the input.
<joe9>
wordbuffer ? I am not sure.
<joe9>
what is the normal convention?
<remexre>
if you don't need to be reentrant and know the max size, you can just allocate a buffer in the dictionary
tech_exorcist has quit [Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world.]
<joe9>
and, any serious haskell code was ending up just looking like C any way. It was tough walking away from it after all the effort that i put into it.
<remexre>
I'm a researcher by profession, so performance doesn't matter for my code :P
<mark4>
so. writing chinese characters into a terminal writes characters wider than the character cell witin the terminal. tahts bullshit
<mark4>
it even does it in the linux console
<mark4>
its like every single chinese character has an implied space after it
<remexre>
mark4: that's the full-width characters I was talking about the other day
<mark4>
and the linux console does not seem to be able to putput either the box characters OR chinse characters
<mark4>
remexre: it breaks my code. a character has a ccell not a cell and some more
<mark4>
and they are not full width, they are EXTRA width which is utter bullshit
f-a has left #forth [#forth]
<mark4>
how can i account for when a character is going to eat up more space that its supposed to?
<mark4>
without adding 28375629346592435 gigs of tables to my executable
<mark4>
chinese characters also display as X X X X not XXXX
Keshl has joined #forth
<mark4>
would like to turn that crap off too
<remexre>
fullwidth = two characters cells; is that not what's happening?
<remexre>
full = a full square, ig
<mark4>
no its like if one character is normally XX wide these chinese characters are XXX wide and have a space following them
<remexre>
huh
<mark4>
i can do aaa <-- the As are packed close and not wide
<mark4>
中文鍵盤
<mark4>
aaaa
<mark4>
those characters are ALL wider than the a's
<mark4>
AAAA
<mark4>
and wider than the A's
<mark4>
AND they have a SPACE following them that I am not specifying
<remexre>
make a fontconfig file that specifies the font selection behavior you want (idk off the top of my head, consult the docs), then either put it into one of the user/system-wide locations, or pass it via the FC_CONFIG_FILE environment variable
<mark4>
i cannot force YOu to use MY fonts
<remexre>
right; if my terminal were configured to use Arial, your TUI would also be broken on it, but that's my problem, not yours
<mark4>
i need ALL characters, no matter what font this terminal randomly selects, to be EXACTLY the same width what ever that is
<remexre>
anyway, I'm getting nagged to go pick up dinner for the 3rd time, so gtg
<mark4>
lol
f-a has joined #forth
<f-a>
I have a question on stack comments ( a b -- c ) ← these
<f-a>
say I have a compile time word
<f-a>
how do I indicate «it takes the next word from stream»?
<f-a>
or «next word from stream and top of stack»?
<mark4>
you dont in the stack comment
<crc>
In the ANS spec, words that parse the input stream have comments like (for 6.1.080, ( ): (“ccc<paren>”--)
<f-a>
thanks
dave0 has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<dave0>
maw
f-a_ has joined #forth
f-a has quit [Ping timeout: 264 seconds]
f-a_ has quit [Client Quit]
f-a has joined #forth
<f-a>
sorry I got d/c
<f-a>
I will paste again
<f-a>
f-a uuhhh ok another q
<f-a>
f-a create palla \ creates a new entry in the dict
<f-a>
f-a is there a
<f-a>
f-a s" palla" screate ( addr u -- ) ?
<f-a>
also crc , say that a word consumes from the stream *and* from the stack, how would that work, ( -- ) wise?
<crc>
I'm not aware of any standard words for `create` that take the string from the stack
<f-a>
thanks
<crc>
Before eliminating forward parsing, I used to do things like ( a b "word" -- c )
<f-a>
that is appropriate
<crc>
Forth200x standard there is execute-parsing, which would let you do: s" palla" ' create execute-parsing
<f-a>
super
<joe9>
I have a forth routines file that i am trying to include from the repl. Is that possible? I can read that the include word opens the file and puts the file descriptor in stdin.
<joe9>
It is not doing anything else other that.
<joe9>
If I type query or interpret, it seems to work fine (no errors) but the defined words in the file are still not recognized.
f-a has quit [Read error: Connection reset by peer]
Keshl has quit [Quit: Konversation terminated!]
gravicappa has joined #forth
<Zarutian_HTC>
hmm... been thinking, I have an 128x128 bitmap matrix lcd and a 4x4 keypad as user I/O. Would using the old style sms nokia editor entrymethod for text work?
<Zarutian_HTC>
would be heavily menu driven ui/ux for the most part
<Zarutian_HTC>
but I foresee cases where alphanumerical data might be need to be entered
Keshl has joined #forth
<mark4>
can the keypad see multiple keys at once?
<mark4>
make it chorded :)
<Zarutian_HTC>
hmm two text input methods then
<Zarutian_HTC>
but the old style 5 5 , 2 2 , 9 9 9 input might work better as getting five fingers on the pad is ackward
<mark4>
lol
<mark4>
well its 2am and im about to face plant lol
<Zarutian_HTC>
btw, did Englebart's Augment system (see Mother of All Demos) use ITA.2 baudot code for lefthand keyboard chording?
<Zarutian_HTC>
I woke around 3 am due to an earthquake, so I am fresh as daisies
<mark4>
where are you again
<mark4>
?
<mark4>
i usually sleep through earthquakes lol
<Zarutian_HTC>
Iceland, near Reykjavík
<mark4>
aga cool!
<mark4>
no pun intended lol
<Zarutian_HTC>
well this one was like somebody yanked my bed
<mark4>
read that one of your volcainos is maybe going to pop soon
<Zarutian_HTC>
been quite a few last 14 days or so
<Zarutian_HTC>
aah, yeah somewhere near Keilir
<Zarutian_HTC>
whose name can be translated as Cone-r
<Zarutian_HTC>
named so because it is cone shaped
<Zarutian_HTC>
but yeah somewhere near Sundhagagígjaröð í Þráinsskjaldarhrauni
* Zarutian_HTC
wants to see tv news anchors balk at that one
<Zarutian_HTC>
if there is an erruption there it most likely will be a lavaflow one
<Zarutian_HTC>
and not ashcloud one
<mark4>
ya i think it looked like that kind of volcaino they had pictured
<mark4>
no telling if the picture was the actual one tho
<mark4>
but i have to sleep
<Zarutian_HTC>
gn
ornxka has quit [Read error: Connection reset by peer]
ornxka has joined #forth
Zarutian_HTC has quit [Remote host closed the connection]
mark4 has quit [Remote host closed the connection]
mark4 has joined #forth
_whitelogger has joined #forth
proteus-guy has joined #forth
<veltas>
joe9: I've read a few styleguides for Forth and I think I disagree with all of them. I've shown my code in here before and people approve of the style
<veltas>
So read a styleguide maybe but take it with a pinch of salt, it's much more important it's readable to you first, then worry about it being not totally unconventional
<veltas>
But as long as you're documenting stack usage in a somewhat conventional fasion it's probably fine
<joe9>
mark4 do you have a test suite? I think I have ff working now. I want to have some tests to be sure.
<mark4>
but most of those probably wont compile for you
<mark4>
and they are not really a test suite
Zarutian_HTC has joined #forth
<joe9>
ok, thanks.
tech_exorcist has joined #forth
tech_exorcist has quit [Remote host closed the connection]
tech_exorcist has joined #forth
tech_exorcist has quit [Remote host closed the connection]
tech_exorcist has joined #forth
<neuro_sys>
Was there a way to print the floating stack in Gforth?
<neuro_sys>
Ah it's f.s
proteus-guy has quit [Ping timeout: 276 seconds]
<neuro_sys>
Out of curiosity, does Forth have a word for inlining (i.e. expanding the word into the word in which it's defined and eliminating the call/return)?
jyf has quit [Ping timeout: 256 seconds]
andrei-n has joined #forth
jyf has joined #forth
<veltas>
Not a standard forth feature and I'm not aware of a forth that does this
<veltas>
There are forths that do inlining automatically for optimisation, I know mecrisp does
boru has quit [Ping timeout: 260 seconds]
boru` has joined #forth
boru` is now known as boru
dave0 has quit [Quit: dave's not here]
<MrMobius>
at least one forth lets you set a minimum size in bytes and it inlines anything smaller
<nihilazo>
now I want to hack my keyboard to be asetniop
<crc>
nihilazo: I used to have an asetniop setup on my ergodox before getting this board
<nihilazo>
hmm
<nihilazo>
how did you set up asetniop on the ergodox?
<nihilazo>
I bet something similar is possible with the crkbd
<crc>
qmk combos
<crc>
I'll look tomorrow to see if I still have the keymap.c for it, not sure if I saved it after getting the dedicated board
<f-a>
at risk of keeping the OT flag flying high
<f-a>
what is a good wpm on those keyboards?
Zarutian_HTC has quit [Ping timeout: 264 seconds]
<crc>
On the asetniop layout, the best I've done is 35 wpm, with an average closer to 15. On my ergodox, with a 36 key layout, I can sometimes hit 60, though I'm often much slower.
<nihilazo>
I type quite quickly on my keyboard but it's not a chording type thing, it's a normal split keyboard
<nihilazo>
well, normal, it's a 42-key layout
<crc>
I do have severe RSI problems that make typing difficult and painful though. I used to be *much* faster: (
<nihilazo>
I've been curious about chording for ages though
<siraben>
120+ WPM with qwerty here :P
<nihilazo>
I'm like 80-ish with qwerty on split ortho
<nihilazo>
far less on staggered
<nihilazo>
I actually learned to type properly for the first time on a split ortho
<crc>
on the chorded board, I have 12g switches, which are really light and make pressing the keys easy
<nihilazo>
because when I built my first (a redox) I used blank caps and had to learn to touchtype for the first time
<crc>
siraben: I was able to do that many years ago
<nihilazo>
I have 35g in this one I think
<nihilazo>
people have said that these switches are too light but honestly I could go even lighter if I wanted
<nihilazo>
I just find these OK
<siraben>
IMO switching keyboard layout is too drastic when practicing proper finger placement and even usage probably gets most of the gains
<nihilazo>
(stock gateron clears)
<siraben>
s/even/having an even/
<crc>
for me, moving to dvorak was helpful, and the split has been very helpful
<crc>
but as noted, I have severe rsi problems and my case is far from typical
<nihilazo>
split has been helpful for me
<nihilazo>
so has ortho
<nihilazo>
just in terms of comfort
<nihilazo>
god I wish QMK was less of a mess to build and work with
<nihilazo>
seriously, somebody needs to just get rid of QMK and build something from scratch. It's so over complicated
<nihilazo>
build something in forth
<crc>
I am considering writing my own firmware in my forth once I settle on a final koyboard layout
<nihilazo>
I'll switch to it :P qmk is painful
<nihilazo>
it isn't even letting me build any more
dddddd has quit [Ping timeout: 256 seconds]
<nihilazo>
it's got its own weird command line tool you need now or something
jess has quit [Quit: brb]
<crc>
I'm still using a qmk from ~1 year ago
<nihilazo>
I just updated mine and am now having build problems
<crc>
doesn't surprise me; qmk is the big and bloated
Zarutian_HTC has joined #forth
j has joined #forth
<nihilazo>
yeah, you need a seperate tool now called qmk
<nihilazo>
just to try building it
<nihilazo>
and it bundles a few different RTOSes
<nihilazo>
for a keyboard!
<nihilazo>
it's insanity
<nihilazo>
god I hate QMK so much
<nihilazo>
(sorry, mini-rant)
<nihilazo>
now there's JSON files everywhere????
<nihilazo>
jesus
dddddd has joined #forth
<crc>
other options also have problems. kmk? written in python. bluemicro is for wireless boards, and is c++, though looks cleaner than qmk. keyberon is in rust, but looks fairly clean.
<nihilazo>
wait, python? For an embedded thing? what
<nihilazo>
oh it's micropython
<nihilazo>
and keyberon seems to be only running on bluepills and similar, which is a shame for my board which is using QMK elite-cs
<nihilazo>
(the elite-c is the best part of QMK)
<nihilazo>
(the hardware. Basically a pro micro but not trash, and it will drop in on any pro micro compatible board)
<crc>
I haven't looked at kaleidoscope yet (keyboard.io's firmware)
<nihilazo>
kaleidoscope is c++, I might check it out
<nihilazo>
the problem is that this is my only keyboard rn so I don't want it to be out of action
<nihilazo>
and I use some QMK features for stuff, although not tons
<crc>
that's why I haven't started working on anything yet
<nihilazo>
I have another keyboard but it's really not great
<nihilazo>
and I'd have to replace all the caps
<crc>
one of my sons and I will be doing a handwire build this summer, so I'll try my hand at firmware for it then
<nihilazo>
nice
<nihilazo>
is there a good open source forth targeting AVR/arduino?
<nihilazo>
actually, there seems to be a few
gravicappa has quit [Ping timeout: 245 seconds]
inode has quit [*.net *.split]
guan has quit [*.net *.split]
gravicappa has joined #forth
guan has joined #forth
f-a has quit [Remote host closed the connection]
siraben has quit [Ping timeout: 268 seconds]
jimt[m] has quit [Ping timeout: 258 seconds]
patrickg has quit [Ping timeout: 268 seconds]
jevinskie[m] has quit [Ping timeout: 268 seconds]
<mark4>
was up till 5am this morning fixing my TUI utf issues :)
<mark4>
got it fixed now, i can now handle wide characters but im not yet entirely extatic about the solution :)
f-a has joined #forth
xek has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
Zarutian_HTC has joined #forth
mirrorbird has joined #forth
patrickg has joined #forth
inode has joined #forth
siraben has joined #forth
jevinskie[m] has joined #forth
jimt[m] has joined #forth
mirrorbird has quit [Remote host closed the connection]
mirrorbird has joined #forth
j is now known as jess
<mark4>
btw, i made my repo public
<mark4>
github.com/mark4th/uCurses
<mark4>
all in forth! err i mean c :/
<mark4>
and i just seen me a bug :)
lispmacs has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 245 seconds]
spoofer_ has quit [Remote host closed the connection]
<f-a>
mhhh
<f-a>
I have a string like s" prova"
<f-a>
so the stack is something like
<f-a>
<2> AABC0F 5
<f-a>
I would like to prepend ‘t’ to that
<f-a>
to that string
<f-a>
but I do not really know how to approach this
<f-a>
to be clear, I would like the end result to be the same as typing s" tprova"
<veltas>
f-a: You want to create a new string with the extra t, or have some kind of compile-time thing to read a string that will ultimately be prefixed?
<f-a>
new string with extra t
<veltas>
You could ALLOT space for it, and save the new string addr/u in a 2CONSTANT
<kiedtl>
Quick question from someone trying to understand ITC vs DTC: the major difference between the two is whether the code field is a 'CALL ENTER' vs inlined ENTER?
<veltas>
Yes
<kiedtl>
Ah, thanks.
<inode>
f-a: : CONCATENATE 2SWAP PAD PLACE PAD +PLACE PAD COUNT ;
<f-a>
danke
<inode>
eg. S" t" S" prova" CONCATENATE TYPE tprova ok
* f-a
types see pad
<mark4>
f-a if you have a string "xxxxx" you usually dont have space after it to append to
<mark4>
you need to have "xxx......" where xxx is the string and the ... are null bytes
Zarutian_HTC1 has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
Keshl has quit [Quit: Konversation terminated!]
<f-a>
I see
<f-a>
fun fact, `place` is *not* on gforth word index