Re: Any updates on spec after “Maybe Not” presentation?

2022-05-25 Thread Dmitry Kakurin
Thank you EuAndreh and Alex! Alex, is it still the plan that spec2 will become *the released spec* eventually? Or has thinking changed since then? I'm curious if any serious obstacles to the spec2 approach were discovered since Rich gave the talk. Thank you, Dmitry. On Tuesday, May 24,

Re: Any updates on spec after “Maybe Not” presentation?

2022-05-24 Thread Alex Miller
wrote: > Hello, > The “Maybe Not” talk from 2018 has hinted at significant upcoming changes > for spec, such as removal of “:req” keys for map specs and potential > introduction of “spec/select”. > But I could not find any additional information in the past 3-4 years on > the

Re: Any updates on spec after “Maybe Not” presentation?

2022-05-22 Thread 'EuAndreh' via Clojure
AFAICT, the spec-alpha2 repository [0] is the latest thing there is. [0]: https://github.com/clojure/spec-alpha2 -- 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 me

Any updates on spec after “Maybe Not” presentation?

2022-05-19 Thread Dmitry Kakurin
Hello, The “Maybe Not” talk from 2018 has hinted at significant upcoming changes for spec, such as removal of “:req” keys for map specs and potential introduction of “spec/select”. But I could not find any additional information in the past 3-4 years on the evolution of that line of development

Re: Any way to replace function body?

2019-02-22 Thread Gary Johnson
You have several options for this in Clojure. However, rebinding the same toplevel var that holds the original function is probably not the right way to do this if you want to be able to retrieve the old function value later. Consider the following approaches: 1. Define a single multi-arity fun

Re: Any way to replace function body?

2019-01-21 Thread Wesley Hall
Janko, It's a little hard to see exactly, but you might want to have a quick glance at the docs for, "with-redefs" in the core library. This will give you a slightly more structured way to redefine vars with actual scoping, even if that scope is your entire app it might be a more controlled a

Re: Any way to replace function body?

2019-01-20 Thread Mars0i
To make the point explicit, bar now contains the original foo function: (bar) ;=> 42 -- 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

Re: Any way to replace function body?

2019-01-20 Thread Mars0i
Functions are values. Why not just this: (defn foo [] 42) (def bar foo) (defn foo [] (inc (bar))) (foo) ;=> 43 -- 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 mem

Re: Any way to replace function body?

2019-01-19 Thread Janko Muzykant
Awsome! This is exactly what I was looking for :) Thanks James and thanks everyone for other suggestions. On Saturday, January 19, 2019 at 5:20:06 PM UTC+1, James Reeves wrote: > > Yes, the alter-var-root function allows you to change a var's definition: > > (alter-var-root >#'fetch-data >

Re: Any way to replace function body?

