Fork me on GitHub
#clojure
<
2022-08-11
>
zeddan07:08:42

I’m trying to catch an exception ; Execution error (ExceptionInfo) at buddy.sign.jwt/validate-claims (jwt.clj:74). by doing (catch buddy.sign.jwt/validate-claims.ExceptionInfo _ ...) which gives me Unable to resolve classname: buddy.sign.jwt/validate-claims.ExceptionInfo. Can anyone spot my mistake?

thheller07:08:46

ExceptionInfo is from clojure, not from the library. so clojure.lang.ExceptionInfo

Daniils Petrovs08:08:01

Hey guys, I was looking around for a Clojure CLI formatting library akin to https://pkg.go.dev/github.com/logrusorgru/aurora/v3 , but didn’t find anything. What do you use/how do you normally format your terminal output?

delaguardo08:08:01

Are you looking for a way to print a string to stdout and add some colour schema to it?

delaguardo08:08:47

there are plenty libs doing that. here is one i use in the past - https://github.com/trhura/clojure-term-colors

Daniils Petrovs09:08:54

ah nice, thanks! I was a bit put off by no changes in years haha

delaguardo09:08:53

ansii colour codes did not change for years 🙂

delaguardo09:08:54

and because clojure is very good in maintaining backward compatibility there is no need to change the library code

👍 1
Ivar Refsdal09:08:28

Here is a fork of trhura/clojure-term-colors if you need GraalVM support: https://github.com/ivarref/clojure-term-colors

borkdude09:08:33

Another one: https://github.com/ams-clj/clansi Maybe we should have a separate "ansi colors" category here ;) https://babashka.org/toolbox/

Daniils Petrovs09:08:12

Also I was looking in https://github.com/razum2um/awesome-clojure , maybe we need to add some stuff

Ashwin Bhaskar10:08:20

hi guys, when I run my main method from REPL my program runs as expected. But when I run from terminal I get an NoClassDefFound exception

java.lang.NoClassDefFoundError: Could not initialize class com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory$CLibrary
	at com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory.open(JNAUSocketFactory.java:114)
I verified the JDK/JVM used in both cases is azul-11.0.16-1 . When it's running inside the same run time environment then why would there be this difference?

borkdude10:08:28

Perhaps your REPL includes dev-time dependencies

roklenarcic11:08:40

I keep getting this error message in REPL ever since upgrading to JDK 17. Any ideas?

Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null

p-himik11:08:24

A stacktrace would be useful.

roklenarcic11:08:34

Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null
*e
=> nil
Error updating class definitions:
Execution error (NullPointerException) at java.util.concurrent.ConcurrentHashMap/get (ConcurrentHashMap.java:936).
Cannot invoke "Object.hashCode()" because "key" is null

roklenarcic11:08:50

I think this happens somewhere else than main REPL thread

p-himik11:08:04

Ah, interesting. No clue. But I'd try to debug your REPL, whatever it uses.

roklenarcic11:08:19

It’s cursive so maybe I’ll ask there

👍 1
diego.videco22:08:10

Hello everyone, what options do I have for connecting two repls through the web, or for sending whatever code string is evaluted to the other computer. It is for a collaborative live coded music project, nothing too serious.

seancorfield22:08:58

Perhaps look at Clojure's built-in Socket REPL and the prepl (programmatic REPL)? See the clojure.core.server namespace.

respatialized22:08:37

https://tailscale.com/ I would strongly recommend (if you can) putting both devices on the same Tailnet. This would allow you to send nREPL (if you use nREPL) messages to the remote machine's IP:port without worrying about exposing a REPL to the entire public internet.

🙏 1
dpsutton22:08:22

Port forwarding will work with socket repl or nrepl I believe

hiredman00:08:25

some misc playing with repls stuff: https://gist.github.com/hiredman/a2630ea6153d06840a2723d5b2c9698c sending a repl over tap, https://gist.github.com/hiredman/86aeb916b478d9e57cbce8e0e678babd a repl over ring https requests (client and server)

devn02:08:31

@technomancy

devn02:08:57

if I can help with this please let me know