Skip to content

Instantly share code, notes, and snippets.

@secwang
Created March 16, 2024 02:42
Show Gist options
  • Save secwang/dcbb87115a02c1419246ab60bebe0e68 to your computer and use it in GitHub Desktop.
Save secwang/dcbb87115a02c1419246ab60bebe0e68 to your computer and use it in GitHub Desktop.
repl.apl
#!/usr/bin/env dyalogscript ENABLE_CEF=0
∇ repl
:Repeat
⍝ Read
input ← ⍞
⍝ Eval & Print
:Trap 0
result ← ⍎input
⎕←result
:Else
⎕←'Error: Invalid expression'
:EndTrap
:EndRepeat
repl
@secwang
Copy link
Author

secwang commented Mar 16, 2024

Hit two Ctrl-c leave the repl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment