clojure

New to Clojure? Try the #beginners channel. Official docs: https://clojure.org/ Searchable message archives: https://clojurians-log.clojureverse.org/
seancorfield 2020-12-07T00:00:29.121500Z

And security is a big enough industry that feeds on a lot of paranoia and generates a lot of money so it perpetuates šŸ˜

alexmiller 2020-12-07T00:14:09.122300Z

I am not aware of any that work for Clojure. Fortify will not.

devn 2020-12-07T03:07:40.123200Z

Is as-> technically an anaphoric macro? :thinking_face:

devn 2020-12-07T03:10:20.125200Z

or does it fail the test because it doesnā€™t force the use of a pre-determined binding name like it or this?

alexmiller 2020-12-07T03:13:06.126600Z

no b/c you supply the name

devn 2020-12-07T03:13:07.126800Z

By definition of ā€œanaphorā€, it seems to be, but most of the anaphoric macros Iā€™ve come across presuppose the binding.

alexmiller 2020-12-07T03:13:33.127400Z

or at least how I think about it

devn 2020-12-07T03:13:43.127600Z

> (https://en.wiktionary.org/wiki/linguistics)Ā AnĀ https://en.wiktionary.org/wiki/expressionĀ https://en.wiktionary.org/wiki/referĀ to another expression. In stricter uses, an expression referring to somethingĀ earlierĀ in theĀ https://en.wiktionary.org/wiki/discourseĀ or, even more strictly, only reflexive and reciprocal pronouns. (Granted, this is a pretty vague definition)

devn 2020-12-07T03:15:10.128800Z

@alexmiller yeah, that was kind of my thinking. It is close though!

alexmiller 2020-12-07T03:15:50.129800Z

the only thing I would consider anaphoric in clojure is proxy

devn 2020-12-07T03:15:55.130Z

itā€™s kind of meta-anaphor, but then I suppose you could take that argument too far and call let an anaphoric macro because it lets you introduce a name and use it in different positions

alexmiller 2020-12-07T03:16:01.130300Z

which uses this as a magic symbol

devn 2020-12-07T03:16:57.130800Z

ah, interesting. I did not know that.

alexmiller 2020-12-07T03:17:51.131400Z

well even stuff like with-open - anything that expands to a let would be in that category

devn 2020-12-07T03:19:09.132300Z

condp is closer than let in terms of shape I suppose

devn 2020-12-07T03:19:33.132600Z

(than let I mean)

devn 2020-12-07T03:19:47.133Z

but well, itā€™s lets all the way down folks šŸ™‚

devn 2020-12-07T03:21:16.134100Z

eh, i retract that. it feels closer in the purely definitional sense

devn 2020-12-07T03:21:53.134300Z

Thanks for coming to my TED Talk.

devn 2020-12-07T03:24:48.136700Z

Change of subject: I really love clojure-lsp.

devn 2020-12-07T03:29:50.141100Z

I donā€™t know why I resisted trying it out for so long, but as an emacs user I feel like I got a lot for a little bit of configuration. Specifically, I was recently working on an old project that had a lot of dead code in it. Once I had clojure-lsp running, I managed to delete a ton (literally I think somewhere around 2k LOC) of unused code and uncover multiple subtle bugs inline with the clj-kondo integration.

devn 2020-12-07T03:36:30.146800Z

I should add for anyone not using emacs, the benefits are there for other editors as well. Specifically, global unused declarations are highlighted. Cursive checks most of the boxes, but not this one. In addition, the clj-kondo integration is neat. It also has a cljfmt integration which I am not currently using because politics. Either way, I feel like adding it to my toolkit was worth the effort and would encourage yā€™all to check it out regardless of editor. Seems like tooling the whole community regardless of editor could benefit from.

šŸ‘ 2
ā˜ļø 1
2020-12-07T14:31:58.151800Z

I wonder why clojure is hardly depends on org.clojure/spec.alpha and org.clojure/core.specs.alpha ? when I try to exclude spec.alpha Iā€™m getting nasty exception

2020-12-07T14:31:58.151900Z

~ on ā˜ļø  (eu-west-1) took 23s 
āÆ clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.1" :exclusions [org.clojure/spec.alpha]}}}' -Stree 
org.clojure/clojure 1.10.1
  . org.clojure/core.specs.alpha 0.2.44

~ on ā˜ļø  (eu-west-1) took 2s 
āÆ clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.1" :exclusions [org.clojure/spec.alpha]}}}'       
Exception in thread "main" java.lang.ExceptionInInitializerError
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2211)
	at clojure.lang.RT.classForName(RT.java:2220)
	at clojure.lang.RT.loadClassForName(RT.java:2239)
	at clojure.lang.RT.load(RT.java:449)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core.server$loading__6721__auto____8842.invoke(server.clj:9)
	at clojure.core.server__init.load(Unknown Source)
	at clojure.core.server__init.<clinit>(Unknown Source)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2211)
	at clojure.lang.RT.classForName(RT.java:2220)
	at clojure.lang.RT.loadClassForName(RT.java:2239)
	at clojure.lang.RT.load(RT.java:449)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.core$require.doInvoke(core.clj:6007)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.lang.Var.invoke(Var.java:384)
	at clojure.lang.RT.doInit(RT.java:491)
	at clojure.lang.RT.init(RT.java:467)
	at clojure.main.main(main.java:38)
