Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

100% Positive

Analyzed from 478 words in the discussion.

Trending Topics

#mov#https#com#forth#stack#code#pop#return#love#donhopkins

Discussion (16 Comments)Read Original on HackerNews

jihadjihad•about 1 hour ago
Slightly OT, but nothing can beat DonHopkins’s “About” section here on HN [0].

0: https://news.ycombinator.com/user?id=DonHopkins

dchest•about 3 hours ago
FORTH LOVE? IF HONK THEN
mikewarot•about 1 hour ago
I never noticed the disclaimer at the bottom until today

  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 caps
hmokiguess•about 1 hour ago
Prediction: someone will make a reverse polish notation skill for interacting with claude claiming all sorts of things, like caveman, turn into another markdown as a service company, and make the news.
DonHopkins•22 minutes ago
I present to you, the return-stack skill:

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:

https://www.youtube.com/watch?v=-exdu4ETscs

hmokiguess•5 minutes ago
Amazing
lhakedal•about 3 hours ago
Saw the same joke with Postscript many years ago.
ajhenrydev•about 3 hours ago
Can someone explain for me?
e12e•about 3 hours ago
A different way to say the same: in forth, words get pushed on the stack, and popped from the stack by words that take arguments:

    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 effect
forsalebypwner•about 1 hour ago
Is that loss?
DonHopkins•35 minutes ago
Here is some inexplicably but meticulously formatted FORTH code that uses right justified indentation! Including reverse polish notation assembley.

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

                                                            -->
spott•about 3 hours ago
Forth I assume uses reverse polish notation: arguments before the operator.

3 4 +

for example, would return 7.

zabzonk•about 3 hours ago
> would return 7

more pedantically, it would push 7 onto the stack

dbcurtis•about 1 hour ago
even more pedantically, would remove 3 and 4 from the stack before pushing 7
argimenes•about 2 hours ago
The stack is really a convenience that makes pipeline-driven programming possible in the language.
HFguy•about 3 hours ago
Forth uses RPN so the "verb" is last.

That is, you provide the data first (I and Forth) and the command (heart) last.

daureg•about 2 hours ago
dwheeler•about 2 hours ago
That beautiful is.
perpil•about 1 hour ago
I first thought this was some spin on May the fourth be with you. As in how Yoda might say it.