←back to thread

414 points henry_flower | 1 comments | | HN request time: 0s | source
Show context
digitalsushi ◴[] No.43108644[source]
Spock levels of fascinating from me. I want to learn how to compile a pdp11 emulator on my mac.
replies(4): >>43108726 #>>43108732 #>>43108743 #>>43109755 #
snovymgodym ◴[] No.43108726[source]
https://opensimh.org/

Works great on Apple Silicon

replies(1): >>43108833 #
haunter ◴[] No.43108833[source]
What’s the difference between an emulator and a simulator in this context?
replies(3): >>43108965 #>>43108980 #>>43119814 #
o11c ◴[] No.43108980{3}[source]
In theory, an emulator is oriented around producing a result (this may mean making acceptable compromises), whereas a simulator is oriented around inspection of state (this usually means being exact).

In practice the terms are often conflated.

replies(2): >>43110169 #>>43111430 #
codr7 ◴[] No.43110169{4}[source]
The difference is about as crystal clear as compiler/interpreter.
replies(1): >>43116620 #
Imustaskforhelp ◴[] No.43116620{5}[source]
compiler creates a binary in elf format or other format which can be run given a shared object exists.

Intepreter either writes it in bytecode and then executes the bytecode line by line ?

Atleast that is what I believe the difference is , care to elaborate , is there some hidden joke of compiler vs intepreter that I don't know about ?

replies(3): >>43117570 #>>43119591 #>>43119624 #
1. somat ◴[] No.43119624{6}[source]
I would generalize it to a compiler produces some sort of artifact that is intended to later be used directly, while for an interpreter the whole mechanism(source to execution) is intended to be used directly.

The same tool can often be used to do both. trival example: a web browser. save your web page as a pdf? compiler. otherwise interpreter. but what if the code it is executing is not artisanal handcrafted js but the result of a typescript compiler?