Keith Schacht’s Weblog

Subscribe

Tuesday, 26th November 2024

💡 TIL: NASA’s Dragonfly probe to Saturn’s Titan in 2028 #

In 2028 NASA is launching a spacecraft to Saturn’s moon Titan to study its habitability in a mission named Dragonfly. It will land in 2034. They’re sending a drone powered by a radioisotope thermoelectric generator so they can visit a variety of sites. Titan is notable because it’s believed to have a similar chemistry to ancient earth. Past probes have measured the contents of the atmosphere and confirmed it contains a mix of hydrocarbons. The surface contains a lot of water ice and scientists believe there is a water ocean in the interior of the moon.

🔗 Vampire game based around AI voice: SUCK UP! (#) This is one of the best examples I’ve seen of games creatively incorporating LLMs. You are a vampire character, you walk up to houses in a neighborhood and as the player you actually talk aloud to your computer and the NPCs talk back. You have to convince these NPCs to let you into their house.

#permalink 11/26/24, 3:47 pm / AI

🔗 Rails web-based database admin (#). A rails gem that gives you a web-based interface to your database.

#permalink 11/26/24, 4:15 pm / Rails

💡 TIL: Rails ActiveRecord has a .sole method #

I just learned about `sole` and `find_sole_by`. They ensure that only a single record is returned and will raise if there is something other than one. It’s the equivalent of:

api_keys = user.api_keys.where(key: key)

if api_keys.length == 1
  api_key = api_keys.first
elsif api_keys.length == 0
  raise "No records found!"
else
  raise "More than one matching record found!"
end

💡 TIL: pick is the single-value version of pluck in Rails #

Instead of doing

Messages.pluck(:user_id).first
you can do
Messages.pick(:user_id)

2024 » November

MTWTFSS
    123
45678910
11121314151617
18192021222324
252627282930