Re: Library like "infix"...

2021-05-17 Thread Blake Watson
ly developing new features." So I think it's the most promising route for now. ===Blake=== -- 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 member

Library like "infix"...

2021-05-15 Thread Blake Watson
em to work. 4. There's no function for "I can't calculate this because I don't know the value of X." All of this is surmountable, of course. The question is, should I surmount it? Or should I just start with Instaparse and a calculator grammar. Or is there a third way? ===Blake

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
ch I can't use here). I could just use a multi-method and roll my own, of course, but I thought it might be useful to try out an existing library. ===Blake=== -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

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: Complete Web Development Setup Using Clojure CLI Tools

2020-04-29 Thread Blake Miller
Jag, I think what you described is worth sharing. I like the simplicity of that approach and the efficiency of the final artifact. -Blake -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: New idea & POC for a Kubernetes/Clojure interface

2018-05-22 Thread Blake Miller
tances? > > > On Tuesday, November 7, 2017 at 8:34:35 AM UTC+5:30, Blake Miller wrote: >> >> Here's a little something I cooked up this weekend, to interact with a >> Kubernetes cluster from Clojure: >> >> https://github.com/blak3mill3r/keenest-rube &g

[ANN] Pyro 0.1.0 - a library for more helpful stacktraces

2018-02-18 Thread Blake Miller
Very nice! Congrats on the release. I'm going to play with it today. -- 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

New idea & POC for a Kubernetes/Clojure interface

2017-11-06 Thread Blake Miller
Here's a little something I cooked up this weekend, to interact with a Kubernetes cluster from Clojure: https://github.com/blak3mill3r/keenest-rube It abstracts away the K8s API calls completely. Instead, you get the state of the cluster as a value in an atom. Changes to the state of the cluste

Re: Is this behavior of clojure.core/pr a bug?

