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

Archive

9,623 entries: 58 from X, 8,925 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

Showing 401–450 of 547Folder notes ×

2022

Markup languages

djot

"Djot is a light markup syntax. It derives most of its features from commonmark, but it fixes a few things that make commonmark's syntax complex and difficult to parse efficiently. It is also much fuller-featured than commonmark, with support for definition lists, footnotes, tables, several new kinds of inline formatting (insert, delete, highlight, superscript, subscript), math, smart punctuation, attributes that can be applied to any element, and generic containers for block-level, inline-level, and raw content. "

  • by John MacFarnale of pandoc
  • implemented in Lua
  • custom pandoc reader
  • custom pandoc writer
  • luarocks install djot

Idyll

"Idyll can be used to create explorable explanations, write data-driven stories, and add interactivity to blog engines and content management systems. The tool can generate standalone webpages or be embedded in existing pages."

  • expands on markdown syntax
  • implemented in javascript
  • github
  • gallery
  • variables declared like -- [var name:'x' value:10 /]
  • datasets -- [data name:'myData' source: 'myData.csv' /]

Articles


See also Static Site Generators

notes#markdown#markup-language

Text search engines

PostgreSQL

Postgres as a search engine

Smaller alternatives to Elasticsearch without all the features

valeriansaliou/sonic: 🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

  • does not ship with a web frontend
  • from HN comment: "Sonic here only returns document identifiers so you will never be able to get document information back. This is very useful though if all you want to do is index text data and then get the stored information from another data store."

quickwit-oss/tantivy: Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust.

  • written in Rust
  • quickwit-oss/tantivy-cli has a quick onboarding via command line and provides an API that returns JSON search results.
  • "UI" is the JSON search endpoint

meilisearch/meilisearch: A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow.

nathell/smyrna

  • written in Clojure
  • "Smyrna is a concordancer and statistical analyzer for metadata-rich corpora in Polish."

zinclabs/zinc: ZincSearch. A lightweight alternative to elasticsearch that requires minimal resources, written in Go.

  • written in Go

More full featured alternatives to Elasticsearch

Manticore: a faster alternative to Elasticsearch in C++ with a 21-year history

Vespa.ai "store, search, organize and make machine-learned inferences over big data at serving time."

Commercial offerings

Static Search

Pagefind | Pagefind — Static low-bandwidth search at scale

is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure.

Pagefind runs after Hugo, Eleventy, Jekyll, Next, Astro, SvelteKit, or any other website framework. The installation process is always the same: Pagefind only requires a folder containing the built static files of your website, so in most cases no configuration is needed to get started.

After indexing, Pagefind adds a static search bundle to your built files, which exposes a JavaScript search API that can be used anywhere on your site. Pagefind also provides a prebuilt UI that can be used with no configuration. (You can see the prebuilt UI at the top of this page.)

The goal of Pagefind is that websites with tens of thousands of pages should be searchable by someone in their browser, while consuming as little bandwidth as possible. Pagefind’s search index is split into chunks, so that searching in the browser only ever needs to load a small subset of the search index. Pagefind can run a full-text search on a 10,000 page site with a total network payload under 300kB, including the Pagefind library itself. For most sites, this will be closer to 100kB.

Articles

notes#database#text-search

Redbean

Redbean single-file distributable web server is built using cosmopolitan.

Redbean's home page does a great job of explaining what the software does:

rebean is an open source webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share.

redbean embeds Lua, SQLite, and MbedTLS into a fork() driven application server that benchmarks at 1.1 million qps on a personal computer. It's got a live bestline REPL with code completion and a UNIX module too, that lets you directly use the Cosmopolitan Libc system call interface. redbean furthermore provides sandboxing and system call tracing for security. This makes redbean a great fit for when you want to build an app that's vertically integrated into a single tiny file that runs on nearly all PCs and servers.

--

Deploying a redbean app to Fly from Simon Willison’s TILs

Redbean Tiddlywiki Saver: rpdillon.net; Nov 2022.

shmup/awesome-cosmopolitan: List of Cosmopolitan Libc related resources and projects

Fullmoon is a Fast and minimalistic Redbean-based Lua web framework in one file by Paul Kulchenko, the creator of ZeroBraneStudio, a Lua IDE.

notes#c#embedded#lua#sqlite#webserver

Kotlin Programming Language

Reading

For the Pythonista

Kotlin uses >>> as the prompt for it's REPL. This is nice and familiar for a Pythonista.

Looping

This program in Python

fruits = ['apple', 'orange', 'banana']
for i, f in fruits:
    print(f'{i+1}\t{f}')

in Kotlin becomes:

val fruits = listOf("hello", "world", "apple")
for ((i, f) in fruits.withIndex()) {
	println("${i+1}\t${f}")
}

A lot more () and {}, I know.

News

My Thoughts on Kotlin: Perspectives after 4 years – tylerrussell.dev; Jan 2025

notes#java#kotlin

parquet

Parquet: more than just "Turbo CSV" a quick intro to why you should add parquet to your toolchain as a data engineer, via csvbase by cal peterson.

Chapter I: The birth of Parquet | The Sympathetic Ink Blog


manojkarthick/pqrs: Command line tool for inspecting Parquet files

brew install manojkarthick/tap/pqrs
# or if you have rust toolchain installed, as I do.
cargo install pqrs

--

multiprocessio/dsq: Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more.

--

maxcountryman/warc-parquet: 🗄️ A simple CLI for converting WARC to Parquet.

cargo install warc-parquet

notes#parquet

Duckdb

davidgasquez/awesome-duckdb: 🦆 A curated list of awesome DuckDB resources

Papers

Articles

Products

Videos

Tutorials

Tools

Discussion

Integration

Greybeam as an alternative for expensive Snowflake workloads using DuckDB.

  • Greybeam provides compute infrastructure to automatically route each query to its optimal engine.
  • Greybeam caches your Snowflake data as Apache Iceberg tables in a bucket you own. Provision it with Terraform, CloudFormation, or any IaC tool you already use.
  • If your tool connects to Snowflake, it already works with Greybeam. Just replace your connection string and your analytics tools will work exactly as they do today.
  • Greybeam manages the query engines, translates your SQL, and automatically routes each query to the most efficient engine. You don't change a single query.

--

See also: Parquet

notes#database#duckdb#sqlite

Books with Small Chapters

I like books with small chapters. Good for a quick pick me up reading.

  1. Ready for Anything by David Allen
  2. The Art of Thinking Clearly by Rolf Dobelli
  3. The Art of the Good Life by Rolf Dobelli
  4. The Daily Stoic by Ryan Holiday
  5. Zen Flesh Zen Bones by Paul Reps
  6. The portable Curmudgeon by Jon Winokur
  7. Zen to Go b Jon Winokur

notes#bookshelf

Vector Databases

What is a Vector Database? from the pinecone.io team.

Common Use cases for vector search:

  • Semantic Search
  • Similarity search for images, audio, video, JSON, and other forms of unstructured data
  • Ranking and Recommendation Engines
  • Deduplication and record matching
  • Anomaly detection (eg: IT Threat detection)

Capabilities of a vector database:

  • Vector Indexes for Search and Retrieval
  • Single-Stage Filtering
  • Data Sharding
  • Replication
  • Hybrid Storage
  • API

Vector databases

Articles

References

notes#database#vectordb

Databases

Meta

Databases

From this tweet by Phil Eaton, databases since 2017

notes#database

Linear Algebra

#mathematics #algebra

If you're interested in more great animations for a visual understanding of linear algebra, I can't recommend 3Blue1Brown's "Essence of Linear Algebra" series on Youtube highly enough.

Books

Courses

Videos

Action list

  1. work through my copy of A Programmer's Introduction to Mathematics
  2. work through my copy of Coding The Matrix
  3. purchase Linear Algebra and Learning from Data: Gilbert Strang: 9780692196380: AmazonSmile: Books

notes

Note Taking

Note Taking Apps

Ones I have tried:

Ones I have only heard about (not tried):

See also zettelkasten

notes#note-taking#productivity#second-brain#zettelkasten

Database Systems

Learning

CMU 15-445/645 :: Intro to Database Systems (Fall 2021)

Database Fundamentals

This is when I decided to read the excellent books Database Internals by Alex Petrov and Designing Data-Intensive Applications by Martin Kleppmann. The books piqued my curiosity enough to write my own little database I called dbeel. (in bash)

tontinton/dbeel: A distributed thread-per-core document database --  A distributed thread-per-core document database written in rust. So basically it has a document API like in MongoDB with leaderless replication like in Cassandra and thread-per-core architecture like in ScyllaDB.

Jennifer Widom's Home Page - (March 2020) Stanford's MOOC offering in Databases is now hosted by Stanford's EdX site and consists of five courses:

  1. Relational Databases and SQL
  2. Advanced Topics in SQL
  3. OLAP and Recursion
  4. Modeling and Theory
  5. Semistructured Data

AI Database systems

georgia-tech-db/eva: AI-Relational Database System | SQL meets Deep Learning

Longer Reads

Blogs

Books

Database Internals by Alex Petrov.

The book consists of two parts: Storage Engines and Distributed Systems since that’s where most of the differences between the vast majority of databases is coming from.

Papers

Database Papers that I like · Issue #7 · auxten/go-sqldb

notes#database

PostgreSQL

Why PostgreSQL

PostgreSQL is Enough; and Just Use Postgres for Everything.

Just use Postgres

Quickstart

Pedram Navid | A Fast, Sample Postgres Database with Docker

Learning PostgreSQL

Internals

Articles

Appliances

The Elephant Shed PostgreSQL Appliance bundles and integrates proven components, required for easy management of a PostgreSQL server. Proven tools for all relevant aspects are already preinstalled and preconfigured. The majority of these tools can be controlled via a comfortable web interface. Even experienced PostgreSQL administrators will hardly find an area not covered by Elephant Shed PostgreSQL appliance.

