here you goThings I’ve made, read and saved — shared here.

Archive

9,565 entries: 46 from X, 8,923 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

21 entriesFolder notes ×2019 ×Clear all

2019

Markdown

Why Use plain text (like markdown) to write things? Dr Kieran Healy has a nice website explaining how

The Markdown Guide for the Perplexed

Desktop Tools

I MarkEdit as the default app to open .md files on MacOS. Otherwise it is painful to wait for XCode to open it. MarkEdit is quite fast and nimble. I have also used Typora before for the same thing before.

  • Glow terminal based markdown reader.
  • markdown-service-tools are a collection of OS X Services designed to make writing Markdown text that much easier.
  • PanWriter Markdown editor for macOS, Windows and Linux.
  • MarkdownDown -- "Convert any webpage to a clean markdown w/ images downloaded."

Web tools

uselink — Turn any doc into a living, shareable link

Wrappers

Foliant

Foliant is a all-in-one documentation authoring tool. It lets you produce standalone documents in pdf and docx, as well as websites, from single Markdown source. Foliant is a higher order tool, which means it uses other programs to do its job. For pdf and docx, it uses Pandoc, for websites it uses MkDocs. Foliant preprocessors let you include parts of documents in other documents, show and hide content with flags, render diagrams from text, and much more.

Who Is Foliant for?

You'll love Foliant if you:

  • need to ship documentation as pdf, docx, and website forms
  • want to use Markdown with consistent extension system instead of custome syntax for every new bit of functionality
  • like reStructuredText's extensibility and Asciidoc's flexibility, but actually would rather use Markdown
  • want a tool that you can actually write custom extensions for without dealing with something as overengineered as Sphinx
  • have documentation spread across many repos and want to reuse parts between documents

pp - A generic Preprocessor (with Pandoc in mind)

PP is a text preprocessor designed for Pandoc (and more generally Markdown and reStructuredText).

pp now implements:

  • macros
  • literate programming
  • GraphViz, PlantUML and ditaa diagrams
  • Asymptote and R figures
  • Bash, Cmd, PowerShell, Python, Lua, Haskell and R scripts
  • Mustache

GitHub - drasimwagan/mdv: MDV — a Markdown superset for documents, dashboards, and slides with embedded data and visualizations. HTML + PDF export, live preview, VS Code extension. · GitHub

Markdown to PDF conversion

HTML to Markdown

Show HN: HTML-to-Markdown – convert entire websites to Markdown with Golang/CLI | Hacker News -- a few tools mentioned, like jina.ai

markdown.new - Markdown for Agents | Cloudflare-Powered URL to Markdown

Markdown Styling

ReMarkdown — HTML that looks like Markdown text

Command line tools

Python One liner:

python3 -m markdown -x markdown.extensions.fenced_code -x markdown.extensions.codehilite index.md > index2.html
mq '.h' demo.md
... lists all the h elements .. 

Browser tools

Python Markdown

This is intersting to me because i use Python Markdown to render this site, and use many built-in and third party extensions.

Libraries

Mistune for Python

: * claims to be fastest markdown renderer for Python

  • mistune.markdown('I am using **mistune markdown parser**')
  • options are configurable
  • contribs

lowdown — simple markdown translator is a Markdown translator producing HTML5 and roff documents in the ms and man formats. Written in C. "Beyond the basic Markdown syntax support, lowdown supports the following Markdown features and extensions: autolinking, fenced code, tables, superscripts, footnotes, disabled inline HTML, “smartypants”, metadata, commonmark (in progress). You can control which parser features are used by using the -d (disable feature) and -e (enable feature) flags."

Gottox/smu: simple markup - markdown like syntax

syntax-tree/mdast: Markdown Abstract Syntax Tree format; see also syntax-tree/unist: Universal Syntax Tree used by unifiedjs

lkesteloot/teamten's markdown parser in Java is very easy to understand how the parsing works. It is a good read!

wernsey/d.awk: An Awk script to generate documentation from Markdown comments in C, C++, Java, JavaScript, C# source code.

Markdown for the component era | MDX MDX allows you to use JSX in your markdown content. You can import components, such as interactive charts or alerts, and embed them within your content. This makes writing long-form content with components a blast. 🚀

Competing mark-up languages

notes#markdown

Email

Email Driven Apps

"Email As API" #concept

Third party hosted email services

After considering different alternatives, migadu appears to be a good solution to host email on; Nov 2019.

Moving off Google

Using gmail

Self Hosting email

