crypt of decay - UrForth/Beast [entries|archive|friends|userinfo]
ketmar

[ userinfo | ljr userinfo ]
[ archive | journal archive ]

UrForth/Beast [Dec. 16th, 2023|07:42 am]
Previous Entry Add to Memories Tell A Friend Next Entry
поскольку Чудовище смогло собрать само себя, то анонсирую репу.

с комментариями «что это», «зачем», «нинужна» и прочей подобной хуетой можете не париться: всё равно я их тупо удаляю.
Linkmeow!

Comments:
[User Picture]
From:[info]wieiner_
Date:December 16th, 2023 - 10:20 am
(Link)
а ты Монстер !
[User Picture]
From:[info]steinkrauz
Date:December 16th, 2023 - 10:59 am
(Link)
Отредактировал слегка, что глаз цепануло


UrForth/Beast uses Direct Threaded Code. each word has a prologue in native code,
whose address is written into a threaded code stream. interpreter doesn't care if
some word is a primitive, or something else; it simply jumps to the given address.
there is still a CFA field, though, which is used by EXECUTE (and to determine word
type). it's not strictly necessary, though, and i may get rid of it later.

the small twist to the usual DTC is that prologues consist of inlined machine code
sequences, not of simple CALL/JMP. i'm not sure if this is better than a CALL with a
common prologue, though: i'd simply wanted to try this approach. in the future i may
create different UrF/B variants ("traditional" DTC, ITC), and check if they are
really much slower. i may switch to some other scheme then.

note that the most of the code doesn't care about those details. i'd abstracted most of
the low-level compiling and field manipulation into the corresponding words, so the
code is (mostly) resistant to an article header format change.

also, there is one global hash table for all words. it is still fast: the code does
1 to 3 bucket checks (average number), and those checks are 2 aligned 32-bit values.
actual name comparison is done only when the hash matches, which usually means that
we found the right word. it is possible to get rid of names completely, as small
change to hash function (extending it to 64 bits with a simple checksum) guarantees
unique identifiers for any word (collision probability is so small that it can be
safely ignored), but i need word names for the decompiler.
[User Picture]
From:[info]ketmar
Date:December 16th, 2023 - 02:58 pm
(Link)
спасибо! с одним не согласен: «resistant to an article header format change» — здесь «an» лишнее. это ближе к глаголу, а не к существительному.
From:(Anonymous)
Date:December 17th, 2023 - 09:53 pm
(Link)
ru.wikipedia.org/wiki/Kenshi
[User Picture]
From:[info]ketmar
Date:December 18th, 2023 - 07:12 am
(Link)
очередной фанатский фалаут? надоело. нахуй мне их постапокалиптика, у меня вокруг такой хуйни достаточно. лучше в какую-нибудь эроге играть, где основной смысл в девках с сиськами.
From:(Anonymous)
Date:December 18th, 2023 - 01:29 pm
(Link)
он делал её один 12 лет
[User Picture]
From:[info]ketmar
Date:December 19th, 2023 - 07:48 am
(Link)
я должен… что? тренд «я много лет страдал, теперь восхищайтесь!» утомил. мне — как потребителю — совершенно поебать, сколько и как делали. про код мы не говорим, потому что проприетарная срань. а для игоря это неважно. такие дела.