Skip to content

Instantly share code, notes, and snippets.


Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.


Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We

ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active April 30, 2023 09:22
Phoenix with esbuild, fortawesome, and tailwindcss
View Phoenix esbuild with Tailwind and Fontawesome
Phoenix esbuild with Tailwind+Fontawesome
inopinatus / uu58.rb
Last active September 16, 2023 18:27
Convert UUIDs to/from base58
View uu58.rb
module Uu58
# Convert a string UUID to a base58 string representation.
# Output will be padded up to 22 digits if necessary.
# Behaviour is undefined if passing something other than a 128-bit
# hex string in network order with optional interstitial hyphens.
def self.uuid_to_base58(uuid, alphabet = SecureRandom::BASE58_ALPHABET)
ary = uuid.delete("-").to_i(16).digits(58).reverse
ary.unshift(0) while ary.length < 22
rolandus /
Last active March 14, 2023 19:44
How to use an Epson Perfection V500 Scanner to Scan Film (Negatives and Positives)

Before Starting

Download and install the driver and software from here:

Preparing the Scanner

Make sure the reflective mat is removed from the top lid (slide out toward front of scanner). Now you should see glass on the lid as well as the scanner base.

Carefully remove all visible dust from the glass with a microfiber cloth. If there are smudges or marks on the glass, use regular window cleaner, and be sure to dry it 100%

Load the Negatives into the Scanner

Make sure the negatives are as clean as possible, but be extremely careful not to scratch them or get figerprints on them. I use a clean microfiber cloth to remove large dust particles and hair. You can use puffed air, or soft antistatic brushes as well.

spencerhunter /
Last active June 14, 2023 20:10
Outlines the sequence of events that are triggered for a subset of Dwolla payment flows that are bank-to-bank via ACH


Use this doc as a reference to map out the sequence of events your app will receive based on Customer type(s) involved in the transfer as well as where the funds are coming from and going to (bank or balance). The following transfer scenarios are covered in this doc:

Transfer scenario 1 - Source: Verified Customer bank Destination: Verified Customer bank.
Transfer scenario 2 - Source: Verified Customer bank Destination: Unverified Customer bank.
Transfer scenario 3 - Source: Unverified Customer bank Destination: Verified Customer bank.

Both success and failure cases will be shown as well as what occurs in the event of a bank transfer failure.

**General recommend



Surgically Refactoring with Suture


The next feature means changing legacy code. The estimate just says "PAIN" in red ink. Your hands tremble as you claim the card from the wall.

For all of Ruby's breakthroughs, refactoring is as painful as 2004, when Feathers' book released. It's time we Make Refactors Great Again.

odewahn /
Last active June 17, 2023 19:24
Processing errors with Fetch API

I really liked @tjvantoll article Handling Failed HTTP Responses With fetch(). The one thing I found annoying with it, though, is that response.statusText always returns the generic error message associated with the error code. Most APIs, however, will generally return some kind of useful, more human friendly message in the body.

Here's a modification that will capture this message. The key is that rather than throwing an error, you just throw the response and then process it in the catch block to extract the message in the body:

  .then( response => {
    if (!response.ok) { throw response }
    return response.json()  //we only get here if there is no error
will / postgres_types.rb
Created February 17, 2016 18:31
proper postgres types for rails
View postgres_types.rb
# config/initializers/postgres_types.rb
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES.tap do |t|
t[:primary_key] = "bigserial primary key"
t[:datetime] = "timestamptz"
t[:timestamp] = "timestamptz"
t[:string] = "text"
progrium /
Created February 17, 2015 14:19
Comparing natural brevity and concise expressiveness between Go and shell/Bash for certain tasks using each tool's "standard" library.
curl -s "$url" | tar -zxC "$dest"
ekmett / fmap.markdown
Last active April 14, 2021 20:41
Proof that fmap f . fmap g = fmap (f . g) given fmap id = id, and the free theorem for fmap's signature.
View fmap.markdown


Given fmap id = id:

fmap f . fmap g = fmap (f . g)

To prove this we're going to need a few lemmas: