Re: [ANN] cpython bindings for clojure

2019-06-08 Thread Mattias Arro
This is beyond cool. Thank you so much for putting this together!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/10e84bb4-6c3f-4957-af11-cbb7160f35f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: spec error output in web context

2019-06-08 Thread Alex Miller


On Saturday, June 8, 2019 at 1:41:59 AM UTC-5, Sven Richter wrote:
>
>
>
> Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller:
>>
>> How do you start the web server?
>>
> I use component to startup immutant web, I also tried with http-kit, but 
> that didnt make a difference.
>

What I mean is, what command do you use? Are using "lein ring server" or 
something like that?
 

>
> Who is printing the error?
>>
> I think thats the key point here, right now I dont know as I never 
> bothered to figure out who prints the stacktraces.
>

I don't think you're going to be able to improve this without understanding 
the answer to that question. 
 

>
>
>> There are functions available in clojure.main to replicate the message 
>> from the repl - you can call them yourself.
>>  
>> See https://clojure.org/reference/repl_and_main#_error_printing for more 
>> on error triage and the functions like Throwable>map, 
>> clojure.main/ex-triage, and clojure.main/ex-str. This chain of functions is 
>> what the REPL uses to produce the message below
>>
>
>
> Thanks, I will try that, but that would mean I will have to catch every 
> potential ExceptionInfo error and check if its a spec error which is pretty 
> cumbersome, especially as I only want to see these outputs during 
> development (instrument is turned off in production).
>

The triage process knows how to print a good message for any error, not 
just a spec instrumentation error. There shouldn't be any conditional 
needed.
 

>
> Thanks,
>
> Sven
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/92d38944-ddf9-49bb-937b-102158907224%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: spec error output in web context

2019-06-08 Thread 'Sven Richter' via Clojure


Am Freitag, 7. Juni 2019 15:35:41 UTC+2 schrieb Alex Miller:
>
> How do you start the web server?
>
I use component to startup immutant web, I also tried with http-kit, but 
that didnt make a difference.

Who is printing the error?
>
I think thats the key point here, right now I dont know as I never bothered 
to figure out who prints the stacktraces.


> There are functions available in clojure.main to replicate the message 
> from the repl - you can call them yourself.
>  
> See https://clojure.org/reference/repl_and_main#_error_printing for more 
> on error triage and the functions like Throwable>map, 
> clojure.main/ex-triage, and clojure.main/ex-str. This chain of functions is 
> what the REPL uses to produce the message below
>


Thanks, I will try that, but that would mean I will have to catch every 
potential ExceptionInfo error and check if its a spec error which is pretty 
cumbersome, especially as I only want to see these outputs during 
development (instrument is turned off in production).

Thanks,

Sven

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/d2dfbe5b-8aac-4680-a3f9-9086bfd83b8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.