off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
2021-02-15T01:21:15.302400Z

Anyone know where in intelliJ I can change the styling of teh box that it puts around matching parens, like shown in the image below. I want to either remove it make it much much lighter

2021-02-15T01:26:28.302800Z

It puts the same stupid box around matching text too, e.g.:

2021-02-15T01:28:58.303400Z

Found it Editor > Color Scheme > General > Code > Matched BRace and turn off bordered or make it a dimmer colour

seancorfield 2021-02-15T01:52:44.304300Z

@qmstuart Glad you figured it out - there's a #cursive channel which should be helpful.

Ben Sless 2021-02-15T08:45:57.306Z

We have at work some services which do a ton of IO and ser/de. the GC improvements from just migrating to Java 15 (from 8 ) are massive. It's very nice to see young generation time take a nose dive

vemv 2021-02-15T09:45:07.306100Z

yeah I heard so :) is the described scenario pure-java or do you also have some clj benefiting from this?

Ben Sless 2021-02-15T10:54:55.306300Z

Clojure services, although almost all CPU is jsonista (i.e. jackson) and gzip in Kafka

๐Ÿ‘€ 1
Ben Sless 2021-02-15T10:55:55.306500Z

Another interesting tidbit I found relating to GC is that direct linking gives an improvement

๐Ÿ‘ 1
vemv 2021-02-15T12:47:36.309100Z

interesting that the CPU bottleneck is non-clojure JVM code ^^

Ben Sless 2021-02-15T13:23:21.309300Z

It's a pretty simple IO service that handles a large amount of traffic, so serialization dominates the CPU. In a sense we do pay a price for the Clojure code because building up maps and vectors, even transients, is probably slower then allocating objects

vemv 2021-02-15T13:47:22.309500Z

Yes it's well plausible that immutable objects are more expensive than mutable ones. Probably Clojure relies heavily on JVM's GC as a basis for good performance, which generally works but GC isn't magic either Things aren't necessarily better in Java either, where "zero-allocation" techniques can be needed There's also the nuance that Clojure, not unlike Java, is a general-purpose language. Certain kinds of workloads beyond that "general-purpose" can benefit from lower-level platforms/languages

2021-02-15T16:58:22.310400Z

clojure maps are Objects, but they contain a lot more data (and a set of internal objects) than the naiive equivalent object, the difference in performance is about the larger number of allocations to create one, and the number of allocations done on each field update. when you update an object field, you do a simple reset of a value, to update a clojure map you do N allocations for each update where N is at least one

Idan Melamed 2021-02-15T17:36:21.313300Z

Hi, Anyone wanna join @pradeep.bishnoi, @pithyless, and me for a session of mob programming? Tuesday at 12:00 UTC. This is the first session, so we'll do the https://codingdojo.org/kata/birthday-greetings/. PM me if you want to join :-)

seancorfield 2021-02-15T17:50:23.313400Z

@ben.sless Which GC are you using with 15? We've been using G1 for a long time (we're on JDK 11 in production/QA and a mix of 14 and 15 in development).

Ben Sless 2021-02-15T17:52:15.313600Z

G1

Ben Sless 2021-02-15T17:53:24.313800Z

I'll test the performance of other algorithms in the next weeks

seancorfield 2021-02-15T17:55:25.314Z

I'll be interested in those results -- were you using G1 with JDK 8 as well? (I can't remember when it was introduced/became the default)

Ben Sless 2021-02-15T18:18:49.314200Z

G1 became the default on JDK9. The default on 8 is ParallelGC

Ben Sless 2021-02-15T18:19:08.314400Z

AKA throughput collector

Ben Sless 2021-02-15T18:20:31.314600Z

On JDK8 I found that services which churn a lot of data (kafka to kafka) indeed have better throughput with ParallelGC

Ben Sless 2021-02-15T18:20:38.314800Z

I'll need to rerun those tests with JDK15

seancorfield 2021-02-15T18:21:42.315100Z

We were mostly using G1 on JDK 8 because it gave better latency on interactive services (like web apps). I think our background processes were using ParallelGC back then. Everything is using G1 now at work (even our legacy JDK 8 processes).

Ben Sless 2021-02-15T18:22:18.315300Z

This is slightly OT of this thread, but do you version control the commands you use to run your services?

Ben Sless 2021-02-15T18:23:31.315500Z

Interactive services should use G1 from what I read, but it seems that at scale when responsiveness isn't an issue ParallelGC still has an opportunity to shine

seancorfield 2021-02-15T18:45:12.315800Z

