TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

milliForth

285 点作者 binarycrusader超过 1 年前

15 条评论

tromp超过 1 年前
&gt; However, milliFORTH appears to be the smallest programming language implementation ever, beating out sectorLISP2, a mind-blowing 436 byte implementation of LISP, by 14 bytes.<p>The sectorlambda implementation of Binary Lambda Calculus is shorter yet at 383 bytes [1].<p>And the BLC self-interpreter is only 29 bytes [2].<p>&gt; A FORTH in 422 bytes — the smallest real programming language ever, as of yet.<p>That may still be true, as BLC is an esoteric programming language.<p>[1] <a href="https:&#x2F;&#x2F;justine.lol&#x2F;lambda&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;justine.lol&#x2F;lambda&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;ioccc.org&#x2F;2012&#x2F;tromp&#x2F;hint.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;ioccc.org&#x2F;2012&#x2F;tromp&#x2F;hint.html</a>
评论 #38166030 未加载
评论 #38163620 未加载
评论 #38159993 未加载
评论 #38171027 未加载
评论 #38159947 未加载
PaulHoule超过 1 年前
When I was in high school I wrote a nice FORTH for the TRS-80 Color Computer using the OS-9 operating system which was a Unix-like multitasking OS that would fit on a 6809 microcomputer.<p>I think it was around 2000 lines of assembly code to implement most of the FORTH-83 standard although mine was unusual in that it did not support the block-based I&#x2F;O that was common on “language system” FORTHs but instead it had handle-based API for accessing files similar to Unix, C and MS-DOS in version 2 and up.<p>The programming environment was a lot like Linux overall in that I’d use an ed or vi clone to edit files, then run something like an assembler or C compiler. I’d run my FORTH binary and it would present an interactive environment like most FORTHs.
anotherhue超过 1 年前
I love projects like these, reminds me of the magic within the machine, as opposed to the normal cacophony of the world that comes via the machine.
评论 #38160176 未加载
rep_lodsb超过 1 年前
You could save one byte by replacing &quot;0=&quot; with &quot;0&lt;&gt;&quot; (well, except for the name, maybe use &quot;0#&quot;?):<p><pre><code> pop ax neg ax ;sets carry flag if nonzero sbb ax,ax push ax </code></pre> And another two bytes in DOCOL:<p><pre><code> ;add ax,4 ;mov si,ax xchg ax,si lodsw lodsw </code></pre> Maybe even free up a word register to always hold the address of DOCOL, then you only need two bytes at each colon definition. If it&#x27;s possible without adding any extra instructions, this should save 4 bytes in total (one stosw in COLON, the DOCOL.addr variable, one lodsw in the above version of DOCOL)
评论 #38170917 未加载
lynx23超过 1 年前
Porting JonesFORTH to x86-64 was one of the most rewarding fun-project experiences lately. Forth is fun to play with.
alexisread超过 1 年前
Looking at the code, this looks remarkably similar to sectorforth? Thing is, with sectorforth and this, 2 of the primitives are not required so reducing the VM to 6ops, so you can probably go smaller. Looks as though Cesar was happy with fitting into a sector: <a href="https:&#x2F;&#x2F;github.com&#x2F;cesarblum&#x2F;sectorforth&#x2F;issues">https:&#x2F;&#x2F;github.com&#x2F;cesarblum&#x2F;sectorforth&#x2F;issues</a>
评论 #38166073 未加载
jart超过 1 年前
When SectorLISP claimed to be the tiniest programming language in the world, it included (1) a Turing machine program, (2) an implementation of SectorLISP written in SectorLISP, and (3) a proof that it could run software that had been written for the original LISP 1.5 system built by LISP&#x27;s inventor. If milliForth is making the same claim, then it should hold itself to the same standard. Otherwise it&#x27;s just a calculator written by an anonymous person. I filed an issue here: <a href="https:&#x2F;&#x2F;github.com&#x2F;fuzzballcat&#x2F;milliForth&#x2F;issues&#x2F;8">https:&#x2F;&#x2F;github.com&#x2F;fuzzballcat&#x2F;milliForth&#x2F;issues&#x2F;8</a>
评论 #38184132 未加载
mikewarot超过 1 年前
I&#x27;ve always wondered how to boot a virtual machine from a single sector with no other OS... now I know, which is cool.
badcppdev超过 1 年前
Does anyone in the Forth community know if Charles Moore is still with us?
评论 #38161283 未加载
评论 #38162606 未加载
评论 #38161660 未加载
评论 #38160436 未加载
tomcam超过 1 年前
justine is probably working on a version so small it will trigger the singularity irrevocably
评论 #38170859 未加载
LordShredda超过 1 年前
Does the benefit of it being embeddable on a QR code outweigh the lack of quality of life features like subtraction? Nevertheless, truly an impressive feat that shows how simple computers can be without all these modern API layers.
评论 #38159181 未加载
评论 #38159977 未加载
评论 #38160465 未加载
tomberek超过 1 年前
Look at how much room you have for data! I wonder what we can fit in there.<p>More seriously, a metacircular example to draw from would be: <a href="https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;stoneknifeforth">https:&#x2F;&#x2F;github.com&#x2F;kragen&#x2F;stoneknifeforth</a>
wkjagt超过 1 年前
Would it be possible to do a similar thing in a similar size for, for example, the 6502? I would love to give that a try, even though I probably lack the skills to make it that small. Or maybe it&#x27;s even impossible.
H8crilA超过 1 年前
How fast is the grabage collector? And is it web scale? I&#x27;m concerned by the lack of native JSON support.
评论 #38175621 未加载
mikewarot超过 1 年前
Has anyone figured out how to pipe input to the qemu vm under WSL 2? I&#x27;ve tried all sorts of things, and nothing seems to work.<p>The included py_autotype.py takes forever, but nothing outputs in the qemu vm as it is running.<p>WSL 2 does have an X server running (xeyes works).<p>Update: running the script against gedit doesn&#x27;t work either... it&#x27;s not a qemu issue
评论 #38184259 未加载
评论 #38173703 未加载