Skip to content

Instantly share code, notes, and snippets.

View lyxal's full-sized avatar
🍔
It's a regional dialect

lyxal lyxal

🍔
It's a regional dialect
  • ‏ɹ‏‏ǝ‏‏p‏‏u‏‏n ‏u‏ʍ‏‏‏o‏‏p‏ ‏p‏‏u‏‏ɐ‏‏l ‏ǝ‏‏‏ɥ‏‏‏ʇ‏ • ‏ɐ‏‏ᴉ‏‏l‏‏ɐ‏‏ɹ‏‏ʇ‏‏s‏‏n‏‏∀‏
  • 06:28 (UTC +11:00)
View GitHub Profile
@lyxal
lyxal / Lambda Template.py
Created October 28, 2018 05:32
An AWS Lambda Function template for working with Alexa skills
'''
This is a template for a lambda function, based off the alexa-skills-kit-color-expert-python example
'''
from __future__ import print_function
#Helper functions that build the responses -- don't change these
SQUARE = ["[", "]"]
ROUND = ["(", ")"]
CURLY = ["{", "}"]
FUNCTION = ["@", ";"]
OPEN, CLOSE = "[({@", "])};"
class CMDS:
CMD = "cmd"
import sys
#import Parse, random
import math
#All built-in functions
LENGTH = "!"
DUPLICATE = ":"
POP = "_"
PRINT_CHR = ","
PRINT_INT = "."
@lyxal
lyxal / Keg2py.md
Created September 24, 2019 07:58
Keg2py
<title>Keg2py</title>
@lyxal
lyxal / Keg2py.md
Created September 24, 2019 07:59
Keg2py

Keg to Python Reference

It's official. Keg is now a transpiled language, as interpreting it was just too hard. Here is a guide of how everything now works

graph TB
First[Preprocessor] --> Second
Second[Uncompressor] --> Third
Third[Parser] --> Fourth
Fourth[Translator] --> Fifth
Fifth[Execution] --&gt; Output
@lyxal
lyxal / Keg2py.md
Last active September 27, 2019 02:34
Keg2py

Keg to Python Reference

It's official. Keg is now a transpiled language, as interpreting it was just too hard. Here is a guide of how everything now works

graph TB
First[Preprocessor] --> Second
Second[Uncompressor] --> Third
Third[Parser] --> Fourth
Fourth[Translator] --> Fifth
Fifth[Execution] --&gt; Output
@lyxal
lyxal / IntCode.intcode
Created December 8, 2019 02:17
Theoretical Intcode Self-interpreter
0,0,0,0,0,0,0,0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007,63,34463338,63,1005,63,53,1101,0,3,1000,109,988,209,12,9,1000,209,6,209,3,203,0,1008,1000,1,63,1005,63,65,1008,1000,2,63,1005,63,904,1008,1000,0,63,1005,63,58,4,25,104,0,99,4,0,104,0,99,4,17,104,0,99,0,0,1102,1,24,1017,1101,0,36,1006,1101,0,30,1011,1101,26,0,1018,1101,32,0,1015,1101,34,0,1004,1101,0,37,1002,1101,25,0,1012,1102,38,1,1010,1101,29,0,1019,1101,308,0,1029,1102,1,696,1027,1102,1,429,1022,1102,1,21,1005,1102,1,33,1013,1101,39,0,1008,1102,20,1,1009,1101,0,652,1025,1102,313,1,1028,1101,0,31,1003,1102,661,1,1024,1101,35,0,1016,1101,0,23,1000,1102,28,1,1014,1102,0,1,1020,1102,27,1,1007,1101,0,1,1021,1102,22,1,1001,1101,703,0,1026,1101,0,422,1023,109,-5,2101,0,9,63,1008,63,31,63,1005,63,205,1001,64,1,64,1105,1,207,4,187,1002,64,2,64,109,6,2102,1,3,63,1008,63,37,63,1005,63,227,1105,1,233,4,213,1001,64,1,64,1002,64,2,64,109,11,21108,40,40,3,1005,1015,255,4,239,1001,64,1,64,1106,0,255,1002,64,2,64,109,-3,21107,41,40,2,1005,1011,275,1001,64,1,64,1105,1,277,4,261,1002,64,2,64,10
# Comp -> Keg
# Because it kinda looks the same
output = ""
source = """Place your program here"""
for char in source:
if char == "#":
output += ":,"
@lyxal
lyxal / fish.py
Last active August 13, 2020 05:00 — forked from anonymous/fish.py
><> python interpreter.
#!/usr/local/bin/python3.2
"""
Python interpreter for the esoteric language ><> (pronounced /ˈfɪʃ/).
Usage: ./fish.py --help
More information: http://esolangs.org/wiki/Fish
Requires python 2.7/3.2 or higher.
"""
import sys