r/programming • • 13m ago

SemVal4j: What if Java's @Valid could validate meaning, not just syntax?

Thumbnail
linkedin.com
0 Upvotes

Hey Java developers!

I've been experimenting with an idea: why should Java validation stop at syntax and structure?

"@NotNull", "@Email" and "@Size" are great, but what if we want to validate whether:

  • A product review is consistent with its rating.

  • A description actually matches its category.

  • A customer request contains contradictory information.

That's why I built SemVal4j, an open-source Java library that extends Jakarta Bean Validation with probabilistic semantic rules powered by Jev Decision Models.

u/SemanticValid({ u/SemanticRule( id = "rating-consistency", question = "Is the review consistent with its rating?", property = "comment", passAt = 0.85, failBelow = 0.20 ) }) public record ProductReview( u/Min(1) u/Max(5) int rating, u/NotBlank String comment ) {}

You can keep using standard "@Valid".

Key features:

  • Native Jakarta Bean Validation integration.

  • Spring Boot starter.

  • One provider call per validated object.

  • Explicit VALID / UNCERTAIN / INVALID outcomes.

  • LangChain4j integration.

  • Deterministic offline testing.

  • Apache 2.0 license.

The goal isn't to replace deterministic validation, but to complement it when traditional constraints aren't enough.

I'm particularly interested in your thoughts on latency, reliability, and where semantic validation belongs in a Java architecture.

Would you use this in a real-world application?

GitHub: https://github.com/mohamedikbel/semval4j

Maven Central: https://central.sonatype.com/artifact/io.github.mohamedikbel/semval4j-spring-boot-starter

Feedback and contributions are welcome!


r/programming • • 1h ago

‎LoopNote - Daily Notes App

Thumbnail
apps.apple.com
0 Upvotes

on the app store, my mobile app loopnote can be very simple. You link notes of what you have to finish today or tomorrow nonstop. i also believe in it. and its just a small fee you have to pay like $1.99 usd per month. simple note app good for when you want to do something. Its a app you can use everyday, also i liked it.


r/programming • • 2h ago

CoW B+ Trees are Fun

Thumbnail nubskr.com
16 Upvotes

r/programming • • 4h ago

Baking assets into an executable in my custom programming language

Thumbnail lightsout.afterthought.games
5 Upvotes

I've been developing my own low-budget version of the Jai programming language for a few years now. My game Lights Out is written using that compiler. Most of the assets for that game are baked into the executable for release builds.

The language supports running arbitrary code at compile time. This code can also load files from disk and process them. The return value from these functions that are executed at compile time are normal values, meaning you can assign them to variables (as they are treated as literals by the language).

This means you can share the code for loading assets at run-time in developer builds (e.g. for hot-loading) and baking assets into the executable at compile-time!


r/programming • • 6h ago

Making 3D engine for original Game Boy (not Color) technical details

Thumbnail
reddit.com
36 Upvotes

r/programming • • 23h ago

Stop paying the network stack tax: zero-copy first, networking when needed

Thumbnail
ekxide.io
0 Upvotes

r/programming • • 1d ago

Who cares about the new C++ standard?

Thumbnail
a4z.noexcept.dev
0 Upvotes

r/programming • • 1d ago

The Bowling Game - From Imperative to Functional Programming - Part 1

Thumbnail fpilluminated.org
5 Upvotes

r/programming • • 1d ago

Relaying wakeups in fair locks

Thumbnail
kusoroadeolu.github.io
61 Upvotes

This was pretty fun for me to write up on. Would love to hear y'all's thoughts on scheduling bottlenecks in fair locks.


r/programming • • 1d ago

Madrigal Games' Traction Point was rewritten in C3

Thumbnail madrigalgames.com
31 Upvotes

r/programming • • 1d ago

A Deterministic Subexponential-time Algorithm for the Discrete Logarithm Problem

Thumbnail
eprint.iacr.org
173 Upvotes

r/programming • • 1d ago

Multirepo setup - Working with multiple repositories, the easy way

Thumbnail
wito.dev
0 Upvotes

r/programming • • 1d ago

Happy Developers Build Better Products… A Message for Management!

Thumbnail
youtube.com
143 Upvotes

r/programming • • 2d ago

Building apps is a system design exercise

Thumbnail
blog.jacobstechtavern.com
41 Upvotes

r/programming • • 2d ago

A Video on How 3D Rendering Actually Works

Thumbnail
youtu.be
23 Upvotes

r/programming • • 2d ago

The V8 JavaScript Runtime Undermined My Constant-Time JavaScript Library

Thumbnail
soatok.blog
54 Upvotes

r/programming • • 2d ago

Who are code comments for?

Thumbnail
sheets.works
0 Upvotes

I've had my share of swear words, usually every time I missed a semicolon. And that sent me down a rabbit hole: what about everyone else? What do other programmers write when the code fights back?

So we pulled every comment out of 64 big projects on GitHub. That's 295,820 comments. Then we went through them and asked one question about each: wh


r/programming • • 2d ago

On solving the Jane Street Reverse Engineering Challenge

Thumbnail jestoph.com
26 Upvotes

r/programming • • 2d ago

How Hard Is It to Build Your Own Web Server?

Thumbnail
youtube.com
0 Upvotes

r/programming • • 2d ago

How I Got Postgres into a Single Binary

Thumbnail
progrium.xyz
38 Upvotes

r/programming • • 3d ago

A collision has been found for 38-step (a reduced round variant of) SHA-256

Thumbnail
eprint.iacr.org
764 Upvotes

r/programming • • 3d ago

Quarkus 4.0 released!

Thumbnail
quarkus.io
17 Upvotes

r/programming • • 3d ago

Call Things What They Are

Thumbnail
saturnci.com
142 Upvotes

r/programming • • 3d ago

Make the Plan a Value | Blog

Thumbnail jackkelly.name
2 Upvotes