Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Tasks involving writing interpreters for various languages or formalisms.
2
votes
Interpret PlusOrMinus
Charcoal, 19 bytes
⭆⌕AΦS№+-ι-℅﹪⁻ι⊗κ²⁵⁶
Try it online! Link is to verbose version of code. Explanation:
S Input string
Φ Filtered where
+- Literal …
1
vote
µUnitDC: A unit-aware RPN calculator
Charcoal, 123 116 bytes
F⪪S ¿Σι⊞υ⁺⟦Iι⟧Eβ⁰¿№βι§≔§υ±¹⊕⌕βι¹«≔⊟υζ≔⊟υη⊞υ∧∨⬤∧ζη∨¬λ⁼κ§ζλ⁻+ιE∧ζη⎇λ⁻κקζλ⊖﹪℅鳧⟦×κ§ζλ⁺κ§ζλ÷κ§ζλ⟧℅ι»Eυ⭆∨ι*⎇μ⎇λ⁺§β⊖μλωλ
Try it online! Link is to verbose version of code. Since t …
2
votes
Implement a simple stack language
Charcoal, 48 bytes
WS≡§ι¹+⊞υ⁺⊟υ⊟υ-⊞υ⁻⊟υ⊟υr≔⊟υιu⊞υ↨υ⁰wFE²⊟υ⊞υκ⊞υIιIυ
Try it online! Link is to verbose version of code. Takes a list of newline-terminated words as input (could save two bytes by requi …
2
votes
Auto-golf an esolang
Charcoal, 79 65 bytes
⊞υ⟦ω⁶ω⟧Fυ¿¬ⅈ¿¬⌕ιθ⊟ι«≔§ι¹ηF⪪⟦η⁻⁶η!ω⁷+ω⁻⮌ηη~ω∧η⁻﹪XχLηηη%⟧³⊞υEκ⁺λ§ιμ
Try it online! Link is to verbose version of code. Explanation: Based on @bsoelch's Python answer.
⊞υ⟦ω⁶ω⟧Fυ
S …
2
votes
Implement Subleq
Charcoal, 45 bytes
W‹ⅈLθ«≔§θ⊕ⅈι§≔θι⁻§θι§θ§θⅈ¿›§θι⁰M³→J§θ⁺²ⅈ⁰»⭆¹θ
Try it online! Link is to verbose version of code. Explanation:
W‹ⅈLθ«
Repeat while the instruction pointer is within range.
≔§θ⊕ⅈι
…
4
votes
Implement a 2fuck interpreter
Charcoal, 126 bytes
WS⊞υιUO⌈EυLιLυ P⪫υ¶≔⪪⮌S¹θ≔E׳⁰φ⁰η≔⁰ζ≔⁰εWKK«≔﹪§ηζ²⁵⁶δ≡ι<≔⁴ε>≔⁰ε^≔²εv≔⁶ε[≦⊖ζ]≦⊕ζ-§≔ηζ⊖δ+§≔ηζ⊕δ?≧⁺∧δ²ε.≔⁺ω℅δω,F¬¬θ§≔ηζ℅⊟θP⁰M✳ε»⎚ω
Try it online! Link is to verbose version of code. T …
1
vote
Make a +-= Interpreter
Retina 0.8.2, 44 bytes
=
=¶$`=
-1=A`
%O`.
+`\+-
((-)+|\+*)=+
$2$.1
Try it online! Link includes test cases. Explanation:
=
=¶$`=
Prepend all of the prefixes of the input that end in an =.
-1=A`
De …
3
votes
Make a +-= Interpreter
Charcoal, 16 bytes
IE⌕Aθ=⁻ι⁺κ⊗№…θι-
Try it online! Link is to verbose version of code. Explanation:
θ Input string
⌕A Find all indices of
= Litera …
3
votes
AoCG2021 Day 16: Interpret Duet
Charcoal, 224 bytes
WS⊞υ⪪ι ≔E²⊞OE²⁸∧ι⁼¹⁵λ¹θW∧⊙θ§κ²⁸⬤θ⁼§κ²⁶﹪§κ²⁶Lυ«≔§θ⁰η≔⮌θθ≔§υ§η²⁶ζ≔⌕β§ζ¹ε≔⌕β§ζ±¹δ≔⎇⊕δ§ηδI§ζ±¹δ≡§§ζ⁰¦¹e§≔ηεδd§≔ηε⁺§ηεδu§≔ηεקηεδo§≔ηε﹪§ηεδgF‹⁰⎇⊕ε§ηεI§ζ¹§≔η²⁶⁺§η²⁶⊖δc«§≔η²⁸‹§η²⁷⁻Lη²⁹§≔η …
10
votes
Obfuscate my ><>
Charcoal, 90 55 bytes
WS⊞υιP⪫Eυ⭆ι‽γ¶≔¹ηW¬⁼;ψ«≔§§υⅉⅈψ≔∨⊕⌕>^<vψηη✳⊗⊖ηψJ﹪ⅈLθ﹪ⅉLυ
Try it online! Link is to verbose version of code. Takes input as a list of newline-terminated lines. Explanation:
WS⊞υι
…
2
votes
Interpret underload
Charcoal, 87 bytes
≔⪪⮌S¹θWθ≡⊟θ~FE²⊟υ⊞υκ:⊞υ§υ±¹!≔⊟υδ*⊞υ⪫⮌E²⊟υω(⊞υ⭆⊖L⌊ΦEθ…⮌θ⊕λ›№κ)№κ(⊟θa⊞υ⪫()⊟υ^F⪪⮌⊟υ¹⊞θκS⊟υ
Try it online! Link is to verbose version of code. Explanation:
≔⪪⮌S¹θ
Reverse the input an …
5
votes
Interpret underload
(If there aren't any )s then the interpreter will give up while if there aren't enough )s then the interpreter will match until the last one.) …
6
votes
Interpret Gelatin
Charcoal, 147 bytes
Nθ≔θζF⁺⪫⪪⪫⪪S+~¦d¦_~¦z¦i«≡№DSdiz++__鲫F⁼²Lυ⊞υθF²⊞υ⎇⊖Lυζι»¹«≔⎇υθζε≡ιD≦⊖εS≦×εεd≦⊗εz≦⁻εε⎚¿υ⊞υε≔εζ»⊞υ⎇⁼aιθIι¿‹²Lυ«≔⎇⁼+§υ¹⁺§υ⁰§υ²⁻§υ⁰§υ²ζ≔…⟦ζι⟧⁻Lυ³υ»»Iζ
Try it online! Link is to verbo …
5
votes
Execute a Befunge Chess Board
Charcoal, 55 bytes
WS⊞υ⪪ι¹≔⁰θW¬№αψ«≔§§υⅉⅈψ§≔§υⅉⅈTF№>^<vψ≔⊗⌕>^<ψθM⊕⁼#ψ✳θ»⎚ψ
Try it online! Link is to verbose version of code. Takes input as a newline-terminated list of strings and outputs A or B, o …
2
votes
Write an interpreter generator
Charcoal, 35 bytes
”y≔⁰θF⁺Sψ≡ι”FA⭆⪪”y≔,θI,θ”,⁺§ιλκ”yIθ
Try it online! Generates this Charcoal program:
≔⁰θF⁺Sψ≡ιa≔XθI3θb≔×θI2θc≔⁺θI15θd≔⎇⁰θI0θe≔∕θI8θIθ
Try it online! Explanation:
”y≔⁰θF⁺Sψ≡ι”
Prin …