notmuch -- "If you want the convenience of fast, reliable search of all your email, but don't want to give a 3rd-party access to your email... Then notmuch may be exactly what you've been looking for."

How To Run Your Own Mail Server

Synergetic Labs | Email Alchemy; HN

Having recently had a small side project which required email capabilities whilst simultaneously wishing to avoid adopting any specific ecosystem, I set about building a self-hosted email solution.

Mail is not hard via [HN] where I found this interesting comment by user skrause.

I think the biggest pain in hosting your own mail server is getting your outbound mail delivered into the mailboxes of the large providers without being marked as spam. Especially if you don't actually send a lot of mail, so you can never really build up a good IP reputation.

That's why I generally recommend a hybrid setup: Host inbound mail completely by yourself so that you have full control, but ship off outbound mail to a trusted relay of a privacy oriented provider. For example https://posteo.de/en doesn't filter any outgoing messages by sender, so you can send mail from your own domains. Your local Postfix can DKIM sign your mail before sending them to Posteo and if you add include:posteo.de to your SPF record all your mail will be DKIM signed, SPF authenticated and coming from a reputable IP, so all your deliverability issues will be gone.

How to run your own mail server (2017) | Hacker News; some new discussion in Nov 2019.

vedetta-com/caesonia: OpenBSD Email Service

Stalwart Mail Server | Stalwart Labs Ltd.

maddy is an email server designed for transactional email, with web hooks on different events. It replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC and more with one daemon with uniform configuration and minimal maintenance cost. Maddy Mail Server implements all functionality required to run a e-mail server. It can send messages via SMTP (works as MTA), accept messages via SMTP (works as MX) and store messages while providing access to them via IMAP. In addition to that it implements auxiliary protocols that are mandatory to keep email reasonably secure (DKIM, SPF, DMARC, DANE, MTA-STS).

  • Learn and Test DMARC Here, you'll get a visual breakdown of how email servers communicate, giving you a better understanding of SPF, DKIM, and DMARC and how they work together.

Self-Hosted email is the hardest it's ever been, but also the easiest.

Calendars

Searching Email

Elasticsearch For Beginners: Indexing your Gmail Inbox | Hacker News; see links within.

Email testing

  • MailCatcher -- Catches mail and serves it through a dream.

MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server, then check out http://127.0.0.1:1080 to see the mail that's arrived so far.

last release of mailcatcher was in 2016.

Mailhog: How to Use It and Why | Mailtrap Blog

"Mailhog alternatives MailCatcher, SMTP Bucket, FakeSMTP, and LunaticSMTP are good replacements for MailHog."

In contrast to these tools, Mailtrap is a purely online service. You don’t have to tinker with any sort of installation or setup. All you need to do is to configure your SMTP server according to the provided credentials. After that, you can get on with testing.

Securing email

Sending Email

  • Brevo API for commercial uses (newsletters, transactional, customer service etc)
  • mjml-The Responsive Email Framework MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase. MJML’s open-source engine generates high quality responsive HTML compliant with best practices. MJML rolls up all of what Mailjet has learned about HTML email design over the past few years and abstracts the whole layer of complexity related to responsive email design.
  • A Deep Dive into Email Deliverability in 2024

notes#email

Datalog

notes#programming-language

Presentation

Presentation tools

Installing metropolis beamer theme on Mac

metropolis is a modern beamer theme that uses Mozilla's Fira Sans typeface.

git clone git@github.com:matze/mtheme.git
cd mtheme
make
mkdir -p `kpsewhich -var-value TEXMFHOME`/tex/latex/beamer/base/themes/theme
cp *.sty `kpsewhich -var-value TEXMFHOME`/tex/latex/beamer/base/themes/theme

See also: TeXLive

notes

Object Oriented Programming

Object-oriented programming: some history, and challenges for the next fifty years

This article is based on a lecture given on 22ndAugust 2011, on theoccasion of the scientific opening of the Ole-Johan Dahl hus at the Universityof Oslo. It looks at the foundational ideas fromSimulathat stand behindobject-orientation, how those ideas have evolved to become the dominantprogramming paradigm, and what they have to offer as we approach thechallenges of the next fifty years of informatics.

notes

Erlang Programming Language

See also: elixir and gleam

Concepts

Scalability

Books / Learning Resouces

Papers / videos

Emacs

John Daily's collection of Erlang links.

Instruction

Documentation

Community

Mailing lists

Advocacy

Experience Reports

Style

Libraries

NIFs

Tools

Projects

Exercises

General functional programming exercises

Alternative languages targeting the Erlang VM