Caused by: java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.
	at clojure.lang.RT.load(RT.java:462)
	at clojure.lang.RT.load(RT.java:424)
	at clojure.core$load$fn__6839.invoke(core.clj:6126)
	at clojure.core$load.invokeStatic(core.clj:6125)
	at clojure.core$load.doInvoke(core.clj:6109)
	at clojure.lang.RestFn.invoke(RestFn.java:408)
	at clojure.core$load_one.invokeStatic(core.clj:5908)
	at clojure.core$load_one.invoke(core.clj:5903)
	at clojure.core$load_lib$fn__6780.invoke(core.clj:5948)
	at clojure.core$load_lib.invokeStatic(core.clj:5947)
	at clojure.core$load_lib.doInvoke(core.clj:5928)
	at clojure.lang.RestFn.applyTo(RestFn.java:142)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$load_libs.invokeStatic(core.clj:5985)
	at clojure.core$load_libs.doInvoke(core.clj:5969)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$require.invokeStatic(core.clj:6007)
	at clojure.main$loading__6721__auto____8974.invoke(main.clj:11)
	at clojure.main__init.load(Unknown Source)
	at clojure.main__init.<clinit>(Unknown Source)
	... 55 more

2020-12-07T14:31:58.152Z

the repl can start if Iā€™m excluding only core.specs.alpha but any macroexpansion give me another one

~ on ā˜ļø  (eu-west-1) 
āÆ clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.1" :exclusions [org.clojure/core.specs.alpha]}}}' 
Clojure 1.10.1
user=> (let [x 1])  
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
Could not locate clojure/core/specs/alpha__init.class, clojure/core/specs/alpha.clj or clojure/core/specs/alpha.cljc on classpath.
user=> 

alexmiller 2020-12-07T14:38:16.152500Z

I don't understand your question. you seem to be asking why it doesn't depend on it but showing why it does

alexmiller 2020-12-07T14:39:08.153100Z

macro specs are checked on expansion and that happens in the compiler

vlaaad 2020-12-07T14:39:11.153300Z

I think the question is why clojure does depend on spec

alexmiller 2020-12-07T14:39:26.153500Z

just answered that

šŸ‘ 1
alexmiller 2020-12-07T14:39:39.153900Z

you can actually turn that off

alexmiller 2020-12-07T14:40:16.154800Z