Yes, all the scripts for building, deploying, and running services at work are under git (bitbucket). Server-specific configuration is the only thing we don't version control (passwords and sensitive API keys etc).

Thomas Moerman 2021-02-15T19:38:58.318800Z

On the topic of naming things nicely, following The Clojure Way (spoken with a Mandalorian accent): how would you call a boolean variable that means: this task is ignored for the completion of the parent Project.

Thomas Moerman 2021-02-15T19:40:27.319600Z

:muted?, :ignored?, :transient?... something like that

seancorfield 2021-02-15T19:40:59.320400Z

I personally dislike keywords with ? on them -- I only use ? for strictly Boolean predicate functions.

dpsutton 2021-02-15T19:41:27.321200Z

On the parent have a set of ignored sub tasks so itโ€™s just membership check with respect to the parent.

dpsutton 2021-02-15T19:41:46.321700Z

Iโ€™m assuming thereโ€™s context info somewhere floating around

Thomas Moerman 2021-02-15T19:42:41.322200Z

that's a possibility, indeed has a stronger link with the semantic context

dpsutton 2021-02-15T19:43:42.323400Z

Yeah itโ€™s only meaningful with respect to the parent. So itโ€™s nested where itโ€™s unambiguous

Thomas Moerman 2021-02-15T19:43:43.323500Z

although it is a memberof the parent, but its completion is ignored for the completion of the Parent

Thomas Moerman 2021-02-15T19:44:18.324200Z

kind of a flag to indicate that this task is e.g. a Training task instance, not an Official task effort.

dpsutton 2021-02-15T19:46:49.325800Z

don't know your specifics. but if you walk a tree of subtasks for a parent you can mark them as don't run and then your task runner doesn't have to care about why they aren't run. or have the task runner consult the parent for which tasks aren't mean to run

Thomas Moerman 2021-02-15T19:50:31.327Z

Thinking about it, I could as well reify the relationship and qualify it with a relationship type, would make more sense but more work to retrofit

Thomas Moerman 2021-02-15T19:51:43.327800Z

anyhow thanks for the input

phronmophobic 2021-02-15T19:55:11.328600Z

arenโ€™t keywords with ? also considered boolean predicate functions? ๐Ÿ˜

๐Ÿ˜… 1
borkdude 2021-02-15T19:56:08.328900Z

Edge case: passing a predicate in a map:

{:odd? odd?}

borkdude 2021-02-15T19:57:00.329100Z

I have considered making this an opinionated linter in clj-kondo, since I also dislike question-marked keywords, but when actually using it, I found it too strict to make sense, because of these edge cases.

2021-02-15T20:01:32.330Z

there are designs where you make a graph of dependent tasks, and only execute the ones across your desired path

2021-02-15T20:01:56.330500Z

eg. what make(1) does - you specify a target to execute, and every target defines its prerequisites

2021-02-15T20:03:38.331500Z

I think that's off topic of your off topic question ๐Ÿ˜„

Thomas Moerman 2021-02-15T20:04:39.332600Z

slightly ๐Ÿ˜‰ it's also off-mark but that's because i didn't properly explain the design problem ๐Ÿ˜…

Thomas Moerman 2021-02-15T20:04:44.332800Z

don't worry

Thomas Moerman 2021-02-15T20:05:38.333900Z

Rubberducking the question here already helped me think about it ๐Ÿ˜‰

Thomas Moerman 2021-02-15T20:06:50.334400Z

I have to call it quits for the day, otherwise i'll be dreaming in Parens again

seancorfield 2021-02-15T20:14:45.334900Z

Yeah, it's def. one of those grey areas for me -- and I've gone back and forth on it a lot over the decade I've been doing Clojure. I believe nothing in clojure.core uses keywords ending in ? (although the implementation of clojure.zip has an internal :changed? flag and the implementation of print-method for reader literals has :splicing?)

phronmophobic 2021-02-15T20:28:04.337500Z

I have no strong feelings, but the general consensus seems to be with you (ie. avoid ? suffixes for keywords , but allow edge cases like borkdudeโ€™s example)

Thomas Moerman 2021-02-15T20:45:13.337900Z

ok, the misplaced doc-string linter is a reason by itself to try clj-kondo I'm still getting bitten by that one due to python muscle memory ๐Ÿ˜…

vemv 2021-02-15T21:42:44.338100Z

?-suffixed keywords can make slightly more expressive APIs when used as keyword arguments (i.e. code). For all other usages (data) they seem more dubious since it's plausible that that data can end up serialized to e.g. json later.