Fork me on GitHub
#off-topic
<
2021-04-01
>
Dimitar Uzunov07:04:04

Does anyone use a SLOC counter for Clojure that ignores (comment ) forms? tokei for example considers only ;; to be a comment

borkdude07:04:03

@dimitar.ouzounoff How about empty lines?

Dimitar Uzunov07:04:36

it counts them separately

borkdude07:04:51

nice. I think rewrite-clj could be suited to implement a more specialized sloc counter for Clojure, taking into account comment and #_

👍 6
borkdude07:04:58

See #rewrite-clj

Stefan08:04:54

@dimitar.ouzounoff Just wondering: for Clojure, would you be interested in the number of lines, or the number of forms? I feel the latter should probably give better information. Depending on what you want to use it for of course, but with a lisp I guess I care less about lines.

Dimitar Uzunov08:04:48

I’m not sure to be honest, especially if one uses a lot of threading macros.. unless they are unwound

Stefan08:04:00

Same with test coverage: form coverage is interesting, not so much line coverage.

Dimitar Uzunov08:04:13

and keeping SLOC as a measure allows for comparison with other languages

Stefan08:04:03

Yeah that’s what I meant with “depending on what you want to use it for”, but I guess I’m not so much interested in this metric at allo so I’m the wrong person to talk to about that 😉

vemv11:04:49

In some teams we've run linters against a targeted LOC count. Some friends target <150, I tend to be fine with <350 it's a good thing for keeping namespaces focused/maintainable and also yielding dep trees that are faster to reload (with require :reload or tools.namespace)

vemv11:04:30

YMMV though and all that :)

borkdude11:04:11

For a minute I thought you meant 350kloc code-bases

Stuart13:04:18

My last job our main app was ~5.5 million lines of code 😞

Stuart13:04:37

But not CLojure, C# .NET

vemv11:04:53

also good to lint for <100kloc codebases 😂

lilactown14:04:58

don't take away my 1kLOC core.cljs 😾

jjttjj14:04:43

Are there separate terms to describe these two phases of "parsing" data from an outside source: - transforming json into "richer" data, ie date strings into Instants or UUID strings to objects - then transforming those maps into domain objects used by my application

vemv15:04:35

hydration comes to mind for the latter step

lilactown14:04:56

would the first one be conforming?

lilactown14:04:46

second one I would consider calling "reifying"

dpsutton14:04:58

words like raw and intermediate come to mind. naming things IL or intermediate language and realizing the boundary of it can be quite helpful

jjttjj14:04:48

good one's thanks! "Richify" kept popping into my head for the first one

Joe14:04:52

How about ‘type enriching’ and ‘conforming’?

jjttjj14:04:38

Yeah "enrich" is probably better 🙂

borkdude14:04:03

I think the first phase is usually called coercing

🎯 6
👍 3
borkdude15:04:25

@ctamayo We have a channel for this: #news-and-articles

coby15:04:49

thanks, I'll move it there

David Pham18:04:57

Should you continue to use a library from an author who adhere to conspiracy theories? Or broadly speaking what is the place of politics in software engineering?

marrs18:04:19

Depends on whether the library is any good or not

David Pham18:04:30

Maybe it is the same question as why we keep using WhatsApp or Instagram while knowing the damage from FB did on some minorities...

jjttjj18:04:30

Its kinda interesting because unlike supporting commercial organizations, you're not really helping someone by using their library, you can generally keep the fact you're using it fairly secret to even avoid giving them a negligible amount of credibility. Still I could see it feeling wrong if their views are particularly awful

👍 3
jjttjj18:04:22

Also to the extent that you bog them down with bug reports that they work on, you have some ability to shift their time from being used on being awful to being useful to the public

Stuart19:04:03

If its a single person, I don't really care about their political affiliation or their views. If the code is good, it's good. But I try not to use anything by big companies like Facebook, WhatsApp, Twitter, Instagram etc as I think they are really damaging society. But if a guy writes a good useful library, I don't care if he's a fruitloop

marrs19:04:08

If I don't financially support a business, it is because of that business's actions, not the views of its employees. I don't have a problem with people having opinions I disagree with

Stuart19:04:34

Yeah, I mean, I have a mate who doesn't really believe in dinosaurs, still love the dude

6
❤️ 3
Jeff Evans19:04:06

meaning what, exactly? that they never existed?

Stuart19:04:40

That all the fossils are fake

Jeff Evans19:04:10

Fascinating. I thought I’d heard everything before, but nope.

lilactown20:04:03

I think the relationship I have with a library maintainer is different than the relationship I have with a business.

lilactown20:04:42

I am much more likely to communicate directly with the maintainer of a library. personally I enjoy the community aspect of participating in open source - e.g. discussing features, reporting bugs, contributing code and docs, answering questions

☝️ 3
lilactown20:04:26

with a corporation like WhatsApp or Instagram, I'm calculating how much harm the company does and whether I want to tacitly support that. It's very indirect; I am unlikely to be harmed, it's more about trying to act in concert with many others who share my beliefs in order to limit the corps impact and my own culpability.

lilactown20:04:07

with a library maintainer, I'm less worried about widespread impact (unless they are a VERY popular lib) and more worried about if they're going to tell me to get bent if I report a bug, or if they are arrested for storming a capitol and I have to take over maintenance of a library 😄

🙂 3
3