2016-08-05 Thread Blake Miller
I agree with Herwig in principal ... even though EDN is not meant to cover the whole set of possible pure Clojure data, if it can be made to cover more (all other things being equal) that would be a Good Thing. I think it would be possible to fix these edge cases with reader macro dispatches witho

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
Er, I mean "built-in reader macro dispatch". On Thursday, August 4, 2016 at 1:14:16 AM UTC, Blake Miller wrote: > > You're right, Dan. Having mulled it over a little more, it's not clear to > me why there ought to be any pure Clojure data (no Java objects) that

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
You're right, Dan. Having mulled it over a little more, it's not clear to me why there ought to be any pure Clojure data (no Java objects) that cannot be serialized as EDN. Emitting a #keyword reader literal for this edge case would make sense to me. -- You received this message because you ar

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > > On 8/3/16, 4:37 PM, "Blake Miller" > on behalf of blak3...@gmail.com > wrote: > > > > I have tried th

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
Thanks, Timothy. I'll give transit a try. -- 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 unsubs

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
The docstring of clojure.core/pr https://github.com/clojure/clojure/blob/clojure-1.7.0/src/clj/clojure/core.clj#L3552-L3555 actually says (in lieu of a formal EDN specification?) "pr and prn print in a way that objects can be read by the reader" ...and the example I showed appears to violate th

Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Blake Miller
I have tried this with Clojure 1.7.0, 1.8.0 and 1.9.0-alpha10 (clojure.core/read-string (clojure.core/with-out-str (clojure.core/pr (clojure.core/keyword "A valid keyword" ;; => :A This just seems wrong. It's valid to have an instance of clojure.lang.Keyword with a space in its name. (cloj

Re: Secondar Sorting in spark using clojure/flambo

2016-07-11 Thread Blake Miller
Hi Punit The behavior you are referring to is a feature of the Scala compiler, which is why it does not happen automatically when you try to use it from Clojure. Please see the note here: https://github.com/t6/from-scala/blob/4e1752aaa2ef835dd67a8404273bee067510a431/test/t6/from_scala/guide.clj

Re: Render Rails templates in Clojure?

2016-03-26 Thread Blake Miller
Pure ruby haml rendering ought to work in jruby, and you could call it from clojure... you would just need to inject values into the jruby scope, taking the place of a rails controller. That seems a bit kludgey, but perhaps if you have tons of templates it might be worth it to avoid rewriting t

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
tes, you've there's: Dolphin Smalltalk on Github: https://github.com/dolphinsmalltalk/Dolphin Lots of free Smalltalk books: http://stephane.ducasse.free.fr/FreeBooks/ Amber is to Smalltalk what ClojureScript is to Clojure: http://amber-lang.net/ Javascript done Smalltalk style: h

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

Recommendations for a schema-based data language for use in Hadoop?

2015-08-05 Thread Blake Miller
I suggest using prismatic`s schema library, and generating kryo serializers for your schematized records at compile time. These serializations can be very compact by leveraging the schemas, and kryo is very fast. I've been having success with this approach on Apache Spark. If you aren't married

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: [ANN] Demo of the Holy Grail workflow

2015-05-21 Thread blake
of cinéma vérité. > > > On Thursday, May 21, 2015 at 5:53:55 PM UTC+3, blake wrote: >> >> Interesting. >> >> I'm somewhat concerned that the "genius.com" annotation says the kingdom >> of Assyria was around for 25,000 years, though. >> >>

Re: [ANN] Demo of the Holy Grail workflow

2015-05-21 Thread blake
Interesting. I'm somewhat concerned that the "genius.com" annotation says the kingdom of Assyria was around for 25,000 years, though. On Wed, May 20, 2015 at 6:03 PM, Daniel Szmulewicz < daniel.szmulew...@gmail.com> wrote: > Hi everybody, > > A video showcasing the Holy Grail workflow has been p

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread blake
me in and fix the Hiccup to make it more professional looking. She didn't have a hitch. Separation of concerns, simplicity, clarity...I guess they do have some value. On Mon, May 4, 2015 at 3:47 PM, gvim wrote: > On 04/05/2015 23:17, blake wrote: > >> I went from Ruby to Clojure

Re: Clojure needs a web framework with more momentum

2015-05-04 Thread blake
I went from Ruby to Clojure in short-order and while I struggled mightily with the functional aspect (after assiduously avoiding those concepts for years), I much prefer every aspect of Clojure web programming to Rails. The bible of rails programming is the Hartl book. In the edition I read, befor

Re: [ANN] edn.el

2015-04-15 Thread Blake Miller
than the proverbial 80% when I invest 20% of my efforts on top of > emacs :) Take a look at this incredibly cool demo of a REST client written > in emacs: http://emacsrocks.com/e15.html > > > On Monday, April 13, 2015 at 11:25:20 PM UTC+2, Blake Miller wrote: >> >> Cool!

Re: [ANN] edn.el

2015-04-13 Thread Blake Miller
Cool! May I ask what your motivation was for this? On Saturday, April 11, 2015 at 3:09:28 AM UTC-7, Lars Andersen wrote: > > https://github.com/expez/edn.el > > is a library for reading an writing edn from emacs lisp. > > -- You received this message because you are subscribed to the Google Gr

Re: csv output

2015-03-23 Thread blake
I just did this but for a more complex data structure so it doesn't quite map to your example. I did it this way: 1. Stringify-keys 2. Merge the data, then pull the keys to get the unique fields 3. Join all the keys got in part 2 with "," to create a header record 4. Now, for each record, pull th

Re: Current best-of-breed JDBC libraries?

2015-02-24 Thread blake
I ran through all of the above and found it easier just to build my queries straight and call with clojure.java.jdbc. But my needs were light. On Tue, Feb 24, 2015 at 10:40 AM, Colin Yates wrote: > I haven't used it but I remember building up pages of SQL in Clojure > wasn't fun. The idea of put

Re: Clojure for Desktop UI Design Application

2015-01-13 Thread blake
Yeah, Adobe Flex can do that, too, with all the same caveats. On Tue, Jan 13, 2015 at 12:09 PM, Timothy Baldridge wrote: > Before coming to Clojure I did 2 years of work on WPF/Silverlight apps, > and let me say what those platforms offer blows the web stuff out of the > water. Yes it's not cros

Re: Author a Book on Clojure - Packt Publishing

2014-12-23 Thread blake
I've worked with a number of publishers over the years and it's not unusual for the process to be mired in typical corporate tech thought. Publishing is not a tech business: You can usually expect things tied to Microsoft products. On Mon, Dec 22, 2014 at 2:39 AM, Jan-Paul Bultmann < janpaulbultm.

Mutable local variables

2014-11-08 Thread Blake McBride
e the mess in a few macros. Thanks. Blake McBride -- 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

Clojure <-> Java

2014-11-07 Thread Blake McBride
Java classes and methods without any work. Is that true? Thanks. Blake McBride -- 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 - pl

Re: better way to group consecutive numbers in a vector?

2014-11-06 Thread blake
I wanted to put the delimiters in one step and then split in a different one, so I did this: (defn delimit[v] (reduce #(if (= (last %) (dec %2)) (conj % %2) (conj % :split %2)) [(first v)] (rest v))) (delimit [1 3 4 5 7 9 10 11 12]) => [1 :split 3 4 5 :split 7 :s

Re: Deterministic Randomness in Functional Clojure

2014-11-05 Thread blake
On Tue, Nov 4, 2014 at 7:22 PM, Fluid Dynamics wrote: > On Tuesday, November 4, 2014 9:54:39 PM UTC-5, Atamert Ölçgen wrote: >> >> clojure-lanterna is pretty cool. >> >> https://github.com/sjl/clojure-lanterna >> >> I'm interested in hearing about alternatives as well. >> > > Terminal emulation?

Re: Deterministic Randomness in Functional Clojure

2014-11-05 Thread blake
atives as well. > > > On Wed, Nov 5, 2014 at 4:09 AM, blake wrote: > >> Pardon my interruption: What are you using for screen output for your >> roguelike? >> >> On Tue, Oct 28, 2014 at 12:08 PM, Isaac Karth >> wrote: >> >>> I've be

Re: Deterministic Randomness in Functional Clojure

2014-11-04 Thread blake
Pardon my interruption: What are you using for screen output for your roguelike? On Tue, Oct 28, 2014 at 12:08 PM, Isaac Karth wrote: > I've been working on some projects (roguelikes, story-generators) that > often have a reason to have a random outcome for things like procedurally > generating

Re: Demoralising experience trying to install on Win 7

2014-10-27 Thread blake
I think it's a recent thing, FWIW:​ I've installed Clojure with lein.bat on several Windows (and Linux) machines with no difficulty. It's been truly wonderful, especially after wrestling with Ruby (and other Open Source) installations for years. I'm sure there's room for improvement; I'm just addi

Re: [ANN] Arcadia, the integration of Clojure and Unity3D

2014-10-21 Thread blake
Very cool! On Fri, Oct 17, 2014 at 1:41 PM, David Nolen wrote: > Rockin! > > On Fri, Oct 17, 2014 at 3:09 PM, Tims Gardner > wrote: > > Ramsey Nasser and I are excited to announce the alpha release of Arcadia, > > the integration of Clojure 1.7 into the Unity3D game engine and > development > >

Re: [ANN] Amazonica: Clojure client for the entire AWS api

2014-10-17 Thread Blake Miller
I know this is an old thread ... but FWIW I think this is awesome. Great work, Michael! I am going to play around with it. On Thursday, March 28, 2013 10:31:00 PM UTC-7, Michael Cohen wrote: > > I ran a quick and dirty benchmark comparing Amazonica with James' rotary > library, which uses no exp

Re: What is the best setup to program Clojurescript IF...

2014-10-02 Thread blake
I've had the best luck with Cursive. On Thu, Oct 2, 2014 at 12:22 PM, Sean Grove wrote: > Presumably LightTable is a good way to get started? > > On Thu, Oct 2, 2014 at 12:13 PM, Peter Mancini wrote: > >> What is the best setup to program Clojurescript IF: >> >>- you hate EMACS >>- use

Re: Clojure terminology

2014-09-11 Thread blake
t seems to me the fact that they look similar is practically coincidental. >> What exactly is a "scalar"? Is it anything that's not a container? ​ In Pascal, a "scalar" referred specifically to enumerable integer types. In Clojure, I think it refers to all vars. But I have

Re: [ANN] leaven and bakery - lightweight components for clojure and clojurescript

2014-09-03 Thread blake
Yeah, I worked back to the original to find the web-app. I note that the repo seems to default to develop, which results in a lot of errors when I try to "lein repl" in "example-web-app". (Missing clojars which are, in fact, missing.) When I switch branch to the master, I don't get those errors, b

Re: [ANN] leaven and bakery - lightweight components for clojure and clojurescript

2014-09-03 Thread blake
I'm not sure your [3] URL works. -- 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 fro

Re: clojurescript introduction

2014-07-31 Thread blake
27;bootstrap' is not a task. See 'lein help'. So I don't know if there's some sort of auto-generation going on but it seems it requires Lein 1.7. I ran into a similar thing with the "Web Development With Clojure" book. (Not the lein requirement but the early ex

Re: An Averaging function

2014-07-10 Thread blake
I have yet to find a Clojure book I consider suitable for a novice to FP programming. The problem (it seems to me) is that the people who can write books on Clojure have long ago made the paradigm shift, and don't necessarily recall how that shift happened. This is similar to what I've found in Sma

Re: Local variable

2014-07-08 Thread blake
> > Also, just a matter of style, but it's customary to leave closing parens >> at the end of a line, rather than by themselves on their own line. >> > > ​I do that also, but when I am editing I put them on there own line, > because in this way changes are faster. When I am satisfied, I merge them.

Re: OT: Github Alternatives

2014-06-30 Thread blake
FWIW, TurnKey has a gitlab appliance that has worked pretty well for me. On Mon, Jun 30, 2014 at 1:26 PM, Jonathan Abbey wrote: > We've been using GitLab in our laboratory for some time now, and I > recommend it very highly indeed. Getting it set up was a bit of a pain > because they did not h

Re: Game logic with Clojure

2014-06-24 Thread blake
I started with "Caves of Clojure"; I'm not sure I'd recommend it as a first thing. Also, as great as it is, it's unfinished, and it stops right where the design gets hard. Or at least the part that I'd consider hard. (Traditional roguelikes have 2D maps but Mr. Losh opts for a 3D map, a la Dwarf F

Re: online courses for clojure?

2014-06-17 Thread blake
This one is not complete: http://mooc.cs.helsinki.fi/clojure But as far as it goes it is very good. On Tue, Jun 17, 2014 at 11:17 AM, Łukasz Kożuchowski < lukasz.kozuchow...@gmail.com> wrote: > Here you are: > http://mooc.cs.helsinki.fi/clojure > > Łukasz Kożuchowski > On Jun 17, 2014 8:12 PM,

Re: Gin card game with Datomic

2014-06-13 Thread blake
Cool! On Fri, Jun 13, 2014 at 12:49 AM, Gijs S. wrote: > Hi all, > > I wrote a web app where you can play a card game with Clojure, > ClojureScript and Datomic. > > Background on the design is here: > http://thegeez.net/2014/06/12/gin_datomic.html > > The game is playable here: http://gin.thege

Re: Count vowels in a string

2014-05-20 Thread blake
To say nothing of "y": yes -> one vowel any -> two vowels but the filter thing is good otherwise. -- 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 mode

Re: Datascript and React.js for a Clojure web app

2014-05-01 Thread blake
Looks good. Is the "admin" login supposed to work? On Wed, Apr 30, 2014 at 6:32 AM, Gijs S. wrote: > Hi all, > > I've released a Clojure web application. It includes a front-end using > DataScript and React.js in ClojureScript. > > More details here: > http://thegeez.net/2014/04/30/datascript_c

Re: is there a way I can learn clojure with a lot of exercises

2014-04-16 Thread blake
cise I can't do, I know it's because there's a hole in my Clojure knowledge, so it's been very good for filling those in. When you start, though, it's all holes. My 2 cents. ===Blake=== -- You received this message because you are subscribed to the Google Groups "Clojure

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

Re: Gwt-Clojure - lightweight browser implementation

2012-08-23 Thread Blake Miller
I realize this is an old thread ... and the blog link about the gwt-clojure project is dead. I just wanted to mention that I'm working on something similar, with a somewhat different approach: This one is a java metaprogramming toolkit written in clojure. It turns clojure forms into java sourc

Clojurescript, is it ready yet?

2012-08-23 Thread Blake Miller
This is somewhat related, though it's not exactly what the OP asked about. This compiles with GWT: https://github.com/blak3mill3r/percolator/blob/master/play/src/com/whatsys/test.clj Also I wanted to point out that you could export a public interface with the GWT compiler and call it with clojure

Re: creating a finite sequence of uncertain length

2011-10-26 Thread Blake C Hurt
ating the final end value > > of nil or []. > > > How would you make such a terminating sequence? > > Is there a special final value myfunc must return so that the sequence > > ends gracefully? > >  Or is this just an abuse of the concept of a sequence and I sh