Avatar
7fqx
9ca0bd7450742d6a20319c0e3d4c679c9e046a9dc70e8ef55c2905e24052340b
πŸ•ΆοΈπŸ†’π“Š

- Robert Frost

Ooohlala πŸ‘€πŸ‘€

Merry Christmas all

#Wordle 1,650 5/6*

πŸŸ©β¬›β¬›β¬›β¬›

πŸŸ©β¬›β¬›β¬›β¬›

πŸŸ©πŸŸ©πŸŸ©β¬›β¬›

πŸŸ©πŸŸ©πŸŸ©β¬›β¬›

🟩🟩🟩🟩🟩

The Christmas Creature aka Kane

https://youtu.be/VrJFPOh9wfM

β™₯️Sometimes all you want is the default heart react β™₯️

Perhaps loading a box with more options was a mistake.

Less things to click = more good

β™₯️

A Ghost Story for Christmas (1971 - 78, 2005 - 13, 18 -)

https://archive.org/details/a-ghost-story-for-christmas-1971

British supernatural anthology series which airs its episodes at Christmas, the majority based on short stories by the master of the English ghost story and the father of folk horror, M. R. James.

(Only ever watched the 70s ones, so can't recommend the others). But the 70s ones are great, especially the M.R. James and the Dickens adaptation.

#kinostr

The Lion, the Witch and the Wardrobe (1979)

https://youtu.be/9_BwNpf2hWs

#kinostr

Midnight Mass enjoyers?

Just learnt of this lesser-known Dickens Christmas short story called Doctor Marigold.

Done with a nice reading voice from a librivox contributor.

Very cosy indeed.

https://youtu.be/pLU8EV7ejYg

Come on let's get some Christmas songs on the aux.

#xmassongs

#Wordle 1,649 3/6*

πŸŸ¨πŸŸ¨β¬›β¬›β¬›

πŸŸ¨πŸŸ¨πŸŸ©πŸŸ¨β¬›

🟩🟩🟩🟩🟩

What do you mean. I'm excited!!! Diamond City, baby!

I've bought a house

on Fallout 4

He is not busy with anything as important as a wordle bot tho. No chance. 😼

This is what claude (free version lol) things the code for the wordle bot should be ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

import React, { useState, useEffect } from 'react';

import { Trophy, Star, Grid3x3 } from 'lucide-react';

const WordleBot = () => {

const [results, setResults] = useState([]);

const [dailyRanking, setDailyRanking] = useState([]);

const [notableMentions, setNotableMentions] = useState([]);

const [connected, setConnected] = useState(false);

const [relays] = useState([

'wss://relay.damus.io',

'wss://nos.lol',

'wss://relay.nostr.band'

]);

// Parse Wordle result from text

const parseWordleResult = (content, pubkey) => {

const wordleRegex = /Wordle (\d+) ([X1-6])\/6\*?\s*([\n\r\s]*(?:[πŸŸ¨πŸŸ©β¬›β¬œπŸŸ¦]+[\n\r\s]*)+)/i;

const match = content.match(wordleRegex);

if (!match) return null;

const puzzleNumber = parseInt(match[1]);

const score = match[2] === 'X' ? 7 : parseInt(match[2]);

const gridText = match[3];

// Extract grid rows

const rows = gridText.split(/[\n\r]+/)

.map(row => row.trim())

.filter(row => /[πŸŸ¨πŸŸ©β¬›β¬œπŸŸ¦]/.test(row));

return {

pubkey,

puzzleNumber,

score,

grid: rows,

content,

timestamp: Date.now()

};

};

// Check if result is all green (perfect first try or perfect pattern)

const isAllGreen = (grid) => {

return grid.some(row => /^🟩+$/.test(row) && row.length === 5);

};

// Check for symmetrical patterns

const isSymmetrical = (grid) => {

if (grid.length < 2) return false;

for (let row of grid) {

const cleaned = row.replace(/[^πŸŸ¨πŸŸ©β¬›β¬œπŸŸ¦]/g, '');

if (cleaned.length < 3) continue;

const reversed = cleaned.split('').reverse().join('');

if (cleaned === reversed) return true;

}

// Check vertical symmetry

if (grid.length >= 2) {

const cleaned = grid.map(row => row.replace(/[^πŸŸ¨πŸŸ©β¬›β¬œπŸŸ¦]/g, ''));

for (let i = 0; i < Math.floor(cleaned.length / 2); i++) {

if (cleaned[i] === cleaned[cleaned.length - 1 - i]) {

return true;

}

}

}

return false;

};

// Connect to Nostr relays

const connectToNostr = async () => {

try {

const ws = new WebSocket(relays[0]);

ws.onopen = () => {

setConnected(true);

// Subscribe to notes with wordle content

const subscription = [

"REQ",

"wordle-sub",

{

kinds: [1],

"#t": ["wordle"],

since: Math.floor(Date.now() / 1000) - 86400 // Last 24 hours

}

];

ws.send(JSON.stringify(subscription));

};

ws.onmessage = (event) => {

const data = JSON.parse(event.data);

if (data[0] === "EVENT") {

const note = data[2];

const parsed = parseWordleResult(note.content, note.pubkey);

if (parsed) {

setResults(prev => {

const exists = prev.some(r => r.pubkey === parsed.pubkey && r.puzzleNumber === parsed.puzzleNumber);

if (exists) return prev;

return [...prev, parsed];

});

}

}

};

ws.onerror = () => setConnected(false);

ws.onclose = () => setConnected(false);

} catch (error) {

console.error('Connection error:', error);

setConnected(false);

}

};

// Generate demo data

const generateDemoData = () => {

const demoResults = [

{

pubkey: 'alice123',

puzzleNumber: 1234,

score: 3,

grid: ['β¬›πŸŸ¨β¬›β¬›β¬›', 'πŸŸ©β¬›πŸŸ©β¬›πŸŸ©', '🟩🟩🟩🟩🟩'],

timestamp: Date.now() - 3600000

},

{

pubkey: 'bob456',

puzzleNumber: 1234,

score: 4,

grid: ['β¬›β¬›πŸŸ¨β¬›β¬›', 'πŸŸ¨πŸŸ¨β¬›β¬›β¬›', 'πŸŸ©πŸŸ©πŸŸ©β¬›πŸŸ©', '🟩🟩🟩🟩🟩'],

timestamp: Date.now() - 7200000

},

{

pubkey: 'charlie789',

puzzleNumber: 1234,

score: 2,

grid: ['πŸŸ©β¬›πŸŸ©β¬›πŸŸ©', '🟩🟩🟩🟩🟩'],

timestamp: Date.now() - 1800000

},

{

pubkey: 'diana101',

puzzleNumber: 1234,

score: 5,

grid: ['β¬›πŸŸ¨β¬›πŸŸ¨β¬›', 'β¬›πŸŸ¨β¬›πŸŸ¨β¬›', 'πŸŸ¨β¬›πŸŸ¨β¬›πŸŸ¨', 'πŸŸ©πŸŸ©β¬›πŸŸ©πŸŸ©', '🟩🟩🟩🟩🟩'],

timestamp: Date.now() - 5400000

},

{

pubkey: 'eve202',

puzzleNumber: 1234,

score: 1,

grid: ['🟩🟩🟩🟩🟩'],

timestamp: Date.now() - 9000000

}

];

setResults(demoResults);

};

// Update rankings and notable mentions

useEffect(() => {

if (results.length === 0) return;

// Sort by score (lower is better)

const ranked = [...results].sort((a, b) => {

if (a.score !== b.score) return a.score - b.score;

return a.timestamp - b.timestamp; // Earlier wins ties

});

setDailyRanking(ranked);

// Find notable mentions

const notable = [];

results.forEach(result => {

if (isAllGreen(result.grid)) {

notable.push({

...result,

reason: result.score === 1 ? '🎯 Perfect First Try!' : 'πŸ’š All Green Result!'

});

} else if (isSymmetrical(result.grid)) {

notable.push({

...result,

reason: '✨ Beautiful Symmetrical Pattern!'

});

}

});

setNotableMentions(notable);

}, [results]);

useEffect(() => {

generateDemoData();

}, []);

const formatPubkey = (pubkey) => {

return pubkey.slice(0, 8) + '...' + pubkey.slice(-4);

};

return (

Nostr Wordle Tracker

Daily rankings and notable Wordle results from Nostr

onClick={connectToNostr}

disabled={connected}

className={`px-4 py-2 rounded-lg font-medium ${

connected

? 'bg-green-100 text-green-700 cursor-not-allowed'

: 'bg-green-600 text-white hover:bg-green-700'

}`}

>

{connected ? '🟒 Connected to Nostr' : 'Connect to Nostr'}

onClick={generateDemoData}

className="px-4 py-2 bg-blue-600 text-white rounded-lg font-medium hover:bg-blue-700"

>

Load Demo Data

Tracking {results.length} Wordle result{results.length !== 1 ? 's' : ''}

{notableMentions.length > 0 && (

Notable Mentions

{notableMentions.map((result, idx) => (

{formatPubkey(result.pubkey)}

Wordle {result.puzzleNumber} - {result.score}/6

{result.reason}

{result.grid.map((row, i) => (

{row}

))}

))}

)}

Daily Ranking

{dailyRanking.length === 0 ? (

No results yet. Connect to Nostr or load demo data to see rankings.

) : (

{dailyRanking.map((result, idx) => (

idx === 0 ? 'bg-yellow-50 border-yellow-400' :

idx === 1 ? 'bg-gray-50 border-gray-300' :

idx === 2 ? 'bg-orange-50 border-orange-300' :

'bg-white border-gray-200'

}`}>

idx === 0 ? 'text-yellow-600' :

idx === 1 ? 'text-gray-600' :

idx === 2 ? 'text-orange-600' :

'text-gray-400'

}`}>

{idx === 0 ? 'πŸ₯‡' : idx === 1 ? 'πŸ₯ˆ' : idx === 2 ? 'πŸ₯‰' : `#${idx + 1}`}

{formatPubkey(result.pubkey)}

Wordle {result.puzzleNumber} - Score: {result.score}/6

{new Date(result.timestamp).toLocaleTimeString()}

{result.grid.map((row, i) => (

{row}

))}

))}

)}

);

};

export default WordleBot;

We need some sort of wordle bot for the ranking system.

I should give attempts, but also mention the all green bonus, and aesthetically pleasing symmetrical shapes.

Who can automate this lol

#wordle