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, yes. There are at least a dozen in Clojure and dozens
more in Java, which I hadn't actually thought of using. But most of them
are at about the level of what you linked, which doesn't, e.g., include
functions. I think I'd prefer to avoid using a Java based one, because I
may well have to extend it and I'd rather not have Java code in my Clojure
projects. (I don't even want Java in my Java projects!)

However, Mr. Hull has been quite responsive. I think when he marked it as
"not maintained" he really just meant "I'm not actively 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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPmdrck%2BdgUsc4j8myrb86Q0Ks%3Dg7Qup05kndfqVbd6%2B2Q%40mail.gmail.com.


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 (which is
WAY overkill), to using infix.

https://github.com/rm-hull/infix

This is basically what I want, only expandable. I have some reservations,
however:

1. It's no longer maintained.
2. It uses the author's own homegrown parser.
3. The comparator operators don't seem 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===

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPmhNNKYY1yHvND5Z8pKwMnNBXqtox7DZrP%2BVwc5LJndmg%40mail.gmail.com.


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 that can't be what you want. The thing is, the actual function body
doesn't know that it's being bound to the symbol "add" and making it aware
would seem to contravene a number of league bylaws.

That is to say, the macro "defn" attaches the meta-information to the
symbol #add, not to the code that follows.

You could certainly make your own macro to make the bound variable name
visible to the body of the code, but I'm not sure you can do that with the
built-in defn.

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPmWK82nS1udL7MvVeDpa1rQHQ3c34G37WWasm%3D7DieroA%40mail.gmail.com.


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"}}

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwP%3DdzzGPxvEJpJgUDULzNQWLcmkW3O8btXg7e7VOq1HTgg%40mail.gmail.com.


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@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPn1u9MRG2mWCVVCy%2BWXgDLAqA9JDXt5Shh2ReGHk0Eb6A%40mail.gmail.com.


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
you could have a history stack which was basically an address like
"\user\update\123" so people could move back and forth between spots
that aren''t otherwise easy to jump around in.


> For general UI programming if you are using javafx then I really like
> cljfx - https://github.com/cljfx/cljfx.
>

I keep looking at cljfx thinking, "Well, this is probably the way to go"
but I could not get the examples to work, despite trying different
Java/JavaFX combos.

But it's a horse pill. Besides JavaFX, you've got component
lifecycles (which I've never grasped), renderers (which I haven't touched
in years, since I used reagent), and after about 3.5K of words and code you
get, "Now that every piece is laid out, it's time to combine them into
application." That kind of approach has not been successful for me, so I've
been interacting with JavaFX directly to get going. This, at least, means
that when I start thinking, "Well, it would make a whole lot of sense to be
able to describe this interface as a data structure," I can go back to
cljfx and go, "Ah, that's why he did that."

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPkOM%3Da_hU0wfnEDn-ge8yTXKfamqntGA%2B9oKWt7Oc0Ljg%40mail.gmail.com.


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 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 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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwPnBTuHsbDA_OgGSAt1j_B_tL%2B%3DnCVsigwZrAzD_g9%3D%2BsA%40mail.gmail.com.


Re: logic programming - find synonyms of a given word

2021-04-10 Thread Blake Watson
||. But I don't think we can derive that big is a synonym of huge from such
an index.

Well, you can if you invert it:

0. Have an arbitrary "meaning" counter set to 0.
1. The first pair are new, so you increment your meaning counter and create
set #1 containing the first pair.
2. When subsequent pairs come up, you check your sets for existence of
either word.
3. If either exists, put them in the set, else do what you did in #1.
4. If both exist, merge the sets they're in.

[big large]
[large huge]
[small little]

You end up with: #{big large huge} and #{small little} Now, if you have:

[big large]
[large huge]
[humongous enormous]
[humongous huge]

You get #{big large huge} and #{humongous enormous}, and this becomes
#{big large huge humongous enormous}. (And now I can't stop thinking "Big
McLargeHuge!")

You have to check each set for the presence of a word, of course, and at
some point you might want to optimize for that, but it gets you all the
words that are synonyms. Including:

[with alongside]
[against versus]
[with against]

Where you have a set that contains #{with alongside against verus}.
Because, as often happens in English, a word has two meanings that are not
only different but antonyms.  ("The whisky is agreeable but the meat has
gone bad!")

I have actually used schemes like this in contexts where the synonyms are
exclusive, but it does assume that "big = large = huge", i.e. that there's
no distinction 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 example input.
>
> On Saturday, April 10, 2021, Blake Watson  wrote:
>
>> 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
>> "places to put your money" and another set for "the side of a river" and
>> another set for "to hit [an object] off a wall or other barrier". Unless
>> you have some other annotation besides the word so that you can distinguish
>> "bank[1]" from "bank[2]" and "bank[3]".
>>
>> On Fri, Apr 9, 2021 at 7:32 AM SideStep  wrote:
>>
>>>
>>> Task is to write a program that can decide whether two words are
>>> synonyms or not.
>>>
>>> I have pairs of synonymous words, E.g.:
>>>
>>>  [big large]
>>>  [large huge]
>>>  [small little]
>>>
>>> We can derive the synonymous relationship indirectly: if big is a
>>> synonym for large and large is a synonym for huge then big is a synonym for
>>> huge.
>>> Being synonyms doesn’t depend on order, e.g. if big is a synonym for
>>> large then large is a synonym for big.
>>>
>>> The program has to answer whether given two words are synonyms or not.
>>>
>>> This seems to me as a good candidate for logic programming, e.g. with
>>> clojure.core.logic.
>>>
>>> a. How to state the input pairs of synonyms as logical
>>> statements/constraints?
>>> b. How to perform a query to find all synonyms of a given word?
>>>
>>> Or perhaps I am yack shaving? What would be a simpler way to solve this?
>>>
>>> This question is also on stackowerflow, if you want to get some points:
>>>
>>>
>>> https://stackoverflow.com/questions/67002758/logic-programming-find-synonyms-of-a-given-word
>>>
>>> --
>>> 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 this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https:

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
"places to put your money" and another set for "the side of a river" and
another set for "to hit [an object] off a wall or other barrier". Unless
you have some other annotation besides the word so that you can distinguish
"bank[1]" from "bank[2]" and "bank[3]".

On Fri, Apr 9, 2021 at 7:32 AM SideStep  wrote:

>
> Task is to write a program that can decide whether two words are synonyms
> or not.
>
> I have pairs of synonymous words, E.g.:
>
>  [big large]
>  [large huge]
>  [small little]
>
> We can derive the synonymous relationship indirectly: if big is a synonym
> for large and large is a synonym for huge then big is a synonym for huge.
> Being synonyms doesn’t depend on order, e.g. if big is a synonym for large
> then large is a synonym for big.
>
> The program has to answer whether given two words are synonyms or not.
>
> This seems to me as a good candidate for logic programming, e.g. with
> clojure.core.logic.
>
> a. How to state the input pairs of synonyms as logical
> statements/constraints?
> b. How to perform a query to find all synonyms of a given word?
>
> Or perhaps I am yack shaving? What would be a simpler way to solve this?
>
> This question is also on stackowerflow, if you want to get some points:
>
>
> https://stackoverflow.com/questions/67002758/logic-programming-find-synonyms-of-a-given-word
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/0cd164b2-56eb-4e99-866d-b1f63522ac52n%40googlegroups.com
> 
> .
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAJAnwP%3DBZJ%2BeEoEeNv1Yg2eRbsHyVcY7OJm2YmvRLsZ2h8oioA%40mail.gmail.com.


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 complicated for the
beginner. Clojure is by far not the worst in this regard, but a new app
creates seven folders (root, doc, resources, src, test, src/root and
test/root) and nine files (.gitignore, .hgignore, CHANGELOG.md, LICENSE,
project.clj, README.md, intro.md, core.clj and core_test.clj). This is a
lot for someone just trying to grasp "Hello, world."

The less you have to say to the student ("you can ignore all that for now")
the better. The less you have to tell the user to toggle mysterious
switches (as with the JVM stack options) the better.

What would be good would be a "lein new beginner foo" that had a truly
minimal setup. It looks like this has been tried over the years, though I
don't see any currently working templates that fit the bill. If I can't
find one, perhaps I'll build that.

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure as first language

2016-03-01 Thread blake watson
sing
computers to grasp math, physics, biology, etc. It has the same sort of
fallout as other great tools, in that while you =can= adapt easily to new
languages, you also end up missing the amazing place you came from.

>> And how might this compare to Clojure?

Smalltalk, in some ways, is the anti-Clojure. If Clojure despises state,
Smalltalk is =all= state. The image is, in essence, a big ball of state. It
suffers, then, from Rich Hickey's complected-ness (and how!). But state +
debugger makes for a powerful teaching tool. Smalltalk has some functional
stuff (select, collect, reject, inject, detect—which map roughly to keep,
map, filter, reduce and (some #{...}) and it is genuinely used (not just
lip service) but the philosophy is definitely "objects are responsible for
their own state, and you must trust that", with the footnote that, well, if
you don't trust it, you can change it. The whole system is right there in
your image.

Tougher concepts to grasp, like laziness, transducers, asynchronous
programming are less "up front" in ST than in Clojure. (Actually, ST
doesn't even have built-in laziness or transducers.)

(Side note: I'd love to make a Clojure for the ST VM.)

>>Any links/references?

In addition to the footnotes, 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: https://www.lively-kernel.org/
Mini-Squeak in the Browser:
http://bertfreudenberg.github.io/SqueakJS/demo/simple.html

That last is Squeak 2.2 but if you've got a powerful enough machine running
a decent browser, you can run up to Squeak 4.5 in the browser.

Hope this helps!

===Blake===


[1]
http://devblog.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 on this last comment about Smalltalk?
> What did you do?
> What was the outcome relative to expectations?
> What were some good and bad aspects of Smalltalk?
> And how might this compare to Clojure?
> Any links/references?
>
> Terje
>
>
> On Thursday, February 25, 2016 at 9:29:10 PM UTC+1, blake watson wrote:
>
>
>> I've had good luck with Smalltalk.
>>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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
initial C# programs I wrote came with pages of boilerplate, though hidden.)

In other ways, it's less good: any language discouraging state is going to
face the "what just happened?" challenge.

Clojure, in particular, has a weakness in its multi-page stack dumps, and
its "Null Pointer Exception". The former is an awful thing to force a
beginner to confront. The latter can be just plain mysterious.

I've had good luck with Smalltalk.


On Tue, Feb 23, 2016 at 2:53 AM, Matching Socks 
wrote:

>
> The post-Python effect came up briefly in another Conj talk -- in 2015 --
> given by Elena Machkasova and two students, one of whom had had Clojure
> first and the other Python.  Their school offered it either way.
>
> https://www.youtube.com/watch?v=n0yN1GauxCA
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.
>
> On Mon, Oct 26, 2015 at 7:24 PM, Robin Heggelund Hansen
>  wrote: There are
> > postgres.async for async db, and fink-nottle for sending sms/push
> > notifications/email etc. using core.async.
>
> In addition to those services (i.e. RDS, SNS, SQS), there are
> core.async-friendly libraries you can use with Redis/ElastiCache
> (redis-async), Lambda & Dynamo.  So you shouldn't have to rewrite too
> much bytecode if you're interested running on EC2.  I'm sure there are
> plenty of alternatives for other environments.
>
> Take care,
> Moe
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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*" by Packt Publishing, please let me know.
>> Reviewers will be entitled to a 6 montn subscription of PacktLib
>> .
>>
>> Here's the list of topics covered in this title.
>>
>>-
>>- Working with Sequences and Types
>>- Orchestrating Concurrency and Parallelism
>>- Parallelization using Reducers
>>- Writing Macros
>>- Composing Transducers
>>- Using Functors and Monads
>>- Programming with Logic
>>- Asynchronous Programming
>>- Reactive Programming
>>- Working with Tests
>>- Troubleshooting and Best Practices
>>
>>
>> --
>> 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 this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> R.
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 and
then parse out the contents with clojure.xml/parse.

On Thu, Jul 30, 2015 at 3:36 PM, Sean Corfield  wrote:

> On Jul 29, 2015, at 7:47 PM, Mike  wrote:
>
> I have done some searching, and there is an old clj-soap library which
> Sean Corfield has mostly abandoned.
>
>
> Just to clarify: I too had started down the path of trying to find a way
> to do SOAP via Clojure and came across the old and *already abandoned*
> clj-soap library so I forked it and got it "working" with Clojure 1.3.0
> (since it was built for 1.2.0) and whilst I could get a few basic SOAP
> services working with it, nothing complex actually worked at all.
>
> At that point I tried a different approach using wsdl2java, compiling the
> generated Java, and then calling that directly and using the Axis libraries
> via Java interop from Clojure. That worked for the complex SOAP service I
> needed and took a lot less time than figuring our how to make clj-soap work
> generically.
>
> As it says on the repo:
>
> I forked it purely to get it running on Clojure 1.3 and then found it
> didn't do what I needed anyway.
>
> If you think it might be useful to you, please fork it and maintain it
> yourself. If you decide to take over as lead maintainer, let me know and
> I'll update this readme to point to your new fork.
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
>
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 sent over:  https://github.com/bhauman/lein-figwheel/issues/161
>
> On Tuesday, 30 June 2015 10:01:01 UTC-7, Gary Trakhman wrote:
>>
>> You'll have to bump instaparse versions:
>> https://github.com/clojure-emacs/refactor-nrepl/issues/53
>>
>> On Tue, Jun 30, 2015 at 12:57 PM Robert Beaupre 
>> wrote:
>>
>>> Is anyone else getting the following error with 1.7.0 when running lein
>>> repl?  All I did was change from 1.6.0 to 1.7.0.
>>>
>>> #error {
>>>
>>>  :cause Wrong number of args (2) passed to: StringReader
>>>  :via
>>>  [{:type clojure.lang.Compiler$CompilerException
>>>:message clojure.lang.ArityException: Wrong number of args (2) passed
>>> to: StringReader, compiling:(abnf.clj:189:28)
>>>:at [clojure.lang.Compiler$InvokeExpr eval Compiler.java 3628]}
>>>   {:type clojure.lang.ArityException
>>>:message Wrong number of args (2) passed to: StringReader
>>>:at [clojure.lang.AFn throwArity AFn.java 429]}]
>>>
>>> Thanks,
>>> Robert
>>>
>>> On Tuesday, 30 June 2015 07:35:34 UTC-7, Alex Miller wrote:

 We are pleased to announce the release of Clojure 1.7.

 - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.7.0/
 - Leiningen: [org.clojure/clojure "1.7.0"]

 The two headline features for 1.7 are transducers and reader
 conditionals. Also see the complete list (
 https://github.com/clojure/clojure/blob/master/changes.md) of all
 changes since Clojure 1.6 for more details.

 ## Transducers

 Transducers (http://clojure.org/transducers) are composable
 algorithmic transformations. They are independent from the context of their
 input and output sources and specify only the essence of the transformation
 in terms of an individual element. Because transducers are decoupled from
 input or output sources, they can be used in many different processes -
 collections, streams, channels, observables, etc. Transducers compose
 directly, without awareness of input or creation of intermediate 
 aggregates.

 Many existing sequence functions now have a new arity (one fewer
 argument than before). This arity will return a transducer that represents
 the same logic but is independent of lazy sequence processing. Functions
 included are: map, mapcat, filter, remove, take, take-while, drop,
 drop-while, take-nth, replace, partition-by, partition-all, keep,
 keep-indexed, map-indexed, distinct, and interpose. Additionally some new
 transducer functions have been added: cat, dedupe, and random-sample.

 Transducers can be used in several new or existing contexts:

 * into - to collect the results of applying a transducer
 * sequence - to incrementally compute the result of a transducer
 * transduce - to immediately compute the result of a transducer
 * eduction - to delay computation and recompute each time
 * core.async - to apply a transducer while values traverse a channel

 ## Portable Clojure and Reader Conditionals

 It is now common to see a library or application targeting multiple
 Clojure platforms with a single codebase. Clojure 1.7 introduces a new
 extension (.cljc) for files that can be loaded by Clojure and ClojureScript
 (and other Clojure platforms).

 There will often be some parts of the code that vary between platforms.
 The primary mechanism for dealing with platform-specific code is to isolate
 that code into a minimal set of namespaces and then provide
 platform-specific versions (.clj/.class or .cljs) of those namespaces.

 To support cases where is not feasible to isolate the varying parts of
 the code, or where the code is mostly portable with only small
 platform-specific parts, 1.7 provides Reader Conditionals (
 http://clojure.org/reader#The%20Reader--Reader%20Conditionals).

 Reader conditionals are a new reader form that is only allowed in
 portable cljc files. A reader conditional expression is similar to a cond
 in that it specifies alternating platform identifiers and expressions. Each
 platform is checked in turn until a match is found and the expression is
 read. All expressions not selected are read but skipped. A final :default
 fallthrough can be provided. If no expressions are matched, the reader
 conditional will read nothing. The reader conditional splicing form takes a
 sequential expression and splices the result into the surrounding code.

 ## Contributors

 Thanks to all of those who contributed patches to Clojure 1.7:

 Timothy Baldridge
 Bozhidar Batsov
 Brandon Bloom
 Mi

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 or a service API? Then "remote" is
> the library for you!
>
> Github: https://github.com/outpace/remote
> Leiningen: [com.outpace/remote "0.3.1"]
>
> This library has been closed source up until now and by popular demand has
> been made available to the public. On behalf of the Outpace staff and
> myself we hope you or your team find this library useful.
>
> Thanks!
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 traditional lisp / scheme texts, like 
> SICP, or Little Schemer (etc) or other books like that?  I've spent quite a 
> bit of time with them, imagining they would pay off, but I'm not sure 
> that's a "normal" route to Clojure proficiency. 
>
> Sent from my iPhone 
>
> > On Mar 20, 2014, at 11:12 PM, Sean Corfield 
> > > 
> wrote: 
> > 
> >> On Mar 20, 2014, at 6:08 PM, Marcus Blankenship 
> >> > 
> wrote: 
> >> So I'm curious: how did you learn Clojure well enough to be proficient 
> with it, or how are you working on learning it? 
> > 
> > Initial dabbling: The Joy of Clojure and a REPL. Caveat: it's not really 
> an introductory Clojure book but I had past FP experience so I felt I could 
> "jump in". 
> > 
> > Initial serious learning: Attended Amit Rathore's Clojure Bootcamp - one 
> day course for about $300 (if I remember correctly?). 
> > 
> > Follow-on: 4clojure.com, worked through Clojure in Action as well. 
> > 
> > Then I picked a handful of small-ish problems we'd already solved at 
> work in other languages and re-coded them in Clojure. 
> > 
> > Since then it's been a steady stream of tackling increasingly larger 
> problems at work, over a period of about three years. 
> > 
> >> Anyone else facing the focus + fear dilemma? 
> > 
> > There's a lot less fear if you're used to learning new languages. I try 
> to pick up a new language every year or two: Groovy in 2008/2009, Scala in 
> 2009/2010, Clojure in 2010/2011 (and onward). Dabbled in Ruby, Python, 
> Haskell since then but nothing serious. Very interested in Elm right now. 
> > 
> > As for focus, yes, you really do need a "project". Either pick things 
> you've done before in other languages, or figure out something that would 
> scratch an itch (a small web app, perhaps?) and tackle that. 
> > 
> > Sean Corfield -- (904) 302-SEAN 
> > An Architect's View -- http://corfield.org/ 
> > 
> > "Perfection is the enemy of the good." 
> > -- Gustave Flaubert, French realist novelist (1821-1880) 
> > 
> > 
> > 
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 programs (Twitter, asteroids, 
Caves of Clojure).

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.