frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Gremllm

https://github.com/awwaiid/gremllm
129•andreabergia•7mo ago

Comments

andreabergia•7mo ago

  from gremllm import Gremllm

  # Be sure to tell your gremllm what sort of thing it is
  counter = Gremllm('counter')
  counter.value = 5
  counter.increment()
  print(counter.value)  # 6?
  print(counter.to_roman_numerals()) # VI?
I love this!
SoftTalker•7mo ago
Awesome, now I don't have to write mocks for testing!
mark_undoio•7mo ago
I am appalled and delighted by this.

It feels like an AI cousin to the Python error steamroller (https://github.com/ajalt/fuckitpy).

Whenever I see this sort of thing I think that there might be a non-evil application for it. But then I think ... where's the fun in that?

femto113•7mo ago
I share your feelings. What it most brings to mind for me is the infamous StackSort from the image alt text on XKCD comic 1185 (https://xkcd.com/1185/)
awwaiid•7mo ago
I was chatting with Simon Willison (who's LLM library I use to power gremllm) on Discord and he suggested D&D use-cases. Kinda works!!!

    >>> from gremllm import Gremllm
    >>> player = Gremllm('dungeon_game_player')
    >>> player.go_into_cave()
    'Player has entered the cave.'
    >>> player.look_around()
    {'location': 'cave', 'entered_cave_at': '2025-07-02T21:59:02.136960'}
    >>> player.pick_up_rock()
    'You picked up a rock.'
    >>> player.inventory()
    ['rock']
(further attempts at this have ... varying results ...)
Fraterkes•7mo ago
Just want to say that I'm not an ai guy at all, but this has made me more excited about it than anything in a while. Really cool! Did you also do the one where you put "spells" in your code?
jmsdnns•7mo ago
i helped Chris Callison-Burch design a class at upenn, called interactive fiction, which is a similar context to what Simon suggested. the real magic is that it reframes hallucinations as creative story telling. the usecase is SUPER fun if you imagine the LLM as a dungeon master telling a story that gets expanded over time.

the framework he and I built kept track of the game state over time and allowed saving and loading games as json. we could then send the full json to an LLM as part of the prompts to get it to react. the most neat part, imo, was when we realized we could have the LLM generate text for parts of the story, then analyze what it said to detect any items, locations, or characters not jn the game state, and then have it create json representations of the hallucinated objects that could be inserted into the game states. that sealed the deal for using hallucinations as creative story telling inside the context of a game.

i assure you the D&D context is very fun! the class website might give you more ideas too https://interactive-fiction-class.org/

i wasnt officially part of upenn at the time, so my name isnt listed on the site, but we wrote a paper about some of the things we did, such as this one, and you'll see me listed there https://www.cis.upenn.edu/~ccb/publications/dagger.pdf

vunderba•7mo ago
Sounds similar to AI Dungeon which I believe ran on a fine-tuned version of GPT-2 "all the way" back in 2019. And honestly kind of reminded me of the "Mind Game" in the novel, Ender's Game.

https://en.wikipedia.rg/wiki/AI_Dungeon

cudder•7mo ago
Thanks, I hate it! Brilliant and absolutely disgusting.
mpalmer•7mo ago
Love it, I am here for exactly this sort of playful boundary nudging.

"Wet mode" is such a fantastically awful name. Definitely make me think twice about turning it on.

awwaiid•7mo ago
You know... Because if you get them wet they multiply, per the documentaries
afcool83•7mo ago
…I read the whole article at OP’s link, many comments off this thread…I even clicked into the college course material in https://news.ycombinator.com/item?id=44468452 …and not once did it occur to me why it was called “wet mode”…not once…

…until your comment. Here! Take my “lived through the 80’s and 90’s” card.

awwaiid•7mo ago
Hm. I'll improve the documentation to make it slightly more obvious. When I add after_midnight with malicious compliance mode and bright_light() to freeze implementations then it should be more obvious.
afcool83•7mo ago
Nah, dude. It’s exactly the right amount of subtle that I found it a delight to discover. Making the joke too obvious undercuts it!
lxgr•7mo ago
Amazing!

Shameless plug: People who love-hate this might also love-hate vibeserver (https://github.com/lxgr/vibeserver).

I had some vague plans to make it self-hosting; this might make that even lower effort :)

cofob_•7mo ago
I implemented something similar a couple months ago, but the principle was based on inspecting the code of the calling party.

https://github.com/cofob/autogenlib

taneq•7mo ago
This is horrifying. Please, go on. :D

How do I give it a base URL for API calls so I can point it at my ollama server?

awwaiid•7mo ago
It is using the llm library, so you do the plugin and model management through that. Let's say you've already gotten ollama installed and the `gemma3n:e2b` model. Then you use the llm cli to add the ollama extension:

  llm install llm-ollama
and then you use whatever model you like, anything llm has installed. See https://llm.datasette.io/en/stable/plugins/installing-plugin... for plugin install info.

Here is a sample session. You can't see it ... but it is very slow on my CPU-only non-apple machine (each response took like 30 seconds) :)

  >>> from gremllm import Gremllm
  >>> counter = Gremllm("counter", model="gemma3n:e2b")
  >>> counter.value = 5
  >>> counter.increment()
  >>> counter.value
  None
  >>> counter.value
  None
  >>> counter.value
  None
  >>> counter.what_is_your_total() 
  6
  6
... also I don't know why it kept saying my value is None :) . The "6" is doubled because one must have been a print and the other is the return value.

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
255•theblazehen•2d ago•85 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
26•AlexeyBrin•1h ago•2 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
706•klaussilveira•15h ago•206 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
969•xnx•21h ago•558 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
69•jesperordrup•6h ago•31 comments

Reinforcement Learning from Human Feedback

https://arxiv.org/abs/2504.12501
7•onurkanbkrc•47m ago•0 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
135•matheusalmeida•2d ago•35 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
45•speckx•4d ago•36 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
68•videotopia•4d ago•7 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
39•kaonwarb•3d ago•30 comments

ga68, the GNU Algol 68 Compiler – FOSDEM 2026 [video]

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
13•matt_d•3d ago•2 comments

What Is Ruliology?

https://writings.stephenwolfram.com/2026/01/what-is-ruliology/
45•helloplanets•4d ago•46 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
240•isitcontent•16h ago•26 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
237•dmpetrov•16h ago•126 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
340•vecti•18h ago•149 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
506•todsacerdoti•23h ago•247 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
389•ostacke•22h ago•98 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
303•eljojo•18h ago•188 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
361•aktau•22h ago•186 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
428•lstoll•22h ago•284 comments

Cross-Region MSK Replication: K2K vs. MirrorMaker2

https://medium.com/lensesio/cross-region-msk-replication-a-comprehensive-performance-comparison-o...
3•andmarios•4d ago•1 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
71•kmm•5d ago•10 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
23•bikenaga•3d ago•11 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
96•quibono•4d ago•22 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
26•1vuio0pswjnm7•2h ago•16 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
271•i5heu•18h ago•219 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
34•romes•4d ago•3 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1079•cdrnsf•1d ago•461 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
64•gfortaine•13h ago•30 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
306•surprisetalk•3d ago•44 comments