Scheduling

Misc

Blogs

notes

Ansible

To look into:

notes

JSON

About JSON

Fast JSON parsers

Query Tools

First see jq.

ObjectPath - The agile query language

In weather readings find cities where temperature is higher than 25°C and the sky is clear.

$..*[@..temp > 25 and @.clouds.all is 0].name

Gron -- "Make JSON greppable"

▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author"
json[0].commit.author = {};
json[0].commit.author.date = "2016-07-02T10:51:21Z";
json[0].commit.author.email = "mail@tomnomnom.com";
json[0].commit.author.name = "Tom Hudson";

Fastgron

fastgron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it. It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.

fastgron is a high-performance JSON to GRON converter, developed in C++20, utilizing simdjson library. It's 50x faster than gron on big files (400MB/s input / 1.8GB/s output on M1 Macbook Pro), so it makes big JSON files greppable.


antonmedv/fx: Command-line tool and terminal JSON viewer 🔥


glomRestructuring data, the Python way.

from glom import glom

target = {'a': {'b': {'c': 'd'}}}
glom(target, 'a.b.c')  # returns 'd'

Charting tools

JSON Templating

JSON Schema

JSON-LD

Being on The Semantic Web is easy, and, frankly, well worth the bother JSON-LD = (JSON "for Linked Data") is the leading format for encoding Sematic Web metadata. It's just JSON, really. There are schemas that lay out the "types" you can use to describe the stuff on your page.

JSON Databases

Softmotions/ejdb: EJDB2 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings.

EJDB query language (JQL) syntax inspired by ideas behind XPath and Unix shell pipes. It designed for easy querying and updating sets of JSON documents. See ejdb.


See also: BBEdit JSON format

notes#json

Iron-Clad Java

These are the notes from the book - 'Iron-Clad Java: Building Secure Web Applications' by Jim Manico, August Detlefsen and others, published by Oracle Press.

I picked up the book from our local library on a whim and decided to give it a go. The book was published in 2015, and so hopefully it is not too out of date.

Web application security basics

As expected in a book from Oracle, the book appears to focus on Java and J2EE technologies from the get go.

Untrusted data: any data that enters your web application from an outside source, even databases and other applications within your organization, should be treated as untrusted. Untrusted data can be any part of the HTTP request . Do not trust any aspect of it. Attacked can and will modify all aspects of a HTTP request to exploit your web application.

Intercepting proxies are important tools in intercepting and modifying requests from users (human and machines). Attackers can use these proxy tools to:

  • modify user-entered input
  • add/modify/delete headers, cookies, and HTTP verbs(GET, POST, DELETE)

Some well known intercepting proxies are:

  1. Burp suite
  2. OWASP ZAP
  3. OWASP WebScarab
  4. Firefox plug-in Tamper Data

Safe handling of dat means properly validating all sources of data that enter your web application and also properly encoding data when it the application to a web page, database or other location.

Security is often lumped into non-functional business requirement like performance. Security requirements have to be fluid in order to adapt to the ever-evolving threat landscape (and businesss requirements -- ed).

Security Quality -- business rules to ensure that the data is consistent with business business requirements.

HTTP security considerations

HTTP is a stateless, request and response protocol that drives the vast majority of web traffic.

HTTPS allows for:

  1. confidentiality -- protect your data from being seen
  2. integrity -- protect your data from being changed
  3. authenticity -- assure that the domain you are visiting is really the real version of that domain

Cipher suits are negotiated between browser and server to determine the cryptographic strength of the session transport. This meanss the cryptographic strength of an HTTPS connection can vary widely between diffetnt HTTPS servers.

HTTP/S GET request

components of a HTTP request

  • HTTP verb: GET
  • Resource: https://www.btbytes.com/
  • Version: HTTP/1.1
  • Request Headers:
    • User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:2232.0)
    • Accept: text/html
    • Accept-Language: en-US, en; q=0.5
    • Connection: keep-alive
    • Host: www.btbytes.com

Questions:

  1. what are the valid values for these request headers?
  2. how much are they validated by servers?
  3. are they used as attack vectors?
  4. what are the well known exploits around Request Headers.

notes#java#security-engineering

Kannada

See: kannada-poetry

Learning

For beginners: Kannada Kalike

From a by Stelo who is learning Kannada on his own:

  1. An Intensive Course in Kannada by Lingadevaru Halemane (CIIL, Mysore)
  2. भारतीय भाषा ज्योति कन्नड़ (CIIL, Mysore)
  3. कन्नड़ स्वयं बोधिनि (कन्नड़ अभिवृद्धि प्राधिकार)
  4. A Practical Key to the Kanarese Language