Migrating and upgrading PostgreSQL

  • How we migrated our PostgreSQL database with 11 seconds downtime - Government Digital Service; 2024
  • xataio/pgroll -- is an open source command-line tool that offers safe and reversible schema migrations for PostgreSQL by serving multiple schema versions simultaneously. It takes care of the complex migration operations to ensure that client applications continue working while the database schema is being updated. This includes ensuring changes are applied without locking the database, and that both old and new schema versions work simultaneously (even when breaking changes are being made!). This removes risks related to schema migrations, and greatly simplifies client application rollout, also allowing for instant rollbacks.. Read introductory blogpost on xata.io

Tips and tricks

PostgreSQL and Full Text Search

This is one of the things PG does a good job. Keeping notes.

Using PostgreSQL as a queue / Kafka

So that’s what we built: a new queue backed by a single, and surprisingly simple, Postgres table. Our publishers write to it. Our consumers (workers) read from it. We maintain things like queue ordering by adding an ORDER BY clause in the query that consumers use to read from it (groundbreaking, we know). And we guarantee that jobs won’t be picked up by more than one worker through simple read/write row-level locks. The new system is actually kind of absurdly simple when you look at it. And that’s a good thing. It’s also behaved flawlessly so far.

It comes with several, significant upsides for our team. For one, the application state is no longer spread out over two systems (RabbitMQ storage and Postgres). It’s now centralized in our application database. This makes disaster recovery that much easier, and increases the resiliency of the overall system by removing moving pieces.

To make all of this run smoothly, we enqueue and dequeue thousands of jobs every day.

