bat-test: How can I stop the capture of test output?

2021-10-25 Thread Alan Thompson
Does anybody here use `bat-test` with boot? It defaults to capturing all test output, and I can't figure out how to stop that. Thanks, Alan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: how to package a project to a jar file?

2021-09-15 Thread Alan Thompson
You could also check out depstar https://github.com/seancorfield/depstar On Tue, Sep 14, 2021 at 8:35 AM c y wrote: > i can't use lein > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to

First build of Tupelo Clojure using Java 17 (Clojure 1.11.0-alpha1)

2021-09-15 Thread Alan Thompson
and everything is working fine (as expected!). 25936 lines of Clojure 419 tests 4014 assertions ~/tupelo > lein clean; lein test Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were

An Intuition for Lisp Syntax

2020-10-25 Thread Alan Thompson
Nice article on how you can "discover" lisp: https://stopa.io/post/265 Enjoy! Alan -- 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: Accessing Record fields with keywords in ClojureScript not working as in Clojure

2020-08-12 Thread Alan Thompson
I verified the problem in the StackOverflow post. For some reason keyword lookup of record fields in CLJS doesn't work. Alan On Tue, Aug 4, 2020 at 12:05 PM Justin Smith wrote: > I don't think this is true, or if true is incidental to the real problem > > % cljs > ClojureScript 1.10.758 >

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-12 Thread Alan Thompson
, ignoring everything else). > > Or could be that it's not the index.html but something it refers to > getting picked up from elsewhere? > > On Tue, Aug 11, 2020 at 6:18 PM Alan Thompson wrote: > >> Hi - I just tried your suggestion and no joy: >> >>

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-11 Thread Alan Thompson
Hi - I just tried your suggestion and no joy: ~/work/tmp810/xanadu > clj -e "((requiring-resolve ' clojure.java.io/resource) \"public/index.html\")" DEPRECATED: Libs must be qualified, change deps-ancient => deps-ancient/deps-ancient (deps.edn) DEPRECATED: Libs must be qualified, change

