A start on styling notebooks.
I'd like the website to have some consistency.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright © 2022 Simon Forman
|
||||
# Copyright © 2022 - 2023 Simon Forman
|
||||
#
|
||||
# This file is part of Thun
|
||||
#
|
||||
@@ -266,6 +266,7 @@ def reversed_stack(stack):
|
||||
██╔══╝ ██╔██╗ ██╔═══╝ ██╔══██╗██╔══╝ ╚════██║╚════██║██║██║ ██║██║╚██╗██║
|
||||
███████╗██╔╝ ██╗██║ ██║ ██║███████╗███████║███████║██║╚██████╔╝██║ ╚████║
|
||||
╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝
|
||||
Expression
|
||||
|
||||
As elegant as it is to model the expression as a stack, it's not very
|
||||
efficient, as concatenating definitions and other quoted programs to
|
||||
@@ -300,6 +301,7 @@ def next_term(expression):
|
||||
██╔═══╝ ██╔══██║██╔══██╗╚════██║██╔══╝ ██╔══██╗
|
||||
██║ ██║ ██║██║ ██║███████║███████╗██║ ██║
|
||||
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
|
||||
Parser
|
||||
|
||||
There is a single function for converting text to joy expressions
|
||||
as well as a Symbol class and an Exception type. The Symbol
|
||||
@@ -389,6 +391,7 @@ def text_to_expression(text):
|
||||
██╔═══╝ ██╔══██╗██║██║╚██╗██║ ██║ ██╔══╝ ██╔══██╗
|
||||
██║ ██║ ██║██║██║ ╚████║ ██║ ███████╗██║ ██║
|
||||
╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
|
||||
Printer
|
||||
'''
|
||||
|
||||
|
||||
@@ -565,6 +568,7 @@ def interp(stack=(), dictionary=None):
|
||||
██║ ██║██║██║ ██║ ██║██║ ██║██║╚██╗██║██╔══██║██╔══██╗ ╚██╔╝
|
||||
██████╔╝██║╚██████╗ ██║ ██║╚██████╔╝██║ ╚████║██║ ██║██║ ██║ ██║
|
||||
╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
|
||||
Dictionary
|
||||
'''
|
||||
|
||||
|
||||
@@ -643,6 +647,7 @@ def help_(stack, expression, dictionary):
|
||||
██║ ██║ ██║██║╚██╔╝██║██╔══██╗██║██║╚██╗██║██╔══██║ ██║ ██║ ██║██╔══██╗╚════██║
|
||||
╚██████╗╚██████╔╝██║ ╚═╝ ██║██████╔╝██║██║ ╚████║██║ ██║ ██║ ╚██████╔╝██║ ██║███████║
|
||||
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
|
||||
Combinators
|
||||
'''
|
||||
|
||||
|
||||
@@ -754,6 +759,7 @@ def quit(stack, expr, dictionary):
|
||||
██║ ██║ ██║██╔══██╗██╔══╝ ██║███╗██║██║ ██║██╔══██╗██║ ██║╚════██║
|
||||
╚██████╗╚██████╔╝██║ ██║███████╗ ╚███╔███╔╝╚██████╔╝██║ ██║██████╔╝███████║
|
||||
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝
|
||||
Core Words
|
||||
'''
|
||||
|
||||
|
||||
@@ -1076,6 +1082,7 @@ for alias, name in (
|
||||
██║ ██║██╔══╝ ██╔══╝ ██║██║╚██╗██║██║ ██║ ██║██║ ██║██║╚██╗██║╚════██║
|
||||
██████╔╝███████╗██║ ██║██║ ╚████║██║ ██║ ██║╚██████╔╝██║ ╚████║███████║
|
||||
╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
|
||||
Definitions
|
||||
'''
|
||||
|
||||
|
||||
@@ -1133,6 +1140,9 @@ class Def(object):
|
||||
██║ ╚██╔╝ ██╔═══╝ ██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ╚════██║
|
||||
██║ ██║ ██║ ███████╗ ╚██████╗██║ ██║███████╗╚██████╗██║ ██╗███████║
|
||||
╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝
|
||||
Type Checks
|
||||
|
||||
Simple guard functions, for type inference see the Prolog versions.
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user