Skip to content

Instantly share code, notes, and snippets.

@searls
searls / kamesame_synonym_detection.md
Created June 12, 2025 07:20
I kinda forgot how I implemented synonym detection in KameSame (other than to know it was the MAIN THING the app had to do and performantly), so I asked Cursor to explain it

Understanding KameSame synonym detection

Exported on 6/12/2025 at 16:19:24 GMT+9 from Cursor (1.0.0)


User

Explain how KameSame does synonym detection when a user answers a question with a valid response but not the one we're looking for. can you please produce a report explaining this at a conceptual level and then back it up with progressively deeper technical dives?

I remember that while this is driven through the UI, it runs all the way down to the design of the database views, which i believe i even materialized for speed so that every night when the dictionaries are updated the synonym query is faster. i'll need you to check me on that stuff though b/c it's been 6+ years since i did this. provide receipts!

@donnfelker
donnfelker / attached_validator.rb
Last active October 28, 2023 02:51
Custom Active Storage Validator
class AttachedValidator < ActiveModel::EachValidator
# Active Storage validator to ensure that an attachment is attached.
#
# usage:
# validates :upload, attached: true
#
def validate_each(record, attribute, _value)
return if record.send(attribute).attached?
errors_options = {}
@laserbat
laserbat / lc0.config
Created November 19, 2022 13:54
Maia chess config
threads=1
task-workers=0
out-of-order-eval=false
max-prefetch=0
minibatch-size=1
nncache=0
smart-pruning-factor=0
@danidiaz
danidiaz / _FP reading lists.md
Last active May 21, 2025 18:27
assorted reading lists

A series of reading lists mostly related to functional programming.

@FrancesCoronel
FrancesCoronel / sampleREADME.md
Last active June 11, 2025 16:32
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@rklemme
rklemme / album.rb
Created October 24, 2009 17:58
Complete file for blog entry "The Complete Class"
require 'yaml'
Track = Struct.new :title, :duration
# An Album represents an audio medium which has title,
# interpret, a pause duration between tracks and a list
# of individual tracks.
class Album
attr_reader :title, :interpret, :pause