(the load isn't all that big)


Sequin "A Postgres alternative to Kafka. Get a feature-rich message stream with none of the operational overhead". See Build your own SQS or Kafka with Postgres blog post.

PostgreSQL and ML

  • Home – PostgresML -- An open source Postgres based platform for your interactive AI powered applications. Instantly scale your workloads with dedicated replicas or our serverless GPU accelerated cloud.

PostgreSQL on MacOS

Installing PostgreSQL on a Mac with Homebrew - Daily Dev Tips -- includes tips on how to create a non-postgres user.

Self Hosting

Go ahead, self-host Postgres | Pierce Freeman

PostgreSQL on the cloud

  1. Supabase -- "an open source Firebase alternative. Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, Storage, and Vector embeddings".
    1. postgres.new: In-browser Postgres with an AI interface by Supabase; HN
    2. Postgres Sandbox
  2. Xata -- "serverless data platform for PostgreSQL."
  3. Tembo -- "Tembo is the Postgres developer platform for building every data service."

PostgreSQL-ish databases

Apart from the ones above ("on the cloud"),

Embedded PostgreSQL

PGlite "Run a full Postgres database locally in WASM with reactivity and live sync."

  • under 3MB Gzipped.
  • Dynamic extension loading mechanism, including support for pgvector and PostGIS
  • Built in support for data loading, synchronisation and live query primitives.

notes#database#postgresql#sql

Sublime Text 3

Notes on Sublime Text 3 editor.

My current user config:

{
	"ignored_packages":
	[
		"Vintage",
	],
	"rulers": [80, 100, 120],
	"line_padding_top": 2,
	"line_padding_bottom": 2,
	"theme": "Adaptive.sublime-theme",
	"font_face": "Fira Code",
	"font_size": 16,
	"binary_file_patterns": ["output/*", "website/*"],
	"color_scheme": "Packages/Ublime Color Schemes/Anatomy of Grey Light.tmTheme",
}

My Sublime Text configs: https://github.com/btbytes/st3_user_config (private repo)

notes#editor

Spaced Repetition

Learning is Remembering

  1. You can only understand something if it combines less than 4 new pieces of information.
  2. Learning is an alteration in long-term memory -- Ofstead, 2019

Learning is remembering and the easiest way to start learning faster is to stop forgetting the things you learn.

Learn Exponentially

  1. Spaced repetition is a rapid exponential process
  2. reading takes years to double in effectiveness whereas spaced repetition takes only days.0

you can become more effective than anyone thought you could, use spaced repetition to learn exponentially.

notes#learning#technique

My Surge.sh sites

Surge.sh is super simple way to put up a static web page or a website with multiple static web pages on the web.

npm install --global surge

--

Use surge list to find all your surge websites.

My Surge Sites

notes#elsewhere

The Rules of Civility, by George Washington

  1. Every action done in company ought to be with some sign of respect, to those that are present.
  2. When in company, put not your hands to any part of the body, not usually discovered.
  3. Show nothing to your friend that may affright him.
  4. In the presence of others sing not to yourself with a humming noise, nor drum with your fingers or feet.
  5. If you cough, sneeze, sigh, or yawn, do it not loud but privately; and speak not in your yawning, but put your handkerchief or hand before your face and turn aside.
  6. Sleep not when others speak, sit not when others stand, speak not when you should hold your peace, walk not on when others stop.
  7. Put not off your cloths in the presence of others, nor go out your chamber half dressed.
  8. At play and at fire its good manners to give place to the last comer, and affect not to speak louder than ordinary.
  9. Spit not in the fire, nor stoop low before it neither put your hands into the flames to warm them, nor set your feet upon the fire especially if there be meat before it.
  10. When you sit down, keep your feet firm and even, without putting one on the other or crossing them.
  11. Shift not yourself in the sight of others nor gnaw your nails.
  12. Shake not the head, feet, or legs roll not the eyes lift not one eyebrow higher than the other wry not the mouth, and bedew no mans face with your spittle, by approaching too near him when you speak.
  13. Kill no vermin as fleas, lice ticks in the sight of others, if you see any filth or thick spittle put your foot dexterously upon it if it be upon the cloths of your companions, put it off privately, and if it be upon your own cloths return thanks to him who puts it off.
  14. Turn not your back to others especially in speaking, jog not the table or desk on which another reads or writes, lean not upon any one.
  15. Keep your nails clean and short, also your hands and teeth clean yet without showing any great concern for them.
  16. Do not puff up the cheeks, loll not out the tongue rub the hands, or beard, thrust out the lips, or bite them or keep the lips too open or too close.
  17. Be no flatterer, neither play with any that delights not to be played withal.
  18. Read no letters, books, or papers in company but when there is a necessity for the doing of it you must ask leave: ... come not near the books or writings of another so as to read them unless desired or give your opinion of them unasked also look not nigh when another is writing a letter.
  19. Let your countenance be pleasant but in serious matters somewhat grave.
  20. The gestures of the body must be suited to the discourse you are upon.
  21. Reproach none for the infirmities of nature, nor delight to put them that have in mind thereof.
  22. Show not yourself glad at the misfortune of another though he were your enemy.
  23. When you see a crime punished, you may be inwardly pleased; but always show pity to the suffering offender.
  24. Do not laugh too loud or too much at any public spectacle.
  25. Superfluous complements and all affectation of ceremony are to be avoided, yet where due they are not to be neglected.
  26. In pulling off your hat to persons of distinction, as noblemen, justices, churchmen &c make a reverence, bowing more or less according to the custom of the better bred, and quality of the person. ... Amongst your equals expect not always that they should begin with you first, but to pull off the hat when there is no need is affectation, in the manner of saluting and re-saluting in words keep to the most usual custom.
  27. 'Tis ill manners to bid one more eminent than yourself be covered as well as not to do it to whom it's due likewise he that makes too much haste to put on his hat does not well... ... yet he ought to put it on at the first, or at most the second time of being asked; now what is herein spoken, of qualification in behavior in saluting, ought also to be observed in taking of place, and sitting down for ceremonies without bounds is troublesome.
  28. If any one come to speak to you while you are sitting stand up though he be your inferior, and when you present seats let it be to every one according to his degree.
  29. When you meet with one of greater quality than yourself, stop, and retire especially if it be at a door or any straight place to give way for him to pass.
  30. In walking the highest place in most countries seems to be the right hand therefore place yourself on the left of him whom you desire to honor: but if three walk together the middle place is the most honorable the wall is usually given to the most worthy if two walk together.
  31. If any one far surpasses others, either in age, estate, or merit yet would give place to a meaner than himself in his own lodging or elsewhere the one ought not to except it, so he on the other part should not use much earnestness nor offer it above once or twice.
  32. To one that is your equal, or not much inferior you are to give the chief place in your lodging and he to who 'is offered ought at the first to refuse it but at the second to accept though not without acknowledging his own unworthiness.
  33. They that are in dignity or in office have in all places precedence but whilst they are young they ought to respect those that are their equals in birth or other qualities, though they have no public charge.
  34. It is good manners to prefer them to whom we speak before ourselves especially if they be above us with whom in no sort we ought to begin.
  35. Let your discourse with men of business be short and comprehensive.
  36. Artificers & persons of low degree ought not to use many ceremonies to lords or others of high degree but respect and highly honor them, and those of high degree ought to treat them with affability & courtesy, without arrogance.
  37. In speaking to men of quality do not lean nor look them full in the face, nor approach too near them at lest keep a full pace from them.
  38. In visiting the sick, do not presently play the physician if you do not know therein.
  39. In writing or speaking, give to every person his due title according to his degree & the custom of the place.
  40. Strive not with your superiors in argument, but always submit your judgment to others with modesty.
  41. Undertake not to teach your equal in the art himself professes; it savors of arrogance.
  42. Let thy ceremonies in courtesy be proper to the dignity of his place with whom thou converses for it is absurd to act the same with a clown and a prince.
  43. Do not express joy before one sick or in pain for that contrary passion will aggravate his misery.
  44. When a man does all he can though it succeeds not well blame not him that did it.
  45. Being to advise or reprehend any one, consider whether it ought to be in public or in private; presently, or at some other time in what terms to do it and in reproving show no sign of choler but do it with all sweetness and mildness.
  46. Take all admonitions thankfully in what time or place so ever given but afterwards not being culpable take a time & place convenient to let him know it that gave them.
  47. Mock not nor jest at any thing of importance break no jest that are sharp biting and if you deliver any thing witty and pleasant abstain from laughing thereat yourself.
  48. Wherein you reprove another be unblameable yourself; for example is more prevalent than precepts.
  49. Use no reproachful language against any one neither curse nor revile.
  50. Be not hasty to believe flying reports to the disparagement of any.
  51. Wear not your cloths, foul, ripped or dusty but see they be brushed once every day at least and take heed that you approach not to any uncleanness.
  52. In your apparel be modest and endeavor to accommodate nature, rather than to procure admiration keep to the fashion of your equals such as are civil and orderly with respect to times and places.
  53. Run not in the streets, neither go too slowly nor with mouth open go not shaking your arms kick not the earth with r feet, go not upon the toes, nor in a dancing fashion.
  54. Play not the peacock, looking everywhere about you, to see if you be well decked, if your shoes fit well if your stockings sit neatly, and cloths handsomely.
  55. Eat not in the streets, nor in the house, out of season.
  56. Associate yourself with men of good quality if you esteem your own reputation; for 'is better to be alone than in bad company.
  57. In walking up and down in a house, only with one in company if he be greater than yourself, at the first give him the right hand and stop not till he does and be not the first that turns... ... and when you do turn let it be with your face towards him, if he be a man of great quality, walk not with him cheek by jowl but somewhat behind him; but yet in such a manner that he may easily speak to you.
  58. Let your conversation be without malice or envy, for 'is a sign of a tractable and commendable nature: and in all causes of passion admit reason to govern.
  59. Never express anything unbecoming, nor act against the rules moral before your inferiors.
  60. Be not immodest in urging your friends to discover a secret.
  61. Utter not base and frivolous things amongst grave and learned men nor very difficult questions or subjects, among the ignorant or things hard to be believed, stuff not your discourse with sentences amongst your betters nor equals.
  62. Speak not of doleful things in a time of mirth or at the table; speak not of melancholy things as death and wounds, and if others mention them change if you can the discourse tell not your dreams, but to your intimate friend.
  63. A man ought not to value himself of his achievements, or rare qualities of wit; much less of his riches virtue or kindred.
  64. Break not a jest where none take pleasure in mirth laugh not aloud, nor at all without occasion, deride no mans misfortune, though there seem to be some cause.
  65. Speak not injurious words neither in jest nor earnest scoff at none although they give occasion.
  66. Be not forward but friendly and courteous; the first to salute hear and answer & be not pensive when it's a time to converse.
  67. Detract not from others neither be excessive in commanding.
  68. Go not thither, where you know not, whether you shall be welcome or not. Give not advice without being asked & when desired do it briefly.
  69. If two contend together take not the part of either unconstrained; and be not obstinate in your own opinion, in things indifferent be of the major side.
  70. Reprehend not the imperfections of others for that belongs to parent's masters and superiors.
  71. Gaze not on the marks or blemishes of others and ask not how they came. What you may speak in secret to your friend deliver not before others.
  72. Speak not in an unknown tongue in company but in your own language and that as those of quality do and not as the vulgar; sublime matters treat seriously.
  73. Think before you speak pronounce not imperfectly nor bring out your words too hastily but orderly & distinctly.
  74. When another speaks be attentive your self and disturb not the audience if any hesitate in his words help him not nor prompt him without desired, interrupt him not, nor answer him till his speech be ended.
  75. In the midst of discourse ask not of what one treateth but if you perceive any stop because of your coming you may well entreat him gently to proceed: if a person of quality comes in while your conversing it's handsome to repeat what was said before.
  76. While you are talking, point not with your finger at him of whom you neither discourse nor approach too near him to whom you talk especially to his face.
  77. Treat with men at fit times about business & whisper not in the company of others.
  78. Make no comparisons and if any of the company be commended for any brave act of virtue, commend not another for the same.
  79. Be not apt to relate news if you know not the truth thereof. In discoursing of things you have heard name not your author always a secret discover not.
  80. Be not tedious in discourse or in reading unless you find the company pleased therewith.
  81. Be not curious to know the affairs of others neither approach those that speak in private.
  82. Undertake not what you cannot perform but be careful to keep your promise.
  83. When you deliver a matter do it without passion & with discretion, however mean the person be you do it too.
  84. When your superiors talk to any body hearken not neither speak nor laugh.
  85. In company of these of higher quality than yourself speak not 'til you are asked a question then stand upright put of your hat & answer in few words.
  86. In disputes, be not so desirous to overcome as not to give liberty to each one to deliver his opinion and submit to the judgment of the major part especially if they are judges of the dispute.
  87. Let thy carriage be such as becomes a man grave settled and attentive to that, which is spoken. Contradict not at every turn what others say.
  88. Be not tedious in discourse, make not many digressions, nor repeat often the same manner of discourse.
  89. Speak not evil of the absent for it is unjust.
  90. Being set at meat scratch not, neither spit, cough or blow your nose except when there's a necessity for it.
  91. Make no show of taking great delight in your victuals, feed not with greediness; cut your bread with a knife, lean not on the table neither find fault with what you eat.
  92. Take no salt or cut bread with your knife greasy.
  93. Entertaining any one at the table, it is decent to present him with meat; undertake not to help others undesired by the master.
  94. If you soak bread in the sauce let it be no more than what you put in your mouth at a time and blow not your broth at table but stay till cools of it self.
  95. Put not your meat to your mouth with your knife in your hand neither spit forth the stones of any fruit pie upon a dish nor cast anything under the table.
  96. It's unbecoming to stoop much to ones meat keep your fingers clean & when foul wipe them on a corner of your table napkin.
  97. Put not another bit into your mouth till the former is swallowed. Let not your morsels be too big for the jowls.
  98. Drink not nor talk with your mouth full; neither gaze about you while you are drinking.
  99. Drink not too leisurely nor yet too hastily. Before and after drinking, wipe your lips; breathe not then or ever with too great a noise, for its uncivil.
  100. Cleanse not your teeth with the table cloth napkin, fork, or knife; but if others do it, let it be done without a peep to them.
  101. Rinse not your mouth in the presence of others.
  102. It is out of use to call upon the company often to neither eat; nor need you drink to others every time you drink.
  103. In the company of your betters, be not longer in eating than they are; lay not your arm but only your hand upon the table.
  104. It belongs to the chiefest in company to unfold his napkin and fall to meat first, but he ought then to begin in time & to dispatch with dexterity that the slowest may have time allowed him.
  105. Be not angry at the table whatever happens & if you have reason to be so, show it not; put on a cheerful countenance especially if there be strangers, for good humor makes one dish of meat a feast.
  106. Set not yourself at the upper of the table; but if it were your due or that the master of the house will have it so, contend not, least you should trouble the company.
  107. If others talk at the table, be attentive but talk not with meat in your mouth.
  108. When you speak of god or his attributes let it be seriously & with reverence. Honor & obey your natural parents although they are poor.
  109. Let your recreations be manful not sinful.
  110. Labor to keep alive in your breast that little spark of celestial fire called conscience.

Thread by Joshua Steinman@JoshuaSteinman on Twitter.

notes#advice#history

2021

2020

Luarocks

When you have multiple lua installations, installing libraries for one of those using luarocks:

luarocks --lua-dir=/usr/local/opt/lua@5.1 install say

To install into a custom location, use the --tree /dir/locn option

mkdir -p lenv
luarocks install --tree lenv fennel

Further exploration:

notes#lua

datasette

Datasette is a tool for exploring and publishing data. Uses sqlite for storing data and is written in python and exposes the db over a web interface. support adhoc querying (made posible by mounting the database file in Readonly mode, so destructive operations are possible).

The author -- Simon Willison has substack newsletter for the project.

How he uses datasette -- "What is the killer app for datasette"; Oct 2022.

datasette.io, an official project website for Datasette -- a blog post detailing how datasette is used to publish a website, in this case the website of the project itself. which uses the The Baked Data architectural pattern.

notes#database#datasette#sqlite

Mnemonics

rahukala

Mother Saw Father Wearing The Turban Suddenly

  • Mother = Mon 7.30-9.00
  • Saw = Sat 9.00-10.30
  • Father = Fri 10.30-12.00
  • Wearing = Wed 12.00-13.30
  • The = Thu 13.30-15.00
  • Turban = Tue 15.00-16.30
  • Suddenly = Sun 16.30-18.00

Eshwarappa brought home a good Ford Car

  • Monday => E => fifth letter => 5 * 1.5 = 7.5
  • Tuesday => B => Second letter => 2 * 1.5 = 3
  • Wednesday => ...

ಯಮಾತಾರಾಜಭಾನಸಲಗಂ in Kannada.

Bharath C has a note about learning this mnemonic from his grandfather

notes

To Read

Authors

  • Kalidasa
  • Abhinavagupta
  • Arthashastra of Kautilya -- read R P Kangle's edition
  • Machiavelli -- Discourses on Livy, the Prince
  • Marcel Proust -- In search of lost time
  • Shakespere

History

  • The Decline and Fall of the Roman Empire by Edward Gibbon

Recommendations:

notes#books

podman

Homepage: Podman

Transitioning from Docker to Podman - Red Hat Developer; HN

Using Podman, Compose and BuildKit · emersion; Aug 2025 via HN, see also abiosoft/colima: Container runtimes on macOS (and Linux) with minimal setup

Colima is an alternative for podman on macOS

  • Simple CLI interface with sensible defaults
  • Automatic Port Forwarding
  • Volume mounts
  • Multiple instances
  • Support for multiple container runtimes

User Notes

Add docker.io to podman container registry

Edit /etc/containers/registries.conf and add the following:

[registries.search]
registries = ['docker.io', 'quay.io', 'registry.fedoraproject.org']

[registries.insecure]
registries = []

[registries.block]
registries = []

notes

Donations

दातव्यमिति यद्दानं दीयतेऽनुपकारिणे |

देशे काले च पात्रे च तद्दानं सात्त्विकं स्मृतम् || 20||

dātavyam iti yad dānaṁ dīyate ‘nupakāriṇe

deśhe kāle cha pātre cha tad dānaṁ sāttvikaṁ smṛitam

Charity given to a worthy person simply because it is right to give, without consideration of anything in return, at the proper time and in the proper place, is stated to be in the mode of goodness -- Bhavadgita 17.20.

But when you do a charitable deed, do not let your left hand know what your right hand is doing. -- Matthew 6:3


This page is just a reminder to myself.

2020

  • Vaidika Bharata Global Foundation for Manuscript Digitization Project; Nov 13; $51
  • Toys for Tots through Proofpoint fundraising campaign; Nov 2; $20
  • Gleaners food bank; Oct 14; $101
  • Internet Archive; Jun 5; $51
  • Akshaya Patra Foundation USA; Ap 13; $300
  • Gleaners food bank; Apr 2; $25
  • Khan Academy; Mar 29; $51
  • HTCI; Feb 9; $51

notes

onlisp

To fix Paul Graham's On Lisp for printing at Lulu.com, I had to fix the embedded fonts:

gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
 -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
 -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \
 -dEmbedAllFonts=true -sOutputFile=onlisp-fonts-embedded.pdf -f onlisp.pdf

The resulting files:

$ ls -l onlisp*
-rw-r--r--@ 1 pradeep  pradeep  1253063 Jun  6 17:35 onlisp-fonts-embedded.pdf
-rw-rw-rw-@ 1 pradeep  pradeep  1030575 Jun  6 15:38 onlisp.pdf

notes#lisp

learning-python

Occasionally, I am asked to recommend good resources to learn Python. This page is a work in progress to list a few.

  1. Practical Python Programming by David Beazley (https://dabeaz.com). David is a well known Python educator and speaker. His PyCon talks (often keynotes) are standing-room-only. He has also written Python Cookbook which can be a good book to learn pythonic, idiomatic solutions to common programming challenges.

notes

Indian History Books

Important Indian History Authors

Books

Many of these are available on archive.org.

Bharatiya Vidya Bhavan

Chief editors: R C Majumdar and S Ramakrishnan

History and Culture of the Indian People, Volume 01, The Vedic Age archive.org link

History and Culture of the Indian People, Volume 02,The Age Of Imperial Unity archive.org link

History and Culture of the Indian People, Volume 03, The Classical Age archive.org link

History and Culture of the Indian People, Volume 04, The Age Of Imperial Kanauj archive.org link

History and Culture of the Indian People, Volume 05, The Struggle For Empire archive.org link

History and Culture of the Indian People, Volume 06,The Delhi Sultanate archive.org link

History and Culture of the Indian People, Volume 07, The Mughul Empire archive.org link

History and Culture of the Indian People, Volume 08, The Maratha Supremacy archive.org link

History and Culture of the Indian People, Volume 10, British Paramountcy And Indian Renaissance, Part 2 archive.org link

History and Culture of the Indian People, Volume 11, Struggle for Freedom, Part 1 archive.org link

South India

K A Nilakanta Sastri

Published by Oxford University Press

A History of South India by K A Nilakanta Sastri archive.org link

The cōḷas by K A Nilakanta Sastri archive.org link

The Pandyan kingdom by K A Nilakanta Sastri archive.org link

Life in Ancient India

A L Basham

The Wonder That Was India archive.org link

Radha Kumud Mookerji

Ancient Indian education archive.org link

Local Government in Ancient India archive.org link

State and government in Ancient India archive.org link

R C Majumdar

Corporate life in Ancient India archive.org link

A S Altekar

Education in Ancient India archive.org link

Vasudev S Agrawala


The above page was a result of a twitter discussion on May 25, 2020, the person asking for recommendation finally settled on these books:

  • Bharatiya Vidya Bhavan Series: History and Culture of the Indian People (11 volumes)
  • The Wonder That Was India (A.L. Basham)
  • South Indian History (Neelakantha Sastry)
  • Land of the Sever Rivers (Sanjeev Sanyal)
  • Ancient India (R.C. Majumdar)
  • Medieval India (J.L. Mehta)
  • Modern India (Shekhar Bandopadhyaya)

notes

\u015Blokah

Popular ślokas in Devanāgarī script.

Ganesha:

वक्रतुण्ड महाकाय सूर्यकोटि समप्रभ ।
निर्विघ्नं कुरु मे देव सर्वकार्येषु सर्वदा ॥

Shanti Mantra:

असतो मा सद्गमय तमसो मा ज्योतिर्गमय ।
मृत्योर्मा अमृतं गमय ॐ शान्तिः शान्तिः शान्तिः ॥

Shiva:

कर्पूरगौरं करुणावतारम् संसारसारं भुजगेन्द्रहारम् ।
सदा वसन्तं हृदयारविन्दे भवं भवानीसहितं नमामि ॥


त्वमेव माता च पिता त्वमेव त्वमेव बन्धुश्च सखा त्वमेव ।
त्वमेव विद्या द्रविणम् त्वमेव त्वमेव सर्वम् मम देव देव ॥

Sri Raghavendra:

पूज्याय राघवेंद्राय सत्यधर्मरताय च।
भजतां कल्पवृक्षाय नमतां कामधेनवे॥

Hanuman:

मनोजवं मारुततुल्यवेगं जितेन्द्रियं बुद्धिमतां वरिष्ठ ।
वातात्मजं वानरयूथमुख्यं श्रीरामदूतं शरणं प्रपद्ये ।

Saraswati:

Guru:

notes

Diagrams

Community list of comparisons between Text to diagram tools

Diagrams python library allows you to draw architectural diagrams for AWS, and other clouds using Python code.

from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Grouped Workers", show=False, direction="TB"):
    ELB("lb") >> [EC2("worker1"),
                  EC2("worker2"),
                  EC2("worker3"),
                  EC2("worker4"),
                  EC2("worker5")] >> RDS("events")

Output:


My own wrapper for https://www.websequencediagrams.com/ is pywsd.

There is a Pure python implementation for WSD here



Isoflow -- Create beautiful cloud diagrams in minutes. Easily create isometric diagrams, for presentations, documentation and illustrations

Penrose | Penrose -- Create beautiful diagrams just by typing notation in plain text. See Examples.

https://excalidraw.com -- online drawing tool.

  • supports exporting drawn diagrams to SVG and PNG directly from right click.
  • has Libraries support to load library of shapes, icons etc.

notes

Kananda keyboards

MacOS

Lipika IME works well on MacOS Ventura on Macbook Air M2 chip - March 2023. You will have to download the compiled LipikaIME.pkg file from it's github releases page.

Some screenshots as seen on MacOS Ventura (Mar 29, 2023).

Keyboard Ventura

Keyboard ventura { width=300px }

Keyboard Settings on MacOS Ventura

Keyboard settings { width=300px }

Lipika settings

Lipika settings { width=300px }


Old notes:

For Mac, Let's investigate MacUIM as given by Shreevatsa. MACUIM no longer works.

Linux

Old notes: On Linux: Setting up Kannada Input on Ubuntu

notes#kannada#macos

Static Site Generators

Some notes and links on Static Site Generators (SSG).

A "hello world" program for the 2010's (and 2020s).

Articles

Why You Should Write Your Own Static Site Generator; Nov 2023.

The understated innovation of static site generators

Smaller Static Sites with New Formats - 2022. Optimizing Fonts, Images etc using newer formats and tools.

Elements Of a Great Markup Language

"... static site generator which takes a bunch of input documents, a custom conversion script, and outputs a bunch of HTML files."

low touch - hosted SSG

Desktop SSG

Publii - Open-Source CMS for Static Site

Static site generators

roman-kashitsyn/mmapped.blog that powers mmapped.blog is a Go program that implements? subset of latex and converts it to HTML. See the "blogware" source code.

Kitten: Home A 💕 Small Web development kit. Build using #html, #css , and #javascript . Progressively enhance with Streaming HTML and #htmx

jemdoc -- light text-based markup language designed for creating websites. Based on Asciidoc. Has #latex support for math, but the equations are rendered as static images, not MathJax etc.,. Appears to be popular with academics.

JBake - Java based open source static site/blog generator -- this is actually surprisingly smooth.

nuex/zodiac: A static website generator written in awk and sh.

Makefile-Based Static Website Generator

Makefile and discount powered blog

Static site generator with rsync and lowdown - Roman Zolotarev [SSG]

kambrium/dssg: A static site generator written in D

sysgears/grain: Static Web Site Building Framework For Groovy that uses ASCIIdoctor

Static site generators need less rigid content APIs | Hacker News

Hammer for Mac 6.9 - Available Now

jeremycw/mfbg: Mother F*ing Blog Generator -- a Makefile + pandoc.

Home - Styx Static Site Generator -- The Purely Functional Static Site Generator. Styx is a functional static site generator based on the Nix package manager.

srid/rib-sample: Sample site for the Rib static site generator

Pelican 4.2.0 — Pelican 4.2.0 documentation with m.css looks very good.

bastibe/org-static-blog: A static site generator using org-mode

Lume, the static site generator for Deno - Lume

jorge  is a personal (small + opinionated) site generator inspired by Jekyll, written in Go, with org-mode and markdown support.

Static site generator for Django - Django Distill

Headless SSG

Deployments

surge.sh:

Examples of surge.sh sites:

Commenting systems

Search for static sites

Not exactly SSG

Crazy / Fun static site generators

Typst

Rheo? is an typesetting and static site engine for Typst.

notes#markdown#markup-language#static-sitegen

Makefile

Why Makefile?

How Make?

Tutorials

Tips and Tricks

  • Polyglot makefiles

    .ONESHELL: python: SHELL := python3 python: greeting = "hello" print(f"{greeting}, python!")

Examples of good use of Makefile

Makefile companions -- autotools, premake, scons, cmake

Make-like

  • Just " is a handy way to save and run project-specific commands." - just is a command runner, not a build system, so it avoids much of make’s complexity and idiosyncrasies. No need for .PHONY recipes!
  • cmake
  • Pants
  • tup is a file-based build system for Linux, OSX, and Windows. It inputs a list of file changes and a directed acyclic graph (DAG), then processes the DAG to execute the appropriate commands required to update dependent files. Updates are performed with very little overhead since tup implements powerful build algorithms to avoid doing unnecessary work. This means you can stay focused on your project rather than on your build system.
  • casey/just: 🤖 Just a command runner ⚡
  • xmake A cross-platform build utility based on Lua Simple, Fast, Cross-platform Modern C/C++ build tools, Support multi-language hybrid compilation.

notes#make

Common Lisp

Why

Why I Chose Common Lisp — Dan's Musings; Jan 2025.

Core

Learning

If you are a beginner to CL, this challenge will help you to get started with setting up a development environment from scratch and begin the journey of learning CL together with other community members.

Reading /practicing CL programming

Scripting

Common Lisp as a Scripting Language, 2015 edition - Cybernethics / Cybernéthique — LiveJournal

Install cl-launch:

git clone https://gitlab.common-lisp.net/xcvb/cl-launch.git
cd cl-launch
make
make install
which cl
/usr/local/bin/cl

Example script -- cllaunch1.lsp:

#!/usr/bin/cl -sp lisp-stripper -E main
(defun main (argv)
  (if argv
      (map () 'print-loc-count argv)
      (print-loc-count *standard-input*)))

Run it: chmod +x cllaunch1.lsp

Fails with: Component "lisp-stripper" not found, required by #<SYSTEM "cl-launch-build-0">

To fix this, i cloned https://github.com/fare/lisp-stripper to ~/common-lisp, and the above problem goes away. Next it fails to find cl-ppcre.

I do remember installing it using quicklisp -- ls ~/quicklisp/dists/quicklisp/software/cl-ppcre-20190521-git.

Distributing CL binaries

Links

Common Lisp Books

Blogs

Projects

Fairly recent Common Lisp project that is not just a web application etc., -- https://github.com/atgreen/red-light-green-light -- "A git-centric policy management and enforcement tool designed to accelerate your CI/CD pipelines."

Opusmodus -- "Music Composition System"

Opusmodus revolutionizes music composition, fuses traditional notation with modern concepts, and streamlines the path to a finalized score.

Editing

notes#lisp#programming-language

SQL

SQL Words
SQL Words (via)
## On SQL

Learning resources

Select Star SQL "... is an interactive book which aims to be the best place on the internet for learning SQL. It is free of charge, free of ads and doesn't require registration or downloads. It helps you learn by running queries against a real-world dataset to complete projects of consequence. It is not a mere reference page — it conveys a mental model for writing SQL". Very nicely laid out (credits M. Buttrick of "Practical Typography").

SQL Teaching - The easiest tutorial to learn SQL

SQLBolt - Learn SQL - Introduction to SQL ... a series of interactive lessons and exercises designed to help you quickly learn SQL right in your browser. Related website - regexone

Advanced SQL window functions quiz

SQL style guide by Simon Holywell

How Does a Database Work? | Let’s Build a Simple Database

Learn SQL while solving crimes! SQL Police Department

SQL for Data Scientists in 100 Queries

SQL visualization/query/notebook tools

Redash -- can be self hosted.

Franchise: a sql notebook -- runs local proxy on your system. the UI itself is on franchise.cloud website. Can also run locally.

apache/incubator-superset: Apache Superset (incubating) is a modern, enterprise-ready business intelligence web application

forbesmyester/esqlate -- Build minimum viable admin panels quickly with just SQL. uses node.js proxy behind nginx. template queries are written using JSON and the "holes" are filled by user to get the results back. Users can also add new records.

The Log File Navigator --

  • An advanced log file viewer for the small-scale
  • Watch and analyze your log files from a terminal.
  • No server. No setup. Still featureful.
  • Many logging tools, like Splunk, provide great features but are optimized for large-scale deployments. They require installing and configuring servers before they can be effectively used. There is still a need for a robust log file analyzer for the terminal.
  • Just point lnav to a directory and it will take care of the rest. File formats are automatically detected and compressed files are unpacked on the fly.
  • Log files are a wealth of information, lnav can help highlight the parts that are important and filter out the noise.

Editors / IDEs

Command line tools

Translation tools

Frameworks

LLM

A Survey Paper (Shi et al. 2024)

Text-to-SQL parsing solves this issue by converting natural language queries into SQL queries, thus making database access more accessible for non-expert users. To take advantage of the recent developments in Large Language Models (LLMs), a range of new methods have emerged, with a primary focus on prompt engineering and fine-tuning. This survey provides a comprehensive overview of LLMs in text-to-SQL tasks, discussing benchmark datasets, prompt engineering, fine-tuning methods, and future research directions.


See also Query Languages

References

notes#database#sql

Software Engineering

A Senior Engineer's CheckList - Little Blah


Learning

Software carpentry - Our Lessons Over the course of the workshop, instructors teach our three core topics: the Unix shell, version control with Git, and a programming language (Python or R).

Paper reviews

Done as part of CSCI 50400 class under Dr. Hill at IUPUI.

No Silver Bullet by Fred Brooks

(Brooks 1987)

This paper by Fred Brooks addresses the inherent difficulties involved in the construction of software. The author distinguishes between the accidental difficulties, which affect the process of development but are not inherent to the final system and essential difficulties, which are inherent to the system. The progress in hardware technology, development of new, higher level programming languages and constructs help in mitigating the accidental difficulties. Of the silverbullets proposed, some have influenced the direction of software development (eg: Ada, OOP), others like program verification, IDEs, cheap & abudant processing power have managed to affect the accidental complexity to a large extent. Expert systems, AI, automated & graphical programming are of little help in deciding and defining what the software should do. The author identifies complexity, conformity, changeability and invisibility as the essential properties of the system. Developing and distributing reusable software components in place of custom development has the benefit of reduced costs via cost-sharing, improved documentation and generalisation of features required by the cross-section of the users. Rapid prototyping allows the clients to narrow down the scope of their requirements in faster fashion and also helps in understanding the capabilities of software systems in an iterative process. Moving beyond the idea of writing software to growing software boosts the morale of engineers and stakeholders alike. All of these proposed methods have to championed by great designers who are trained in sound design methodoligies, have the ability to distinguish between good and great designs and over time develop the capability to deliver structures that are efficient, simple and effective. Managing the entropy generated by the interplay of people, software, hardware is at the core of software engineering. The success of RAD tools has given credence to the rapid prototyping approach. Practicing software construction as an ongoing activity encourages the designers to make choices that address the essential problems instead of getting lost in the accidental aspects, which in practice demand significant attention. Many recent software development methodologies such as continuous integration, agile programming, emphasise the importance of the engineers, and customers having access to the software as it is built. This allows all the stakeholders to get familiar with the system capability from top-down and consequently influence the direction of software development. The idea of software a living, growing entity is a powerful one and one that encourages the desiger to make decisions that are congruent with that expectation. The pervasive adoption of component vendors and Open source software development model has proven that the "buy over build" approach has succeeded spectacularly. reviewed: Aug 22, 2012

Quantitative evaluation of software quality by Boehm

(Boehm et al. 1976)

Software quality evaluation deals with fundametal issues such as: defining characterstics of software quality that are measureable and non-overlapping, how well one can measure overall software quality and how can this information be used to improve the software life-cycle process. The paper concludes that the desireable qualities of a product are not universal and there is no single metric that can universally rate software quality. However, a useful approximation is achievable through checklists and priorities. Even then, the overall rating is suggestive than conclusive and lessons from one product cannot wholly transposed on to a new product. Quality metrics should be used to indicate the presence of anomalies and as guides to develop, test, acquire and maintain software products. Software quality is a fuzzy phrase. This paper does an excellent job of enumerating the characterstics that any proposed metric that claims to improve quality should have. Many metrics have been considered and methodically analyzed to evaluate their efficacy in achieving goals identified for the product. Metrics which are specific, help in tracking errors over the life-cycle and are amenable to automation are considered to be higher value. It is important to develop a catalog of software quality metrics that transcend individual projects. Selecting which metrics to apply for a given project should be an important part of any software project planning. Reviewed: Aug 27, 2012

NAOMI -- An Experimental Plaform for Multi-modeling

(Denton et al. 2008)

This paper documents an experimental platform designed to address the challenge of combining Domain Specific Modeling Langauges(DSMLs). The key challenges are capturing interdependencies, maintaining consistency and semantic precision. A version controlled repository is used to store all the artefacts which provides a model registry, constraint-checking, and notifications on model change. The platform provides data exchange between models, executes the models processing input to output and propagates change between connected models. The platform also checks for consistency of attributes, constraints of models and thier interactions. The components of the NOAMI system are: connectors to provide interoperability between models, a manager to orchestrate modelers in integrating and invoking connectors, and an execution engine that determines the order in which the invdividual models are executed. The system is implemented and tested using an experiment that simulates a traffic light. This paper does a good job of documenting the NOAMI project. The authors start by identifying the key challenges that the proposed system should solve. Then they go on to identify the requirements that are captured as testable outcomes. They model the software that provides the functionality required to achieve the desired outcome. Overall, the paper does an excellent job of explaining why the project was necessary, how to they implemented it and tested it. This paper made me aware of the various modeling languages used in various contexts and the problem of interoperability that exists in large projects. However, I was a little disappointed that they did not test this tool on multi-models from a real-life project that could substantiate some of the challenges they faced and validate the results obtained by using this platform. Reviewed: Aug 29, 2012

Where Do Operations Come from? A Multiparadigm Specification Technique

(Zave and Jackson 1996)

In this paper, a multiparadigm technque is discussed to organize and write complex specifications of systems that are event driven and the output of the systems modify the system state. The Z notation is augmented with automata and grammars to map input stimuli to operations and arguments of the Z specifications. The specification is made of partial specifications written in different languages: finite automaton, first-order logic and Z. Partial specifications have vocabularies which are categorised as event class, argument function and a state component.The technique described assumes that the application is restricted to a event-oriented input and the output is state-oriented. The apply this technique to write the specifications for a graphical user interface and a telephone switch. They then show how the multiparadigm specification is checked for consistency. There are many techniques which allow us to write partial specifications, which can then be combined into a complete specification of the system. While it is appealing to use a single paradigm, having multiple, yet cooperating paradigms allows us to use them against each other to check for overall system consistency. Writing formal specifications for real-life complex applications is very challenging. There are different ways of capturing the specifcations formally. I came to know of the existence of the Z system, which is impressively also an ISO specification. Some problems fit naturally with some paradigms (eg: state diagrams for -> state diagrams). Some paradigms are better suited for low level details (eg: first order logic). I'm of the opinion that the entire system should be specified using the same language, preferrably with a full- fledged, standard system like Zed. This allows the designers to get the complete system picture. However, I see that choosing the right paradigm is a judgement call on the part of the designer. So, while the paper demonstrates the use of the multiple paradigms on a real problem, it is not prescriptive for all projects.

Seven Myths of Formal Methods

(Hall 1990)

There are many commonly held beliefs that are hindering the adoption of formal methods in software development. Formal methods cannot guarantee that software is perfect because there is a limit what can be proven to correct and users of the formal system are not immune to making mistakes. However, formal methods can demonstrate correctness of the specification and find errors. Formal methods are often assumed to be useful only for program proving, however in authors experience, they are more useful in writing formal specifications, providing properties, constructing programs by mathematicaly manipulating specifications and verifying programs by mathematical argument. The paper also counters the lament that formal methods are only useful for safety-critical systems by giving examples from development of CASE tools. Formal methods do not need higher level mathematics are often feared. Familiarity with Logic and Set theory in addition to some training in Z system, can bring up the professional software engineer up to speed. The rigour brought by formal methods are claimed to reduce development costs by identifying potential problems early on. Keeping formal specifications in sync with the implementation, it is claimed that life-cycle change will become easier. The author also references the use of formal methods in large, industrial system development. The author has made a sincere effort to address the unsaid, yet often decision-influencing assumptions about formal methods. This paper makes an attempt at identifying some of those commonly held beliefs and provides anecodtal evidence from author's own software development projects. This papers serves as a good starting point to start addressing some of the concerns that formal methods are "not practical" and "too academic" given the splash of mathematical symbols on any material related to formal methods. What this paper lacks in experimental rigour is made up for by author's enthusiasm in urging the reader to take a second look at formal methods by providing convinient exits. The author's emphasis that formal methods are primarily a tool for capturing specifications rings true to me. Since specifications are contracts between the stake-holders and the implementeres, capturing it with utmost rigour is beneficial. There will always be cultural backlash from programmers who resist deviating from their programming language and platform worldview. However, a serious software engineer will welcome the clarity formal methods bring to the table.

Reviewed: Sep 10, 2012

Requirements Engineering in the year 00 -- A research perspective

(Van Lamsweerde 2000)

This paper covers the milestones in evolution of requirement engineering as a discipline. Existing system can be modeled using ontological questions like why-what-how and reasoning about the model. The scope of requirement engineering also involved identifying the elements of ontology such as goals, viewpoints, data, operations, agents and resources. Goal based reasoning allows us to capture the why questions. Formal frameworks (KOAS methodology) allow us to caputre goal refinements through AND/OR graph structures. Qualitative frameworks (NFR methodology) catpure the soft (and sub)goals. Conflicts betweeen stakeholders' viewpoints are addressed by applying conjuction on pais of viewpoints. Multi paradigm specifications lik OMT capture entiry-relationship, dataflow and state transition which is now popular(!) as UML. To elicit better expression from stakeholders, scenario based "story telling" has proven to be successful. Scenarios capture exceptional cases, abstract conceptual models, requirement validations and generate acceptance tests.

This paper makes a distinction between requirements and software specifications. This distinction is important as stakeholders often think in terms of objects and agents in the real world. Specification are formulated in terms of software objects. I am curious to learn more about goal driven nature of requirement engineering can segue into writing better software specifications. I suspect that the often mentioned screed of "insufficient requirements" can perhaps be attributed to the impedence mismatch between these two vocabularies. Another aspect of requirement engineering that appeals to me is that it has specific methodologies (NFR) to capture non-functional requirements, which is often brushed under the rug.

Reviewed: Sep 12, 2012

Software Architecture Patterns

  • Blackboard architectural model.
  • GBOpen -- a black board system in Common Lisp.

Formal Methods in Software Engineering

Documentation

tutorials, how-to guides, explanation, reference

Research and Development

Misc reading

To read

Software Design X-ray

References

  • Brooks (1987). No Silver Bullet: Essence and Accidents of Software Engineering.
  • Boehm, Brown, Lipow (1976). Quantitative Evaluation of Software Quality.
  • Denton, Jones, Srinivasan, Owens, Buskens (2008). NAOMI--an Experimental Platform for Multi--Modeling.
  • Zave, Jackson (1996). Where Do Operations Come from? A Multiparadigm Specification Technique.
  • Hall (1990). Seven Myths of Formal Methods.
  • Van Lamsweerde (2000). Requirements Engineering in the Year 00: A Research Perspective.

notes

Haskell Programming Language

Why Haskell

via

Why Not Haskell

Learning Haskell

Liquid Haskell

Write Simple Haskell

Read Haskell code

Video lectures and talks

Courses

  • Functional Programming an introductory course on functional programming in Haskell by Graham Hutton.
  • Introduction to Haskell at UPenn by Brent Yorgey, Joachim Breitner et al. This in my experience is the best introduction to Haskell in a classroom format you can find. The lecture notes are self-explantory and written in a conversational, easy to follow manner.
  • CMSC498V -- "Advanced Functional Programming Languages (Fall 2017)" taught by Dr Niki Vazou at UMD.

Developing with Haksell

Resources

Blogs

Blog posts / articles

Meta lists

Editors

  • Haskell idea plugin
  • Haskell for Mac
  • Code.world
  • Haskell-tools A GHC based toolset for Haskell programming. Currently featuring Haskell-tools Refact, a refactoring framework.
  • HyperHaskell -- is a graphical Haskell interpreter (REPL), not unlike GHCi, but hopefully more awesome. You use worksheets to enter expressions and evaluate them. Results are displayed using HTML.

Papers

My Notes

What are some of the low-friction ways of using Haskell?

  • Pandoc -- add custom elements, extract metadata from documents.
  • Hakyll -- build custom site renderers.
  • Shake -- build system where Make isn't sufficient.

If you get can't load .so/.DLL for when installing cabal package: put shared: True in ~/.cabal/config

Cabal

Sandbox:

    cabal sandbox init
    cabal init #to init a new proj.

remember to export HASKELL_PACKAGE_SANDBOX=.cabal-sandbox/x86_64-osx-ghc-7.6.3-packages.conf.d inside the cabal sandbox.

jupyter notebook

See www.btbytes.com/stack.yaml for dependencies.

stack new myproj
cd myproj
stack init
brew install zmq
stack exec ipython -- notebook

Note: iHaskell binary is installed in ~/.local/bin:

Copied executables to /Users/pgowda/.local/bin/:
- ihaskell

(not sure if the above two lines are actually important ...)

Libraries and tools

Haskell Reference

Misc

Links

Projects in haskell

notes#functional-programming#haskell#programming-language

Programming

Notes on Programming as a practice. Collect notes about programming language at the "language" level without getting into specific details of each language. "on", "about", "of" programming.

The Myth of the Coder "Considering the historical distinction between coder and programmer" – Communications of the ACM, Aug 2024.

List of Tips | The Pragmatic Bookshelf -- Extracted From The Pragmatic Programmer

norvig/pytudes: Python programs to practice or demonstrate skills.

My list of challenging software projects some programmers should try | andreinc; 2024.

Papers

Books

  • Nature of Code by Daniel Shiffman. "an online resource and print book exploring the unpredictable evolutionary and emergent properties of nature in software via the creative coding framework processing."

2024 version with a new and rebooted version of this book built around javascript and the p5.js library. The book has a few new coding tricks this time, but it’s the same old nature—birds still flap their wings, and apples still fall on our heads.

The discussions on naming and abstraction are particularly illuminating, exposing some fundamental tradeoffs like synthetic vs natural names, or principled vs adaptable systems of abstractions. Were these notions more widespread, a lot of the pointless rants and debates we hear in programming circles would disappear.

I would not recommend this book to beginners - this book is most useful when you are experienced enough that your struggle is to make choices, not to get things to work. -- HN

Courses

All CS-CMU courses


Other lists

Journals

Papers

Rosetta Code Analysis (Nanz and Furia 2014)

Our statistical analysis reveals, most notably, that: functional and scripting languages are more concise than procedural and object-oriented languages; C is hard to beat when it comes to raw speed on large inputs, but performance differences over inputs of moderate size are less pronounced and allow even interpreted languages to be competitive; compiled strongly-typed languages, where more defects can be caught at compile time, are less prone to runtime failures than interpreted or weakly-typed languages.

Blogs

Tools

... is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, go to definition, find all references and alike into the tool

  • Trinket -- "lets you run and write code in any browser, on any device. Trinkets work instantly, with no need to log in, download plugins, or install software. Easily share or embed the code with your changes when you're done."

Tutorials

Projects

practical-tutorials/project-based-learning: Curated list of project-based tutorials

Videos

Articles

  • The Grug Brained Developer -- grug brain developer not so smart, but grug brain developer program many long year and learn some things although mostly still confused

Concepts

Delimited continuation

Misc

Aphorisms on programming language design

-- via

Links

See also: literate, pl, programming-aphorisms

References

notes#programming

Zig Programming Language

The Zig Programming Language is an open-source programming language designed for robustness, optimality, and clarity.

Introduction

Code

Learning

Articles

Project Management

FFI

Twitter

Provide or link to a small (50-200 ish lines) idiomatic Go program demonstrating concurrency. (Elegant use of goroutines, channels, etc)

I'll provide the equivalent Zig program using async/await and std.event.Loop for comparison.

My notes

Cross compiling zig

Code

# crosscompile.zig
const warn = @import("std").debug.warn;

pub fn main() void {
    warn("Hello, world!\n");
}

Compiling natively on Mac OSX

$ zig build-exe crosscompile.zig
$ file crosscompile
crosscompile: Mach-O 64-bit executable x86_64

Cross-compiling for Linux

The C ABI tuple of (operating system, architecture, C compiler environment) is defined by --target-os --target-arch --target-environ flags of zig. [ref]

zig build-exe crosscompile.zig --target-os linux --target-arch x86_64

Verify the executable file type created:

$ file crosscompile
crosscompile: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped

Software written in Zig

notes#programming-language#zig

Publishing

See also: 100-page-book

Lulu specific notes

Fixing Embedded fonts error

When you are trying to publish a book via Lulu.com, you might encounter "embed fonts" error. This is the workaround I found on the web that uses ghostscript:

gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
 -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \
 -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \
 -dEmbedAllFonts=true -sOutputFile=new.pdf -f old.pdf

See also: Embed fonts in a PDF with pdflatex which shows a simpler technique:

pdf2ps doc.pdf
ps2pdf13 -dPDFSETTINGS=/prepress doc.ps doc2.pdf

However, the resulting PDF looks fuzzier than the original one.

Resizing all pages of a PDF to a common size

This can happen if you are combining multiple PDF documents (say using pdftk) to make a compendium. You can resize all the pages to be of the same size using ghostscript -- source:

gs -o /path/to/resized.pdf
   -sDEVICE=pdfwrite
   -dPDFFitPage
   -r300x300
   -g2550x3300
   /path/to/original.pdf

Cropping PDFs

Self publishing tools

Manning

Libraries

  • PrinceXML
  • Speedata Publisher to generate reports. XML->PDF. Uses LuaTeX. AGPL/Commercial license.
  • PreTeXt An authoring and publishing system for authors of textbooks, research articles, and monographs, especially in STEM disciplines. The best of DocBook, LaTeX, and HTML. Outputs: print, PDF, web, EPUB, Jupyter Notebooks, braille,. github; XML based syntax.

Web publishing

Zines

Book covers


See also: pandoc

notes#books#publishing

Pandoc

Pandoc is a program that converts between various text markup formats.

Pandoc allows you to customise the output via extensive command line arguments and by templates.

My projects related to Pandoc

  • Semantic CSS for Pandoc -- an attempt at finding and using various semantic Cascading Style Sheets with Pandoc'd default HTML rendering.
  • Pandoc + Missing.css -- is instructions on how to use missing.css to style pandoc output. Summary: you will have to wrap the $body$ variable in <main> </main> tag.

Writing Papers

Guides on using Pandoc to write books

Editors

Customising pandoc

These are some of the examples of users customising pandoc to output LaTeX, HTML to their taste and requirements.

My own attempts are here:

Templates

Filters

Pandoc filters can be written in Haskell which modify the document structure programmatically. These are some of the user written filters that are instructive:

Exporters

Ox-pandoc is an exporter that translates Org-mode file to various other formats via Pandoc.

Markdown to InDesign; Pandoc now ships with a writer able to produce an ICML file from any Pandoc-supported input file format.13 ICML is the document format of Adobe InCopy; Dec 2015.

Books written using pandoc

See also

  • Laika -- Text Markup Transformer for sbt and Scala applications, transforming markdown and reStructuredText to HTML and PDF
  • lise-henry/crowbook -- converts books written in Markdown to HTML, LaTeX/PDF and EPUB.

Styling

Sites built using Pandoc

Book publishing

  • [output.pandoc.profile.pdf] + output-file = "output.pdf" + to = "latex"

Using with weasyprint

From an HN thread:

It's even possible to replace (Xe)LaTeX with weasy, a Python HTML-to-PDF converter. It supports two-colums via CSS, automatic CSS hypens, CSS page counters and embedding SVGs. I just needed an HTML header with CSS in the markdown file.

$ pandoc --filter pandoc-citeproc --csl ieee.csl --bibliography=paper.bib --smart --normalize -f markdown+multiline_tables+inline_notes -t html5 -V margin-top:0.5in -V margin-bottom:0.5in -V margin-left:0.5in -V margin-right:0.5in -o output.html input.md
$ python3 -c "from weasyprint import HTML; HTML('output.html').write_pdf('output.pdf', presentational_hints=True)"

For LaTeX-style math equations I added mathjax-pandoc-filter as filter to the pandoc args:

--filter ~/node_modules/.bin/mathjax-pandoc-filter -Mmathjax.centerDisplayMath -Mmathjax.noInlineSVG

SVG2PDF

^b5a0d2

If you are trying to convert an HTML page to PDF using Pandoc, and the HTML page has svg drawings (e.g.: this excellent post - The Big LLM Architecture Comparison by Sebastian Raschka), pandoc might choke on it unless you have rsvg-convert installed (on macOS: brew install svg2pdf). As you can see from this commit that added passing svg through rsvg-convert command to covnert it into a png file.

also had to install the latex svg package.

even after this the PDF generation failed with:

pdflatex: major issue: User/administrator updates are out-of-sync.                                                                                                    Error producing PDF.
! Package svg Error: File `1e7afdcc9b596b58d739c7d01b66c47cb52f6c23_svg-tex.pdf                                                                                       ' is missing.
                                                                                                                                                                      See the svg package documentation for explanation.
Type  H <return>  for immediate help.                                                                                                                                  ...
                                                                                                                                                                      l.140 ...dcc9b596b58d739c7d01b66c47cb52f6c23.svg}}

notes#markdown#pandoc

NixOS

Why NixOS

Via this HN Comment Maintaining your system configuration is an exercise in software development like any other - if you lack rigor or discipline, your codebase will become painful to work with. Nothing is ever one shell incantation away - it has to be carefully architected into the existing system.

That being said, once you get the hang of things, you reap amazing benefits:

  • You can clone your system to any machine, and immediately have an identical environment
  • You can share system configurations as code (declare the means for hosting a website in its repository, for example)
  • You can use a fully-fledged programming language to configure any part of your system
  • You can make use of an extensive ecosystem of easily composable, prebuilt NixOS modules
  • You can seamlessly integrate with Nix, allowing for ephemeral development environments and shells with packages, eliminating much of the need for imperative package management
  • Everything in a Nix-based system must be derived strictly from (lockfiled) inputs, making the reproducibility guarantees incredibly strong (barring any network errors or resources being taken down)
  • The declarative nature of anything Nix-based means that every change is documented - your system never shifts from the source of truth, compared to other distros where discipline is required to maintain reproducibility
  • Nix is so robust that you could even nuke your filesystems on every log out, if you'd like

Quick Reference


nix-env -iA nixpkgs.octave # to install octave
nix-env -e octave # to uninstlal octave
nix-env --delete generations # to delete old generations
# See [GC](https://nixos.org/manual/nix/stable/package-management/garbage-collection.html)
nix-storage --gc # for collecting garbage and actually removing files from HDD

See MyNixOS site -- home.sessionVariables - MyNixOS

Nix Language

Nix Flakes

Tutorials

NixOps

Nix land

via domenkozar:

Nix + Rust

Articles

Blogs

  • Computing - Shen's Essays has many nixos articles including how to setup home manager, sway, wayland, FDE, latex on linux friendly laptop like Purism Librem.

Running log

2022-11-27 MyNixOS (selfnote: account using github.) - Build and share reproducible software environments with Nix and NixOS.

2022-10-24 Blog posts on Nix at ianthehenry.com; and Using Nix on macOS

2018-06-05

2019-02-24 Static Nix: a command-line swiss army knife.. looks promising to use even on systems where creating -nix is not an option. Can run nix as an unprivileged user.

2019-10-14 bauer: an Emacs+Nix IDE

2019-11-11 Package a Django website -- acelpb/acelpb: Configuration for acelpb.com 2019-11-11 Nix for Python developers | Asko Soukka

2019-11-26 Nix recipes for Haskellers — Sridhar Ratnakumar

2020-02-29 Edit /etc/configuration.nix to add default packages. Run nixos-rebuild switch to update the system to match the configuration.

cron is not installed by default (because nix uses systemd timersand users not allowed to have crontab by default too! quelle surprise. To do that you have to edit the /etc/configuration.nix file do any thing.

2023-03-06 Nix-powered development with OCaml - Dimitrije's Website

2023-09-25 Fast, Declarative, Reproducible, and Composable Developer Environments - devenv

2024-03-28 Flakes aren't real and cannot hurt you: a guide to using Nix flakes the non-flake way - jade's www site

notes#devops#nixos

Docker

Docker is an open-source engine which automates the deployment of applications as highly portable, self-sufficient containers which are independent of hardware, language, framework, packaging system and hosting provider.

See also:

Building docker from scratch

Articles

Software related to docker:

It is essentially Docker, but you can boot bare-metal with it. It even uses Docker under the hood. Every boot is a fresh boot. You can read-write during boot, but all changes are made to ram. You mount with fstab things you want persisted, like home. It uses very simply primitives, which makes it easy to use. Squashfs/grub-mkconfig/overlayfs/etc. Docker isn't exactly a "primitive", but it is easily reasoned with. reply -- creator comment

# You prepare /bin/your_executable here...

ADD https://github.com/coord-e/magicpak/releases/latest/download/magicpak-x86_64-unknown-linux-musl /usr/bin/magicpak
RUN chmod +x /usr/bin/magicpak

RUN /usr/bin/magicpak -v /bin/your_executable /bundle

FROM scratch
COPY --from=0 /bundle /.

CMD ["/bin/your_executable"]

BuildKit in depth: Docker's build engine explained | Hacker News

Building container images - using no tools · Ravikanth Chaganti

More Articles

Dockerizing applications

Nix and Docker

notes#containers#docker#linux

D Programming Language

Why D?

Show off D

Semantics

Garbage Collection

Example code showing GCStats:

import std.stdio;

extern (C)
{
	void gc_stats(GCStats* stats) nothrow;
}

struct GCStats
{
    size_t poolsize;        // total size of pool
    size_t usedsize;        // bytes allocated
    size_t freeblocks;      // number of blocks marked FREE
    size_t freelistsize;    // total of memory on free lists
    size_t pageblocks;      // number of blocks marked PAGE
}

void main()
{
	GCStats stats;
	gc_stats(&stats);
	writeln(stats);
	auto p = new byte[200];
	gc_stats(&stats);
	writeln(stats);
	p = new byte[1000];
	gc_stats(&stats);
	writeln(stats);
	p = new byte[10000];
	gc_stats(&stats);
	writeln(stats);
}

To turn on garbage collection profiling

$ max_column_sum_by_key_v1 --DRT-gcopt=profile:1 ngrams.tsv 1 2
max_key: 2006 sum: 22569013
        Number of collections:  132
        Grand total GC time:  246 milliseconds
GC summary:   35 MB,  132 GC  246 ms

Summary of GC discussion

See June 2016 discussion on the Garbage collector

  • Precise GC is in the works. (todo: summarise progress)
  • "Only a few language features forces you to use the GC." (which ones?)
  • "For most uses you are not forced to use the GC in any form especially with the help of std.experimental.allocator." (How?)
  • Current GC is based on a forked version of Boehm GC. So, not easy to upgrade to current version without deep understanding of how D does Thread Local Storage etc.,
  • "we can disable the GC so it won't go ahead and scan upon allocation (only time it does)" (how?)

Memory allocations are /always/ expensive. Higher level languages like Java have the benefit of using pools and optimizing for this usage pattern, D does and will never have this. Keep in mind an allocation = usage of malloc + write to returned pointer. -- rikki c.

The point is, D doesn't have to have a GC. Not using it is way easier than in most other languages because all the tools to help you profile it and avoid it are provided by the compiler. Go without a good GC is a dead language. D without a good GC is just not as good as it could be. And btw we're generally faster than Go ;-) The point is: while a better GC is a work in progress we'll never have a GC that can fit all needs, but it's not as critical as it is in Go or in C# because we provide other ways to manage memory when limitations arise. -- cym13

"Has anyone thought about taking GC from .NET and reusing it in D?"

One significant point has been already mentioned: cost of write barriers. I'd like to mention another factor: .NET GC is a copying one, it moves data around. One good feature of current D is it never moves data, so you can very easily call C and C++ code and pass pointers to your buffers and stuff and C/C++ code just takes these pointers and works with them as usual. No pinning, no marshaling, zero overhead. If you take a moving GC like .NET's, you immediately make all C/C++ interaction much harder, now you need to worry about pinning stuff or copying "managed" data to "unmanaged" memory and back. This is all costly both in terms of CPU cycles and of programmer cycles. You'll need "FFI", what most other GC-ed languages have to have, and D doesn't. --thedeemon

Precise Garbage Collector

GSoC project

It is essentially in a similar state that it was when Rainer presented it at DConf2013. The version in the pull request is not different from the one Rainer presented at all. It's actually the same one, just updated with what has been changed in druntime recently and my attempts at making the marking phase faster.

Meta programming3

Debugging

Building

  • To build projects using ldc2 instead of dmd2 with dub, use the --compiler switch, thus: dub build --compiler=ldc2
  • To build the release version of the software, use the -b switch, thus: dub build -b release

Cross Compiling

Serialization

  • Orange library for serialization.

Concurrency

Range based programming

  • poita.org has couple of articles on range based programming.

Profiling / performance

D run time

Testing

C/C++ binding

Lexing and parsing

Another option is to use a lexer/state machine generator. Ragel supports D and Rust (as of the not-quite-released v7) as target languages. HN

Memory safety

Documenting D code

  • harbored-mod A documentation generator for D with support for both DDoc and Markdown in documentation comments.

Higher level programming

Resources

Introduction

Intermediary

Articles

Tutorials

Presentations

Editor

  • IntelliJ plugin for D language -- look at the screenshots. It is a fairly complete IDE with syntax highlighting, auto completion, compile checking, code linting (via Dscanner), navigate to classes etc.,

  • DDT -- the Eclipse based D IDE works as advertised. Use the 3.7(Indigo) version. [In Oct 2012, DDT did not work with the latest version of Eclipse: Juno].

  • Setting up TextAdept to autocomplete D code using DCD

Blogs

Talks

Read code

Discussions

Contributing to D development

Software written in D

Developing and distributing D software

Misc

User experience

Libraries

For some reason, many D programmers have this "collection of D libraries", which is interesting in the sense that more than one developer has found it just easy to write their own library to do X...

In addition to those of CWEB:

  • Markdown based -- very easy to read and write Literate source.
  • Generates readable and commented code in the target language (the generated code is usable by others)
  • Reports syntax errors back from the compiler to the right line in the literate source
  • Supports any language including syntax highlighting and pretty printing in HTML
  • Compatible with Vim (literate.vim)
  • Highly customizable (you can add your own HTML or CSS)
  • Runs fast -- wc.lit compiled for me in 7ms for both code and HTML output
  • Supports TeX equations with $ notation.

Inspired from CWEB:

  • Automatically generates hyperlinks between code sections
  • Formatted output similar to CWEB

Interop

The power of reflection | Átila on Code

import autowrap;
mixin(
    wrapDlang!(
        LibraryName("mylib"),
        Modules(
            Module("mymodule"),
            Module("myothermodule"),
        )
    )
);

The code above, when compiled, will generate a Python extension (shared library) that exposes every D function marked as “export” in the modules “mymodule” and “myothermodule” as Python functions. It’ll even convert their names from camelCase to snake_case. Any D exceptions thrown will become Python exceptions. D structs and classes become Python classses. If the original D functions take a D string, you’ll be able to pass Python strings to them in user code. Modulo bugs, this… works! The code shown above is the only code that needs to be written. Setting up the build system takes more work!

notes#dlang#programming-language

Sanskrit

Padyapaana channel on youtube contains tutorial series by Sri R Ganesh on samskRta chandas.

Grammar

Learning

  • https://prakrit.info/vrddhi/ -- Sanskrit at the University of Chicago has lesons with video lectures with exercises, readings; survey of skt grammar, readings of sanskrit texts, annotated and categorized by grammatical features; meters; resources -textbooks, grammars and dictionaries. Via @suhasm.
  • Vyoma labs
  • Sanskrit Chanting --The purpose of this free course is to help aspirants learn correct pronunciation of Sanskrit


The Sounds of Sanskrit


Scholars

Articles

Online Radio

Newspaper

Books

  • The Mahābhārata -- The critical edition of the mahabharata available as electronic text by the Bhandarkar Oriental Institute. I is a good resource for Sanksrit learners. The text is formatted like this:
01001000a नारायणं नमस्कृत्य नरं चैव नरोत्तमम्
01001000c देवीं सरस्वतीं चैव ततो जयमुदीरयेत्
01001001A लोमहर्षणपुत्र उग्रश्रवाः सूतः पौराणिको नैमिषारण्ये शौनकस्य कुलपतेर्द्वादशवार्षिके सत्रे
01001002a समासीनानभ्यगच्छद्ब्रह्मर्षीन्संशितव्रतान्
01001002c विनयावनतो भूत्वा कदाचित्सूतनन्दनः

which makes it easy to read short sentences slowly and progressively build speed. Also available in Roman and ASCII transliteration.


Poems From The Sanskrit : John Brough via this neat thread about John Brough by Srivatsa.


“Sunāma: Beautiful Sanskrit Names” by Nityānanda Miśra.

Tools


Misc Collection


दशकूपसमा वापी दशवापीसमो ह्रदः।
दशह्रदसमः पुत्रो दशपुत्र समो द्रुमः ॥

Ten wells equal a pond.
Ten ponds equal a lake.
Ten lakes equal a child.
Ten children equal a tree.

Via @KS1729


Definition


जननी जन्मभूमिश्च स्वर्गादपि गरीयसी


Interesting and amazing creations in Sanskrit -- on "adhamakavyas", and "varnacitras".

notes#sanskrit

Forth

History

Chuck Moore -- inventor of FORTH. I saw Chuck at Strange Loop 2013. The picture on his home page is from his talk at that Event.

Articles

Presentations

Books

Implementations

See also: Factor

Discussions

Interesting take:

Forth is the language that taught me (among other things) that its possible to break problems into pieces that are too small to understand the whole. I'm not sure really what to call this other than something along the lines of can't see the forest for the trees. Its the opposite of having functions so large it takes hours to figure out what they do. In this case you have words that you can't figure out what they do for days because the call graphs step across 300 different modules and 10k other words all of which are like "update-pie-with-apples" and comprise two other words "dup pie, apple-pie-update" or something. -- via

notes#forth#programming-language

PHP Programming Language

25 years of PHP history a chronological story of PHP by JetBrains.

Jan 2019 Notes:

Success stories

Facebook’s backups were written in PHP. Well, the second version was, anyway. (T... | Hacker News

Multiprocess, forking, long-lived, server-side, I/O intensive PHP. And it worked brilliantly. Over the following years, it scaled from a backup set of a few hundred TB to many, many petabytes.

Alternatives

alekcz/pcp: PCP: Clojure Processor -- Like drugs but better

Just use it like PHP on a webserver (say nginx):

    #new pcp config => change .php to .clj
    index index.clj index.html index.htm;
    #new pcp config => change .php to .clj
    location ~ \.clj$ {
        #default nginx config on digital ocean lemp image
        #include snippets/fastcgi-php.conf;
        #fastcgi_pass unix:/run/php/php7.0-fpm.sock;

        include scgi_params;
        scgi_intercept_errors on;
        scgi_pass   127.0.0.1:9000;
    }

PCP has following libraries built in:

(require  '[cheshire.core :as json]
      '[clostache.parser :as clo]
      '[selmer.parser :as parser]
      '[selmer.filters :as filters]
      '[clj-http.lite.client :as client]
      '[next.jdbc :as jdbc]
      '[honeysql.core :as sql]
      '[honeysql.helpers :as helpers]
      '[postal.core :as email]
      '[clojurewerkz.scrypt.core :as sc])

FrankenPHP: the modern PHP app server "Uses the official PHP executor embedded in a state-of-the-art web server: Caddy"; written in golang

notes#programming-language