aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-01-09 20:00:43 -0800
committerChristine Dodrill <me@christine.website>2019-01-09 20:00:43 -0800
commit54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c (patch)
tree09aa012e70689867e46ac8190e0b0b4871cf21fe
parent7628126032977d182af7e8ae56bc3809c294596c (diff)
parentddbe51f7fcb3ce1c86e45c7f4a51836be4a91a4c (diff)
downloadx-54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c.tar.xz
x-54fceb8b197dc90cd5d8cc60fab0d1bcad8dcc9c.zip
la-baujmi: start on toki pona logic engine
-rw-r--r--Dockerfile11
-rw-r--r--discord/ilo-kesi/within.go2
-rw-r--r--docs/man/README.md11
-rwxr-xr-xdocs/man/prepare.sh5
-rw-r--r--docs/man/routed.1129
-rw-r--r--farbfeld/ff-primitive/vendor-log10
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/bezier.go59
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/context.go795
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/gradient.go202
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/matrix.go88
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/path.go140
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/pattern.go123
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/point.go25
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/util.go117
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/gg/wrap.go58
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/color.go44
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/core.go124
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/ellipse.go179
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/heatmap.go59
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/log.go23
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/model.go174
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/optimize.go75
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/polygon.go111
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/quadratic.go100
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/raster.go46
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/rectangle.go198
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/scanline.go29
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/shape.go25
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/state.go48
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/triangle.go171
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/util.go195
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/fogleman/primitive/primitive/worker.go108
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/raster/geom.go245
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/raster/paint.go287
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/raster/raster.go601
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/raster/stroke.go483
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/truetype/face.go507
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/truetype/glyph.go522
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/truetype/hint.go1770
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/truetype/opcodes.go289
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/golang/freetype/truetype/truetype.go653
-rw-r--r--farbfeld/ff-primitive/vendor/github.com/hullerob/go.farbfeld/farbfeld.go96
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/draw.go43
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/gen.go1403
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/go1_8.go49
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/go1_9.go57
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/impl.go6668
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/scale.go527
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/draw/stdlib_test.go96
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/font/basicfont/basicfont.go126
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/font/basicfont/data.go1456
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/font/basicfont/gen.go115
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/font/font.go359
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/math/f64/f64.go37
-rw-r--r--farbfeld/ff-primitive/vendor/golang.org/x/image/math/fixed/fixed.go410
-rw-r--r--go.mod11
-rw-r--r--go.sum21
-rw-r--r--internal/gokrazy/auto.go22
-rw-r--r--la-banjmi/README.md13
-rw-r--r--la-banjmi/data/NORALUJV.txt5273
-rw-r--r--la-banjmi/data/cmavo.txt1092
-rw-r--r--la-banjmi/data/gismu_english_order.txt1437
-rw-r--r--la-banjmi/data/lujvo.txt3846
-rw-r--r--la-banjmi/data/oblique_keywords.txt3542
-rw-r--r--la-banjmi/data/rafsi.txt1545
-rw-r--r--la-baujmi/README.md63
-rw-r--r--la-baujmi/const.go5
-rw-r--r--la-baujmi/main.go24
-rw-r--r--mastodon/almarid/main.go2
-rw-r--r--mastodon/furrybb/main.go2
-rw-r--r--mastodon/tptrans/.gitignore (renamed from mastodon/sona-pi-toki-pona/.gitignore)0
-rw-r--r--mastodon/tptrans/build.go (renamed from mastodon/sona-pi-toki-pona/build.go)0
-rw-r--r--mastodon/tptrans/gokrazy.go5
-rw-r--r--mastodon/tptrans/main.go (renamed from mastodon/sona-pi-toki-pona/main.go)4
-rw-r--r--tg/polyglot/gokrazy.go5
-rw-r--r--tools.go10
-rw-r--r--tools_install.go22
-rw-r--r--tun2/client.go4
-rw-r--r--tun2/connection.go4
-rw-r--r--tun2/server.go4
-rw-r--r--tun2/server_test.go2
-rw-r--r--version/ko/main.go7
82 files changed, 211 insertions, 37037 deletions
diff --git a/Dockerfile b/Dockerfile
index c48ae3a..dd0e297 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,10 +3,15 @@ WORKDIR /x
COPY . .
ENV GOPROXY=https://cache.greedo.xeserv.us
ENV CGO_ENABLED=0
-RUN GOBIN=/x/bin go install -v ./...
-RUN cd ./docs/man && ./prepare.sh
+RUN go run tools_install.go \
+ && GOBIN=/x/bin go install -v ./...
+RUN apk --no-cache add mdocml \
+ && cd ./docs/man \
+ && ./prepare.sh
+RUN apk --no-cache add upx \
+ && upx /x/bin/*
FROM xena/alpine
COPY --from=build /x/bin/ /usr/local/bin/
-COPY --from=build /x/doc/man /usr/share/man/man1
+COPY --from=build /x/docs/man /usr/share/man/man1
RUN apk --no-cache add man
diff --git a/discord/ilo-kesi/within.go b/discord/ilo-kesi/within.go
index 1b4d291..0987342 100644
--- a/discord/ilo-kesi/within.go
+++ b/discord/ilo-kesi/within.go
@@ -6,6 +6,7 @@ var tokiToWithin = map[string]string{
"Lesi": "Jessie",
"Sesi": "Sephie",
"Ase": "Ashe",
+ "Mai": "Mai",
}
var withinToToki = map[string]string{
@@ -14,4 +15,5 @@ var withinToToki = map[string]string{
"Jessie": "Lesi",
"Sephie": "Sesi",
"Ashe": "Ase",
+ "Mai": "Mai",
}
diff --git a/docs/man/README.md b/docs/man/README.md
new file mode 100644
index 0000000..b0a74fc
--- /dev/null
+++ b/docs/man/README.md
@@ -0,0 +1,11 @@
+# manpages
+
+These are manpages for a selected group of commands that I consider really useful. I have created a web version of these manpages too at TODO: add link to deployed site.
+
+## Deployment
+
+- gzip all the files (`$ gzip *.1`)
+- copy to (`/usr/share/man/man1/`)
+- `$ man appsluggr`
+
+
diff --git a/docs/man/prepare.sh b/docs/man/prepare.sh
index 2180c32..c56f8f1 100755
--- a/docs/man/prepare.sh
+++ b/docs/man/prepare.sh
@@ -1,3 +1,8 @@
#!/bin/sh
+for file in *.1
+do
+ mandoc -T markdown $file > ../$file.md
+done
+
gzip *.1
diff --git a/docs/man/routed.1 b/docs/man/routed.1
deleted file mode 100644
index 14736b1..0000000
--- a/docs/man/routed.1
+++ /dev/null
@@ -1,129 +0,0 @@
-.Dd December 12, 2017
-.Dt ROUTED 1 URM
-
-
-.Sh NAME
-.Nm routed
-.Nd TLS termination and reverse reverse proxying daemon.
-
-
-.Sh SYNOPSIS
-.Nm
-
-
-.Sh ENVIRONMENT
-
-.Bl -tag -width "routed" -offset indent -compact
-
-.It Ev BOLTDB_PATH
-Specifies the path to the boltdb database
-.Nm
-stores all of its relevant data in.
-
-.It Ev WEB_ADDR
-Specifies the host+port that
-.Nm
-will listen on for unsecured HTTP traffic. This will only forward traffic to HTTPS.
-
-.It Ev SSL_ADDR
-Specifies the host+port that
-.Nm
-will listen on for secure (TLS) traffic. This should have port 443 if you want Let's Encrypt to work (you probably want Let's Encrypt to work).
-
-.It Ev QUIC_ADDR
-Specifies the host+port that
-.Nm
-will listen on for secure (TLS) QUIC traffic. For more information see https://datatracker.ietf.org/wg/quic/about/. This should also be port 443, but is not essential for Let's Encrypt to work.
-
-.It Ev BACKEND_TCP_ADDR
-Specifies the host+port that
-.Nm
-will listen on for secure (TLS) TCP connections from backends. Any client that is successfully able to authenticate with
-.Nm
-on this port will relay HTTP traffic from to and from end users.
-
-.It Ev BACKEND_KCP_ADDR
-Specifies the host+port that
-.Nm
-will listen on for secure (TLS) KCP (reliable-UDP) connections from backends. Any client that is successfully able to authenticate with
-.Nm
-on this port will relay HTTP traffic from to and from end users.
-
-For more information about KCP, see https://github.com/xtaci/kcp-go
-
-.It Ev GRPC_ADDR
-Specifies the host+post that
-.Nm
-will listen on for secure (TLS) TCP gRPC connections from clients wishing to control
-.Nm
-configuration. Authentication is enforced and requires the use of an API token generated by the API call route.Tokens.Put.
-
-.It Ev DOMAIN_SUFFIX
-Specifies the domain suffix that
-.Nm
-will use when automatically generating a domain name for a newly created route. Please set this to something that has a wildcard DNS record pointing to your instances of routed.
-
-.It Ev ACME_EMAIL
-Specifies the email address that
-.Nm
-will use when creating a new account with Let's Encrypt. This assumes you have read (and agree to) the Let's Encrypt terms of service found here: https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf.
-
-.It Ev SSL_CERT_KEY
-Specifies the encryption key that
-.Nm
-will use when encrypting and decrypting SSL certificates when loading them from and saving them to the database. This can be created with
-.Xr route-cli 1 .
-
-.El
-
-
-.Sh IMPLEMENTATION NOTES
-
-In order for
-.Nm
-to route traffic, a route must be set up using
-.Xr route-cli 1 .
-Please see its manpage for more information on how to do this.
-
-.Nm
-exposes debugging and introspection information on a randomly generated port every time it starts up. The message will look something like:
-
-2017/12/13 02:06:56 manhole: Now listening on http://127.0.0.1:39245
-
-Expose this using
-.Xr route-httpagent 1
-or similar tools.
-
-.Nm
-can be managed using terraform. See
-.Xr terraform-provider-route 1
-for more information.
-
-
-.Sh EXAMPLES
-
-routed
-
-
-.Sh DIAGNOSTICS
-
-.Ex -std routed
-
-
-.Sh SEE ALSO
-
-.Bl -bullet
-
-.It
-https://datatracker.ietf.org/wg/quic/about/
-
-.It
-https://github.com/xtaci/kcp-go
-
-.It
-https://grpc.io/
-
-.It
-https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf
-
-.El
diff --git a/farbfeld/ff-primitive/vendor-log b/farbfeld/ff-primitive/vendor-log
deleted file mode 100644
index 6b5a045..0000000
--- a/farbfeld/ff-primitive/vendor-log
+++ /dev/null
@@ -1,10 +0,0 @@
-b572f0728b691aae4256edb2e408279146eafe52 github.com/hullerob/go.farbfeld
-ee8994ff90057955c428a5a949da5d064bf3ce6b github.com/fogleman/gg
-80f39ceaa8f4c66acb28aba6abe6b15128c06113 github.com/fogleman/primitive/primitive
-bcfeb16b74e8aea9e2fe043406f2ef74b1cb0759 github.com/golang/freetype/raster
-bcfeb16b74e8aea9e2fe043406f2ef74b1cb0759 github.com/golang/freetype/truetype
-426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d golang.org/x/image/draw
-426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d golang.org/x/image/font
-426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d golang.org/x/image/font/basicfont
-426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d golang.org/x/image/math/f64
-426cfd8eeb6e08ab1932954e09e3c2cb2bc6e36d golang.org/x/image/math/fixed
diff --git a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/bezier.go b/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/bezier.go
deleted file mode 100644
index f2cd7ab..0000000
--- a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/bezier.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package gg
-
-import "math"
-
-func quadratic(x0, y0, x1, y1, x2, y2, t float64) (x, y float64) {
- u := 1 - t
- a := u * u
- b := 2 * u * t
- c := t * t
- x = a*x0 + b*x1 + c*x2
- y = a*y0 + b*y1 + c*y2
- return
-}
-
-func QuadraticBezier(x0, y0, x1, y1, x2, y2 float64) []Point {
- l := (math.Hypot(x1-x0, y1-y0) +
- math.Hypot(x2-x1, y2-y1))
- n := int(l + 0.5)
- if n < 4 {
- n = 4
- }
- d := float64(n) - 1
- result := make([]Point, n)
- for i := 0; i < n; i++ {
- t := float64(i) / d
- x, y := quadratic(x0, y0, x1, y1, x2, y2, t)
- result[i] = Point{x, y}
- }
- return result
-}
-
-func cubic(x0, y0, x1, y1, x2, y2, x3, y3, t float64) (x, y float64) {
- u := 1 - t
- a := u * u * u
- b := 3 * u * u * t
- c := 3 * u * t * t
- d := t * t * t
- x = a*x0 + b*x1 + c*x2 + d*x3
- y = a*y0 + b*y1 + c*y2 + d*y3
- return
-}
-
-func CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3 float64) []Point {
- l := (math.Hypot(x1-x0, y1-y0) +
- math.Hypot(x2-x1, y2-y1) +
- math.Hypot(x3-x2, y3-y2))
- n := int(l + 0.5)
- if n < 4 {
- n = 4
- }
- d := float64(n) - 1
- result := make([]Point, n)
- for i := 0; i < n; i++ {
- t := float64(i) / d
- x, y := cubic(x0, y0, x1, y1, x2, y2, x3, y3, t)
- result[i] = Point{x, y}
- }
- return result
-}
diff --git a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/context.go b/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/context.go
deleted file mode 100644
index e828af8..0000000
--- a/farbfeld/ff-primitive/vendor/github.com/fogleman/gg/context.go
+++ /dev/null
@@ -1,795 +0,0 @@
-// Package gg provides a simple API for rendering 2D graphics in pure Go.
-package gg
-
-import (
- "image"
- "image/color"
- "image/png"
- "io"
- "math"
-
- "github.com/golang/freetype/raster"
- "golang.org/x/image/draw"
- "golang.org/x/image/font"
- "golang.org/x/image/font/basicfont"
- "golang.org/x/image/math/f64"
-)
-
-type LineCap int
-
-const (
- LineCapRound LineCap = iota
- LineCapButt
- LineCapSquare
-)
-
-type LineJoin int
-
-const (
- LineJoinRound LineJoin = iota
- LineJoinBevel
-)
-
-type FillRule int
-
-const (
- FillRuleWinding FillRule = iota
- FillRuleEvenOdd
-)
-
-type Align int
-
-const (
- AlignLeft Align = iota
- AlignCenter
- AlignRight
-)
-
-var (
- defaultFillStyle = NewSolidPattern(color.White)
- defaultStrokeStyle = NewSolidPattern(color.Black)
-)
-
-type Context struct {
- width int
- height int
- im *image.RGBA
- mask *image.Alpha
- color color.Color
- fillPattern Pattern
- strokePattern Pattern
- strokePath raster.Path
- fillPath raster.Path
- start Point
- current Point
- hasCurrent bool
- dashes []float64
- lineWidth float64
- lineCap LineCap
- lineJoin LineJoin
- fillRule FillRule
- fontFace font.Face
- fontHeight float64
- matrix Matrix
- stack []*Context
-}
-
-// NewContext creates a new image.RGBA with the specified width and height
-// and prepares a context for rendering onto that image.
-func NewContext(width, height int) *Context {
- return NewContextForRGBA(image.NewRGBA(image.Rect(0, 0, width, height)))
-}
-
-// NewContextForImage copies the specified image into a new image.RGBA
-// and prepares a context for rendering onto that image.
-func NewContextForImage(im image.Image) *Context {
- return NewContextForRGBA(imageToRGBA(im))
-}
-
-// NewContextForRGBA prepares a context for rendering onto the specified image.
-// No copy is made.
-func NewContextForRGBA(im *image.RGBA) *Context {
- return &Context{
- width: im.Bounds().Size().X,
- height: im.Bounds().Size().Y,
- im: im,
- color: color.Transparent,
- fillPattern: defaultFillStyle,
- strokePattern: defaultStrokeStyle,
- lineWidth: 1,
- fillRule: FillRuleWinding,
- fontFace: basicfont.Face7x13,
- fontHeight: 13,
- matrix: Identity(),
- }
-}
-
-// Image returns the image that has been drawn by this context.
-func (dc *Context) Image() image.Image {
- return dc.im
-}
-
-// Width returns the width of the image in pixels.
-func (dc *Context) Width() int {
- return dc.width
-}
-
-// Height returns the height of the image in pixels.
-func (dc *Context) Height() int {
- return dc.height
-}
-
-// SavePNG encodes the image as a PNG and writes it to disk.
-func (dc *Context) SavePNG(path string) error {
- return SavePNG(path, dc.im)
-}
-
-// EncodePNG encodes the image as a PNG and writes it to the provided io.Writer.
-func (dc *Context) EncodePNG(w io.Writer) error {
- return png.Encode(w, dc.im)
-}
-
-// SetDash sets the current dash pattern to use. Call with zero arguments to
-// disable dashes. The values specify the lengths of each dash, with
-// alternating on and off lengths.
-func (dc *Context) SetDash(dashes ...float64) {
- dc.dashes = dashes
-}
-
-func (dc *Context) SetLineWidth(lineWidth float64) {
- dc.lineWidth = lineWidth
-}