Forth
Posted by beardyw 12 hours ago
Comments
Comment by 7734128 51 minutes ago
https://technicpack.fandom.com/wiki/Forth_language
I built a massive mining platform that repeated a series of about 200 movements to vacuum up blocks, and used that computer block to orchestrate it.
Must admit that I got a bit scared of programming until I tried again in university.
Comment by jihadjihad 9 hours ago
Comment by dchest 11 hours ago
Comment by kentbrew 6 hours ago
Comment by mikewarot 9 hours ago
xkcd.com is best viewed with Netscape Navigator 4.0 or below on a Pentium 3±1 emulated in Javascript on an Apple IIGS
at a screen resolution of 1024x1. Please enable your ad blockers, disable high-heat drying, and remove your device
from Airplane Mode and set it to Boat Mode. For security reasons, please leave caps lock on while browsing.
Also, the font chosen is all capsComment by Lutzb 1 hour ago
Comment by ButlerianJihad 1 hour ago
Comment by hmokiguess 9 hours ago
Comment by DonHopkins 8 hours ago
https://github.com/SimHacker/moollm/tree/main/skills/return-...
See Self's "dynamic deoptimization", where it constructs a virtual return stack on demand that you would have had, were it not for the JIT compiler's agressive inlining.
Debugging Optimized Code with Dynamic Deoptimization, by Urs Hölzle, Craig Chambers, and David Ungar:
https://bibliography.selflanguage.org/_static/dynamic-deopti...
And a return-stack rotated 180 degrees around in time is an action-queue:
https://github.com/SimHacker/moollm/tree/main/skills/action-...
From games like The Sims:
https://sims.fandom.com/wiki/Action_queue
Also the ever popular advertisement skill, more like comefrom than goto:
https://github.com/SimHacker/moollm/tree/main/skills/adverti...
Also from The Sims:
https://simstek.fandom.com/wiki/SimAntics
The Sims, Pie Menus, Edith Editing, and SimAntics Visual Programming Demo:
Comment by hmokiguess 8 hours ago
Comment by joshu 8 hours ago
Comment by sph 2 hours ago
I am glad that this forum that has mostly been colonized by the ‘normies’ still manages to keep these two languages in the conversation, capturing curious passersby with their exotic allure. In every post you see new prey with the comments like ‘I keep reading about Lisp and I still don’t get why it’s popular. All I see is parentheses. Can anybody explain?’
I fear the day HN closes is the day those languages will die.
Comment by pjmlp 2 hours ago
USENET, Slashdot, Reddit, HN, Lambda the ultimate,....
There will surely be a spot left for the refugees.
The biggest issue is when natural language programming would make all these paradigms irrelevant, a curiosity for computing history museums.
Comment by firesteelrain 6 hours ago
Comment by lhakedal 11 hours ago
Comment by ajhenrydev 11 hours ago
Comment by e12e 11 hours ago
code stack
I Forth love
Forth love I
love I
Forth
; love presumably pops
; subject, object args
; from stack - and does something
; perhaps prints as side effectComment by forsalebypwner 9 hours ago
Comment by DonHopkins 9 hours ago
https://donhopkins.com/home/code/tomt-cam-forth-scr.txt
https://donhopkins.com/home/code/tomt-users-forth-scr.txt
( FMOVE -- functional intersegment move ) HEX
88 CONSTANT *MOV* ( fn = 0 ) 20 CONSTANT *AND* ( fn = 1 )
08 CONSTANT *OR* ( fn = 2 ) 30 CONSTANT *XOR* ( fn = 3 )
CODE FMOVE ( fn s.seg s.off d.seg d.off length --) AX, SI MOV
CX POP DI POP ES POP SI POP DS POP DX POP AX PUSH
AL, # *XOR* MOV DX, # 3 CMP 1$ JE
AL, # *OR* MOV DX, # 2 CMP 1$ JE
AL, # *AND* MOV DX, # 1 CMP 1$ JE
AL, # *MOV* MOV 1$:
CS: HERE 5 + , AL MOV ( modify "[DI], AL MOV" ) 2$:
LODS ES: [DI], AL MOV DI INC 2$ LOOP
AX, CS MOV ES, AX MOV DS, AX MOV SI POP NEXT, END-CODE
-->Comment by spott 11 hours ago
3 4 +
for example, would return 7.
Comment by zabzonk 11 hours ago
more pedantically, it would push 7 onto the stack
Comment by dbcurtis 9 hours ago
Comment by DonHopkins 9 hours ago
On the other hand, PostScript also has a dictionary stack, which you can use to implement a Smalltalk-like object oriented programming system. And its data types and executable code are basically polymorphic homoiconic JSON (like Lisp), not raw untyped bytes like FORTH.
Comment by HFguy 11 hours ago
That is, you provide the data first (I and Forth) and the command (heart) last.
Comment by ithkuil 2 hours ago
Comment by daureg 10 hours ago
Comment by perpil 9 hours ago
Comment by weikju 6 hours ago
But then he would also say: Forth is the path to the Light Side…
Comment by sdenton4 7 hours ago
Comment by throw-the-towel 7 hours ago
Comment by iberator 5 hours ago
IT DOES NOT NEED TO BR ALL IN ONE LINE
Most commercial forth source code is totally readable and maintainable:
comments, newlines, macros, high level commands etc
It's a total myth that its 'write only'. The same nonsense is spreaded by some nerds who actaully never wrote a single program in it.
ps. same goes to COBOL. 99% of fud by guys who never even wrote a simple program in it.
Comment by pjmlp 2 hours ago
Comment by dwheeler 10 hours ago