(see https://clojure.org/guides/faq#skip_macros) but you still probably need the dep even in that case

2020-12-07T14:42:00.156Z

mostly I wonder why stable clojure hardly has a hard dependency on spec library with alpha in the name

2020-12-07T14:44:38.156100Z

Minor English nit: "clojure hardly depends" can be interpreted as "clojure barely depends". I think if you said "clojure has a hard dependency on spec library" it would be clearer.

2020-12-07T14:45:15.156300Z

thanks! didnā€™t know that.

2020-12-07T14:46:16.156600Z

Also, I suspect that when they created the dependency, they did not expect that it would be alpha for as long as it has been. The dependency is only for stricter syntax checking of some macro invocations, currently.

alexmiller 2020-12-07T14:46:58.157400Z

the spec api is still alpha (and will likely change). clojure's usage of that is internal and users dependency on it is optional.

alexmiller 2020-12-07T14:47:41.157600Z

also see: https://clojure.org/guides/faq#spec_alpha

2020-12-07T14:52:26.160600Z

thanks for those links, but Iā€™m still donā€™t know how to promote stability of clojure when there is an alpha library in dependencies. I have no problems with this personally but was asked trying to present clojure to the group of Scala/Java developers. And I donā€™t know how to explain because there is no (at least not on my radars) roadmap for spec2

alexmiller 2020-12-07T14:57:54.161300Z

alpha here means "subject to future change", not "unstable"

alexmiller 2020-12-07T14:58:27.161900Z

don't even try to tell me Scala people don't understand "subject to future change"

2020-12-07T15:01:19.163300Z

they certainly understand that) I will give it another try

alexmiller 2020-12-07T15:02:59.163700Z

I would happily put Clojure's language stability up against Scala's any day :)

2020-12-07T15:03:27.164100Z

same as I šŸ˜„

Darrell 2020-12-07T15:17:03.164500Z

Any idea why compiling an uberjar hangs at ā€œProcessing pom.xmlā€?

kenny 2020-12-07T15:18:12.164700Z

Are you using depstar?

alexmiller 2020-12-07T15:20:59.164900Z

take a thread dump - ctrl-\ on *nix/mac

alexmiller 2020-12-07T15:21:13.165100Z

see where it's hanging

kenny 2020-12-07T15:22:27.165300Z

I had this same issue (specifically due to Neanderthal doing some funky stuff at init). If he's using depstar, I'll bet its no shutdown-agents call. Sean fixed that in a newer release.

kenny 2020-12-07T15:23:05.165600Z

Oddly, however, I would get a blocked for far more than the usual 60s...

alexmiller 2020-12-07T15:23:09.165800Z

if it waits for about 1 minute, and then shuts down...

Darrell 2020-12-07T15:23:15.166Z

Iā€™m not using depstar that I know of. I did add at-at prior to this which is the only change I can think of that might cause this.

alexmiller 2020-12-07T15:23:42.166200Z

the jvm won't exit if there are non-daemon threads running

alexmiller 2020-12-07T15:23:53.166400Z

so if that launches those, you might need to call some kind of shutdown functino

Darrell 2020-12-07T15:24:35.166600Z

What am I looking for in the thread dump? (Iā€™m still somewhat new to Clojure and JVM)

alexmiller 2020-12-07T15:25:20.166800Z

is the main thread still running? if so, what's it doing?

alexmiller 2020-12-07T15:26:38.167Z

