Re: Newbie Classpath issues on OSX

2020-10-10 Thread Jeremy Heiler
Can you share your project.clj and your project's directory structure? On Oct 3, 2020 at 6:17:36 PM, ok_computer wrote: > After reinstalling Leiningen via brew, I started getting classpath > errors. I uninstalled all my Clojure libs, deleted the ~/.lein folder and > started fresh with a new in

Re: symbol is not a symbol in (def (symbol "x") ...) ???

2020-10-05 Thread Jeremy Heiler
Do you know about macroexpand? user=> (defmacro m1 [v] `(def (symbol ~v))) #'user/m1 First argument to def must be a Symbol user=> (macroexpand '(m1 "foo")) (def (clojure.core/symbol "foo")) user=> (defmacro m2 [v] `(def ~(symbol v))) #'user/m2 user=> (macroexpand '(m2 "foo")) (def foo) The tric

Re: [ANN] duratom 0.4.3

2019-06-07 Thread Jeremy Heiler
Could you share a link to the project? Thanks! On Fri, Jun 7, 2019 at 1:47 PM dimitris wrote: > Hi folks, > > I'm pleased to report that duratom 0.4.3 is out, and it adds support for > synchronous backend commits - if that's your thing ;). > > This is also the first dependency-less release. Cloj

Re: Java Interop for a static method call that returns an ArrayList

2016-02-10 Thread Jeremy Heiler
On Wed, Feb 10, 2016 at 8:43 AM, Adrian Cooley wrote: > > How does clojure deal with an ArrayList that is being passed into clojure > from java? > The trick is to not think in terms of specific classes, but in terms of the different Java-related things you can do. See: http://clojure.org/referen

Re: Delivering HTML documentation to end-users via uberjar

2015-04-09 Thread Jeremy Heiler
On Thu, Apr 9, 2015 at 3:41 AM, henrik42 wrote: > Hi, > > I'd like to ship my app *incl. documentation* as an uberjar to end-users > and give them access to the docs via HTTP. > I plan to use codox/marginalia/markdown-clj to produce the HTML in lein > build and then build the uberjar incl. the ge

Re: [ANN][book] Clojure Reactive Programming

2015-03-27 Thread Jeremy Heiler
Congrats, Leonardo! On Tue, Mar 24, 2015 at 10:25 AM, Leonardo Borges < leonardoborges...@gmail.com> wrote: > Hi all, > > Some of you may know that I have been working on a book for the better > part of last year. > > I'm happy to announce it has finally been published! Here's the link: > https:/

Re: clojure map to java instance of pojo class