For those learning to learn more advanced Kannada, recommended by Stelo

  1. Zydenbos' A Manual of Modern Kannada
  2. Spencer's Kannada Grammar
  3. Halemane's An Intensive Course in Kannada
  4. Jensen's Grammatik der kanaresischen Schriftsprache
  5. Dr. Kalegoda's भारतीय भाषा ज्योति कन्नड़
  6. Halemane's Kannada A Self-Instructional Course (in 5+ languages)
  7. Andronov's Язык каннада (this booklet is more of an overview of Kannada grammar than a full-fledged course).

One can refer Kittle dictionary which is available on online. Old and good one. I also use Champu nudigannadi for few words which were from Old Kannada literature. via

Grammar

Websites

Blogs


Videos


Books

Fonts

notes#kannada

Ballerina programming language

"Ballerina" Could Become the Programming Language of Integration - By dhanushka

Ballerina is a static typed language.

Another special type of variable is that “anydata” data type. This type is a union of the ()|boolean|int|float|decimal|string|(anydata|error)[]|map<anydata|error>|xml|table data types. anydata variables can be used in places where you expect pure values.

Since Ballerina specifically designed to construct apps operating on networks, it natively supports JSON and XML.

json user = {
         fname: "Peter",
         lname: "Stallone",
         "age": age,
         address: {
             line: "20 Palm Grove",
             city: "Colombo 03",
             country: "Sri Lanka"
         }
    };
io:println(user.address.country);
xml x1 = xml `<book>The Lost World</book>`;
io:println(x1);

News

Articles

James Clark's blog:

notes#ballerina#jvm#programming-language

Scala programming language

See Also: Scala for Datascience, ScalaJS, coursier, select-scala

July, 2015 -- Scala book reviews Feb, 2018 -- Recursion and Trampolines in Scala

Random Notes

scala-cli—power repl -S 2.13 -A —ammonite-ver 2.5.11

Notes from Programming in Scala

Chapter 7 - built-in control structures.

  • has very few control structures
  • if while for try match and function calls.
  • scala accumulates control structs in libraries.
  • use val instead of var wherever possible. makes it easy to refactor. "equational reasoning".
  • no = sign while defining a function => returns a Unit value ()
  • while and do-while are NOT expressions. they return Unit.
  • prefer NOT to use while.
  • for
  • "generator" syntax -- file <- files. works on all collections.
  • file is a val.
  • Ranges -- 1 to 4 (yields 1,2,3,4)
  • 1 until 4 -- exlcude the upper bound (yields 1,2,3)
  • generators can also include filters -- for (f <- files if f.getName.endsWith('.py'))
  • nested iteration.
  • mid-stream variable bindings
  • new collection:
def pyFiles =
  for {
    file <- files
    if file.getName.endsWith('.py')
  } yield file
  • IMP: don't put yield inside the curlies.

Exceptions:

try {


} catch {
  case ex: FileNotFoundException => //handle
  case ex: IOException => //handle
}
  • like other control structures, try-catch-finally also results in a value. (this is unlike Java) //imp

Match:


val fruit =
    someArg match {
      case "foo" => "bar"
      case "banana" => "pepper"
      case _ => "what?"
}

Chapter 8- Functions and Closures

First class functions

(x: Int) => x+1

named function:

var increase = (x: Int) => x + 1
  • target typing: someNumbersList.filter((x) => x > 0). the type is inferred from the the list of integers.
  • alternatively: someNumbersList.filter(x => x > 0)

Placeholder syntax:

someNumbersList.filter( _ > 0)
val f = (_: Int) + (_: Int)

Chapter 12 -- Traits

Traits are like java interfaces with concrete methods + declare fields and maintain state.

Traits can do everything classes can do, except --

  1. trait cannot have any clas parameters (ie., those passed to primary constructors).
  2. super calls are not statically bound.

Unlike Java, adding a concrete method to scala trait is an one-time effort.

Chapter 15 -- Case classes and pattern matching


Notes from "Scala in Action"

Chapter 2 -- Getting started

// working with arrays and Lists
@ val nList = 1 :: 2 :: 3 :: 4 :: Nil
nList: List[Int] = List(1, 2, 3, 4)
@ nList.fil
filter     filterNot
@ nList.filter( _ > 2)
res17: List[Int] = List(3, 4)

