set vs hash-set

2014-02-06 Thread Alan Thompson
OK, this one has me stumped. What is the difference between clojure.core/set and clojure.core/hash-set ??? The source code is almost identical. Is one to be preferred over the other depending on circumstances? Alan (defn set Returns a set of the distinct elements of coll. {:added 1.0

Re: unconditional append to end

2014-02-09 Thread Alan Thompson
Holy cow! Where have these been hiding! They don't show up on ClojureDocs.org at all!!! I was about to write my own macro vmap to implement (vec (map(...)) for just the use cases outlined above. I just looked on clojure.org, and searching on map doesn't return any (useful) results. I

Re: unconditional append to end

2014-02-10 Thread Alan Thompson
-clj-1.3/cheatsheet-tiptip-cdocs-summary.html After you go though the cheat sheet you can try http://clojure.github.io/clojure It's more complete but way less nice. On Monday, February 10, 2014 3:21:16 AM UTC-2, Mars0i wrote: On Sunday, February 9, 2014 10:45:04 PM UTC-6, Alan Thompson wrote

Re: [ANN] Gorilla REPL initial release (0.1.2)

2014-02-19 Thread Alan Thompson
Hey - tried to play the video with Chrome/Fedora, and no go! Got any other formats available? Alan On Wed, Feb 19, 2014 at 1:23 PM, Jony Hudson jonyepsi...@gmail.com wrote: Hi All, I'm pleased to announce the first release of Gorilla REPL, a rich REPL in the notebook style:

Re: Help a Startup use Clojure!

2014-03-13 Thread Alan Thompson
Hey, I love your write-up! You should put that in a blog post so more people can read it share it. Alan On Mar 12, 2014 2:00 PM, da...@dsargeant.com wrote: I just spent the day writing this document for my boss, called The case for Clojure. I hope it helps. We are in exactly the same boat,

Re: nested map destructuring

2013-03-20 Thread Alan Thompson
Nice explanation! --Alan On Tue, Mar 19, 2013 at 1:09 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: nice one...when thinking like there is literally no confusion. thank you thank you thank you :) Jim On 19/03/13 20:05, Marko Topolnik wrote: Think of it in layers, like

Re: Clojure/West 2013 videos?

2013-03-25 Thread Alan Thompson
Thank you for the conferences! I missed this one but really want to attend the next one. And a double thank you for having such high-quality videos from past conferences available on-line! Alan Thompson On Mon, Mar 25, 2013 at 10:35 AM, Mark Engelberg mark.engelb...@gmail.comwrote: I've been

Re: Apply elements in a vector as arguments to function

2013-03-26 Thread Alan Thompson
Apply works for any number of args: (apply + [1 2 3 4 5]) He just gave you an example inline function of 2 args since that was the original example. Alan Thompson On Tue, Mar 26, 2013 at 12:44 PM, Ryan arekand...@gmail.com wrote: Thanks Michael, but If i am not mistaken, your example only

Re: Apply elements in a vector as arguments to function

2013-03-26 Thread Alan Thompson
Essentially, apply just removes the parens (or brackets) from your list of args and creates the original function call: (apply + [1 2 3]) - (+ 1 2 3) Alan Thompson On Tue, Mar 26, 2013 at 12:49 PM, Alan Thompson thompson2...@gmail.comwrote: Apply works for any number of args: (apply

Re: Problem with map (only when running on browser)

2013-04-01 Thread Alan Thompson
I second that, Nico! For some reason the lines are not wrapping at all in GMail and are coming in a couple of hundred char's wide! Alan On Sat, Mar 30, 2013 at 8:54 AM, Cedric Greevey cgree...@gmail.com wrote: On Sat, Mar 30, 2013 at 10:09 AM, Nico nbren...@gmail.com wrote: BTW, it seems

Re: WAT? BigInt instead of Long?

2013-04-01 Thread Alan Thompson
the overhead of the arbitrary-precision type. But, the extra precision is there if you need it later on in a calculation. Alan Thompson On Mon, Apr 1, 2013 at 2:43 PM, Gary Verhaegen gary.verhae...@gmail.comwrote: That's because ratios are intended to get you arbitrary precision. That would

Re: [ANN] Schejulure 0.1.3

2013-04-18 Thread Alan Thompson
Looks nice! Alan On Mon, Apr 15, 2013 at 12:40 PM, Anthony Grimes disciplera...@gmail.comwrote: You had me at the changelog entry regarding Sundays. I was actually tasked with writing pretty much this at work last Friday. My thanks for doing my work for me. Unfortunately I don't think you

Re: More idiomatic way to use map like this?

2013-05-03 Thread Alan Thompson
Hey Armando - How did you get the nice syntax highlighting into your post??? Enquiring minds wanna know. Alan On Fri, May 3, 2013 at 7:41 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: I Just realised you've many responses and that you've already solved your problem...sorry for the noise

Re: How to: reduce boolean operations?

2013-05-24 Thread Alan Thompson
Usage: (every? pred coll) (see http://clojuredocs.org/clojure_core/clojure.core/every_q ) Function *every?* expects a predicate and a collection. Converting the map {:a 1} into a collection returns a sequence of 2-element vectors: user= (seq {:a 1}) ([:a 1]) Calling the function :a on a

Git vs Perforce Comparison

2013-05-24 Thread Alan Thompson
to a more modern approach. The result is posted at the link below in case you find it useful in making a similar argument. Enjoy! http://cooljure.blogspot.com/2013/05/hello-all-this-is-my-very-first-post-on.html Alan Thompson -- -- You received this message because you are subscribed

Re: ANN - adi 0.1.5 (user friendly syntax for datomic)

2013-05-29 Thread Alan Thompson
Wow - that is pretty cool! Alan On Tue, May 28, 2013 at 11:41 PM, zcaudate z...@caudate.me wrote: 6. Insertion of `arbitrarily` formatted data: a - books containing users: (adi/insert! ds [{:book {:name Charlie and the Chocolate Factory :author Roald Dahl

Re: GSOC Algebraic Expressions

2013-05-29 Thread Alan Thompson
in your rules example? Good luck! Alan Thompson On Wed, May 29, 2013 at 8:29 AM, David Nolen dnolen.li...@gmail.com wrote: A very cool of use of core.logic, look forward to seeing where it goes :) On Wed, May 29, 2013 at 11:10 AM, Maik Schünemann maikschuenem...@gmail.com wrote: Hello

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Alan Thompson
I am new to re-seq, but this is progress: (re-seq #(?i)target.* testcase) (Target Line target line) On Wed, May 29, 2013 at 9:18 AM, Peter Mancini pe...@cicayda.com wrote: (def testcase Line 1\nLine 2\nTarget Line\nLine 4\nNot a target line) (println testcase) (re-seq #(?i)^target

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Alan Thompson
line at a time. You must then the .* to the search pattern to match the remainder of the line if you want that returned (try leaving it off to see the difference). Alan On Wed, May 29, 2013 at 9:28 AM, Alan Thompson thompson2...@gmail.comwrote: I am new to re-seq, but this is progress: (re

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Alan Thompson
really want to process a sequence of strings (broken up by line) and just filter out the ones you want to keep. So, re-find seems like the right tool here. Alan On Wed, May 29, 2013 at 9:42 AM, Alan Thompson thompson2...@gmail.comwrote: Here it is: (def lines (clojure.string/split Line 1

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Alan Thompson
OK, here it is: http://docs.oracle.com/javase/7/docs/api/index.html?java/util/regex/Pattern.html Look under Special Constructs, the 3rd entry. Still pretty terse! Alan On Wed, May 29, 2013 at 9:45 AM, Neale Swinnerton ne...@isismanor.comwrote: You need to pass the multiline 'm' flag to the

Re: regular expressions how-to: recognize lines?

2013-05-29 Thread Alan Thompson
... (re-split ...)) will be much easier for readers of the code to understand than the complicated do-it-all-in-one-regex method. Also, this is what people are used to from unix grep, which operates on each line of a file separately. Alan On Wed, May 29, 2013 at 9:50 AM, Alan Thompson thompson2

Re: GSOC Algebraic Expressions

2013-05-29 Thread Alan Thompson
to have generic rules classes of operations. Thanks for your feedback On Wed, May 29, 2013 at 6:21 PM, Alan Thompson thompson2...@gmail.comwrote: Hi - This looks great! Did you look at Mathematica at all? They have been doing symbolic algebra for many years, and you might get some ideas

Re: [ANN] Leiningen 2.2.0 released

2013-05-29 Thread Alan Thompson
Hi - I get ~ lein upgrade The script at /home/alathompson/bin/lein will be upgraded to the latest stable version. Do you want to continue [Y/n]? Upgrading... curl: (35) Unknown SSL protocol error in connection to github.com:443 Failed to download

Re: Leiningen 2.2.0 released

2013-05-29 Thread Alan Thompson
Both usages are from the command line in Cygwin, both accessing Github. It seems strange that one works by default and one doesn't. Oh well. Alan On Wed, May 29, 2013 at 11:32 AM, Phil Hagelberg p...@hagelb.org wrote: On May 29, 11:01 am, Alan Thompson thompson2...@gmail.com wrote: curl

Re: Best IDE

2013-06-04 Thread Alan Thompson
Have any of you looked at Light Table? http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/ I wonder what it would take to get a VIM-like mode available with that? Alan On Tue, Jun 4, 2013 at 10:27 AM, Alex Baranosky alexander.barano...@gmail.com wrote: There are things I

Re: Making things go faster

2013-06-05 Thread Alan Thompson
Nice summary on the blog. Might I suggest one small improvement? How about: (do (use 'plugh.file-test :reload-all) (run-tests) ) Then, just a single up-arrow ret sequence. :) Alan Thompson P.S. I'm still working on getting GVIM+fireplace set up, which should allow me to do everything from

Re: with-open and for

2013-06-10 Thread Alan Thompson
Hey Thomas - How'd you get the nice syntax highlighting in your post? Alan On Sat, Jun 8, 2013 at 7:16 PM, Steven D. Arnold thoth.amon.i...@gmail.comwrote: Thanks for the responses! As suggested, wrapping in 'doall' does work. On Jun 8, 2013, at 3:28 AM, Thomas Heller th.hel...@gmail.com

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-13 Thread Alan Thompson
you how many times this fail-fast type of behavior has saved me, since it makes bugs easy to find rather than burying the cause of a problem (kinda like getting an error at compile-type instead of at runtime). Alan Thompson On Wed, Jun 12, 2013 at 5:30 PM, Shannon Severance s...@s53.me wrote

Re: A* Graphe implementation

2013-06-18 Thread Alan Thompson
There is a nice example using the A* algorithm on page 149-154 of The Joy of Clojure by Fogus Houser. Alan Thompson On Sun, Jun 16, 2013 at 11:00 PM, Marc Haemmerle vonhan...@gmail.comwrote: There's also: http://nakkaya.com/2010/06/01/path-finding-using-astar-in-clojure/ Sent from my

Re: In what OS do you code?

2013-06-18 Thread Alan Thompson
Windoze 7 with Cygwin on desktop, AIX in production (mostly PL/1 Java). Alan On Tue, Jun 18, 2013 at 4:08 AM, Kelker Ryan theinter...@yandex.com wrote: Arch Linux, but moving to Manjaro for a more stable and simple version of the distro. The editor is Emacs + nrepl.el + clojure-mode + ritz

Software project estimation

2013-06-19 Thread Alan Thompson
Hi All, I saw a nice summation of software project estimation and thought some of you might like to view it: http://agile.dzone.com/articles/estimating-unknown-dates-or Enjoy! Alan Thompson -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: [ANN] Shodan: ClojureScript console API wrapper

2013-09-11 Thread Alan Thompson
Looks nice! Alan On Fri, Sep 6, 2013 at 12:29 PM, David Nolen dnolen.li...@gmail.com wrote: SWEET! On Fri, Sep 6, 2013 at 3:26 PM, Joel Holdbrooks cjholdbro...@gmail.comwrote: Hi everyone, I put together a small library for wrapping the JavaScript console API available here:

Re: Is clojars down?

2014-08-05 Thread Alan Thompson
I'm getting flakey problems from clojars right now. I can access any other websites, from multiple computers. I can access the homepage, and download any files from clojars, delete ~/.m2 and restore via 'lein deps', but I cannot upload any changes via lein deploy clojars'. I keep getting

Clojure Vim Ctags (oh my!)

2014-09-04 Thread Alan Thompson
Hi, I've been using Clojure Vim for a year now, with fireplace, etc. However, it seems that Exuberant Ctags is a bit crippled since I have not found a way to make it understand namespace aliases. In my current work it seems that nearly every function is in a separate namespace with a namespace

Re: Clojure Vim Ctags (oh my!)

2014-09-04 Thread Alan Thompson
, Alan Thompson clooj...@gmail.com wrote: Hi, I've been using Clojure Vim for a year now, with fireplace, etc. However, it seems that Exuberant Ctags is a bit crippled since I have not found a way to make it understand namespace aliases. In my current work it seems that nearly every function

Re: Clojure cheatsheet v16 with few updates for Sets, Maps, and Relations sections

2014-09-04 Thread Alan Thompson
Thanks for the update! I noticed that the URL still implies usage of Clojure 1.3: http://jafingerhut.github.io/cheatsheet-clj-1.3/cheatsheet-tiptip-cdocs-summary.html Should this change as well? Alan On Fri, Aug 29, 2014 at 6:56 AM, Andy Fingerhut andy.finger...@gmail.com wrote: Newest

Re: Clojure Vim Ctags (oh my!)

2014-09-05 Thread Alan Thompson
ability to jump around: gf on an external symbol will jump to that symbol's definition. On Thursday, 4 September 2014, Alan Thompson clooj...@gmail.com wrote: Nothing that fancy. Just trying to make ctags understand namespaces namespace aliases. Vim/Ctags works fine for non-namspaced function

Re: Clojure Vim Ctags (oh my!)

2014-09-05 Thread Alan Thompson
Ah! Thank you! Alan On Fri, Sep 5, 2014 at 12:24 PM, Dave Ray dave...@gmail.com wrote: ctrl-o will take you back to your previous position after gf. At least it does for me. Dave On Fri, Sep 5, 2014 at 11:47 AM, Alan Thompson clooj...@gmail.com wrote: Thanks for the 'gf' reference. I

Software Quality video: Douglas Crockford

2015-06-08 Thread Alan Thompson
and an overview of the current state of the practice. I recommend it to everybody. Alan Thompson -- 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

clojure.core.match: AssertionError: Pattern row reuses wildcards

2015-07-01 Thread Alan Thompson
Hi - I am trying to write some unit tests for Datomic using core.match to keep things succinct. I was hoping to use a match pattern like this: [ {:e tx-eid :a :db/txInstant:v _ :tx tx-eid :added true} {:e _ :a :community/category :v free stuff :tx tx-eid

Refactoring - Not on the Backlog

2015-08-12 Thread Alan Thompson
A very nice article by Ron Jeffries on how technical debt creeps into a codebase and a practical approach to cleaning it up. http://ronjeffries.com/xprog/articles/refactoring-not-on-the-backlog/ -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Finding all Entities in a given partition

2015-08-22 Thread Alan Thompson
I forgot to include the GitHub link: https://github.com/cloojure/tupelo Tupelo Datomic (and the rest of the Tupelo library) is intended to make it easier more effortless to use Datomic (and Clojure in general). Enjoy! Alan On Sat, Aug 22, 2015 at 5:18 PM, Alan Thompson clooj...@gmail.com

Fwd: Finding all Entities in a given partition

2015-08-22 Thread Alan Thompson
Hi, An email to the Datomic mailing list piqued my interest, so I have added a new funtion to the Tupelo Datomic library which allows the user to easily ( efficiently) retrieve all Entity IDs (EIDs) from a given partition (specified as a keyword). For example, suppose in our James Bond Unit Test

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Alan Thompson
Clearly the Clojure community does not get enough exposure to Italian culture. World-famous motorcycle racer for Ducati, Andrea Iannone. Actress Debi Mazar and her husband, chef Gabriele Corcos. Seriously people, put down the keyboard and watch a little TV once in a while! Alan On Thu,

Re: Decomplecting Clojure

2015-08-13 Thread Alan Thompson
I must agree with Lee that, IMHO, default laziness can cause unexpected problems. I would argue that it violates the Principle of Least Surprise. A better way would be to make laziness optional and explicit, perhaps by adding a z suffix to the lazy version of each function (e.g. map - mapz, for -

Re: Updated Clojure cheatsheet, including new vars in Clojure 1.7.0

2015-07-13 Thread Alan Thompson
Thank you again for providing such a valuable resource! I have a permanent browser tab open to the Cheatsheet! Alan On Sun, Jul 12, 2015 at 8:31 PM, Andy Fingerhut andy.finger...@gmail.com wrote: Thanks to Alex Miller, http://clojure.org/cheatsheet is now updated to the latest version of the

Re: Typed Clojure paper draft

2015-07-13 Thread Alan Thompson
Ambrose - I like the paper and am glad to see continuing progress on Typed Clojure. I think the ability to integrate types easily into Clojure programs will only grow in importance in the future. Keep up the great work! Alan On Sat, Jul 11, 2015 at 7:30 AM, Ambrose Bonnaire-Sergeant

Clojure, Made Simple: Rich Hickey at JavaOne

2015-07-14 Thread Alan Thompson
Hey, I just saw this video released: https://youtu.be/VSdnJDO-xdg It is Rich, talking at JavaOne, and might be the best talk I've seen him deliver. Alan -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Reviewers needed for new Clojure book!

2015-08-24 Thread Alan Thompson
HI Akhil - I would be interested. Alan On Mon, Aug 24, 2015 at 11:47 AM, blake watson dsblakewat...@gmail.com wrote: I'm in. On Mon, Aug 24, 2015 at 11:02 AM, Rick Moynihan rick.moyni...@gmail.com wrote: I'd be happy to read it and potentially offer feedback. What is expected of

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-10 Thread Alan Thompson
Runs fine in my tests. One small question: would it be feasible to keep everything lowercase in the future (i.e. org.clojure:clojure:jar:1.8.0-rc1)? Keep up the great work, Alan On Tue, Nov 10, 2015 at 9:30 AM, Alex Miller wrote: > Clojure 1.8.0-RC1 is now available.

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-10 Thread Alan Thompson
Just keeps it simpler when typing, and most other things seem to be all lowercase. Not a big deal. Alan On Tue, Nov 10, 2015 at 9:55 AM, Alex Miller <a...@puredanger.com> wrote: > Any reason why? > > On Tuesday, November 10, 2015 at 11:51:40 AM UTC-6, Alan Thompson wrote: >&g

Re: [ANN] Pipes 0.1.1 - chain processes, shell commands and threads via pipes

2015-11-13 Thread Alan Thompson
Looks nice! Alan On Fri, Nov 13, 2015 at 5:56 AM, Marcin Bilski wrote: > Home: https://github.com/bilus/pipes > > If you ever used Un*x pipes > > ``` > $ ls | grep .clj > ``` > > then this library gives you a power to do this in Clojure and a lot more. > > You can use

Re: A call for an idiomatic rendering of Clojure EDN in info/error messages

2015-11-13 Thread Alan Thompson
I would that the existing format of pr-str would work, no?. I often structure Exception error strings like: foo-service: bad value=2 foo-service: bad value="2" Does that not keep it unambiguous? Alan On Fri, Nov 13, 2015 at 10:59 AM, Colin Yates wrote: > Hi Ben, > > I’m

Re: Pareto's Clojure

2015-11-11 Thread Alan Thompson
Finish reading CFBT, and add "Living Clojure". Then read the other ones and keep the Clojure Cookbook handy for concrete examples on specific tools. Don't forget "Web Development with Clojure" for a focused tutorial on that topic. Alan On Tue, Nov 10, 2015 at 3:23 PM, Sayth Renshaw

Re: [ANN] a HugSQL adapter for postgres.async

2015-11-04 Thread Alan Thompson
Put that comparison in the README! Alan On Wed, Nov 4, 2015 at 11:03 AM, Robin Heggelund Hansen < skinney...@gmail.com> wrote: > The basic principle is the same, but the api is a little different, > especially after YeSQL 0.5. > > The biggest things for me: > - HugSQL allows you to replace

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-04 Thread Alan Thompson
The example demonstrates that your interpretation is exactly what occurs, as described in CFB It is just not what I thought was happening from reading all of the other Clojure books! Alan On Tue, Nov 3, 2015 at 10:00 PM, Sean Corfield wrote: > > So, when using commute the

Re: [ANN][Book] Clojure Recipes published and for sale on Amazon

2015-11-04 Thread Alan Thompson
Ordered! Looking forward to it! Alan On Thu, Oct 22, 2015 at 4:52 AM, Torsten Uhlmann wrote: > Congratulations, Julian! > > Leonardo Borges schrieb am Do., 22. Okt. > 2015 um 13:10 Uhr: > >> Congratulations Julian! I'll share this around! >>

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-03 Thread Alan Thompson
Hey, I just verified this piece about the commute function and I couldn't believe my eyes! (defn sleep-print-update [sleep-time thread-name update-fn] (fn [state] (Thread/sleep sleep-time) (println (str thread-name ": " state)) (update-fn state))) (def counter (ref 0)) (future

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-03 Thread Alan Thompson
Hi Daniel - Just finished the book and think it is one of the best places to start Clojure. Is there anyplace online that you are accepting errata? Thanks again, Alan On Fri, Oct 23, 2015 at 10:10 AM, John Gabriele wrote: > Excellent news! Looking forward to receiving my

Re: [ANN][Book] Clojure for the Brave and True published, web site updated

2015-11-05 Thread Alan Thompson
en...@nostarch.com. > > Thanks! > Daniel > > On Wednesday, November 4, 2015 at 12:06:51 AM UTC-5, Alan Thompson wrote: >> >> Hi Daniel - Just finished the book and think it is one of the best places >> to start Clojure. >> >> Is there anyplace online that you are

The Reading List

2015-10-14 Thread Alan Thompson
Hi, Just saw a good presentation on InfoQ by Jason McCreary ( http://www.infoq.com/presentations/the-reading-list) where he mentions several topics from "The Reading List", which is an informal list of books that are considered by many in the industry to be "required reading" for software

Writing Friendlier Clojure

2015-10-08 Thread Alan Thompson
A very nice blog posting about making your clojure functions more readable to other people (or a future you!). Enjoy. http://adambard.com/blog/write-friendlier-clojure/ Alan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Fwd: [ANN] Tupelo Datomic: Making Datomic Even Sweeter

2015-07-08 Thread Alan Thompson
! https://github.com/cloojure/tupelo/blob/master/src/tupelo/datomic.adoc#license License Copyright © 2015 Alan Thompson. Distributed under the Eclipse Public License, the same as Clojure. https://github.com/cloojure/tupelo/blob/master/src/tupelo/datomic.adoc#todo-list-todo -- You received

Re: Live rendering of AsciiDoc files in Chrome browser

2015-09-02 Thread Alan Thompson
ns page. People who use > Chrome regularly have probably already done that, I suppose. :) > > -James > > > On Wednesday, September 2, 2015 at 2:06:23 PM UTC-5, Alan Thompson wrote: >> >> Hey, >> >> As you all know, the README files on Github, etc can be formatte

Live rendering of AsciiDoc files in Chrome browser

2015-09-02 Thread Alan Thompson
Hey, As you all know, the README files on Github, etc can be formatted using the either AsciiDoc (my favorite) or the older MarkDown format. However, it is a pain to edit these files in just a plain text editor without a good way of seeing the final, rendered format until you commit and push

Re: top-level lets or private globals

2015-08-25 Thread Alan Thompson
Ya know, I've never seen that before but I like it! I have noticed that you can have naked expressions in a file (i.e. not inside of a def/defn). For example, I use a statement like this: (require '[tupelo.core :refer [spyx]]) (spyx *clojure-version*) at the top of my main testing namespace

Re: top-level lets or private globals

2015-08-25 Thread Alan Thompson
the repl). Thanks for the suggestion, Alan On Tue, Aug 25, 2015 at 2:19 PM, Alan Thompson clooj...@gmail.com wrote: Ya know, I've never seen that before but I like it! I have noticed that you can have naked expressions in a file (i.e. not inside of a def/defn). For example, I use a statement

Re: Clojure/Pedestal vs Go

2015-09-13 Thread Alan Thompson
P.S. I have seen the results at https://github.com/ptaoussanis/clojure-web-server-benchmarks although I'm not sure exactly how to interpret them w.r.t. "keepalive" and the "errors" graph. Also, the plotted results don't seem to include latency. Alan On Sun, Sep 13, 20

Clojure/Pedestal vs Go

2015-09-13 Thread Alan Thompson
Hi, I'm about to start a new web project and they are thinking about using Go (golang) instead of a JVM (preferably Clojure) based approach. The idea is "BARE METAL SPEED!!!", but I really think the network and DB will be the bottlenecks, not Clojure vs Go. Is anybody out there aware of any

Re: Martin Thompson: "Designing for Performance" video

2015-09-15 Thread Alan Thompson
The keynote is quite good, too: https://youtu.be/oxjT7veKi9c?list=PLEx5khR4g7PKFs3Y-gWd8TX4Y_5yTyUTP "Shared Mutable State: The most feared words in computing" - quite a bit of overlap with the ideals of Clojure. Alan On Tue, Sep 15, 2015 at 5:43 AM, Alan Thompson <clooj

Martin Thompson: "Designing for Performance" video

2015-09-15 Thread Alan Thompson
If you haven't seen any of Martin's talks before, you should give this one a try. It is one of his best and reminds me a lot of Rich's best talks. This one is motivated by getting higher performance from code, but most of it emphasizes good design fundamentals as the basis for everything else.

Re: lazy-seq and threads

2015-09-15 Thread Alan Thompson
Do you have a corresponding example of the parallel code? I'm not sure which part(s) are being delegated to other threads. Often it is just the I/O cost of reading the file that is the dominant cost, so parallelism doesn't buy you much. Alan On Mon, Sep 14, 2015 at 9:10 PM, Andy L

Re: Generalizing - and - forms

2015-08-28 Thread Alan Thompson
I have become very partial to a simple adaptation of as- from the Tupelo Core https://github.com/cloojure/tupelo library. I almost always like to be explicit about the location the previous value, since either - or - can sometimes be difficult if the threading forms don't always want the arg as

Re: Changing font size in IntelliJ IDEA / Cursive

2015-10-05 Thread Alan Thompson
Here is the IDEA doc page: https://www.jetbrains.com/idea/help/configuring-colors-and-fonts.html On Mon, Oct 5, 2015 at 9:39 AM, Alan Thompson <clooj...@gmail.com> wrote: > I came across this super-handy blog posting just now on how to globally > set the font size/type in IntelliJ.

Changing font size in IntelliJ IDEA / Cursive

2015-10-05 Thread Alan Thompson
I came across this super-handy blog posting just now on how to globally set the font size/type in IntelliJ. It is very non-intuitive! - from: http://www.tilcode.com/how-to-globally-change-the-font-size-in-intellij-idea/ How to globally change the font size in

San Diego Clojure Meetup

2015-12-01 Thread Alan Thompson
Hi, The San Diego Clojure Users Group meetup is held the 2nd Wednesday of each month, and our meetup this month is one week from tomorrow on 2015-12-9. Last month we had a nice overview of a simple Om app. This month we will be discussing tupelo.core and its

Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Alan Thompson
If the assumptions of a function call aren't satisfied, I find the "silent failure" of returning nil to be extremely problematic. After all, you can't fix a problem if you don't know you have a problem (or where it is). As a result, I am definitely in the camp of the "fail-fast" philosophy.

San Diego Functional Programming Meetup

2016-01-12 Thread Alan Thompson
Hi - If anybody is in the San Diego area, we are having our monthly Clojure/FP meetup tomorrow evening. All are welcome! Alan San Diego Functional Programming Meetup San Diego Clojure Users Group Wednesday, January 13, 2016 at 7:30 PM Ansir Innovation Center 4685 Convoy St Suite 210 (upstairs)

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-12 Thread Alan Thompson
On Thursday, June 9, 2016 at 11:40:03 PM UTC-7, Rangel Spasov wrote: > > Add the latest tools.analyzer as a dependency solved the problem. > > [org.clojure/tools.analyzer "0.6.9"] > >> >> I had the same problem and had to add this dependency. Is this expected? Using lein-collisions found no

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-12 Thread Alan Thompson
] ...) ​​ On Sun, Jun 12, 2016 at 5:12 PM, Alan Thompson <clooj...@gmail.com> wrote: > > > On Thursday, June 9, 2016 at 11:40:03 PM UTC-7, Rangel Spasov wrote: >> >> Add the latest tools.analyzer as a dependency solved the problem. >> >> [org.clojure/tools.anal

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-12 Thread Alan Thompson
I would have expected the namespaces to avoid this kind of conflict. Why don't they? Alan On Sun, Jun 12, 2016 at 6:29 PM, James Reeves <ja...@booleanknot.com> wrote: > On 13 June 2016 at 01:21, Alan Thompson <clooj...@gmail.com> wrote: > >> I am also getting a confl

Re: set return value is unordered, is that a bug or by design?

2016-05-31 Thread Alan Thompson
I believe you may have meant sorted-set On Tue, May 31, 2016 at 6:10 AM, vandr0iy wrote: > You could use sorted-map, if you wish to have them ordered: > > https://clojuredocs.org/clojure.core/sorted-map > > there is

Re: set return value is unordered, is that a bug or by design?

2016-05-31 Thread Alan Thompson
e trouble, I think), use "sorted-set": user=> (def s1 (set [1 2 3])) #'user/s1 user=> s1 #{1 3 2} user=> (def s2 (into (sorted-set) s1)) #'user/s2 user=> s2 #{1 2 3} The same trick works for "sorted-map" Alan On Tue, May 31, 2016 at 8:12 AM, Alan Thompson <

Re: [ANN] New clojure.org!

2016-06-14 Thread Alan Thompson
Alex - I could not find a link to the Clojure.org github project on the clojure.org site. Should one be added under "Contributing" somewhere? Alan On Thursday, January 14, 2016 at 7:45:06 AM UTC-8, Alex Miller wrote: > > The new http://clojure.org is alive! > > Most of the content on the site is

GMail code formatter

2016-06-14 Thread Alan Thompson
Just discovered a cool Chrome extension so that you can get proper syntax highlighting when pasting code into your email. It turns plain-old code into something nice to read: *Plain:* (defn truthy? "Returns true if arg is logical true (neither nil nor false); otherwise returns false." [arg]

clojure.spec regression bug for 1.9.0-alpha6

2016-06-14 Thread Alan Thompson
Hi - Just noticed that the :ret function in fdef seems to be ignored in 1.9.0-alpha6: user=> (require '[clojure.spec :as s]) user=> (defn dummy [x] (if x "yes" "no")) user=> (s/fdef dummy #_=> :args (s/cat :x integer?) #_=> :ret integer?) user=> (s/instrument #'dummy) user=> (dummy 3)

Re: GMail code formatter

2016-06-16 Thread Alan Thompson
​​Hmmm, Never thought of that: (defn truthy? "Returns true if arg is logical true (neither nil nor false); otherwise returns false." [arg] (if arg true false) ) ​Doesn't look half-bad, although ​I don't always have Cursive/IDEA open. Alan On Tue, Jun 14, 2016 at 9:38 PM, Colin Taylor

New issue of Clojure Gazette is out

2016-06-21 Thread Alan Thompson
If you haven't seen the Clojure Gazette, please give it a try! http://us4.campaign-archive2.com/?u=a33b5228d1b5bf2e0c68a83f4=70c69d167d=c39662b4e4 Alan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Too over complicated

2016-06-22 Thread Alan Thompson
Olek - You may find some of the convience functions you are missing in the Tupelo library. In particular: https://github.com/cloojure/tupelo#convenience-in-testing-seqs https://github.com/cloojure/tupelo#keeping-it-simple-with-not-nil Keeping It Simple with not-nil? Clojure has the build-in

Crossclj.info shows outdated dependencies

2016-01-17 Thread Alan Thompson
Hey - Many of you are probably already aware of the centralized API documentation available at https://crossclj.info . However, I just noticed a new (to me) feature: CrossClj shows the outdated dependencies of a project! Checkit out at:

Awesome VIM cheatsheet!

2016-01-14 Thread Alan Thompson
Hey - I just found this awesome VIM cheatsheet, laid out in the form of a keyboard showing all of the keys and what they do (normal, shift, control, etc), along with an extensive legend. Check it out at: http://michael.peopleofhonoronly.com/vim/ It is from a wiki of cheatsheets located at:

Re: is there a way to use drip to speed up the running of unit tests?

2016-06-26 Thread Alan Thompson
I also highly recommend test-refersh! Alan On Sat, Jun 25, 2016 at 8:47 AM, Jake McCrary wrote: > Hi Fenton, > > In my experience the way to get faster feedback from your tests is to have > them run in a way that doesn’t require stopping and starting a process. > This can

Sisyphus on Fire

2016-02-04 Thread Alan Thompson
Hi. I just read very well-written post by Marc Phillips on the Cognitect blog. He describes some of the current antipatterns that have hijacked the original idea of "Agile" development. Please read! Alan http://blog.cognitect.com/blog/2015/12/2/sisyphus-on-fire -- You received this message

(type ...) vs (class ...)

2016-02-12 Thread Alan Thompson
Hey - Just saw something on the clojure.core/type function: (defn type "Returns the :type metadata of x, or its Class if none" {:added "1.0" :static true} [x] (or (get (meta x) :type) (class x))) I have never seen this before, and it appears the :type metadata is not used in the clojure.core

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-02 Thread Alan Thompson
I do think the whole "code is data" thing is a bit overstated. The earliest computers used paper tape for data records: At Bletchley Park, the "data" (ciphertext to be broken) was encoded onto the paper tape in the photo. The "code" was hardwired into the design of the machine & its

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Alan Thompson
range 4 7) nil [:a :b :c :d :e :f :g :h :i]) > => [:a :b :c :d :h :i] > > And the navigator to prepend to a sequence is just selecting the empty > subsequence at the beginning: > > (def BEGINNING (srange 0 0)) > (setval BEGINNING [:a :b] '(1 2 3)) > => (:a :b 1 2 3)

Re: [ANN] Specter 0.9.2

2016-01-29 Thread Alan Thompson
examples use half-open intervals :) The first selects the > subsequence with indices 1,2,3, and the second selects the subsequence with > indices 2,3. You can see in the second example that [2 3] in the overall > sequence is replaced by [-1 -1 -1]. > > On Thu, Jan 28, 2016 at 9:10

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-03 Thread Alan Thompson
Very good points, Timothy! On Wed, Feb 3, 2016 at 7:45 AM, Timothy Baldridge wrote: > I find this subject interesting as I was just discussing this with a > co-worker recently. There's a few points I'd like to make: > > Firstly, data is often a form of a DSL (domain

Re: [ANN] Specter 0.9.2

2016-01-28 Thread Alan Thompson
Looks great, Nathan. I also highly enjoyed your recent interview on the Cognitect podcast . One quick question: In the first example below from the README (verified at the repl), it seems that the (srange ...) function sometimes behaves as a half-open

  1   2   3   >