2015-03-05 Thread Jeremy Heiler
On Thu, Mar 5, 2015 at 2:42 AM, Xiangtao Zhou wrote: > hi all, > > is there some library or simple way to do it like the function > "map-to-pojo" in the following code ? > > java code > class A{ > public int a; > public String b; > } > > clojure code > (def a {:a 1 :b 2}) > (def b (map-to-poj

Re: [ANN] lein-html5-docs-3.0.0

2015-03-02 Thread Jeremy Heiler
Do you have a link to the project? :-) On Mon, Mar 2, 2015 at 3:26 PM, Tassilo Horn wrote: > Hi all, > > I've just pushed version 3.0.0 to Clojars. lein-html5-docs is a > Leiningen plugin to generate API docs for Clojure projects. The docs > are valid HTML5, and they have a simple JavaScript-b

Re: XPATH/XSLT like access to Clojure data structures?

2015-02-28 Thread Jeremy Heiler
Sorry, I misread your email. -- 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 th

Re: XPATH/XSLT like access to Clojure data structures?

2015-02-27 Thread Jeremy Heiler
On Fri, Feb 27, 2015 at 7:53 AM, Henrik Heine wrote: > > do you know of a lib that let's you navigate around nested Clojure > structures like XPATH does on XML? > I'm aware of core.match, walk and zippers. But has anyone put those > together in order to produce an API > that gives you XPATH/XSLT?

Re: Dependency conflict between parkour [0.6.2] and inflections [0.9.13]

2015-02-23 Thread Jeremy Heiler
On Mon, Feb 23, 2015 at 11:22 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > I tried putting the above in :exclusions in the project.clj with no > success. What do you mean by "with no success"? Can you show how you modified your project.clj? -- You received this message because

Re: A newbie question with using parkour

2015-02-22 Thread Jeremy Heiler
What version of parkour are you using? That will help us match line numbers in the stracktrace with the code. -- 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 membe

Re: defmulti: dispatch function is not called

2015-02-22 Thread Jeremy Heiler
On 2/22/15 12:52 PM, Timur wrote: Hi everyone, I have the following question regarding the defmultis of clojure: (defmulti create-fact (fn [item-vector] (do (print item-vector) (first item-vector (defmethod create-fact [:a] [item-vector]

Re: Default values

2015-02-21 Thread Jeremy Heiler
On 2/21/15 4:57 AM, Cecil Westerhof wrote: I want to work with default values. For this I use: [& nr] This gives the value null to nr. So far so good. But I want to propagate the value, because I want to fill the default at a higher level. ​I have: (defn test-lucky-numbers-all

Re: javac-options are ignored

2015-02-19 Thread Jeremy Heiler
On February 19, 2015 at 4:40:16 PM, Felipe Gerard (fger...@interware.com.mx) wrote: > When you set: > > :javac-options ["-target" "1.6" "-source" "1.6” ] This option is only for when you are compiling Java source. https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L249:L25

Re: handling agent errors

2014-08-11 Thread Jeremy Heiler
On Mon, Aug 11, 2014 at 3:07 PM, Brian Craft wrote: > Two questions, really. I'm running large batch jobs with an agent. The > jobs may fail in any number of unanticipated ways (due to user input), so I > do a try/catch in the agent, log any errors, and continue with the next job. > > First quest

Re: futures and atoms and bears, oh my!

2014-07-15 Thread Jeremy Heiler
On Tue, Jul 15, 2014 at 9:44 AM, Stefan Kamphausen wrote: > > Note, that it may be a reasonable fix to your situation to change bar > instead of foo. This is possible by evaluating the new definition of bar > /later/; bar could also be a dynamically bindable Var, so that when > compiling foo, we

Re: futures and atoms and bears, oh my!

2014-07-15 Thread Jeremy Heiler
On Tue, Jul 15, 2014 at 3:15 AM, wrote: > Curiouser and curiouser. > > I turns out the problem was *not* with my next-to-play function but rather > with the fact that it takes three arguments but I was only passing it two. > > The curious part is that whilst the compiler complained about the wron

Re: Functions in data structures?

2014-06-12 Thread Jeremy Heiler
On Thu, Jun 12, 2014 at 9:31 PM, Mike Fikes wrote: > Is there anything wrong with doing something like this? > > (def foo (atom {:fn inc})) > ((:fn @foo) 1) > ; => 2 > > This works in Clojure and ClojureScript. > > Just wondering if placing functions into immutable data structures could > cause a

Re: Generating functions from data

2013-11-19 Thread Jeremy Heiler
On Tue, Nov 19, 2013 at 11:44 AM, John D. Hume wrote: > After some experience with excessively meta-programmed Ruby apps, I > generally try to design an API that is as clean (or almost) as what I'm > tempted to generate and avoid the metaprogramming. For example > (api/get-user-by-id "123") is onl

Re: Generating functions from data

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 7:48 PM, Jeremy Heiler wrote: > I am interested in what you think about generating functions at compile > time (with a macro) from data. The specific use case I am thinking about > pertains to libraries for large web services with a lot of endpoints. A >

Re: Generating functions from data

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 9:35 PM, Michael-Keith Bernard (SegFaultAX) < mkbernard@gmail.com> wrote: > There are a number of existing implementations of what you're describing, > the most well known of which is the Web Services Description Language > (WSDL) >

Re: 2013 State of Clojure & ClojureScript survey results

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 4:01 PM, Brian Craft wrote: > Also, I find it difficult to find libraries. When I do find libraries > they're often deprecated, or moribund. What's the easy way to find clojure > libraries? > There's http://www.clojure-toolbox.com, but your mileage may vary. Viewing the

Generating functions from data

2013-11-18 Thread Jeremy Heiler
I am interested in what you think about generating functions at compile time (with a macro) from data. The specific use case I am thinking about pertains to libraries for large web services with a lot of endpoints. A cost-benefit analysis could probably be done for what size is appropriate, but let

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-18 Thread Jeremy Heiler
On Mon, Nov 18, 2013 at 6:01 AM, Kris Jenkins wrote: > On Monday, 18 November 2013 03:21:12 UTC, Jeremy Heiler wrote: > >> Very cool. Do you have any thoughts on a caching strategy? >> > > Yes, for the next version. At the moment it's only changing when the > def

Re: [ANN] Yesql 0.2.1 - Clojure & SQL queries rethought.

2013-11-17 Thread Jeremy Heiler
On Mon, Nov 11, 2013 at 6:10 AM, Kris Jenkins wrote: > https://github.com/krisajenkins/yesql > > Yesql is a simple library for blending SQL & Clojure together, cleanly. > Here's how it works , > and how to use it

Re: Question on Sequences

2013-11-17 Thread Jeremy Heiler
On Sat, Nov 16, 2013 at 9:00 PM, Cedric Greevey wrote: > This efficiency is why built-in functions to map, filter, etc. vectors to > vectors aren't provided > Well, there is mapv and filterv. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Can't seem to import namespaces of test.generative

2013-07-28 Thread Jeremy Heiler
The answer to this question can be found here:  http://stackoverflow.com/questions/17904061/cant-seem-to-import-namespaces-of-test-generative In summary, version 0.1.4 doesn't have these namespaces. The solution is to use 0.1.5 or newer. Ultimately, it seems like the test.generative README is ou

Re: Symbol.intern doesnt return already interned symbols?

2013-07-26 Thread Jeremy Heiler
On July 26, 2013 at 10:39:47 AM, Jürgen Hötzel (juer...@hoetzel.info) wrote: I did some memory profiling on a Clojure Application. I wondered why 361000 clojure.lang.Symbols exist. So I did some object browsing on the memory dump  and found duplicate symbols. After checking the source: static p

Re: [ANN] REST in Peace 0.1.0

2013-07-19 Thread Jeremy Heiler
Got a link? On July 19, 2013 at 8:37:13 PM, Sebastian Rojas (sebastian.rojas.viva...@gmail.com) wrote: A library for RESTFul applications built on top of Compojure, includes routing abstractions with reverse routing functionalities and validation helpers. -- -- You received this message bec

Re: --> macro proposal

2013-07-19 Thread Jeremy Heiler
On July 19, 2013 at 11:28:50 AM, Daniel Dinnyes (dinny...@gmail.com) wrote: Oh, and the implementation is clean and simple. Just cleaned it up a bit from all the clutter: ;;; The DUH..IT'S SO SIMPLE! macro (defmacro duh->   ([x alias form] `(let [~alias ~x] ~form))   ([x alias form & more]  

Re: --> macro proposal

2013-07-15 Thread Jeremy Heiler
On July 15, 2013 at 6:30:28 PM, Daniel Dinnyes (dinny...@gmail.com) wrote: Hmm, good point, especially the `let` one... What is `as->`? I can't find anything about that. http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/as-%3E There is one benefit over `let` though: it is more e

Re: --> macro proposal

2013-07-14 Thread Jeremy Heiler
On Sat, Jul 13, 2013 at 10:49 PM, Daniel Dinnyes wrote: > (->>> "test-string-with-lots-of-dashes" > x (s/split x #"-") > y (interleave y (range)) > z (s/join #"_" z) > z (s/join " * " ["I am serious" z "Not Kidding!!" z])) Why not use as-> or a let in this situatio

Re: --> macro proposal

2013-07-14 Thread Jeremy Heiler
On Sat, Jul 13, 2013 at 9:08 PM, Daniel Dinnyes wrote: > Just made a quick search on `main arguments` on both Google and Wikipedia. > Do you mean the arguments in `public static void main (String[] args)`? If > not please provide some definition what do you mean by main arguments. Else > the point

Re: java.jdbc - (sql/where ...) with multiple values (i.e. 'x in (1,2,3')

2013-07-08 Thread Jeremy Heiler
On July 8, 2013 at 5:28:13 PM, Colin Yates (colin.ya...@gmail.com) wrote: Using the latest release of java.jdbc, does anybody know how I can construct a where clause when I want to check if the value is one of many values? For example, if I have a filter {:age [1 2 3 4]} then (sql/where filter) c

Re: Applying function on a vector of tags to extract content from xml

2013-07-08 Thread Jeremy Heiler
On July 8, 2013 at 5:39:14 AM, Vesna Petkovic (vesna.petko...@gmail.com) wrote: (defn func [& tags](#(zf/xml1-> (xml-zipper tags) % zf/text))) As the exception states, you are passing 0 arguments to a function that doesn't accept 0 arguments. The name of the function "datamodel$func$fn" narrows it

Re: Contrib libs where the name starts with "core."

2013-07-07 Thread Jeremy Heiler
The "core" contribs are basically language extensions that don't need to be shipped in the Clojure jar. In some case, they're better off being on their own because then their release cycles are independent from the core language. The other prefixes are used when it makes sense to use something m

Re: [ANN] Timbre, an all-Clojure logging library

2013-03-15 Thread Jeremy Heiler
On Fri, Mar 15, 2013 at 7:34 PM, wrote: > I'd just like to thank you for writing this. It's perfect. I'll second that! I've been using Timbre lately and it has been really useful. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Trying to understand Java better to understand Clojure better

2013-03-14 Thread Jeremy Heiler
On Thu, Mar 14, 2013 at 12:41 AM, Jason Lewis wrote: > What I'd love to see is a tutorial on abstracting Java classes and > interfaces in pure Clojure, [...] > Zach Tellman did a great talk about this called "Distilling Java Libraries" at Clojure/West 2012. Check it out! http://www.infoq.com/pre

ANN: Xenopath 0.1.0 (XPath for Clojure)

2013-03-12 Thread Jeremy Heiler
I've released 0.1.0 of my XPath library. My goal is to create a light library that wraps Java's javax.xml.xpath and org.w3c.dom packages. It's not feature complete, but it should be enough to get started with XPath. Any feedback is appreciated! https://github.com/jeremyheiler/xenopath //Jeremy

Re: CSV Parser

2012-07-26 Thread Jeremy Heiler
On Wed, Jul 25, 2012 at 7:31 PM, Christian Sperandio wrote: > hi, > > I started learning Clojure programming these last days. For my training, I > developped a CSV parser. > I propose to everyone and I'd like to hava advice about my development (is > it in the FP logic? Do I use the good practices

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:44 PM, Jeremy Heiler wrote: > On Thu, Jul 5, 2012 at 1:40 PM, Jeremy Heiler wrote: >> (= x (#(%) x)) ;=> true > > I lied when I said that :-) > > But invoking #(%) will return the value passed in as the first argument. Maybe I should check

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:40 PM, Jeremy Heiler wrote: > (= x (#(%) x)) ;=> true I lied when I said that :-) But invoking #(%) will return the value passed in as the first argument. -- You received this message because you are subscribed to the Google Groups "Clojure" group.

Re: Help a newbie with his first babysteps... Understanding a function.

2012-07-05 Thread Jeremy Heiler
On Thu, Jul 5, 2012 at 1:11 PM, Jacobo Polavieja wrote: > 1. What is the value of that [new-yx] ? The value of `new-yx` in the anonymous function that is used with `filter` is whatever value `filter` is invoking the function with from its second argument. In this case, the second argument is a se

Re: Anybody interested in a Clojure Group in Rochester, NY?

2012-04-03 Thread Jeremy Heiler
on Clojure so far. > > http://roclisp.org/ > https://github.com/roclisp > Twitter: @roclisp > > I myself am pretty nuts about Clojure. Looking forward to meeting and > hacking with you, > > Justin > @jkkramer > > > On Tuesday, April 3, 2012 3:28:58 PM UTC-4

Anybody interested in a Clojure Group in Rochester, NY?

2012-04-03 Thread Jeremy Heiler
I am wondering if anybody in (or near) Rochester, NY would be interested in forming a Clojure Group? I would like to think that there's more than just me hacking on Clojure in the area! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: Alternate set literal syntax?

2012-03-24 Thread Jeremy Heiler
On Sat, Mar 24, 2012 at 6:38 PM, Scott Jaderholm wrote: > On Sat, Mar 24, 2012 at 1:44 AM, Cedric Greevey wrote: >> As for the aesthetics, what I like about {{...}} is that the >> delimiters are symmetrical, unlike #{...}, and it would allow one to >> reserve use of the # mark to, mostly, closure

Re: clojure.io

2012-03-08 Thread Jeremy Heiler
On Thu, Mar 8, 2012 at 4:12 PM, cej38 wrote: > Would it be possible to write a library that could do IO without > resorting to the underlying VM? What do you mean by that? Do you want to restrict yourself to a particular platform? I think a more prudent question would be: Should there be a stand

[ANN] Lime: An SMTP Client Library for Clojure

2012-01-25 Thread Jeremy Heiler
Hey all, I've begun working on an SMTP client library[0] for Clojure that *does not* depend on JavaMail. It is still in a very early stage of development, but I hope to make it somewhat useful soon. For my motivation, please check out my blog[1], which I will be writing about the project as it ma

Re: Could be my favourite improvement in 1.4

2012-01-19 Thread Jeremy Heiler
On Tue, Dec 20, 2011 at 2:05 AM, Alan Malloy wrote: > I agree, this horrifies me. It isn't even as simple as "letting them > be whitespace", because presumably you want (read-string "{a: b}") to > result in (hash-map 'a 'b), but (read-string "{a :b}") to result in > (hash-map 'a :b). So you can't

Re: can't see the error

2011-09-26 Thread Jeremy Heiler
On Mon, Sep 26, 2011 at 5:33 PM, Dennis Haupt wrote: > now i'm here: > (defrecord point [x y z]) > (defn genPoints [n] >  (let [random (new Random) >        randomInt #(.nextInt random) >        randomPoint #(new point (randomInt) (randomInt) (randomInt))] >    (repeatedly n randomPoint))) > > is

Re: Randomly select an element from a sorted-set (rand-nth (sorted-set ..))

2011-09-26 Thread Jeremy Heiler
On Mon, Sep 26, 2011 at 9:12 AM, Paul Richards wrote: > Hi, > How can I efficiently pick a random element from a sorted-set? > > If I try rand-nth I get this: > user=> (rand-nth (sorted-set 1 2 3)) > java.lang.UnsupportedOperationException: nth not supported on this > type: PersistentTreeSet (NO_S

Re: try catch and finally

2011-08-16 Thread Jeremy Heiler
On Tue, Aug 16, 2011 at 3:36 PM, rakesh wrote: > In java the finally block is executed after the catch block. But in > clojure, I observed that the finally block is executed before catch > block. Is this behavior right. The behavior is correct. What you are probably seeing is that the side effect

Re: New to Clojure -- Errors Are Frustrating

2011-08-02 Thread Jeremy Heiler
On Tue, Aug 2, 2011 at 3:11 AM, recurve7 wrote: > Here's one example where recursion and lack of positional error > feedback make it hard for me, as someone coming from Java, to spot the > error (and seeing "ClassCastException" threw me off and had me > wondering where/how I had done something lik

Re: Pair Coding over Skype

2011-07-29 Thread Jeremy Heiler
On Thu, Jul 28, 2011 at 5:37 PM, nil wrote: > Until you find someone, one site you can look at is the clojure euler > site. It has some math examples written by folks who know clojure to > varying degrees. You can see different ways of tackling a given > problem. Is this the site you are talking

Re: Clojure Books

2011-07-19 Thread Jeremy Heiler
On Tue, Jul 19, 2011 at 9:19 AM, Foge wrote: > I'm currently reading Joy of Clojure and I definitely like it. > +1 for the Joy of Clojure. I am really enjoying reading it. It's a book that assumes you know what you're doing, which is very much welcomed. -- You received this message because you

Re: Anyone on Google+ yet?

2011-07-15 Thread Jeremy Heiler
On Fri, Jul 15, 2011 at 10:17 AM, Sergey Didenko wrote: > Well, if you are going to spam, I guess Claudia will be penalized :) > Right now I can only spam all of you. And, well, I can safely do that right here ;-) Link: https://plus.google.com/100568537112681351664 -- You received this message

Re: Anyone on Google+ yet?

2011-07-15 Thread Jeremy Heiler
On Fri, Jul 15, 2011 at 10:07 AM, Claudia Doppioslash wrote: > Yes, it's invite-based. Invite sent to your gmail :) > Thank you so much! On Fri, Jul 15, 2011 at 10:09 AM, Sergey Didenko wrote: > Jeremy, I can send you an invitation. Do you need it? > Claudia beat you to it ;-) But thank you!

Re: Anyone on Google+ yet?

2011-07-15 Thread Jeremy Heiler
Is Google+ invite based? How did all of you get a profile? -- 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 firs