@ // for comprehensions
@ oldList
res19: List[Int] = List(1, 2)
@ newList
res20: List[Int] = List(1, 2, 3)
@ for { a <- oldList; b <- newList } println (a+b)
2
3
4
3
4
5
@ // above is imperative form
@ // The functional form for comprehension is:
@ // also called the sequence composition
@ for { a <- oldList; b <- newList } yield a+b
res22: List[Int] = List(2, 3, 4, 3, 4, 5)

@ // Pattern Matching
@ val x = 3
x: Int = 3
@ def ordinal(number: Int):  Unit = number match {
    case 0 => println("One")
    case 1 => println("Two")
    case 2 => println("Three")
    case 3 => println("Four")
    case _ => println("what is this?")
  }
defined function ordinal
@ ordinal(x)
Four

@ // Pattern Matching Types
@ dBef printType(obj: AnyRef) = obj match {
    case s: String => println("This is a string")
    case i: java.util.Date => println("This is a Date")
    case l: List[_] => println("An array eh?")
    case _ => println("dunno who ye are")
  }
defined function printType
@ printType(List(1,1,2))
An array eh?


// Guards
@ def numCatcher(num: Int): Unit = num match {
    case x if x < 10 => println("Number less than 10")
    case y if (y%2 == 0) => println("Is an even number")
  }
defined function numCatcher
@ numCatcher(5)
Number less than 10

@ numCatcher(12)
Is an even number

Miscellaneous notes

sbt plays an important role in the day to day programming of scala. I believe 'sbt' stood for "scala build tool" at one time, but is no longer.

To start working on a scala program, you can start with a simple text editor, however using something like IntelliJ IDEA is probably far more productive.

Creating a "project structure" can be automated. Essentially this boilBs down to creating the build.sbt file, project directory and optional plugins.sbt file inside it, a scala file inside the proper src/main/scala/com/example/projectname/ directory etc., There is little reason to do all this manually, except when you are trying to understand the reason behind such a recommended directory layout.

giter8 ie., the g8 is a tool that can create a project structure based on pre-defined templates. Think of this as paster tool for Python.

When you have g8 installed, creating a new project (say, a basic scala project using this template ), all you have to do is:

$ g8 fayimora/basic-scala-project.g8

A basic scala project

name [Basic Project]: basic-scala
organization [com.example]: com.btbytes
version [0.0.1]:

Template applied in ./basic-scala

$ cd basic-scala
$ ls
build-sbt src

$ sbt run will download the dependencies defined in the build.sbt file,B compile source and run the program.

sbt can also create the files necessary to make this an "IntelliJ IDEA project". For this, we add a dependency to the plugins.sbt file:

#project/plugins.sbt -- add this line
addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

Running sbt gen-idea will generate the IDEA project files (.idea, some .iml).

Launch up IDEA and "open project" and open the root directory of the project. You are now set to work on the code.

Packaging the binary to a .jar:

$ sbt packageBin

Will produce target/scala-2.10/basic-scala_2.10-0.0.1.jar (where basic-scala is the name of the project).

Why not Scala

Concepts

Covariance, Contravariance and Invariance

Reading:

In general, covariant type parameter can be used as immutable field type, method return type and also as method argument type if the method argument type has a lower bound. Because of those restrictions, covariance is most commonly used in producers (types that return something) and immutable types.

Adhoc polymorphism

In this article we discussed the motivation for introducing ad hoc polymorphism and implementing it using the Type Class Pattern in Scala. It allows us to build abstractions which are completely decoupled from the underlying data types on which they operate. Hence we can implement polymorphic functions which operate on types we have no control over, such as types defined in the standard library or some other third party library, without sacrificing the static type safety.

Concurrency (Akka etc.,)

StBreams

Libraries

Tools

  • lihaoyi/Ammonite: Scala Scripting. Ammonite enables shell-like scripting in the Scala programming language.
  • Conscript -- is a tool for installing and updating Scala software programs.
  • giter8 -- is a command line tool to generate files and directories from templates published on github or any other git repository.

SBT

Ensime -- Enhanced Scala

Interaction Mode for Emacs.

Talks

Articles

Blogs

Libraries

  • kantan.csv has good documentation/tutorials.
  • Quill Quoted Domain Specific Language (QDSL) to express queries in Scala and execute them in a target language. The library’s core is designed to support multiple target languages, currently featuring specializations for Structured Query Language (SQL) and Cassandra Query Language (CQL).

REPL

Ammonite REPL is much more featureful than the default REPL and comes with a lot of ergonomic improvements and configurability that may be familiar to people coming from IDEs or other REPLs such as IPython or Zsh.