if not, there must be another non-daemon thread (won't say daemon) that's doing something, so what is it - if it's an "agent" thread, that's the result of a future or something

alexmiller 2020-12-07T15:27:15.167200Z

(shutdown-agents) would probably "fix" it but might be an issue with some code that has undesired top-level effects

alexmiller 2020-12-07T15:28:14.167400Z

seems like a common issue that comes up is building an uber jar where the uber jar accidentally contains the directory where the uberjar is being made and it never finishes?

Darrell 2020-12-07T15:29:14.167600Z

Full thread dump OpenJDK 64-Bit Server VM (11.0.8+10-jvmci-20.2-b03 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007fddbf9e1520, length=13, elements={
0x00007fddbb8d0800, 0x00007fddbb8d1800, 0x00007fddbb8ce000, 0x00007fddbb015000,
0x00007fddbb028000, 0x00007fddbb028800, 0x00007fddbd01c800, 0x00007fddbd01d800,
0x00007fddbb8cf000, 0x00007fddbbba8800, 0x00007fddbd3cf000, 0x00007fddc0025800,
0x00007fddbd008800
}

"Reference Handler" #2 daemon prio=10 os_prio=36 cpu=0.89ms elapsed=1185.92s tid=0x00007fddbb8d0800 nid=0x3903 waiting on condition  [0x0000700004392000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.8/Native Method)
	at java.lang.ref.Reference.processPendingReferences(java.base@11.0.8/Reference.java:241)
	at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.8/Reference.java:213)

"Finalizer" #3 daemon prio=8 os_prio=34 cpu=0.44ms elapsed=1185.92s tid=0x00007fddbb8d1800 nid=0x3a03 in Object.wait()  [0x0000700004495000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.8/Native Method)
	- waiting on <0x00000007000b3b08> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.8/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x00000007000b3b08> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.8/ReferenceQueue.java:176)
	at java.lang.ref.Finalizer$FinalizerThread.run(java.base@11.0.8/Finalizer.java:170)

"Signal Dispatcher" #4 daemon prio=9 os_prio=35 cpu=0.27ms elapsed=1185.90s tid=0x00007fddbb8ce000 nid=0x5503 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"JVMCI-native CompilerThread0" #5 daemon prio=9 os_prio=35 cpu=6802.76ms elapsed=1185.90s tid=0x00007fddbb015000 nid=0x5603 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #6 daemon prio=9 os_prio=35 cpu=2588.99ms elapsed=1185.90s tid=0x00007fddbb028000 nid=0xa503 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #7 daemon prio=9 os_prio=35 cpu=87.29ms elapsed=1185.90s tid=0x00007fddbb028800 nid=0x5803 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #8 daemon prio=8 os_prio=34 cpu=2.59ms elapsed=1185.79s tid=0x00007fddbd01c800 nid=0xa203 in Object.wait()  [0x0000700004caa000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.8/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.8/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x00000007000b3cc8> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run(java.base@11.0.8/CleanerImpl.java:148)
	at java.lang.Thread.run(java.base@11.0.8/Thread.java:834)
	at jdk.internal.misc.InnocuousThread.run(java.base@11.0.8/InnocuousThread.java:134)

"Service Thread" #9 daemon prio=9 os_prio=31 cpu=0.07ms elapsed=1185.75s tid=0x00007fddbd01d800 nid=0x9f03 runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Libgraal MBean Registration" #10 daemon prio=1 os_prio=27 cpu=47.68ms elapsed=1185.47s tid=0x00007fddbb8cf000 nid=0x9c03 waiting on condition  [0x0000700004fb3000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
	at java.lang.Thread.sleep(java.base@11.0.8/Native Method)
	at org.graalvm.compiler.hotspot.management.LibGraalMBean$Factory.run(jdk.internal.vm.compiler.management/LibGraalMBean.java:602)

"mysql-cj-abandoned-connection-cleanup" #13 daemon prio=5 os_prio=31 cpu=55.09ms elapsed=1180.55s tid=0x00007fddbbba8800 nid=0x9203 in Object.wait()  [0x0000700005ace000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(java.base@11.0.8/Native Method)
	- waiting on <no object reference available>
	at java.lang.ref.ReferenceQueue.remove(java.base@11.0.8/ReferenceQueue.java:155)
	- waiting to re-lock in wait() <0x0000000707995448> (a java.lang.ref.ReferenceQueue$Lock)
	at com.mysql.cj.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:91)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.8/ThreadPoolExecutor.java:1128)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.8/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.8/Thread.java:834)

"pool-1-thread-1" #14 prio=5 os_prio=31 cpu=105.19ms elapsed=1176.74s tid=0x00007fddbd3cf000 nid=0x6803 waiting on condition  [0x0000700005bd1000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.8/Native Method)
	- parking to wait for  <0x00000007079dfdb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.8/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.8/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.8/ScheduledThreadPoolExecutor.java:1170)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.8/ScheduledThreadPoolExecutor.java:899)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.8/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.8/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.8/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.8/Thread.java:834)

