Where answers come from

Some pages can ask a language model questions. Set this up once; your choice is remembered in this browser for the whole site.

Model source
Use another source instead

Smallest-to-largest weight downloads. Qwen3.5 0.8B is our starting choice for page Q&A. GPU estimates are not total RAM: leave room for the browser, context and temporary buffers. Hardware changes speed and capacity; answers still need checking.

Session-only loading avoids saving model weights, uses extra RAM and downloads again after unloading. Turn it off to save downloads. Delete-data-on-exit or private browsing may impose a much smaller storage limit than the displayed estimate.

You sign in on OpenRouter; it gives this page a key for your account.

A free account does not make every model free. Choose a model with a listed :free variant; merely adding that suffix does not create one. Check free-model availability and pricing.

Chat

AI assistant, not Shawn Hartsock. It does not speak for him.

Inspect the page excerpt

Up to 4,800 characters, not the whole site. Recent conversation turns are retained within the model’s context limit.

Ask about this page, or just say hello.

Ready when you are.

Not saved or uploaded automatically. Closing keeps this conversation in this tab; changing pages starts a new one. Model replies can be wrong.

Groovy Grails: Little joys

Originally published .

I’m working on a Groovy Grails project and I’ve just written a controller that takes a post from a form with only a partial representation of the object. Full representation of the object in the form is easy just do this:


  myObj.properties = params

  myObj.save()

The properties save to the Database without much fuss and if the data is invalid we’ll toss back to the edit view with a bucket of error messages. But, what if I only wanted to update one field in my object from a form… or sub form… or Ajax call?

…take a look at this little slice of groovy:


public class testObj {

    Long a

    Long b

    String c

}

def t = new testObj(a:0,b:1,c:"foo");

t.properties.each({

    println it

    });

def params = ['a':1,'b':2]

println "-----------"

params.keySet().each({

    println it + "->" + params[it]

    t[it] = params[it]

})

println "-----------"

t.properties.each({

    println it

    });

The output looks like this:


metaClass=groovy.lang.MetaClassImpl@157c2bd[class testObj]

class=class testObj

b=1

c=foo

a=0

-----------

a->1

b->2

-----------

metaClass=groovy.lang.MetaClassImpl@157c2bd[class testObj]

class=class testObj

b=2

c=foo

a=1

What just happened? We mapped the values from a Map object onto the fields of an object with out knowing what the fields in the Java object were. Without introspection.

I presume this works with a POJO and if it does I’m going to go have a party tonight because I think web form processing, ETL, and a whole mess of other ORM type activities just got a helluva lot easier in Java land.

Aren’t you happy?

Explore the map · Browse by topic and date