Skip to content

Instantly share code, notes, and snippets.

#+begin_ai :noweb yes
[SYS]: You are an expert programmer specialist in golang. You give concise answers for expert users. You write unit tests, fuzzing and CLI tools with cobra, errgroup, and bubbletea. You pass context.Context around for cancellation. You use modern golang idioms.
[ME]: Write an app that takes an ascii string and outputs a code 128 barcode as PNG.
[AI]: Alright, to generate a Code 128 Barcode, we'll need a 3rd party library. For this task, we'll be using the "boombuler/barcode" and "boombuler/barcode/code128" libraries for generating the barcode, and "gg" library for converting it into PNG format. For the sake of simplicity, CLI arguments handling is done using the built-in "os" package, but it can be replaced with a CLI library like cobra for complex applications.
Here's a simple application which does that:
;;; org-ai-md.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2023 Manuel Odendahl
;;
;; Author: Manuel Odendahl <wesen@ruinwesen.com>
;; Maintainer: Manuel Odendahl <wesen@ruinwesen.com>
;; Created: July 06, 2023
;; Modified: July 06, 2023
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp

2023 07 03

IAM :

  • everything in AWS has an arn
  • IAM is a mapping from arn principals to a list of other ARNs
  • these other ARNs are actions you are allowed to do
  • every action is labeled with an ARN
    • in this context () is allowed to do this action.ARN in this environment
;;; md.el --- Description -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2023 Manuel Odendahl
;;
;; Author: Manuel Odendahl <wesen@ruinwesen.com>
;; Maintainer: Manuel Odendahl <wesen@ruinwesen.com>
;; Created: July 06, 2023
;; Modified: July 06, 2023
;; Version: 0.0.1
;; Keywords: abbrev bib c calendar comm convenience data docs emulations extensions faces files frames games hardware help hypermedia i18n internal languages lisp local maint mail matching mouse multimedia news outlines processes terminals tex tools unix vc wp

2023 06 01

2023 05 25

Coworking today.

Generate some examples for a config file for sqleton serve

I want to get a couple of ideas for a config file structure to configure sqleton. I started by asking the ai straight, but then realized I would like to have couple more takes on the whole thing.

First suggestion YAML

#+begin_ai
[SYS]: You are a doom emacs and emacs lisp expert. You answer questions very concisely, aimed at expert users. You use modern libraries and a modern emacs lisp style.
[ME]: I want to practice structured editing with lispy, give me some exercises to practice functionality like "raise" and "move-up/move-down" and clone.
[AI]: Here are some exercises to practice lispy's "raise", "move-up/move-down", and "clone" functions:
1. Raise:
Given the form `(when (and (foo) (bar)) (baz))(cursor)`, `(cursor)` denotes the cursor position.

2023 05 08 Terraform Dsl

Draft 2023 05 06 Building An Org Mode To Markdown Exporter

Writing an org-mode to markdown converter on my own

Overall planning of the program

The first thing is to go through the buffer by line, and have a little state machine to drive the conversion.

I want `#+begin_ai` blocks to start blockquoting the individual interlocutors, with an empty line between each. We can experiment with adding separators or not.

LLMs are like a forgetful scholar that can answer questions about language A written in language B