Links

Scalajs

Scala Native

Scala CLI

With scala-cli, it is quite easy to package a scala program into a standalone program:

scala-cli --power package --native-image Echo.scala -o echo -- --no-fallback

where Echo.scala is:

object Echo {
def main(args: Array[String]): Unit =
	println(args.mkString(" "))
}
$ ls -alrt echo
-rwxr-xr-x@ 1 pradeep  staff  14120984 Aug 23 17:15 echo
$ du -sh echo
 13M    echo

Books

Tutorials

Indyscala notes

Feb 6, 2017 -- Resource management in Scala

Presenter -- Ross A. Baker

May 1, 2017

notes#jvm#programming-language#scala

Mercury Programming Language

Mercury language -- Home page

Mercury combines (predicate) logic programming and one of the more rigorous type systems to give a programming language that is declarative, efficient and consistent.

-- Good explanation of Mercury syntax by Markus Triska, a prolog programmer; Apr 2019.

notes#programming-language

Ada Programming Language

Why Ada

Blogs

Ada learning resources

Ada Code examples

Ada Editors

Ada Books

  • Ada for Software Engineers
  • Concurrent and Real-Time Programming in Ada

Ada resources on the net

Ada articles

I don't know if Zen of Python was directly influenced by the Steelman document, or it's a result of convergent evolution, but they bear a striking similarity in their spirit. Perhaps it's simply because they should be requirements for any well designed language!

notes

Kubernetes

Articles

Related software

Learn

I had a similar experience myself with Kubernetes. The first time I tried to learn it, it was a bewildering morass of jargon—all those namespaces and containers and Pods and Deployments and Services and Ingresses just to get a simple HTTP server running! Then I read a networking textbook and everything made much more sense. The (arguably) most complicated parts of Kubernetes exist to solve networking-related problems—allowing hundreds of containers to talk to each other independently while hosted on a much smaller set of computers—so the networking textbook gave me a schema onto which I could hang all my Kubernetes factoids. Once I knew how Linux’s IP routing, iptables, and network namespaces worked, it was much easier for me to understand what exactly something like “kube-proxy” was doing. -- In defense of blub studies

News

A better Kubernetes, from the ground up · blog.dave.tf; Nov 2020

Tools

notes

Splunk

Remove indexes and indexed data:

splunk stop
splunk clean eventdata -index _internal -f

See search history - |history

See also:

notes

GNU/Linux, MacOS

See also:

Keep in mind to explore:

Notes

  • To convert the .pub file into pem format -- ssh-keygen -f rsa.pub -e -m pem
  • pidof <appname> returns the pid of the application. useful for killing the app etc..
  • The sock file for mysql5 installed using macports lives at /opt/local/var/run/mysql5/mysqld.sock . You will need this when using thirdy party SQL clients such as Seqel Pro
  • Use python_select to select the default python that is used on your mac.
  • If a download is corrupted while installing from macports, try sudo port clean --all <the offending package>
  • Upgrade ports and all other software: sudo port selfupdate and sudo port upgrade outdated.
  • X environment tricks for Mac OS X.

Pick up *NIX skills

Installing OpenJDK on Mac OSX

  • Download Soylatte

  • Unzip to ~

  • Edit ~/.bashrc and add these lines:

     JAVA_HOME=~/java
     export JAVA_HOME
     export PATH=~/java/bin:$PATH
     
  • activate changes with $source ~/.bashrc

Burning ISO images to CD/DVD from shell

DVD:

$ growisofs -dvd-compat -Z /dev/hdc=dvd.iso

CD: Find out the cd recording device using cdrecord -scanbus

$ $ cdrecord -scanbus
scsibus2:
        2,0,0   200) 'HL-DT-ST' 'DVDRAM GH22NS50 ' 'TN01' Removable CD-ROM

Use cdrecord to burn.

$ cdrecord -v -dao dev=2,0,0 speed=8 file.iso

don't want namservers handed out by local DHCP server?

Comment out domain-name-servers, in /etc/dhcp/dhclient.conf.

Tell apt to add new pgp key to its list

$ curl -s http://someurl/key.pgp | sudo apt-key add -
$ sudo apt-key list

Label Drives using e2label command

$ sudo e2label /dev/sdg1 emdebian

Compiling stuff in 32 bit mode on Mac OSX 10.6

Add these flags to ./configure.

CFLAGS="-O -arch i386" CXXFLAGS="-O -arch i386" LDFLAGS="-arch i386"