2019-01-19 Thread John Newman
dispacio has a shadow-extend-like capability: (defp assoc string? [s i c] (str (subs s 0 i) c (subs s (inc i And then (assoc "abc" 2 'x);#_=> "abx" Using alter-var-root in dispacio correctly would prevent var replacement warnings I

Re: Any way to replace function body?

2019-01-19 Thread James Reeves
Yes, the alter-var-root function allows you to change a var's definition: (alter-var-root #'fetch-data (fn [original-fetch-data] (fn [& args] (let [result (apply original-fetch-data args)] (transform-result result)) On Sat, 19 Jan 2019 at 14:58, Janko Muzykant wr

Re: Any way to replace function body?

2019-01-19 Thread Chris Nuernberger
There has to be. Trace, profile, and debugging libraries for clojure do it all the time. I might check the source for some of those. On Sat, Jan 19, 2019 at 9:06 AM jason poage wrote: > Why would you want to overwrite a function if you need reference to the > original function? Why not just re

Re: Any way to replace function body?

2019-01-19 Thread jason poage
Why would you want to overwrite a function if you need reference to the original function? Why not just rename the wrapper function to something else? Or you could use (source function-name) to get the function body and essentially rename the function. Sent from my iPhone > On Jan 19, 2019, at

Re: Any way to replace function body?

2019-01-19 Thread Pankaj Doharey
Checkout multi-arity functions in clojure. On Sat, 19 Jan 2019 at 8:28 PM, Janko Muzykant wrote: > Hi, > > Is there an way to replace body of existing (interned) function with own > code still being able to call original fn? > Suppose, I have a function: > > (defn fetch-data [arg1 arg2] >

Any way to replace function body?

2019-01-19 Thread Janko Muzykant
Hi, Is there an way to replace body of existing (interned) function with own code still being able to call original fn? Suppose, I have a function: (defn fetch-data [arg1 arg2] (db/fetch-data ...)) I would like to intern a slightly modified version of this fn. Something like this:

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-17 Thread Jason Turner
Thanks a lot Aaron for getting in touch. We are pretty much following all the practices you have listed - and I agree that they overall have more impact than static analysis, and can do more to lead to a secure deliverable; it is good though to note them and review to what extent we can make th

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-17 Thread Jason Turner
Dragan our experience is that organisations often adopt something like BlackDuck and then use that as their benchmark. On Sun, Apr 15, 2018 at 10:59 AM, Dragan Djuric wrote: > Hi all. Very interesting thread! I guess that not many Clojure developers > are in this situation, but I hope many more

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-15 Thread Gregg Reynolds
e with not-so-standard procedures)? > Those are damn good questions and I don't know the answer to any of them. Frankly i've never thought about this much. But now I do it seems like an obvious business opportunity: if you can sign a blob of code then you can offer a security warrant for i

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-15 Thread Dragan Djuric
Hi all. Very interesting thread! I guess that not many Clojure developers are in this situation, but I hope many more will be; that would mean that Clojure got the foot in the door of the enterprise. Gregg, I need a little clarification on the last thing you mentioned: Is a dependency treated a

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Gregg Reynolds
On Fri, Apr 13, 2018, 4:09 PM Aaron Bedra wrote: > Penetration testing is something performed on an application, but a source > code review of the language is certainly an interesting idea. My company > does these all the time. I ran this by my folks and there was certainly > interest. If we coul

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Aaron Bedra
Penetration testing is something performed on an application, but a source code review of the language is certainly an interesting idea. My company does these all the time. I ran this by my folks and there was certainly interest. If we could publish the results and create a healthy discussion my

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Aaron Bedra
Thanks for the shout Alex. Jason reached out to me directly but I figured it would be better to answer this for the broader group. I’ve got a lot of thoughts around this and I am happy to dive deeper into any of these as well. On the topic of static analysis, I don’t think that application

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Alex Miller
The socket repl is inherently not secure. It allows anyone to connect and run arbitrary code on the process. However, by default it is not running - you need to add extra system properties to start the server(s). If someone can start your server with arbitrary system properties, I'd say that is

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Didier
I'd love an independent penetration and security audit of the Clojure codebase. Especially around the socket repl in a localhost restricted way and making sure its not exploitable. I wonder how much it costs, and if Clojurist together could have one funded. -- You received this message because

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Jason Turner
Excellent Alex - thanks a lot. -- 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

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Alex Miller
n codebase (currently just a small > prototype system); so if we find any real issues we will definitely feed > back to you thanks. I think that we will anyway report back to you our > findings on the core false positives - I understand you may not pick them > up but seems a good

Re: Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Jason Turner
ture looks like once they are 'fixed' (given that on top of these issues there will obviously be both false and real positives (presumably) in our own codebase (currently just a small prototype system); so if we find any real issues we will definitely feed back to you thanks. I think t

Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Alex Miller
“fixing” any of that. It’s perfectly possible that there are some actual issues in there and we would be happy to take patches for anything serious. I don’t have any other advice except that there are several banks that use Clojure now, so clearly this is not an issue for everyone. -- You received

Using Clojure for public facing system in a bank - code security scanning - any luck?

2018-04-13 Thread Jason Turner
know that making changes to working code to avoid this kind of static analysis issue is typically not uniformly popular, and would anyhow need careful analysis to detect and avoid any potential performance impacts on added checks. So on that front I am wondering if anyone has managed to contribute

Re: Any better client then telnet for connecting to a socket repl server?

2018-03-14 Thread Didier
Okay, for anyone else coming here and looking, you must absolutely try out Unravel https://github.com/Unrepl/unravel Its a command line tool that you install through npm (implemented in ClojureScript cool!), and then you can just do: unravel >From your terminal, and it will connect to

Re: Any better client then telnet for connecting to a socket repl server?

2018-03-10 Thread Stuart Sierra
I sometimes use inf-clojure mode in Emacs, which can connect directly to a socket REPL. I have a helper Elisp function inf-clojure-to-socket

RE: Any better client then telnet for connecting to a socket repl server?

2018-03-04 Thread Kimmo Koskinen
Hi! There are quite impressive socket repl clients such as https://github.com/Unrepl/unravel and https://github.com/Unrepl/spiral (for Emacs) both of which use the unrepl protocol https://github.com/unrepl/unrepl. - Kimmo -- You received this message because you are subscribed to the Google G

RE: Any better client then telnet for connecting to a socket repl server?

2018-03-03 Thread Sean Corfield
rch 2, 2018 5:49:45 PM To: Clojure Subject: Any better client then telnet for connecting to a socket repl server? I want to connect to a Clojure socket repl server, but telnet is a really terrible repl experience. Anyway I can have a better client to connect to it that would have some b

Re: Any better client then telnet for connecting to a socket repl server?

2018-03-03 Thread Timothy Baldridge
ne. Perhaps you can pipe something together via netcat, GPL readline, and socket servers? Also Emacs provide a lot of this support via inferior lisp. So, like any lisp you can tell emacs that your inferior lisp command is a telnet command and it all "just works". Timothy On Sat, Mar 3

Re: Any better client then telnet for connecting to a socket repl server?

2018-03-03 Thread Chris Shellenbarger
Can you use NREPL? https://github.com/clojure/tools.nrepl This seems to be what most tools that provide a REPL are built on top of (Cursive, CIDER, etc). On Friday, March 2, 2018 at 7:49:45 PM UTC-6, Didier wrote: > > I want to connect to a Clojure socket repl server, but telnet is a really

Any better client then telnet for connecting to a socket repl server?

2018-03-02 Thread Didier
I want to connect to a Clojure socket repl server, but telnet is a really terrible repl experience. Anyway I can have a better client to connect to it that would have some better support for history, backspace, maybe even some auto-complete, highlight, etc. Whatever I can get over telnet? Thank

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2018-02-10 Thread Philip Aston
I just tripped over this and opened https://issues.apache.org/jira/browse/MSHADE-272 . Affected users might like to vote it up. FWIW, my workaround: maven-shade-plugin ...

Re: [ANN] clj-java-decompiler - decompile any Clojure form into Java in the REPL

2018-01-29 Thread Howard Lewis Ship
Very impressive; this is already answering some nagging questions I've had about code generation, especially with protocols and defrecord. On Mon, Jan 29, 2018 at 8:25 AM, Laurens Van Houtven <_...@lvh.io> wrote: > This is awesome! Thanks Alexander! > > On Mon, Jan 29, 2018 at 8:58 AM, Alexander

Re: [ANN] clj-java-decompiler - decompile any Clojure form into Java in the REPL

2018-01-29 Thread Laurens Van Houtven
This is awesome! Thanks Alexander! On Mon, Jan 29, 2018 at 8:58 AM, Alexander Yakushev wrote: > I'm happy to release clj-java-decompiler[1] today, a wrapper around > Procyon[2] Java decompiler. With it, you can cut the feedback loop of > writing a file, AOT-compiling it, and then running the cla

[ANN] clj-java-decompiler - decompile any Clojure form into Java in the REPL

2018-01-29 Thread Alexander Yakushev
I'm happy to release clj-java-decompiler[1] today, a wrapper around Procyon[2] Java decompiler. With it, you can cut the feedback loop of writing a file, AOT-compiling it, and then running the classes through a decompiler to a single call in the REPL. user> (clj-java-decompiler.core/decompile

Re: Spec - is there any way to tell which keys are not described by a spec?

2018-01-14 Thread Lucas Wiener
> > Turns out it does not do what I thought it would when I initially looked > at it. I would like something that does similar to possible-keyspec-typos > but kinda the reverse. Instead of reporting missing keys found in the spec, > I would like it to report keys that are present in the data bu

Re: Spec - is there any way to tell which keys are not described by a spec?

2018-01-05 Thread Lucas Wiener
Ah, yes that seems to be what I want exactly. Thank you, I'll give it a shot. Den fredag 5 januari 2018 kl. 20:53:55 UTC+1 skrev Josh Tilles: > > I think Stu Halloway’s proof-of-concept is at least close to what you > want: > https://gist.github.com/stuarthalloway/f4c4297d344651c99827769e1c3d34

Re: Spec - is there any way to tell which keys are not described by a spec?

2018-01-05 Thread Josh Tilles
I think Stu Halloway’s proof-of-concept is at least close to what you want: https://gist.github.com/stuarthalloway/f4c4297d344651c99827769e1c3d34e9. (Here’s the context for that code, in case you were curious.) btw, you might want t

Spec - is there any way to tell which keys are not described by a spec?

2018-01-05 Thread Lucas Wiener
Hi, I'm writing a spec for a fairly complex data structure. One thing that I have identified troublesome is that I currently have no clue how "well" my spec describes my data. I keep iterating the spec, thinking that I have described all fields but then it turns out later that I've missed some

Re: Any data about just how much loc Clojure shaves off java?

2017-11-20 Thread Matching Socks
To Alex's list -- you may add the contorted use of XSLT for lack of data-structure transformation functions! And all the messing around making "safe copies"! And "thread-safe" wrappers! And factory-factory factories! And code written just to print out the contents of POJOs! And duplication

Re: Any data about just how much loc Clojure shaves off java?

2017-11-20 Thread Luc
At least 7-10 times less code on average. Except for UIs, UIs are naturally bloated code wise 😬 I spend much more time thinking about solving problems and testing than writing code. It was the reverse in other languages. And refactoring is a piece of cake, no need for these heavy tools found in

Re: Any data about just how much loc Clojure shaves off java?

2017-11-19 Thread Ravindra Jaju
31 AM, Didier wrote: > Hi there, > > Out of pure curiosity, I was wondering if there was any rewrite or > equivalent code out there between Java and Clojure that showed exactly how > many LOC you save from switching to Clojure. Especially for larger > endeavour. > > Thank

Re: Any data about just how much loc Clojure shaves off java?

2017-11-19 Thread Alex Miller
I agree that 5-10x is probably a good estimate not knowing anything else. Typically the “information objects” are a huge savings and then another large savings in data transformation and glue code. Algorithmic code is probably smaller. Depending on what you’re doing, if there is a lot of repet

Re: Any data about just how much loc Clojure shaves off java?

2017-11-19 Thread Rangel Spasov
Very hard to give any sort of scientifically or statistically accurate answer to this question but I'll go for it nevertheless ;). I would say 5-10x (half to one order of magnitude). On Sunday, November 19, 2017 at 2:01:12 PM UTC-8, Didier wrote: > > Hi there, > > Out of pure

Any data about just how much loc Clojure shaves off java?

2017-11-19 Thread Didier
Hi there, Out of pure curiosity, I was wondering if there was any rewrite or equivalent code out there between Java and Clojure that showed exactly how many LOC you save from switching to Clojure. Especially for larger endeavour. Thanks. -- You received this message because you are

Re: any? in clojure 1.9.0 alpha

2017-10-10 Thread Jozef Wagner
ct, I have searched prior conversations and have not found a > justification for why any? is in clojure.core rather than clojure.spec. > > All the problems people have raised with any? are due to it be a predicate > with a very specific use-case (defining specs) but placed in a names

Re: any? in clojure 1.9.0 alpha

2017-10-10 Thread Gordon Syme
With respect, I have searched prior conversations and have not found a justification for why any? is in clojure.core rather than clojure.spec. All the problems people have raised with any? are due to it be a predicate with a very specific use-case (defining specs) but placed in a namespace

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Margaret Atwood > > > -- > *From:* clo...@googlegroups.com > on behalf of lawrence...@gmail.com < > lawrence...@gmail.com > > *Sent:* Monday, October 9, 2017 11:23:05 AM > *To:* Clojure > *Subject:* Re: Can slingshot/try+ and then

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
nce...@gmail.com < > lawrence...@gmail.com > > *Sent:* Monday, October 9, 2017 11:23:05 AM > *To:* Clojure > *Subject:* Re: Can slingshot/try+ and then catch Object really catch any > error? > > MatchingSocks, thanks for that. I think the pattern I fol

RE: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Sean Corfield
" -- Margaret Atwood From: clojure@googlegroups.com on behalf of lawrence.krub...@gmail.com Sent: Monday, October 9, 2017 11:23:05 AM To: Clojure Subject: Re: Can slingshot/try+ and then catch Object really catch any error? MatchingSocks, thanks for that. I thi

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Gary Verhaegen, thanks for that. The idea of buffers and threads dying is a good one and gives me something to look for. On Monday, October 9, 2017 at 2:23:05 PM UTC-4, lawrence...@gmail.com wrote: > > MatchingSocks, thanks for that. I think the pattern I followed everywhere > was: > > (future

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
MatchingSocks, thanks for that. I think the pattern I followed everywhere was: (future (slingshot/try+ ;;; some code (catch Object o (println o So I think I do catch everything inside of each future that I launch. But I will check again. Perhaps I missed one somewhere. O

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Matching Socks
The linked page https://stuartsierra.com/2015/05/27/clojure-uncaught-exceptions also says "Another wrinkle: exceptions inside a future are always caught by the Future. The exception will not be thrown until something calls Future.get (deref in Clojure)." So you would need to review the pattern

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Gary Verhaegen
wrote: >> >> Shantanu Kumar, thanks for that, I might try it. I assume you've never >> had the problem I'm talking about, of messages on background threads that >> disappear? >> > > Logback (the SLF4j impl we use) is capable of logging from multiple

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Shantanu Kumar
se) is capable of logging from multiple threads. I always set the default uncaught handler to log any exception arising from background threads: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) Stuart Si

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Shantanu Kumar
On Monday, 9 October 2017 12:31:57 UTC+5:30, lawrence...@gmail.com wrote: > > Kumar, > > Just so you know, on this page: > > https://github.com/cambium-clojure/cambium.logback.core > > you link to here: > > https://cambium-clojure.github.io/ > > but I get a 404 when I go there. > I'm sorry the

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Shantanu Kumar, thanks for that, I might try it. I assume you've never had the problem I'm talking about, of messages on background threads that disappear? On Monday, October 9, 2017 at 2:56:24 AM UTC-4, Shantanu Kumar wrote: > > >> >> I'm curious what others do for logging? >> > > At Concur w

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Kumar, Just so you know, on this page: https://github.com/cambium-clojure/cambium.logback.core you link to here: https://cambium-clojure.github.io/ but I get a 404 when I go there. On Monday, October 9, 2017 at 2:56:24 AM UTC-4, Shantanu Kumar wrote: > > >> >> I'm curious what others do fo

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread Shantanu Kumar
> > > > I'm curious what others do for logging? > At Concur we using Cambium https://github.com/kumarshantanu/cambium that's being moved (WIP) here: https://github.com/cambium-clojure Cambium wraps SLF4j and gives a Clojure API (which extends tools.logging) to use it's MDC feature. Shantanu

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
I'm using Cider in Emacs, but the problems I face only occur when I've created an uberjar and I try to run the app on the server. In the REPL I only work with small amounts of data, whereas on the server I work with a few million. Not sure how to get around that as I'm working from my apartment

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread Timothy Baldridge
What REPL are you using? A rather nasty side-effect of NRepl is that it tends to send messages from non-main-threads to weird places. On Sun, Oct 8, 2017 at 10:29 PM, wrote: > I just re-wrote much of the code to run on the main thread. And so now I > can see the error message (which was about a

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
I just re-wrote much of the code to run on the main thread. And so now I can see the error message (which was about a nil value in a place where I was certain there would be no nil values). Which is great. But since the app does a lot of I/O, I would like to for this app to be multi-threaded. B

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
Possibly this is a complication arising from the use of Slingshot? It would take a 2 maybe hours to completely tear Slingshot out of this app, but I would do that if I thought I would then be able to see the error messages. On Sunday, October 8, 2017 at 11:46:26 PM UTC-4, tbc++ wrote: > > I do

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
It's a bit absurd, but at the end of core/main I'm now catching Exceptions, Throwable and Object. But this doesn't seem to help me see what is happening on background threads. (defn -main [& args] (slingshot/try+ ;; 2017-10-04 -- see this: ;; https://stackoverflow.com/questions/28908

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
. But I never see any results of printing or throwing from inside the catch block. On Sunday, October 8, 2017 at 11:46:26 PM UTC-4, tbc++ wrote: > > I don't think you can catch an Object on the JVM can you? What happens if > you catch Throwable? > > On Sun, Oct 8, 20

Re: any? in clojure 1.9.0 alpha

2017-10-08 Thread Timothy Dean
Thank you, Alex. I'll check them out. ~Timothy Dean On Sun, Oct 8, 2017 at 8:09 PM, Alex Miller wrote: > We had this discussion at length in several places (clojure mailing list, > clojure-dev mailing list, reddit probably) over a year ago when any? was > added in 1.9.0-alpha

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread Timothy Baldridge
I don't think you can catch an Object on the JVM can you? What happens if you catch Throwable? On Sun, Oct 8, 2017 at 9:43 PM, wrote: > So, for instance, this says that 10 documents were retried: > > {"message" {:num-slabs 1, :num-active-slabs 1, :enqueued 389, :retried 10, > :completed 378, :in

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
So, for instance, this says that 10 documents were retried: {"message" {:num-slabs 1, :num-active-slabs 1, :enqueued 389, :retried 10, :completed 378, :in-progress 1}} The only place that I call retry! is in this catch block (this function runs in a background thread): (defn advance [message

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
Using spit to an append to a log file, I end up seeing much more than what I can see from Timbre. The app writes a few lines, then dies: ("\n\n\n\n\nResource usage: " "Memory in use (percentage/used/max-heap): (\"3%\" \"133M\" \"3568M\")\n\nCPU usage (how-many-cpu's/load-average): [4 0.0]\n\n

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
More generally, I'm having trouble seeing any kind of logging messages. Even when I delete this Timbre config, and simply go with Timbre defaults, and set the level to "trace", I only erratically see anything printed to the logs. I assume there are messages dying in background

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
(errors/log) simply writes to the Timbre logging library. I thought perhaps there was an error in my Timbre configuration, so I wrapped those functions in try/catch, but I still don't see anything. I'm trying this as my Timbre config: (defn- set-timbre-level [] (timbre/set-config! {:lev

Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
I'm trying to use a Zach Tellman's durable-queue to pass information from one part of my app to another. I have 3 queues. I also have a function that runs every 30 seconds, that is suppose to report some statistics for me: (fn [] (future (slingsho

Re: any? in clojure 1.9.0 alpha

2017-10-08 Thread Alex Miller
We had this discussion at length in several places (clojure mailing list, clojure-dev mailing list, reddit probably) over a year ago when any? was added in 1.9.0-alpha10. Search the archives for the prior discussions, I don't have time right now to re-summarize it all. On Sunday, Octo

Re: any? in clojure 1.9.0 alpha

2017-10-08 Thread Timothy Dean
If the ship has sailed, why, then, the ship has sailed. I only send this now because I'd already written it before I saw your reply, Alex. I do not think `any?` is a "gigantic" mistake, though I do think it is confusing. I expect to see a few some?/any? bugs from beginners. `s

Re: any? in clojure 1.9.0 alpha

2017-10-06 Thread Alex Miller
This ship has sailed. > On Oct 6, 2017, at 6:04 PM, Alan Thompson wrote: > > Before 1.9.0 is officially released, I would like to propose a revisit to the > semantic mismatch introduced by the clojure.core/any? function. > > Many, many people are dissatisfied by the choice o

Re: any? in clojure 1.9.0 alpha

2017-10-06 Thread Alan Thompson
Before 1.9.0 is officially released, I would like to propose a revisit to the semantic mismatch introduced by the *clojure.core/any? *function. Many, many people are dissatisfied by the choice of *clojure.core/any?* to be defined as *(constantly true)*, which is completely in conflict with

Any way to get all problems?

2017-04-13 Thread Caocoa
Hello, clojure.spec/and only returns first problem for the sake of optimality but in some case (*i.e.* form validation) it's useful to get the full list of problems. Any idea how to achieve that? Actually I've written a tiny snippet for that which I put on GitHub (then I realised co

Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread piastkrakow
mit loops a great deal. > > You just need to ensure you are building the sequences in an eager manner, > rather than a lazy manner. > > > > Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you&

Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread Sean Corfield
uences in an eager manner, rather than a lazy manner. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood From: piast...@gmail.com Sent: Satu

Re: I can not find any function that might give rise tothisStackOverflow error

2017-04-03 Thread piastkrakow
; *From: *piast...@gmail.com > *Sent: *Saturday, April 1, 2017 9:56 PM > *To: *Clojure > *Subject: *Re: I can not find any function that might give rise > tothisStackOverflow error > > > > > > Because when you recur in your loop, you’re passing in lazy sequ

RE: I can not find any function that might give rise tothisStackOverflow error

2017-04-01 Thread Sean Corfield
tect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood From: piastkra...@gmail.com Sent: Saturday, April 1, 2017 9:56 PM To: Clojure Subject: Re: I can not find any function that might give rise tothisStackOverflow

Re: I can not find any function that might give rise to thisStackOverflow error

2017-04-01 Thread piastkrakow
> > > *From: *piast...@gmail.com > *Sent: *Saturday, April 1, 2017 6:52 PM > *To: *Clojure > *Subject: *Re: I can not find any function that might give rise to > thisStackOverflow error > > > > > Crazy! I re-wrote the (loop) to use (reduce) instead and no

RE: I can not find any function that might give rise to thisStackOverflow error

2017-04-01 Thread Sean Corfield
iastkra...@gmail.com Sent: Saturday, April 1, 2017 6:52 PM To: Clojure Subject: Re: I can not find any function that might give rise to thisStackOverflow error Crazy! I re-wrote the (loop) to use (reduce) instead and now everything works: (defn loop-over-scores   [set-of-scores]   "2017-

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread Luke Burton
urday, April 1, 2017 at 6:23:29 PM UTC-4, piast...@gmail.com wrote: >>> >>> I have a function that will run repeatedly, so I use the at-at library to >>> call it: >>> >>> https://github.com/overtone/at-at >>> >>> I don't think this i

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
think this is the problem. >> >> Sad to say, the Error is catching a StackOverflow, which I'm having >> trouble finding. I don't see a place where I call a function recursively, >> so I don't see where any of this becomes stackoverflow. >> >

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
g. I don't see a place where I call a function recursively, > so I don't see where any of this becomes stackoverflow. > > I'm using Dire to catch errors, but for now I'm just logging them. I don't > see anything fancy or clever that would give me a

Re: I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
is is the problem. > > Sad to say, the Error is catching a StackOverflow, which I'm having > trouble finding. I don't see a place where I call a function recursively, > so I don't see where any of this becomes stackoverflow. > > I'm using Dire to catch err

I can not find any function that might give rise to this StackOverflow error

2017-04-01 Thread piastkrakow
call a function recursively, so I don't see where any of this becomes stackoverflow. I'm using Dire to catch errors, but for now I'm just logging them. I don't see anything fancy or clever that would give me a stackoverflow, and yet this anonymous function called by at-at is defin

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2017-01-03 Thread Mike Rodriguez
r. >> >> I've brought this up before @ >> http://stackoverflow.com/questions/19594360/preserving-timestamps-on-clojure-clj-files-when-building-shaded-jar-via-maven-s >> >> I have rarely seen people bring up issues around this with >> maven-shade-plugin

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-31 Thread Alex Miller
verflow.com/questions/19594360/preserving-timestamps-on-clojure-clj-files-when-building-shaded-jar-via-maven-s > > I have rarely seen people bring up issues around this with > maven-shade-plugin beyond this particular case. I believe I have seen a > complaint or two around the timest

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-28 Thread Mike Rodriguez
I also forgot to include the error message from my example GitHub project, in case it is easier than actually running it. I understand this issue for the most part. It has still been a bit tricky for me to fully understand how this AOT class interface/class is being referred to by any Clojure

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-28 Thread Mike Rodriguez
. While re-adding the files, we change all .clj files' timestamps to some time in the past and all other files just get the current time. This ensures that all .clj files will look "older" than any AOT .class file that happens to be in the jar. My main problem statement is primarily

Re: maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-28 Thread Gary Trakhman
flow.com/questions/19594360/preserving-timestamps-on-clojure-clj-files-when-building-shaded-jar-via-maven-s > > I have rarely seen people bring up issues around this with > maven-shade-plugin beyond this particular case. I believe I have seen a > complaint or two around the timestamp

maven-shade-plugin issues with Clojure core (or any clj) AOT compilation

2016-12-28 Thread Mike Rodriguez
lding-shaded-jar-via-maven-s I have rarely seen people bring up issues around this with maven-shade-plugin beyond this particular case. I believe I have seen a complaint or two around the timestamp loss during shading (I can't find them now), but nothing that has gained any traction (I may t

Re: Is there any way to pass clojure spec conform value to next spec?

2016-11-18 Thread Alex Miller
(catch Exception e > :clojure.spec/invalid)) > :else :clojure.spec/invalid)) > > > > (s/explain (and (s/conformer x-int?) (s/int-in 10 15)) "12") ;; Failed > (s/explain (and (s/conformer x-int?) (s/int-in 10 15)) 11 ) ;; Passed

  1   2   3   4   5   6   7   8   9   10   >