"pool-1-thread-2" #15 prio=5 os_prio=31 cpu=102.22ms elapsed=1176.73s tid=0x00007fddc0025800 nid=0x6903 waiting on condition  [0x0000700005cd4000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@11.0.8/Native Method)
	- parking to wait for  <0x00000007079dfdb0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(java.base@11.0.8/LockSupport.java:194)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.8/AbstractQueuedSynchronizer.java:2081)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.8/ScheduledThreadPoolExecutor.java:1170)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(java.base@11.0.8/ScheduledThreadPoolExecutor.java:899)
	at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.8/ThreadPoolExecutor.java:1054)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.8/ThreadPoolExecutor.java:1114)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.8/ThreadPoolExecutor.java:628)
	at java.lang.Thread.run(java.base@11.0.8/Thread.java:834)

"DestroyJavaVM" #16 prio=5 os_prio=31 cpu=10565.18ms elapsed=1174.33s tid=0x00007fddbd008800 nid=0x2803 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=35 cpu=99.20ms elapsed=1185.96s tid=0x00007fddbb8d0000 nid=0x4a03 runnable

"GC Thread#0" os_prio=35 cpu=97.19ms elapsed=1186.04s tid=0x00007fddbb819800 nid=0x2e03 runnable

"GC Thread#1" os_prio=35 cpu=89.39ms elapsed=1184.73s tid=0x00007fddbd19c000 nid=0x6103 runnable

"GC Thread#2" os_prio=35 cpu=89.51ms elapsed=1184.73s tid=0x00007fddbb2a4000 nid=0x6203 runnable

"GC Thread#3" os_prio=35 cpu=89.57ms elapsed=1184.73s tid=0x00007fddbb28d000 nid=0x9703 runnable

"GC Thread#4" os_prio=35 cpu=93.94ms elapsed=1184.73s tid=0x00007fddbb2ab800 nid=0x9503 runnable

"GC Thread#5" os_prio=35 cpu=90.34ms elapsed=1184.73s tid=0x00007fddbb2ac800 nid=0x9403 runnable

"GC Thread#6" os_prio=35 cpu=11.71ms elapsed=1175.34s tid=0x00007fddbbaff000 nid=0x8e03 runnable

"G1 Main Marker" os_prio=35 cpu=2.92ms elapsed=1186.04s tid=0x00007fddbc03d800 nid=0x5203 runnable

"G1 Conc#0" os_prio=35 cpu=20.02ms elapsed=1186.04s tid=0x00007fddbb81a800 nid=0x5003 runnable

"G1 Conc#1" os_prio=35 cpu=22.31ms elapsed=1182.01s tid=0x00007fddbd1b1800 nid=0x9303 runnable

"G1 Refine#0" os_prio=35 cpu=2.41ms elapsed=1186.04s tid=0x00007fddbb8bb000 nid=0x4e03 runnable

"G1 Young RemSet Sampling" os_prio=35 cpu=514.15ms elapsed=1186.04s tid=0x00007fddbb018000 nid=0x3203 runnable
"VM Periodic Task Thread" os_prio=36 cpu=1195.26ms elapsed=1185.76s tid=0x00007fddbd011000 nid=0x5a03 waiting on condition

JNI global refs: 21, weak refs: 0

Heap
 garbage-first heap   total 317440K, used 138191K [0x0000000700000000, 0x0000000800000000)
  region size 1024K, 132 young (135168K), 20 survivors (20480K)
 Metaspace       used 33435K, capacity 40958K, committed 41136K, reserved 1081344K
  class space    used 6630K, capacity 9000K, committed 9136K, reserved 1048576K

Darrell 2020-12-07T15:31:15.167800Z

I donā€™t see any mention of agents or futures in that.

Darrell 2020-12-07T15:32:23.168Z

Yeah; itā€™s at-at. When I comment that out and rebuild it finishes.

alexmiller 2020-12-07T15:40:07.168200Z