Produce print ready copies of man docs

$ man -t `man -w tmux` | ps2pdf - tmux.pdf

Change keyboard layout in the shell

$ setxkbmap us

2014/11/25: swapped caps and left-ctrl. Put line below in /etc/default/keyboard

XKBOPTIONS="lv3:ralt_alt,compose:menu,ctrl:nocaps"

and run sudo dpkg-reconfigure keyboard-configuration and confirm changes to keep the changes you have made.

find memory usage by a process(?)

$ ps -Ao pid,rsz,args | grep <name>

src

Enabling anti-aliased fonts on Ubuntu

Edit $IDEA/bin/idea.vmoptions file and add these options:

-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=lcd

The above options managed to get smooth font rendering on Ubuntu 12.10 using OpenJDK7.

Resources

OpenBSD

Minix

Debian

Measuring stuff

  • osquery -- allows you to easily ask questions about your Linux and OSX infrastructure. Whether your goal is intrusion detection, infrastructure reliability, or compliance.

Running log of things

notes

Computer Science

A jumping off point for cs topics.

Curriculum

Concepts

  • CS for all -- "In a nutshell, our objective is to provide an introduction to computer science as an intellectually rich and vibrant field rather than focusing exclusively on computer programming. While programming is certainly an important and pervasive element of our approach, we emphasize concepts and problem-solving over syntax and programming language features." At Mudd, this course is taken by almost every first-year student—irrespective of the student’s ultimate major—as part of our core curriculum.

  • Introduction to Theoretical Computer Science "This is a textbook in preparation for an introductory undergraduate course on theoretical computer science. I am using this text for Harvard CS 121."

  • The "Computer Science Field Guide" is an online interactive resource for high school students learning about computer science, developed at the University of Canterbury in New Zealand.

  • Graph Coloring Methods

  • Great Ideas in Theoritical Computer Science -- CS251 at CMU.

Constructing proofs in the context of CS

via this twitter discussion

Reading Lists

Forgotten ideas of Computer science

Joe Armstrong, the creator of Erlang programming language, asked on twitter (2018/1/11):

: "I’m interested in the forgotten ideas of computer science. Needed for a talk.Can you post examples of great CS ideas that have been largely forgotten. Examples: Linda tuple spaces, Boyer-Moore algorithm". Fascinating response.

ChanningWalton:

: Linda tuple spaces (cf: Fly object space by @NigeWarren, gigaspaces's commercial offering). "What are tuple spaces and Linda tuple spaces good for?" One use is the blackboard idea. Tuples are put into the space, processes observing the space can be notified of interesting tuples, ‘take’ one or all, perform work and ‘put’ new tuples into the space for other workers to pick up. Tuples can also be leased out from the space, this guarantees only one process can lease a tuple to do something with it. JavaSpaces is based on these ideas. [Argorak: Interesting. Has this influenced the idea of a "document based application" comes from in OS X? Which for example doesn't close when the last window closed, ready for handling others?] Not really, that's how OS 9 works also. The "document-based" thing in OS X is mostly about a way of structuring the OOP in your application to best take advantage of the builtin capabilities of NSDocument. The most OpenDoc-y idea in OS X is the little-used "Services" menu. Oddly OpenDoc DID massively influence Microsoft, who stripped down the basic concept to a less-ambitious, but much more practical, set of ideas around IPC/software components. Their version was called OLE, which became COM, which set the basic design of C#/.NET.

enkiv2:

: Transpointing windows Regex derivatives Enfilades Cord routing

: Specific tech: 9p, MUMPS, XU88, network-transparent object method forwarding, icon/unicon, APL, bitmapped keyboards, literal cranks for debugging, distributed expert systems (like the 5th generation computer project)

: Plan9, Xanadu, colorforth, the legacy Amiga community, & the Squeak Smalltalk community each have a greater number of interesting ideas than the whole of the web dev & devops world combined, and all those ideas are 30+ years old.

Hillelogram:

: APLs and special purpose langauges, Program Synthesis For Declarative Building Design

thompson_si:

: - Lucid - coroutines

rtraschke:

: - Croquet TeaTime protocol for synchronised distributed objects

  • Arena based memory allocation
  • Using make to describe artefact dependencies, instead of as a programming language

robertrodermann:

: Inmos Transputer, Occam. π-calculus

mcclure111:

