10 comments

[ 3.1 ms ] story [ 28.5 ms ] thread

  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!
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?

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 ...)
Thanks, I hate it! Brilliant and absolutely disgusting.
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.

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 :)

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?

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.