This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Scrabble extends App { | |
import scala.io.Source | |
val words = Source.fromFile("/usr/share/dict/words").getLines.toStream | |
val primes: Stream[Int] = | |
2 #:: Stream.from(3, 2).filter(i => primes.takeWhile(p => p * p <= i).forall(p => i % p > 0)) | |
val letterCounts = words.foldLeft(Map.empty[Char, Long].withDefault(_ => 0L)) { case (counts, word) => | |
word.toLowerCase.filter(_.isLetter).foldLeft(counts) { case (counts2, c) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import setupViewEdit from "@lib/view_edit.tsx"; | |
import H2 from "@components/H2.tsx"; | |
import type model from "@/model.ts"; | |
export default function Prompt(props: any) { | |
const [editMode, prompt, EditButton] = setupViewEdit<model.Prompt>(`/api/prompt/${props.id}`, data); | |
function data(): string { | |
const text: HTMLInputElement = document.getElementById("text"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generated Aug 11, 2025 14:49:29 | |
system "Aurora (Version: latest-42.20250810.1 / FROM Fedora Kinoite 42)" Linux | |
6.15.9-201.fc42.x86_64 x86_64 pgtk | |
emacs 30.1 EMACSDIR=~/.config/emacs/ EMACS=/usr/bin/emacs | |
doom 3.0.0-pre PROFILE=_default@0 HEAD -> master 751ac613 2025-08-11 02:27:38 | |
+0200 ~/.config/doom/ | |
shell /bin/bash | |
features ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBOTF | |
LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER | |
PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS |
OlderNewer