: OpenDoc -- Briefly in the mid-90s Apple and IBM collaborated on a tech that inverted the idea of a gui "application" and refocused around "documents" as the core idea. You'd be working on a piece of data, and software would exist sort of in a cloud around your document things you previously wrote as an application would be broken down into a cloud of individual features. Features could be mixed and matched from different apps, so you could be in Word using Wordperfect's spellchecker and editing one of the graphics using Photoshop's tools.

@andrew_j_stone:

: E (programming language) (justincormack: Still alive in capnproto rpc! Directly based on E https://capnproto.org/rpc.html) (evanplaice: The capabilities sound eerily like modern JS + AJAX + Rxjs/promises/async/await. Specifically, the event-callback model to avoid deadlocking, fetchi g distributed resources asynchronously, and using promises to ensure order of execution on async code.)(KentonVarda: The concept of a Promise in both Cap'n Proto and JavaScript is derived from E's promises, hence they all look similar. However, "capabilities" are an entirely separate concept, not directly related to promises or async event loops. On the Cap'n Proto RPC page, scroll down to "distributed objects" -- that's the part about capabilities.)

jcoplien:

: 1s complement arithmetic. Lissajou status trace console displays with the upper 8 address bits driving the X-axis and the lower 8 bits driving the Y-axis. Twister-card memory. BCD ALUs. ABACABAD scheduling. Leaky bucket counters. Coroutines. Buddy system. Use of XOR'ed links to traverse a list in either direction with just one link field. And, to be snarky, object-oriented programming, forgotten in about 1980 and replaced by class-oriented programming.

jminguillona:

: Bresenham's algorithm for drawing lines and other graphic primitives

GabeMoralesVR:

: More on graphics side of things, but deferred tile-based rendering. Only PVR really explored it, but it makes so much more sense than traditional rasterization. Free z-culling, essentially infinite fill rate, no wasted rasterization. Sadly, apple ditched PVR, so likely dead tech.

exclamatio:

: MASCOT, DARTS, all those '80s real-time system methodologies

Kitten_tech:

: The NetBLT protocol: net flow control/retransmission based on transferring blocks, rather than a stream like TCP.

DavidTWeaver:

: - The Marr Hypothesis

  • Multi-Agent Systems
  • Boids Algorithm
  • Cybernetics (or at least, it doesn't get emphasized in CS anymore)
  • Fuzzy Logic

mhollemans:

: - self modifying code

plragde:

: Treaps. Brzozowski derivatives. FKS perfect hashing. (TommyEttinger: Brzozowski derivatives and their successors in partial derivatives are still actively studied in some circles, though I think they have a ways to go to catch highly-optimized traditional regex libraries for efficiency. Great potential though.) (ysr1729: They have been used in decision problems in logic and computer science -- e.g. for satisfiability of interval temporal logic using automat-theoretic methods.)

Ngnghm:

: Orthogonal Persistence. Reflection. Fexprs. Lisp Machines. The Systems Paradigm. FORTH. The TUNES project. Having lots of simple connected CPUs with each unit of RAM, instead of a overly complex and securitywise hazardous central CPU behemoth (connection machine, greenarrays). (phenidone: Persistence: true and that makes me a little sad - my PhD on GC was implemented in an orthogonal-persistence storage layer. Reflection is still a big thing at least in Java-land, and there is a bit of a forth fanboy-revival in the microcontroller space.)

madrawls:

: clockless flow computing

danbjson:

: Analogous machines, ie solving a diffential differential equation by building an electric circuit with the same characteristics and then measuring the current over time.

KalmanReti:

: Pattern matching as a primitive operation in a language SNOBOL

hypercubed:

: (3) Stanford Seminar - Concatenative Programming: From Ivory to Metal - YouTube

notes

Lists

The best facts I heard this year (2025) - Zhengdong Wang; list of facts overheard.

Agnes Callard's 51 tips, via Zhengdong Wang


Prompt: What lists do you keep?; My attempts at thinking what could be good^Hfun lists to keep:

  • books to read
  • authors to read
  • places to visit
  • temples to visit
  • shlokas and mantras to memorize
  • list of opening phrases to break ice
  • list of questions to get people to talk to you/know them.
  • list of songs to sing
    • solo
    • in a grownup group
    • in a childrens group
    • devotional
    • in different languages
  • newsletters that I subscribe to
  • Talks I liked


See also: reading-lists

notes

Racket Programming Language

Libraries

  • Video Language -- "Video is a language for making movies. It combines the power of a traditional video editor with the capabilities of a full programming language."

Articles

Code

Exciting

Videos

My notes

  • Racket cannot pin version dependencies yet. Does common-lisp have the same issue? Is it a Lispism?

notes#programming-language