<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