cljdoc

Cora (she/her) 2022-04-11T17:50:54.614909Z

very much an aside but part of this search work has me pulling functionality out of request handlers and making them available as functions. ideally, for me, request handlers should be doing as little as possible such that they only contain the things that are specific to http request handling

Cora (she/her) 2022-04-11T17:51:29.369429Z

you can see the two parts I pulled out in that file

Cora (she/her) 2022-04-11T17:53:30.769049Z

so things like extracting parameters, loading things from the config, etc, can be in the handler but there are only one or two function calls. that way the request handling details are decoupled from the functionality

Cora (she/her) 2022-04-11T17:55:10.111109Z

I've noticed this a lot in clojure projects, fwiw. there doesn't seem to be much of a sense of where to separate things within request handlers. in ruby, at least, there's a strong focus on request handlers being as simple as possible

Cora (she/her) 2022-04-11T17:56:55.742079Z

in the rails world they have a phrase for it: "fat model, skinny controller"

Cora (she/her) 2022-04-11T17:57:38.807439Z

but really it's about separation of concerns and making code as re-usable as possible

Cora (she/her) 2022-04-11T17:58:30.661529Z

I think in a functional world that's even more important since we can compose functions so easily it makes re-use even more valuable

Cora (she/her) 2022-04-11T18:01:31.741629Z

my thoughts aren't 100% fully formed but I thought I'd share

lread 2022-04-11T20:29:55.040299Z

Cool, more unit-testable too, I assume.

Cora (she/her) 2022-04-11T20:30:59.320989Z

absolutely

Cora (she/her) 2022-04-11T21:40:15.073089Z

maybe we should split single docset search from finding functions/namespaces by name

Cora (she/her) 2022-04-11T21:40:35.282209Z

I'm having such a hard time getting the search to work like I'd expect

Cora (she/her) 2022-04-11T21:43:08.047779Z

lunr offers highlighting but the search isn't as good. flexsearch has fantastic search but no highlighting

Cora (she/her) 2022-04-11T21:43:09.212659Z

wat do

Cora (she/her) 2022-04-11T21:45:02.637939Z

really, funding the right function/namespace could be like a fuzzy finder with some levenshtein distance checks, but searching docs is more of a full-text search problem

Cora (she/her) 2022-04-11T21:45:08.049699Z

and I think this is why I'm struggling

Cora (she/her) 2022-04-11T21:45:31.403219Z

think of it like searching a project on github vs hitting t and doing fuzzy file finding

lread 2022-04-11T22:33:52.130539Z

And then there are the docstrings too.

lread 2022-04-11T22:36:25.179119Z

I’m not sure what kind of sophistication cljdoc users would be expecting. They’ll probably be very happy with whatever first cut you come up with! Maybe if you tokenize in such a way that both words and symbols can be found, you might have a good first cut?

Cora (she/her) 2022-04-11T22:56:49.368039Z

that's the thing, they're not terribly configurable

Cora (she/her) 2022-04-11T22:59:25.351559Z

i'll need to play around more

lread 2022-04-11T23:40:24.564309Z

hey waddya think of?

lread 2022-04-11T23:41:59.182289Z

(this is in the theme of libraries search work and the idea you should see the freetext content that you are searching)

Cora (she/her) 2022-04-11T23:43:54.521509Z

it could use some spacing and increase in font size, I think

Cora (she/her) 2022-04-11T23:44:52.897349Z

maybe put clojars on the same line as the version and move view docs down beneath it

Cora (she/her) 2022-04-11T23:46:18.485569Z

it's pretty sweet

Cora (she/her) 2022-04-11T23:46:28.534049Z

I like that I can see the description

Jungwoo Kim 2022-04-11T00:17:50.106899Z

Hi! Is it possible to host a private documentation for the companies project? I love cljdoc documentation and things but as I found so far, it only offers for public.

lread 2022-04-11T01:15:49.139219Z

Hi @kjw0323! To host private docs you’d have to setup your own cljdoc server at your company. This is certainly possible but not trivial.

Jungwoo Kim 2022-04-11T01:18:51.177569Z

Ahh I got it! thank you for letting me know! 🙂

👍 1