<neuro_sys>
"Rather than link each entry to its physical predecessor, link it to a predecessor in one of a number of chains. Scramble the word to determine which chain it belongs in, both when you enter it and when you search for it"
<neuro_sys>
Does Chuck Moore talk about using a hash table here?
jedb__ has joined #forth
<Zarutian_HTC>
assume nothing. How Chuck describes stuff might not have exact translation in usual comp sci terms
jedb_ has quit [Ping timeout: 272 seconds]
<Zarutian_HTC>
many people are too prone to do what I call noospheric snap-to
jedb__ is now known as jedb
<Zarutian_HTC>
that is, they see a description of a concept and they think it is symonymus with a closely related but distinct concept they already know
<neuro_sys>
I see what you mean
<Zarutian_HTC>
what Chuck is describing might be something new or at least something that overlapps something well known
<neuro_sys>
"noospheric snap-to" is a nice way to put it
<Zarutian_HTC>
but looking at what he describes can be a source of inspiration of a diffrent view on these things
<neuro_sys>
"It is a futile exercise to attempt to establish a universal set of nouns. Compiler languages have repeatedly stumbled by not providing enough, and no matter how many they provide, someone will want one more."
<neuro_sys>
It makes me think of the latest C++ features and proposals.
jimt[m] has quit [Ping timeout: 246 seconds]
jimt[m] has joined #forth
Zarutian_HTC has quit [Remote host closed the connection]
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
Gromboli has quit [Read error: Connection reset by peer]
gravicappa has joined #forth
sts-q has quit [Ping timeout: 272 seconds]
sts-q has joined #forth
hosewiejacke has joined #forth
dddddd has quit [Ping timeout: 246 seconds]
xek has joined #forth
gravicappa has quit [Ping timeout: 265 seconds]
gravicappa has joined #forth
gravicappa has quit [Ping timeout: 260 seconds]
gravicappa has joined #forth
dave0 has joined #forth
gravicappa has quit [Ping timeout: 246 seconds]
gravicappa has joined #forth
hosewiejacke has quit [Ping timeout: 256 seconds]
hosewiejacke has joined #forth
<neuro_sys>
I have a begin-while-repeat loop, and I'd like to do short-circuit evaluation in the while condition. I've read about Wil Baden's conditionals, but meanwhile I'm thinking to myself, maybe I should un-learn the short-circuit idea and think differently.
<cmtptr>
put the condition in its own word which returns early to short-circuit?
<neuro_sys>
"returns early", does this involve some return stack manipulation?
Gromboli has joined #forth
<cmtptr>
no, just : condition? first-test if true exit then second-test if true exit then third-test if true exit then false ;
dddddd has joined #forth
<cmtptr>
(assuming what you want is a logical OR)
<neuro_sys>
Ah I see
<neuro_sys>
I'm doing Advent of Code 2020 to learn some Forth, here's my day 1.0 solution for a naive way to solve the problem of given N numbers, find the pair whose sum is equal to 2020, and multiply them: https://gist.github.com/neuro-sys/3197152e07b1dd95c85ad9245a6588d5
<neuro_sys>
Any comments on it to improve?
<neuro_sys>
I'll try doing it different ways until I get more comfortable
dave0 has quit [Quit: dave's not here]
<cmtptr>
i'll let someone more experienced respond. i would say it looks pretty much how most of my forth turns out (except i tend to have less newlines)
<cmtptr>
(also isn't there a cell+ word?)
<neuro_sys>
Ah right cell+ is better
hosewiejacke has quit [Ping timeout: 240 seconds]
hosewiejacke has joined #forth
<cmtptr>
what forth are you using, by the way? gforth?
<neuro_sys>
Yes, but I'm trying to keep it minimal for now
<neuro_sys>
For instance, not resorting to local variables
<cmtptr>
i should just install and play with gforth already
<neuro_sys>
It is convenient and the documentation is nice. But I can't compare to any other.
<neuro_sys>
Oh that stack juggling I did was not needed. Now I updated the gist with a simpler version.
the_cuckoo has quit [Quit: WeeChat 1.9.1]
the_cuckoo has joined #forth
<neuro_sys>
Hmm, puzzled by >NUMBER in gforth. 0 S" 123" >NUMBER fails. Seems like it expects 4 cells in the stack.