Re: Library like "infix"...

2021-05-17 Thread Blake Watson
On Mon, May 17, 2021 at 10:18 AM Justin Smith wrote: > unless this is an exercise in learning clojure, why not use an existing > calculator parser? eg. > https://inst.eecs.berkeley.edu/~cs164/sp05/ta/calculator/Parser.java for > a random example found with a quick google > > That is the question,

Library like "infix"...

2021-05-15 Thread Blake Watson
Hello, I've got a situation where I want to allow users some modest calculation ability, and I've gone through various evolutions of possibilities, like letting them put in raw Clojure code (that I will restrict at some point), to (heh) using POI to let them use Excel to specify possibilities (whi

Re: How get function name in body?

2021-04-28 Thread Blake Watson
Well, it seems like it should be possible. At the end of the defn macro, metadata is attached to a function, so you can see the name with: ``` (meta #'my.ns/add) ``` And you could do this inside the function: ``` (defn add [a b] (let [name (:name (meta #'add))] (str a b name))) ``` But th

Re: Routing for a non-web-app

2021-04-22 Thread Blake Watson
I tried Reitit a couple of months ago so maybe I'll look at it again. || > (bidi.bidi/match-route ["/foo" :bar] "/foo") || {:handler :bar} Yeah, the simplicity of bidi is nice. I couldn't figure out if it would also parse out query params. Like: "/foo?a=123" {:handler :bar :query-params {:a "123

Re: Routing for a non-web-app

2021-04-20 Thread Blake Watson
Cool. I thought about bidi but this: ...is intended for use with Ring middleware, HTTP servers... sorta made me think it wouldn't work in a non-web app. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

Re: Routing for a non-web-app

2021-04-19 Thread Blake Watson
> > For 'routing' specifically, if you want a more formal system we used state > machines in the past and recently Clojure has a really nice additional > possibility there - https://github.com/lucywang000/clj-statecharts. I really like the idea of the app being as stateless as possible, to where

Routing for a non-web-app

2021-04-18 Thread Blake Watson
Howdy, Writing a desktop app and thinking describing routes is the way to go, as far as setting up the flow through the program. There are quite a few Clojure routing libraries but most seem to assume it's a web backend (naturally), and the ones that don't seem to be ClojureScript (which I can't u

Re: logic programming - find synonyms of a given word

2021-04-10 Thread Blake Watson
inction between a direct connection and an inferred one. On Fri, Apr 9, 2021 at 11:12 PM Nesvarbu Nereikia wrote: > Thanks Blake, the map of sets was my first intuition too. But I don't > think we can derive that big is a synonym of huge from such an index. If > you look at the ex

Re: logic programming - find synonyms of a given word

2021-04-09 Thread Blake Watson
In practice I would probably just build a map, word : #setofsynonyms and whenever a synonym was added [a b], I would add b to a's set and a to b's set. Or, even more likely, a vector, because "a" is probably a homonym (if we're talking English) and if "a" is "bank", I need one set of synonyms for

Re: Clojure as first language

2016-03-19 Thread blake watson
On Sat, Mar 12, 2016 at 2:42 PM, Lee Spector wrote: > Is "lein new app foo" that complicated? If I understand Paul correctly—and am not just imposing my own similar feelings on him—the problem is not that "lein new app foo" is complicated, it's that it creates a directory structure that is compl

Re: Clojure as first language

2016-03-01 Thread blake watson
log.avdi.org/2015/05/11/in-which-i-make-you-hate-ruby-in-7-minutes/ [2] http://www.squeakland.org/ [3] http://www.phratch.com/ [4] http://agilevisualization.com/ [5] http://pharo.org/ [6] http://squeak.org/ On Fri, Feb 26, 2016 at 1:09 AM, Terje Dahl wrote: > Blake. > > Would you elaborate o

Re: Clojure as first language

2016-02-25 Thread blake watson
In a lot of ways, Clojure is a good first language: Except for project.clj files (which you don't absolutely need right off the bat), it's not too hard for a novice to look at a simple Clojure program and not see 40 things he doesn't understand. (I don't know if it's still like this, but the initia

Re: Examples of core.async usage in production?

2015-11-09 Thread blake watson
I just got through putting async into production. It allowed me to decouple my Clojure code from underlying Java objects which allowed me to intelligently manage the Java objects. On Mon, Oct 26, 2015 at 12:40 PM, Moe Aboulkheir wrote: > I've used core.async in production a bunch with AWS. > > O

Re: I am looking for xml parsing lib

2015-08-24 Thread blake watson
I believe that's it, though. On Mon, Aug 24, 2015 at 10:48 AM, Josh Kamau wrote: > Hello; > > Which is the recommended xml parsing lib for clojure? > > clojure.data.xml was last updated 10months ago and is still on version > 0.0.8 > > Thanks > Josh > > -- > You received this message because you

Re: Reviewers needed for new Clojure book!

2015-08-24 Thread blake watson
I'm in. On Mon, Aug 24, 2015 at 11:02 AM, Rick Moynihan wrote: > I'd be happy to read it and potentially offer feedback. What is expected > of reviewers? > > R. > > On Mon, 24 Aug 2015 07:46 Akhil Wali wrote: > >> If anyone is interested in being a reviewer for a new book "*Mastering >> Clojure

Re: clj-soap (was: Beginner question

2015-08-06 Thread blake watson
We did some soap as well, and found the same thing, except in our case, SOAP was merely a formality. In other words, it seems some people are using only the barest of SOAP features, and wrapping up the meat up in a SOAP envelope. In other words, we were able to just generate a skeleton in Soap-UI

Re: [ANN] Clojure 1.7.0 is now available

2015-06-30 Thread blake watson
Yep. Got the same error, found the same fix. Was impressed at how easy it was to fix. (Seriously, compared to most upgrades I've had to do in my life...) On Tue, Jun 30, 2015 at 10:13 AM, Robert Beaupre wrote: > Thanks. Looks like it was in Compojure - linked to at the bottom of the > page you

Re: ANN: remote - DSL for clj-http/cljs-http

2015-06-29 Thread blake watson
Wait, how can there have been popular demand before it went public? =P Looks good, though, hoping to try it out soon... On Fri, Jun 26, 2015 at 10:09 AM, Joel Holdbrooks wrote: > Are you tired of writing the same clj-http/cljs-https boilerplate? Looking > for an easy way to express an endpoint

Re: How did you learn Clojure?

2014-03-20 Thread blake . watson
Some Lisp books have been "translated" to Clojure. http://juliangamble.com/blog/2012/07/13/amazing-lisp-books-living-again-in-clojure/ On Thursday, March 20, 2014 11:23:10 PM UTC-7, Marcus Blankenship wrote: > Cool, thanks to all who've replied thus far. > > Question: is there any value in tra

Re: How did you learn Clojure?

2014-03-20 Thread blake . watson
I'm learning it now. In my case, we had a single Clojure programmer who's leaving and I was volunteered to take his place. =) So, in this case, fear is very focusing. Heh. Fun, though. He's been giving lessons and I've been reading books, using 4Clojure, looking at a variety of different progra