#Semantic Satiation

1 messages ยท Page 1 of 1 (latest)

patent mauve
#

Looking up "semantic satiation" ๐Ÿ™‚

celest lodge
#

when a phrase is repeated so much it loses meaning

patent mauve
#

Ah right

#

Semantic satiation is a psychological phenomenon in which repetition causes a word or phrase to temporarily lose meaning for the listener, who then perceives the speech as repeated meaningless sounds. Extended inspection or analysis (staring at the word or phrase for a long time) in place of repetition also produces the same effect.

celest lodge
#

so what we were doing was a lot of:

#

`container.With(WithSomeCommonFeature), and he noticed our functions used With redundantly, which yep, we fix that.

#

then I look at how a bunch of steps in a row look:

#
    return GoBuildBase(client).
        With(debian.AddPackages("docker")).
        With(InstallMage()).
        With(ShellStep("cd /usr/local/; curl -L https://dl.dagger.io/dagger/instal_l.sh | sh")).
        WithEntrypoint([]string{"/bin/sh", "-s"})
patent mauve
#

Yeah, I hear you. With() is a stopgap until we ship a more powerful composition model.

#

For one, it's SDK-specific.. Unlike all the other calls, With() doesn't exist in the GraphQL schema. Each SDK has to manually add its own.

celest lodge
#

we came up with this shape:

func Compose(funcs ...dagger.WithContainerFunc) dagger.WithContainerFunc {
    return func(container *dagger.Container) *dagger.Container {
        for _, fn := range funcs {
            container = container.With(fn)
        }

        return container
    }
}
#

and do something like this:

    return GoBuildBase(client).
        With(Compose(
            debian.AddPackages("docker"),
            InstallMage(),
            ShellStep("cd /usr/local/; curl -L https://dl.dagger.io/dagger/instal_l.sh | sh"))).
        WithEntrypoint([]string{"/bin/sh", "-s"})
#

we're just a team obsessed with defining language around our concepts, so we're all pretty weird about the shape of apis. sorry.

patent mauve
#

Don't worry you're in good company ๐Ÿ™‚

#

Should be right up your alley

celest lodge
#

I will probably end up getting up to speed on it, and yeah it is interesting. I really need to get a po submitted for the cache service

patent mauve
#

Re: cache service, are you in touch with Lev? (head of solutions) He can help navigate