it's waiting on those pool-1-thread-N - must be a executor pool of non-daemon threads started by at-at

alexmiller 2020-12-07T15:41:01.168400Z

probably you have a namespace that is starting that at the top level (or maybe just require'ing at-at does it)

alexmiller 2020-12-07T15:41:16.168600Z

if the former, you can put that in a delay

Darrell 2020-12-07T15:45:35.168800Z

Iā€¦ think I follow? šŸ˜„ I have my at-at code in the main file outside of any functions. Are you saying I should move that to its own function?

Darrell 2020-12-07T15:46:07.169Z

I was also doing (:use overtone.at-at) because trying to :require it was causing an error (that I canā€™t recall now)

alexmiller 2020-12-07T15:51:01.169200Z

yes, should probably be in its own function. uberjar often means compiling, which means loading, which means that code is getting run while you are making the uberjar

alexmiller 2020-12-07T15:51:15.169400Z

the :use is probably fine

Darrell 2020-12-07T15:52:31.169600Z

That makes sense. Iā€™ll try that. Thanks @alexmiller!

alexmiller 2020-12-07T15:54:05.169800Z

cheers!

William Skinner 2020-12-07T18:34:44.172700Z

Does cheshire or other support streaming a giant JSON file that looks like:

{
  "members": [
    ... potentially GBs of data
  ]
}

2020-12-07T18:40:50.173500Z

cheshire's parsed-seq should handle that, just be sure you don't leak the head of the result so it is held by a GC root

2020-12-07T18:43:01.174100Z

I thought I'd find a similar lazy function in data.json, but I'm not seeing it

2020-12-07T18:44:54.175100Z

I believe, but I am not 100% sure, that parsed-seq only handles cases like [..gbs of data..]

2020-12-07T18:45:39.176Z

oh, that would make sense, that's also too bad

2020-12-07T18:46:50.177200Z

the thing is most clojure json libraries parse json into clojure datastructures, which as a model, doesn't really generically match with streaming

2020-12-07T18:47:45.178200Z

if you look at streaming xml parsers (and I believe streaming json parsers function similarly) what you get it kind of a stream of events

dpsutton 2020-12-07T18:47:59.178700Z

You could jq piped to another file to unnest it

2020-12-07T18:49:30.180Z

jackson, the java library chesire is built on does streaming json decoding, but the model for consuming the stream of events like START_ARRAY, START_OBJECT, etc, is radically different from using clojure datastructures

William Skinner 2020-12-07T18:50:09.180600Z

yeah I think I'm going to have to write some of this is in java to unnest the array element

William Skinner 2020-12-07T18:50:39.181200Z

or @dpsutton s approach

2020-12-07T18:51:36.182100Z

if you do the unnesting using jackson, you may then be able to pass the event stream into cheshire's internal parse function to get clojure data out https://github.com/dakrone/cheshire/blob/master/src/cheshire/parse.clj

2020-12-07T18:52:39.183400Z

it seems like some json lib could return a lazy seq instead of vector, and lazy-seq of vector tuples instead of maps, it would be clumsier to use in the general case but it would allow stream oriented processing without blowing up the VM

2020-12-07T18:54:05.185100Z

I guess each level of nesting would still be at least one stack frame though

2020-12-07T18:54:12.185600Z

yeah, you start doing things like have custom map and vector types which lazily walk the parse stream, but explode if you try to call = on them

2020-12-07T18:54:23.185900Z

as opposed to true streaming, which would have map-start/ map-end events etc. with no nesting

Christos 2020-12-07T20:09:01.188800Z

Hello, I have installed Datomic dev-local, and try to run a simple query on the ā€œMoviesā€ db but I get the error: :db.error/not-an-entity Unable to resolve entity: :release/name

Christos 2020-12-07T20:09:30.189400Z

Any ideas? What am I dong wrong? Many thanks in advance!

Christos 2020-12-08T08:21:44.191Z

You are right šŸ™‚ Many thanks!

p-himik 2020-12-07T20:15:26.189500Z

Might get better traction in #datomic