malli

valerauko 2025-07-07T13:06:48.815329Z

is there any prior art for using llms for generating with malli?

2025-07-07T13:17:01.471259Z

why would you want this

Samuel Ludwig 2025-07-07T13:38:37.829119Z

@vale you might instead find malli.provider interesting, when it comes to generating schemas from existing data https://github.com/metosin/malli#inferring-schemas

βž• 2
Samuel Ludwig 2025-07-07T13:39:33.008949Z

unless you mean for generating example values, which is the raison detre of generators, which also work for clojure.spec

βž• 1
valerauko 2025-07-07T14:01:06.607609Z

generating realistic-looking random data like people names, city names, age distribution of organizational members etc that'd take a ton of work to procure and format from online sources

valerauko 2025-07-07T14:02:19.406769Z

@sludwig.dev i meant to ask if there's some way to plug some llm into a malli generator so i don't need to have people named "xfisdufy oisdfugosfdi"

Samuel Ludwig 2025-07-07T14:04:24.172679Z

so, this is something i've actually done at work, there's a few libraries in the ecosystem that do that, you can plug those into generators if you want, or just generate data with them on their own (and check it against your schema) let me find the library we're using

πŸ‘ 1
πŸ™ 1
Samuel Ludwig 2025-07-07T14:05:25.087739Z

ah, here it is, I know there's a few more that do this if you wanna do some exploring as well https://github.com/jgrodziski/talltale

πŸ‘ 1
valerauko 2025-07-07T14:08:11.419439Z

please do share if you recall any others as well ❀️

2025-07-07T14:12:23.500309Z

https://github.com/paraseba/faker is the one i've used in the past but it's not nearly as fancy as talltale

πŸ‘ 1
Ben Sless 2025-07-07T16:51:04.035569Z

For generating reasonable looking data you should check out Michael Drogalis's Shadow Traffic

πŸ‘ 1
danielneal 2025-07-07T13:18:37.268769Z

Using malli.experimental.time with :time/zoned-date-time it looks like decoding requires an offset and a timezone (ie. 2022-12-18T06:00:25.840823567-06:00[America/Chicago]) Is there any way to allow it to decode just use the timezone (ie 2022-12-18T06:00:25.840823567[America/Chicago])? (in clojure, not clojurescript)

danielneal 2025-07-07T13:25:11.736889Z

is it because that’s ambiguous at exactly DST intervals?

rschmukler 2025-07-07T17:00:08.531189Z

I'm having an odd issue where it appears that a function registered via m/=> is being instrumented in my test suite (run via kaocha). As far as I know, I am not calling m/-instrument or any other function that should cause instrumentation. When I look at (-> #'m/-function-schemas* deref (.getWatches)) it's empty (so it doesn't seem like ! is running) If I re-evaluate the namespace the instrumentation disappears. I've tried upgrading to 19.1 but that didn't change anything. Any ideas on how I can debug further?

2025-07-08T15:17:53.494309Z

Can you print the fn you suspect is being instrumented? It's usually obvious from its name whether its instrumented. For example, uninstrumented defn's are named after the munged var, but instrumented ones usually come from another ns.

rschmukler 2025-07-08T15:19:01.033749Z

The stack trace it throws when called with non-conforming inputs shows malli.instrument + its the pretty reporter

πŸ‘ 1
rschmukler 2025-07-08T15:20:25.436319Z

I've temporarily worked around it by manually uninstrumenting the var in a fixture, but I have no idea why its instrumented in the first place. The only thing I can think is that some library I am using has a malli/instument! call somewhere in its root namespace

2025-07-08T15:20:37.800719Z

if you're doing no instrumentation at all, you could alter-var-root m/-instrument early in your boot process to print a stack trace and exit the jvm.

2025-07-08T15:21:16.324079Z

or clone malli onto your machine and do a similar thing with :local/root deps.

rschmukler 2025-07-08T15:21:28.963289Z

Yeah it's a good thought

rschmukler 2025-07-08T15:21:39.833289Z

Almost certainly its got to be a library calling it somewhere

2025-07-08T15:21:44.751239Z

more flexible would be to spit the traces to a file

rschmukler 2025-07-08T15:22:27.907189Z

Found it...

rschmukler 2025-07-08T15:23:29.162519Z

I'll open a PR upstream

rschmukler 2025-07-08T15:23:33.818549Z

Thanks for the reply

πŸ‘ 1
rschmukler 2025-07-08T15:24:05.161949Z

(Inspecting the function registry led me to see the library that had function definitions registered)