Re: What to read after 3 dozen "introduction to transducers" blog posts

2017-05-09 Thread Michael Willis
After he uses this one weird trick, you'll never guess what happens next! On Saturday, May 6, 2017 at 11:56:13 AM UTC-6, Matching Socks wrote: > > This one. > https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure > > "To be honest, this is a somewhat advanced usage of the transduce

Re: I knew that primitives were better, but this is ridiculous

2016-05-13 Thread Michael Willis
I'm also really interested in the topic of indexing a CES game engine. At one point I was trying to build a game, and mine was designed with components being maps of entity-id -> value. I found that it worked really well to quickly do things like running a function for all entities that have

Re: understanding a clojuredocs merge example

2016-05-12 Thread Michael Willis
As long as we're cutting out unnecessary code, this is also equivalent: (defn baz [options] (merge {:opt1 "default-1" :opt2 "default-2"} options)) (baz {:opt1 "custom-1" :opt3 "custom-3"});;=> {:opt3 "custom-3" :opt1 "custom-1 :opt2 "default-2"} On Thursday, May 12, 2016 at 4:03:04 AM UTC-5

Re: Schemas for DSLs on top of Clojure

2016-04-29 Thread Michael Willis
The convention that I've seen among the Clojure community is to represent these kinds of things as data structures, and define your contraints using something like https://github.com/plumatic/schema On Friday, April 29, 2016 at 1:10:29 PM UTC-5, Olek wrote: > > Hi! > > Clojure data structures ca

Re: Running Clojure apps using less memory.

2016-03-28 Thread Michael Willis
that helps, Michael Willis On Monday, March 28, 2016 at 7:11:49 AM UTC-5, Jason Basanese wrote: > > Hello all! I'm new to this forum. My name Is Jason Basanese and I am a > relatively new clojurist. > > I recently began hosting my first small full stack Clojure web app. While

Re: [ANN] Graclj 0.1.0 -- New Gradle Plugin for Clojure

2016-02-15 Thread Michael Willis
In the event that you're looking for a logo, consider an artistic icon based on this: https://en.wikipedia.org/wiki/Common_grackle On Sunday, February 14, 2016 at 8:11:00 PM UTC-6, Andrew Oberstar wrote: > > I just released the first version of Graclj, which is a new Gradle plugin > for Clojure.

Re: Java API type hint question

2016-01-26 Thread Michael Willis
What's not practical about quoting? I thought it was considered more idiomatic than doing (list ...) On Sunday, January 17, 2016 at 2:48:29 PM UTC-6, Ritchie Cai wrote: > > Hi all, > > I'm trying to create a Java ArrayList object from a Clojure collection to > pass to another Java API. I get re

Re: [ANN] Brute 0.4.0 - A lightweight Entity Component System library for writing games

2016-01-26 Thread Michael Willis
Nice! I'm curious if you have thought of any way to index the entities by component values. For example, let's say your game has thousands of entities, and you want to write a system that does something with all entities in proximity of a given location, or maybe it does something to all enti

Re: Largest Clojure codebases?

2015-11-16 Thread Michael Willis
For what it's worth, here's the way that I always count lines of code, should work on any unix-like system: find -name "*.clj" | wc -l On Sunday, November 15, 2015 at 5:23:01 PM UTC-6, Colin Yates wrote: > > Exactly this. I couldn’t find a reliable way of counting LOC but my > (Clojure/ClojureS

Re: Leiningen template in private maven repo

2015-09-11 Thread Michael Willis
I figured it out - leiningen looks for template in the default repos, and anything configured under {:user {:plugin-repositories ...}} On Friday, September 11, 2015 at 11:38:24 AM UTC-5, Michael Willis wrote: > > I'm trying to write a leiningen template for company internal u

Leiningen template in private maven repo

2015-09-11 Thread Michael Willis
I'm trying to write a leiningen template for company internal use. I have deployed it to our internal Artifactory instance, and added the Artifactory URL to :repositories in ~/.lein/profiles.clj, but `lein new` can't resolve it: $ lein new rest-microservice my-new-api Failed to resolve version

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
n categories [1 3] merge { :age 12 :somethingElse 29 }) [{1 {:text "foo"}, 2 {:text "bar", :ack 5}} {3 {:age 12, :somethingElse 29}}] On Monday, January 26, 2015 at 9:42:56 AM UTC-6, Michael Willis wrote: > > (def categories [ [ { :id 1 :text "foo" } { :id

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
(def categories [ [ { :id 1 :text "foo" } { :id 2 :text "bar" :ack 5 } ] [ { :id 3 :age 7 } ] ]) #'user/categories (update-in categories [1 0] merge { :age 12 :somethingElse 29 }) [[{:text "foo", :id 1} {:text "bar", :ack 5, :id 2}] [{:age 12, :somethingElse 29, :id 3}]] On Monday, January 26,

Re: defmacro/gen-class/annotation woes

2013-02-28 Thread Michael Willis
Hi Meikel! Thanks for the suggestion. I'll second what Paul said, I'm not sure if I would ever have guessed to syntax quote the metadata map. I just tested it and it works like magic. Cheers, Michael Willis On Thursday, February 28, 2013 12:21:57 AM UTC-7, Meikel Brandmeyer (kota

defmacro/gen-class/annotation woes

2013-02-27 Thread Michael Willis
re/gen-class :name ^{java.lang.Deprecated true} Test2 :prefix Test2- :methods [[^{java.lang.Deprecated true} getValue [] java.lang.Integer]]) (user/defn Test2-getValue [] 56)) Is there something wrong with the way that I attempt to attach the metadata? Thanks! Michael Willis -- -- You received