Re: Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
P.S. There seems to be no *`clojure --version`* flag. Should this be added to the command line tool? On Mon, Aug 10, 2020 at 4:58 PM Alan Thompson wrote: > Hi. Just helped a colleague debug a vexing problem on a CLJS project > using Figwheel.Main. > > If we do *`brew install c

Classpath bug re Clojure 1.10.1.645 when using Figwheel.Main

2020-08-10 Thread Alan Thompson
Hi. Just helped a colleague debug a vexing problem on a CLJS project using Figwheel.Main. If we do *`brew install clojure/tools/clojure`*, it works: ~/work/tmp810/xanadu > clj --help Version: *1.10.1.561* Usage: clojure [dep-opt*] [--] [init-opt*] [main-opt] [arg*] clj [dep-opt*]

Re: bit-wise operators for bigint in Clojure

2020-05-28 Thread Alan Thompson
In Clojure, it is probably easiest to just use Java interop, eg: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigInteger.html#setBit(int) Alan On Tue, May 26, 2020 at 9:39 AM Harmon Nine wrote: > Hello. > > I noticed a post about this from 2013, so doing a bump. > >

Excellent series of videos by Uncle Bob Martin

2020-04-28 Thread Alan Thompson
I think everyone can benefit from viewing this material: - Clean Code - pt 1 - Clean Code - pt 2 - Clean Code - pt 3 - Clean Code - pt 4 - Clean Code - pt 5

Re: Strange result for clojure.core/time

2020-04-12 Thread Alan Thompson
; > `with-timer-print` 0.048 msec > `with-timer-print` with eval 1.041 msec > > The `with-timer-print` version is slower, and I suspect it is the use of > `format` instead of `str`. > > Paul > > On Fri, Apr 10, 2020 at 8:46 PM Alan Thompson wrote: > >> I was d

Strange result for clojure.core/time

2020-04-10 Thread Alan Thompson
I was doing some macro work and was curious about the cost of an inline `eval` vs compiled code. I tried to time it with `clojure.core/time` and got results I can't explain: (println :eval-time) (time (do (println (eval (quote (+ 40 0 (println (eval (quote (+ 40 1 (println

Re: Using Deps/CLI for building mixed Clojure & Java projects

2020-04-02 Thread Alan Thompson
onto the classpath that a subsequent CLI invocation could use). >> >> It would be just another tool like any of the others listed here: >> https://github.com/clojure/tools.deps.alpha/wiki/Tools >> >> On Thu, Apr 2, 2020 at 2:18 PM Alan Thompson wrote: >>

Using Deps/CLI for building mixed Clojure & Java projects

2020-04-02 Thread Alan Thompson
I've seen this conversation: https://clojureverse.org/t/is-there-a-sales-pitch-for-switching-to-deps-edn-from-lein-in-2020/5367/15 which seems to say there is no existing way to combine Java & Clojure source code when building with deps/CLI. Is this correct? If so, what would be entailed in

Re: Clojars moved to new infrastructure

2020-03-28 Thread Alan Thompson
g is now a CNAME for clojars.org, so you > can drop the beta. > > - Toby > > [1]: https://github.com/cloojure/tupelo/blob/master/project.clj#L17 > > On Sat, Mar 28, 2020 at 7:53 PM Alan Thompson wrote: > > > > Just tried to upload a new release to Clojars.org and got

Re: Clojars moved to new infrastructure

2020-03-28 Thread Alan Thompson
e /home/alan/tupelo/pom.xml Need to sign 2 files with GPG [1/2] Signing /home/alan/tupelo/target/provided/tupelo-0.9.200.jar with GPG You need a passphrase to unlock the secret key for user: "Alan Thompson (n/a) " 2048-bit RSA key, ID 303912FC, created 2018-11-25 [2/2] Signing /ho

Destructuring in Kotlin

2020-03-25 Thread Alan Thompson
I was just reading an article on Kotlin and noticed they have nearly identical destructuring syntax as in Clojure: for ((k, v) in map) { println(“$k -> $v”) } Kotlin can also be compiled into JavaScript ES5.1 to target browsers, just like with ClojureScript. -- You received this message

Re: Clojure 1.10 "Illegal Reflective Access Operation"

2020-03-22 Thread Alan Thompson
I have included easy-to-use parsers of 3 types in the Tupelo library for 3 formats: - HTML: tupelo.parse.tagsoup - XML: tupelo.parse.xml - YAML:

Re: quoting vs syntax quoting

2020-03-02 Thread Alan Thompson
It is even simpler if you just run the following code: (println "plain-quote: " 'map) (println "syntax-quote: " `map) with result: plain-quote:map syntax-quote: clojure.core/map The syntax-quote also allows you to unquote forms using `~` and `~@` (you can't do this with

Re: Clojars deployment failing

2020-02-20 Thread Alan Thompson
I just did a `lein deploy clojars` and it worked fine. Alan On Wed, Feb 19, 2020 at 8:40 PM Aaron D. wrote: > Whelp -- Just another data point -- I got two releases through just now > successfully. So this is intermittent or something was fixed. > > On Wednesday, February 19, 2020 at 10:24:47

[ANN] Juxt/Bidi routing library demo

2020-01-29 Thread Alan Thompson
I just started maintaining a new codebase that uses the juxt/bidi routing library, which I've not used before. In going through the code, the project uses some features which are not fully documented in the juxt/bidi README, so I wrote some demo code to clarify what is going on and the proper

[ANN] Tupelo Clojure I/O Utils - tupelo.io - 0.9.185

2020-01-17 Thread Alan Thompson
ctory tmp-name)) ; idempotent )) There are also a few stream type-testing predicates: (let [in-stream (io/input-stream dummy-file) out-stream (io/output-stream dummy-file) dis(DataInputStream. in-stream) dos(DataOutputStream. out-stream)] (isnt (dat

Re: Enlive: select a comment, drop all subsequent nodes?

2019-12-16 Thread Alan Thompson
amples <https://github.com/cloojure/tupelo/blob/master/test/clj/tst/tupelo/forest_examples.clj> . Alan On Mon, Dec 16, 2019 at 12:18 PM Alan Thompson wrote: > Quick & dirty technique: > > (ns tst.demo.core > (:use demo.core tupelo.core tupelo.test) > (:requir

Re: Enlive: select a comment, drop all subsequent nodes?

2019-12-16 Thread Alan Thompson
Quick & dirty technique: (ns tst.demo.core (:use demo.core tupelo.core tupelo.test) (:require [clojure.java.io :as io] [clojure.walk :as walk] [tupelo.parse.tagsoup :as tagsoup] )) (dotest (let [txt(slurp (io/resource "test.html")) >> (println

Re: 100x startup for Clojure using GraalVM

2019-12-03 Thread Alan Thompson
When you have a short-running task that completes in 0.01 sec, a startup delay of 1.3 seconds (or more) *is* the total execution time. On Fri, Nov 29, 2019 at 10:32 AM david hoyt wrote: > This kind of think is really only interesting for shell piping in bash. It > won’t help numerical, tensor,

Re: 100x startup for Clojure using GraalVM

2019-11-12 Thread Alan Thompson
g scales? >> >> I know a bunch of meta data isn’t needed as it is hotspot specific, but >> are there any other memory savings? >> >> Sent from my iPhone >> >> On 12 Nov 2019, at 18:42, Alan Thompson wrote: >> >> In my initial post, I failed to mention the huge

Re: 100x startup for Clojure using GraalVM

2019-11-12 Thread Alan Thompson
In my initial post, I failed to mention the huge memory savings achieved by the standalone executable (in addition to the startup time savings). Note that using *time* at the command line resolves to a shell built-in command. We can get more information from the standard Unix version of time: #

100x startup for Clojure using GraalVM

2019-11-08 Thread Alan Thompson
Some people I know have been interested in switching from Clojure to Go in order to get faster startup times and statically linked executables for microservices on AWS Lambda, etc. Having recently reviewed the Go: the Good, the Bad, and the Ugly

Love Letter to Clojure (by Gene Kim)

2019-10-11 Thread Alan Thompson
Thought this would be of interest: https://itrevolution.com/love-letter-to-clojure-part-1/ -- 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 -

Java in 2019 survey

2019-10-09 Thread Alan Thompson
I thought this might be of interest to Clojure devs: https://www.baeldung.com/java-in-2019 -- 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

Good Clojure article by Uncle Bob

2019-08-23 Thread Alan Thompson
Nicely sums up the advantages of Clojure: http://blog.cleancoder.com/uncle-bob/2019/08/22/WhyClojure.html -- 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

Nice blog entry on not trying to do much with `:prep-tasks` in `lein`

2019-06-07 Thread Alan Thompson
Makes a good point that other tools should be used for non-clojure build steps. https://grishaev.me/en/lein/ -- 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

Re: No "clojure --version" switch

2019-05-08 Thread Alan Thompson
Jira CLJ-2508 created. On Wed, May 8, 2019 at 4:51 AM Alex Miller wrote: > > Actually, reporting the Clojure AND Java version would be even better. > > > On May 8, 2019, at 6:31 AM, Alex Miller wrote: > > > > I would echo the other comments here. What user question are we trying to > > answer?

Compiler error message misses the target

2019-05-07 Thread Alan Thompson
So I get a strange error from the compiler after a few minor edits: Syntax error compiling at (tupelo/forest.clj:7:1). Unable to resolve symbol: d in this context Full report at: /tmp/clojure-18236661144073611223.edn with the following EDN message: {:clojure.main/message "Syntax error

No "clojure --version" switch

2019-05-07 Thread Alan Thompson
Seems we should have the "--version" switch that is pretty universal. Right now, the best one can do is > clojure --eval "(clojure-version)" "1.10.0" which is hard for a new user to figure out. Jira ticket? Alan -- You received this message because you are subscribed to the Google Groups

StackOverflow Survey Results

2019-04-09 Thread Alan Thompson
are in. Clojure ranks highly on the scale of global salary and in the "Most Loved" categories:

Re: [ANN] defn-spec, define your specs inline with your function

2019-04-01 Thread Alan Thompson
Looks interesting! Definitely need to check this out. Alan On Sun, Mar 31, 2019 at 12:44 AM Daniel Compton < daniel.compton.li...@gmail.com> wrote: > Hi folks > > I've released 0.1.0 of defn-spec > , a library that lets you > define your function

Re: [ANN] Clojure 1.10.1-beta1

2019-03-26 Thread Alan Thompson
Working fine for the Tupelo library: https://github.com/cloojure/tupelo - Clojure 1.10.1-beta1Java 12 - Ran 312 tests containing 2874 assertions. 0 failures, 0 errors. lein test :all 61.60s user 1.22s system 299%

Re: Clojure 1.10 "Illegal Reflective Access Operation"

2019-03-03 Thread Alan Thompson
After further investigation, I modified my copy of the xml parsing code to wrap either an InputStream or a Reader with an org.xml.sax.InputSource (and changed the type hint): (defn ^:private sax-parse-fn [xml-input content-handler] (let [input-source (cond (or

Re: Clojure 1.10 "Illegal Reflective Access Operation"

2019-03-02 Thread Alan Thompson
s ; actual type => java.io.BufferedInputStream ^org.xml.sax.helpers.DefaultHandler ch; actual type => net.cgrand.xml.proxy$org.xml.sax.ext.DefaultHandler2 ) A Pull Request has been filed. Much thanks to Andy Fingerhut for pointing me in the right direction. Alan Thompson On Sun, Feb

Clojure 1.10 "Illegal Reflective Access Operation"

2019-02-24 Thread Alan Thompson
Upgrading from Clojure 1.9 to 1.10, I am getting a new warning: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by clojure.lang.InjectedInvoker/0x000800231c40 (file:/home/alan/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar) to

Re: Using map to produce side effects, not working

2019-02-08 Thread Alan Thompson
Also remember that `mapv` is not lazy and will force the map to run right away, which helps if side-effecty things like `println` are a part of the function. On Thu, Feb 7, 2019 at 10:54 AM Justin Smith wrote: > also do note that clojure.core/run! is designed for two-arg map when > it's only

crossclj.info unavailable ???

2019-02-06 Thread Alan Thompson
Trying to hit http://crossclj.info (Ubuntu 16.04 + Chrome) yields: This site can’t provide a secure connection *crossclj.info * sent an invalid response. ERR_SSL_PROTOCOL_ERROR -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: [ANN] Calfpath (v0.7.1), a fast and flexible Ring request router

2019-01-04 Thread Alan Thompson
Hi have been very happy using Pedestal for routing chores. How does this compare to Pedestal? Alan On Fri, Jan 4, 2019 at 9:50 PM Shantanu Kumar wrote: > Hi, > > (Cross-posted on Clojure and Ring mailing lists.) > > Happy new year to all! > > I am pleased to announce

Re: How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-04 Thread Alan Thompson
If you haven't seen it before, you can use the excellent Claypoole library for many parallel scheduling tasks. Alan On Wed, Jan 2, 2019 at 1:07 PM wrote: > I guess this is more of a JVM question than a Clojure question, unless > Clojure

Re: [ANN] Oz 1.4.0 - Interactive data visualizations and scientific documents with Vega/Vega-Lite

2018-12-18 Thread Alan Thompson
Looks very nice. I will definitely be using this in the future. Alan On Tue, Dec 18, 2018 at 4:44 AM wrote: > Odd. The exact same code works for me. This is clojure 1.10/oz 1.4, and > evaluating the whole blob from lighttable. > > I had to call (oz/v! line-plot) again to get it to show the

Re: `lein test` 28x slower than `lein run`.... Why?

2018-12-15 Thread Alan Thompson
Never mind, I found the problem. During testing I had enabled Plumatic Schema function validation: (s/set-fn-validation! true) ; enforce fn schemas Disabling validation made `lein test` and `lein run` produce comparable times. Alan On Sat, Dec 15, 2018 at 10:41 AM Alan Thompson wrote

`lein test` 28x slower than `lein run`.... Why?

2018-12-15 Thread Alan Thompson
Hi, I'm seeing something I never expected with Leiningen, namely that `lein test` can take 28x longer to run a task than if it is invoked via `lein run`. Elapsed time measurements (sec): * function test run ratio* :add-tree-xml

Re: (float 0.819869321599107) = 0.81986934 ?

2018-12-15 Thread Alan Thompson
10:18 AM Alan Thompson wrote: > An IEEE-754 floating point value has only 32 bits (total), which > corresponds to approximately 8 decimal digits. For full info, see the java > spec: > > > https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html > >

Re: (float 0.819869321599107) = 0.81986934 ?

2018-12-15 Thread Alan Thompson
An IEEE-754 floating point value has only 32 bits (total), which corresponds to approximately 8 decimal digits. For full info, see the java spec: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html On Sat, Dec 15, 2018 at 10:11 AM ru wrote: > Dear Clojure users

Re: [ANN] Lancaster 0.6.0 - Avro Schema Creation / Serialization / Deserialization

2018-11-17 Thread Alan Thompson
Looks nice. Alan On Sat, Nov 17, 2018 at 6:57 PM Chad Harrington wrote: > https://github.com/deercreeklabs/lancaster > > Lancaster is an Apache Avro library > for Clojure and ClojureScript. It aims to be fully compliant with the Avro > Specification

Re: Plumatic Schema error in CLJS

2018-11-04 Thread Alan Thompson
lojure hash-set or a java.util.HashSet" (s/either #{s/Any} *#?(:clj* java.util.HashSet*)*)) ; <= *This was missing the #?(:clj ...)* and caused the error On Sun, Nov 4, 2018 at 9:43 PM Alan Thompson wrote: > I am seeing the following errors in CLJS, but not in CLJ: > > ER

Plumatic Schema error in CLJS

2018-11-04 Thread Alan Thompson
I am seeing the following errors in CLJS, but not in CLJ: ERROR in (dotest-line-695) (schema/core.js:33:64) expected: (clojure.core/= (t/thru 9) (t/glue-rows data)) actual: #object[Error Error: No protocol method Schema.spec defined for type undefined: ] The errors disappear if I remove

Re: Prototype code for enhanced CIDER code completion for Java methods

2018-10-17 Thread Alan Thompson
I love Cursive and use the IntelliJ Vim keybindings everyday. Apparently they have alternate keybindings for those of you from the dark side. Alan On Wed, Oct 17, 2018 at 4:19 AM 'somewhat-functional-programmer' via Clojure wrote: > I appreciate your thoughtful response -- I wish some of the

Re: [ANN] Clojure 1.10.0-beta1

2018-10-05 Thread Alan Thompson
Looks good to me, tested on both prod and open source code. Alan On Fri, Oct 5, 2018 at 9:21 PM Alex Miller wrote: > Now is a great time to try 1.10.0-beta1 and let us know if you find any > major bugs or performance issues. > > I also meant to mention that all changes in Clojure 1.10 are now

Re: [ANN] com.walmartlabs/cond-let 1.0.0

2018-10-04 Thread Alan Thompson
How would the :when and :do forms work? Alan On Wed, Oct 3, 2018 at 7:22 PM Mark Engelberg wrote: > This looks like a case of "convergent evolution". > > Having the ability to do a :let in the middle of a cond feels like one of > those things that *should* be in the core language, so if it's

Re: Keyword namespacing best practices

2018-10-01 Thread Alan Thompson
It is easy to overdo it when trying to predict future needs. I always (now) do the minimal solution, with the expectation that it *may* evolve in the future. Since the parts that do need change (say 5% ?) are usually not the ones I would have predicted, I am usually very glad I didn't

Re: IF, WHEN or SOME

2018-09-20 Thread Alan Thompson
Should have been:(evens? nil) On Thu, Sep 20, 2018 at 1:47 PM Alan Thompson wrote: > `println` always returns `nil`. So it prints "one", returns `nil`, and > you try to execute the form: > > (nil) => NullPointerException > > > user=> (evens? (println

Re: IF, WHEN or SOME

2018-09-20 Thread Alan Thompson
`println` always returns `nil`. So it prints "one", returns `nil`, and you try to execute the form: (nil) => NullPointerException user=> (evens? (println “one”)) one NullPointerException user/eval239 (NO_SOURCE_FILE:74) On Thu, Sep 20, 2018 at 9:06 AM Orestis Markou wrote: > evens? is

Still loving the lein-test-refresh

2018-09-20 Thread Alan Thompson
Just tried the test selector feature, which lets you use metadata to mark only some tests to be re-run when you are focusing on a specific part of the code. https://github.com/jakemcc/lein-test-refresh#built-in-test-narrowing-test-selector Loving it! Alan -- You received this message because

Agile in 2018 - Martin Fowler talk

2018-08-30 Thread Alan Thompson
Very good talk if you haven't seen it yet: https://www.infoq.com/presentations/agile-2018 -- 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

Clojure treat all Thread's as deamon?

2018-08-09 Thread Alan Thompson
There is question on StackOverflow: https://stackoverflow.com/questions/51776663/why-does-looping-over-a-large-amount-of-data-in-another-thread-cause-an-overacti/5164#5164 In my answer, I document how Clojure seems to tread a manually created java Thread as if it a daemon thread, even

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Alan Thompson
ial: any mix of lists & vectors (vector result) - all maps (sorted or not) - all sets (sorted or not) - all text: any mix of strings & characters (string result) On Wed, Jul 18, 2018 at 1:13 PM, Alan Thompson wrote: > As someone mentioned, the functions `prepend` an

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Alan Thompson
As someone mentioned, the functions `prepend` and `append` exist in the Tupelo library to prevent this kind of confusion: from the README:

Re: concat and mapcat not sufficiently lazy

2018-07-18 Thread Alan Thompson
I have added this to the Tupelo library as `tupelo.lazy/join`: API docs:http://cloojure.github.io/doc/tupelo/tupelo.lazy.html source: (defn join "Lazily concatenates a sequence-of-sequences into a flat sequence." [sequences]

Re: Windows Cygwin lein repl

2018-06-02 Thread Alan Thompson
;> >> "If you're not annoying somebody, you're not really alive." >> -- Margaret Atwood >> >> >> -- >> *From:* clo...@googlegroups.com on behalf of >> Alan Thompson >> *Sent:* Thursday, May 24, 2018 4:48:58 PM >

Re: Windows Cygwin lein repl

2018-05-24 Thread Alan Thompson
I have used cygwin extensively in the past, but not recently. If you haven't tried it yet, you should try installing Git For Windows and then use the "Git Bash" command shell. Alan On Wed, May 23, 2018 at 3:37 AM, wrote: > A quick note to anyone coming to this later. I

Re: accessing symbols in local context of a closure

2018-05-24 Thread Alan Thompson
No, it is hidden inside the closure and can't be accessed from the outside. On Thu, May 24, 2018 at 11:22 AM, Sonny To wrote: > (defn foo[] > (let [x 1] >(fn [] > (+ x 1) > ) > ) > > (def bar (foo)) > > Is there a way to get the value of x from closure bar?

Re: [ANN] packthread 0.1.10

2018-04-03 Thread Alan Thompson
If you are interested in alternatives to `clojure.core/->`, you may be interested in the `it->` macro from the Tupelo library . Here is a summary: = Usage examples for

StackOverflow Job Survey results are out

2018-03-13 Thread Alan Thompson
& Clojure is still doing well on the salary front: https://insights.stackoverflow.com/survey/2018/#work-salary-and-experience-by-language -- 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

Re: [ANN] com.walmartlabs/dyn-edn 0.1.0

2018-02-20 Thread Alan Thompson
Looks very useful. One suggestion: the example might be easier to read if you included the values of the env vars, and clarified the way you specify default values: {:connection-pool {:user-name #dyn/prop [DB_USER "accountsuser"] ; default value "accountsuser" :user-pw #dyn/prop DB_PW

Re: what does future do after fn finish ?

2018-02-01 Thread Alan Thompson
You may find that using the Claypoole library is the easiest way to handle threadpools: https://github.com/TheClimateCorporation/claypoole Alan On Thu, Feb 1, 2018 at 11:16 AM, Justin Smith wrote: > yes, that's the idea exactly > > also, you might want more fine grained

Re: Russ olsen's Clojure Book

2018-01-22 Thread Alan Thompson
Really looking forward to it! Alan On Mon, Jan 22, 2018 at 11:43 AM, Shaun Parker wrote: > The book is now available to purchase. Thanks Russ, I can't wait to read > it! > > https://pragprog.com/book/roclojure/getting-clojure > > On Wednesday, January 17, 2018 at 5:12:15

Re: [ANN] Datomic Cloud

2018-01-17 Thread Alan Thompson
Cool. On Wed, Jan 17, 2018 at 6:25 AM, Jeroen van Dijk wrote: > Congrats! > > On Wed, Jan 17, 2018 at 3:06 PM, Stuart Halloway < > stuart.hallo...@gmail.com> wrote: > >> Datomic Cloud is now available! http://blog.datomic >> .com/2018/01/datomic-cloud.html >> >> --

Re: [ANN] Git Deps for Clojure!

2018-01-07 Thread Alan Thompson
Hey - I love the idea. However, I'm getting an error message trying to run the example: ~/work/fred > cat deps.edn {:deps {github-clj-time/clj-time {:git/url "https://github.com/clj-time/clj-time; :rev "cce58248"}} } ~/work/fred > clj Error building classpath. Manifest type :lein not loaded

Re: Advice on Shell Scripting with new "clojure" binary

2018-01-05 Thread Alan Thompson
Cool! I had somehow missed that in the announcement. Quick test on linux: > echo '(println "Yes!!!")' | time clojure Clojure 1.9.0 user=> Yes!!! nil user=> clojure 1.38s user 0.07s system 198% cpu *0.730 total* Well under a second, even with a full-power JVM to load. Very convenient!

Re: Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
xit Use exit() or Ctrl-D (i.e. EOF) to exit >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>> On Sat, Dec 9, 2017 at 8:29 PM, Alan Thompson <clooj...@gmail.com> wrote: > Would a message such as "use CRTL-D to exit" be appropriate? Right now it > is

Re: Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
:55:17 PM > *To:* clojure@googlegroups.com > *Subject:* Re: Terminating 'clj' REPL session > > I find the fact that "exit" and "quit" work in leiningen repls to be weird > - this doesn't follow the otherwise consistent rules of the language. What > about an exit

OutOfMemoryError when using Plumatic Schema and infinite lazy lists

2017-12-09 Thread Alan Thompson
I am a huge fan of Plumatic Schema, and it regularly helps me to find mistakes in my code early in the development process. However, I just tracked down a very unexpected error when using a lazy infinite list such as that produced by `(range)` Suppose you define two simple functions like

Terminating 'clj' REPL session

2017-12-09 Thread Alan Thompson
Hi - Just downloaded the new Clojure 1.9.0 package. When I tried the repl I noticed that it doesn't respond to either `exit` or `quit` as one might expect from the lein repl: ~/cool/tools > clj Clojure 1.9.0 user=> (+ 2 3) 5 user=> exit CompilerException java.lang.RuntimeException: Unable to

Re: Lazy Flatten; One seq at a Time

2017-11-21 Thread Alan Thompson
You can also solve this using `lazy-gen` and `yield-all` from the Tupelo library . It allows you to make a lazy generator function (a la Python): (let [seq-of-seqs [(range 0 5) (range

Re: [ANN] data.xml 0.2.0-alpha5

2017-11-13 Thread Alan Thompson
I seem to still be getting the JDK 1.9 reflection warning: ~/tupelo > grep data.xml project.clj [org.clojure/data.xml "0.2.0-alpha5"] > lein test lein test tst.tupelo._bootstrap - Clojure 1.9.0-RC1Java 9.0.1

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
;Makes sure that all changes to `src` are reflected in `dst`." ​I haven't seen any problems in using it for a year or so, but the implementation is not the same as I expected. Hmmm. Alan​ On Tue, Nov 7, 2017 at 12:08 PM, Alan Thompson <clooj...@gmail.com> wrote: > In the Tupelo l

Re: Who Uses import-vars?

2017-11-07 Thread Alan Thompson
In the Tupelo library, I have been using `import-fn` and `import-macro` from Potemkin so that I can define functions/macros in a single namespace `tupelo.impl`, but then expose an API in "user-visible" namespaces like: - tupelo.core - tupelo.char - tupelo.test - etc Perhaps I've been

Re: [ANN] Clojure 1.9.0-beta4

2017-11-03 Thread Alan Thompson
ov 3, 2017 at 1:36 PM, Alan Thompson <clooj...@gmail.com> wrote: > OK, I upgraded lein to 2.8.1, and it removed one of the error messages. > I still have one remaining: > > WARNING: An illegal reflective access operation has occurred > WARNING: Illegal reflective access by cloju

Re: [ANN] Clojure 1.9.0-beta4

2017-11-03 Thread Alan Thompson
OK, I upgraded lein to 2.8.1, and it removed one of the error messages. I still have one remaining: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by clojure.lang.Reflector

Re: [ANN] Clojure 1.9.0-beta4

2017-11-02 Thread Alan Thompson
Hi. 1.9.0-beta4 works great for the Tupelo library on java 1.8, but I get the following warnings using Java 9.0.1: ​WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by dynapath.defaults$eval380$fn__381 to method

Nice screencast overview of Specter

2017-10-18 Thread Alan Thompson
I just saw this on YouTube and thought you may enjoy it: https://youtu.be/rh5J4vacG98 While there is lots of written documentation on Specter, the live-coding and narration of what one is seeing provides some nice examples. Enjoy, Alan -- You received this message because you are subscribed to

Re: Help ship Clojure 1.9!

2017-10-06 Thread Alan Thompson
Before Clojure 1.9 is shipped, I would like to reiterate the appeal from many in the community to stop the terrible, permanent mistake that is *clojure.core/any?* For those who have not seen past emails on this topic, you may view the main threads here: -

Re: any? in clojure 1.9.0 alpha

2017-10-06 Thread Alan Thompson
id a permanent pollution of the language with a gigantic mistake such as *any?*. At the very least, the function could be moved to *clojure.spec/any?* from *clojure.core*. If we insist on adding this blatant contradiction to *clojure.core*, we won't even have the excuse of a committee to blam

Re: [core.spec] Stricter map validations?

2017-10-03 Thread Alan Thompson
While it doesn't use spec, you can do this using the validate-map-keys helper function in the Tupelo library . It verify that a map does not contain any keys other than those you specify. The unit test shows it in action: (ns tst.demo.core (:use demo.core

Re: Clojure rookie vs parsing

2017-08-16 Thread Alan Thompson
While Instaparse is (IMHO) the best parser for use with Clojure, you don't have to start from such a low level (i.e. parsing a char stream text file). Just re-write your original problem a little and you can skip writing a custom parser. In Clojure, perhaps the most popular format (certainly the

Re: The Empire Strikes Back: Microsoft Visual Studio IDE Integration for F#

2017-06-05 Thread Alan Thompson
Link: https://blogs.msdn.microsoft.com/dotnet/2017/05/31/why-you-should-use-f/ On Mon, Jun 5, 2017 at 9:23 AM, Alan Thompson <clooj...@gmail.com> wrote: > Here is an interesting talk from MS Build 2017 conference, especially when > compared to similar capabilities in Clojure/

Re: Adding debug traces to expressions

2017-06-05 Thread Alan Thompson
] to get printed output like this: module-hid => :5d77d6d3a49b09624ca8e8c9f9c975228a212d03 module-bush-before => [{:tag :module} [{:tag :identifier} "calculator"] [{:tag :namespace} [{:tag :string} "http://brocade.com/ns/calculator;]] [{:tag :contact} [{:tag :string} "Alan

The Empire Strikes Back: Microsoft Visual Studio IDE Integration for F#

2017-06-05 Thread Alan Thompson
Here is an interesting talk from MS Build 2017 conference, especially when compared to similar capabilities in Clojure/Cursive, etc. For the first time they can do code completion, IDE REPL integration, and simple refactorings (e.g. "Rename Variable"). They also have an interactive data explorer

SymbolHound search engine

2017-05-25 Thread Alan Thompson
Hi - Just came across a reference to a search engine *symbolhound.com * which explicitely *does not* ignore special characters. This could be very useful in searching for Clojure literals like *#{}* & reader macros like *#' *which are difficult to search for using Google

Re: How to Create Clojure `defn` Functions automatically?

2017-05-13 Thread Alan Thompson
on being presented. > > > On Sat, May 13, 2017 at 4:49 PM, Alan Thompson <clooj...@gmail.com> wrote: > >> I was just trying to answer a question posed by someone else, so I can't >> give details about the original motivation. I thought it was a good example &g

Re: How to Create Clojure `defn` Functions automatically?

2017-05-13 Thread Alan Thompson
gmail.com> wrote: > Sorry, but this use of intern is a pointless. What does intern give you > that a let over a defn doesn't? > > On Sat, May 13, 2017 at 4:37 PM, Alan Thompson <clooj...@gmail.com> wrote: > >> If anyone is interested, I cleaned up the question to

Re: Functional Pattern to Replace Temp Var

2017-05-13 Thread Alan Thompson
You are already doing exactly the right thing by having a temporary variable. To be precise a code fragment like: (let [expensive-answer (some-fn x y z) final-result { :k1 (f1 expensive-answer) :k2 (f2 expensive-answer) :k3 (f3 expensive-answer) }

  1   2   3   >