Re: what is the best forum for keeping up with Clojure?

2024-01-10 Thread Laws
ection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > > -- > *From:* clo...@googlegroups.com on behalf of > Laws > *Sent:* Tuesday, January 9, 2024 2:46 PM > *To:* Clojure > *Subject:* what is the best forum for k

what is the best forum for keeping up with Clojure?

2024-01-09 Thread Laws
Hi everyone, I did a lot with Clojure back 2012-2019, but I've been away from it for several years. Now I'm beginning a big new project in Clojure. I'm curious, where would I go to learn about the newest libraries and projects? There was a time 5 years ago when I knew all of the best and most i

Re: how do I debug a cryptic XML error?

2022-02-15 Thread Laws
(-> xmlzipper zip/down zip/right zip/node) On Tuesday, February 15, 2022 at 10:44:13 PM UTC-5 Laws wrote: > > I changed the code a bit: > > cpe-dictionary (-> "official-cpe-dictionary_v2.3.xml" >

Re: how do I debug a cryptic XML error?

2022-02-15 Thread Laws
ed in prolog.* *location*: #object[com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl$1 0x296bfddb "Line number = 1\nColumn number = 1\nSystem Id = null\nPublic Id = null\nLocation Uri= null\nCharacterOffset = 0\n"] On Tuesday, February 15, 2022 at 7:50:12 PM UTC-5 La

how do I debug a cryptic XML error?

2022-02-15 Thread Laws
So, I went to the government NVD website: https://nvd.nist.gov/products/cpe I downloaded the CPE Dictionary and unpacked it. It looks like standard XML. I copy and paste the standard XML example given on the Clojure XML documentation page: cpe-dictionary (-> "official-cpe-dictionary_v2.3.xm

Re: pre and post assertions, always in the meta data?

2022-02-03 Thread Laws
Hmmm, okay, I was using slingshot/try+ everywhere and then, just once, I used a plain 'try' and forgot to use the correct catch. My fault. On Thursday, February 3, 2022 at 1:56:59 PM UTC-5 Laws wrote: > > I see this old post by Fogus: > > http://blog.fogus.me/2009/12/21

pre and post assertions, always in the meta data?

2022-02-03 Thread Laws
I see this old post by Fogus: http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ With this example: (defn constrained–fn [f x] {:pre [(pos? x)] :post [(= % (* 2 x))]} (f x)) But I see this modern example: https://ostash.dev/posts/2021-07-01-pre-post-conditions/ (defn func ^{:pre

Re: common ways to run regex against either Hickory HTML or zippers?

2022-02-03 Thread Laws
Thank you, everyone. On Wednesday, February 2, 2022 at 3:22:53 PM UTC-5 lawrence...@gmail.com wrote: > Assume I've been cursed to scrape HTML. If I convert the pages to Hickory > I end up with a big mass of data which, sadly, lacks many "class" or "id"s > that would let me easily pick out the

Re: How to suppress warnings about namespace replacements?

2022-02-02 Thread Laws
space with this issue, you can address like this: > > (ns whatever > (:refer-clojure :exclude [boolean?])) > > But you can't really do that from outside the namespace or suppress this > warning otherwise. > > Alex > > > On Tuesday, February 1, 2022 at 11:22:28 A

How to suppress warnings about namespace replacements?

2022-02-01 Thread Laws
I get a lot of warnings like this: WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/boolean? Is there an official way to acknowledge that I'm aware of this namespace issue, such that the

a new Mac, with an old Emacs setup, and Cider won't work

2022-01-22 Thread Laws
I've a new Mac, but I copied over my old Emacs setup. Not sure if this is some kind of version conflict. I'm trying to run "cider-jack-in" for the first time on this machine and I get this error. Does anyone have a guess what this is about? Caused by: java.lang.RuntimeException: Invalid token

Ruby on Rails similar functionality for auto-generating an API?

2022-01-07 Thread Laws
In Ruby on Rails, given an existing database, it is very easy to autogenerate much of the code needed to serve a simple RESTful API. Does the Clojure ecosystem have anything like that? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: What Emacs framework do you prefer?

2021-08-10 Thread Laws
Thank you, everyone, I'll investigate these suggestions. On Monday, August 9, 2021 at 10:50:04 PM UTC-4 Laws wrote: > I've been away from Clojure for 3 years but I've decided my next project > will be pure Clojure. I'm setting everything up on a new MacBook Pro tha

What Emacs framework do you prefer?

2021-08-09 Thread Laws
I've been away from Clojure for 3 years but I've decided my next project will be pure Clojure. I'm setting everything up on a new MacBook Pro that I just bought. I just installed Emacs and I'm wondering what kind of starter-kit or framework do people prefer nowadays? Does anyone want to either

Re: How can I do something like (= (class ds) next.jdbc.connection) ??

2019-10-22 Thread Laws
rians Slack http://clojurians.net and https://clojurians.slack.com > where you can ask real time questions in the #beginners channel and > next.jdbc-specific questions in the #sql channel. > > > > On Thu, Oct 17, 2019 at 6:03 PM Laws > > wrote: > >> If I do thi

How can I do something like (= (class ds) next.jdbc.connection) ??

2019-10-17 Thread Laws
If I do this: (class ds) I see: next.jdbc.connection$url_PLUS_etc$reify__555 Is there anyway I can match against this? I'd like a runtime check to know that the code really does have a database connection. Imagine code like this: (if (= next.jdbc.connection (class ds)) (println "its n

Re: What is the correct way to increment a value in an atom from multiple workers?

2017-02-11 Thread Laws
Thank you On Friday, February 10, 2017 at 11:08:33 PM UTC-5, Francis Avila wrote: > > Not all intermediates appear because in between your completed swap! and > your log (really the deref of the atom) the value in the atom changed. > > You are using atoms correctly. Your swap! function would me m

What is the correct way to increment a value in an atom from multiple workers?

2017-02-10 Thread Laws
I don't know what I did wrong here. I wanted to build an accuracy test for some search matching code we wrote. We match text using things like Levenshtein distance and Jaro-Winkler scores. These parameters can be fine-tuned, so I wrote a small app that fires 10 million requests at our search m

Re: When did this start? java.lang.IllegalAccessError cond* does not exist nippy

2017-02-07 Thread Laws
rogram.adoc, > > > https://github.com/clojure/clojure-site/pull/141 is the pr. > > On 02/07/2017 02:32 PM, Laws wrote: > > Sorry about that. Here is the whole of my project.clj. It is a fairly > > small app. > > > > (defproject csv-to-dynamodb "1.0&q

Re: When did this start? java.lang.IllegalAccessError cond* does not exist nippy

2017-02-07 Thread Laws
chitect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > > On 2/7/17, 2:32 PM, "Laws" on > behalf of smashco...@gmail.com > wrote: > > > > Sorry about t

Re: When did this start? java.lang.IllegalAccessError cond* does not exist nippy

2017-02-07 Thread Laws
[org.clojure/tools.analyzer.jvm "0.6.5"] [org.clojure/core.memoize "0.5.6"] [org.clojure/core.cache "0.6.3"] [org.clojure/data.priority-map "0.0.2"] [org.clojure/tools.analyzer "0.6.4"] [org.ow2.asm/asm-all

When did this start? java.lang.IllegalAccessError cond* does not exist nippy

2017-02-07 Thread Laws
Two months ago I could run "lein uberjar" and my project compiled. Then I had to focus on other things for 2 months. Then today I come back to it, change one line of code, and run "lein uberjar". I get: java.lang.IllegalAccessError: cond* does not exist, compiling:(nippy.clj:1:1) Exception in t

Re: in Dire, is it possible to mix the "Erlang" style and the Slingshot integration?

2016-03-06 Thread Laws
o (println "humongorous-api is shutting down") (stop (start) (catch Exception e (println e So... if I use the Erlang style I can not match against Object? I'm trying to figure out what mistake I have made. On Sunday, March 6, 2016 at 7:38:53 PM UTC-

in Dire, is it possible to mix the "Erlang" style and the Slingshot integration?

2016-03-06 Thread Laws
I am a fan of Michael Drogalis's library Dire: https://github.com/MichaelDrogalis/dire And I found I was adding logging to any function I wrote to catch errors, so I wrote a macro that added in the logging: (defmacro handle-error [object-to-catch symbol-to-target & args] (let [result-fn (fir

Shouldn't we consider this a bug? "Unable to resolve symbol: % in this context"?

2016-02-14 Thread Laws
If I write this in a file: (defn different-order [order] {:pre [ (map? order) (:waiter order) (:customer order) (:menu-item-name order) ] :post [ (map? %) (:waiter %) (:customer %) (:menu-item-name %)

conditional logic implemented as pattern-matching and restructuring in the signature of the function

2016-02-08 Thread Laws
Sean Johnson has a great video about pattern matching, where he suggests that any function that starts with a conditional should have the conditional removed and the conditional logic implemented as pattern-matching and restructuring in the signature of the function. But after some experimentat

Re: How is the emphasis of “data over code” different than the XML advocacy of the early 2000s?

2016-02-02 Thread Laws
> I don’t know much about why the industry seems to have rejected XML as “bad” Off-topic, but I think 2 issues dominated 1.) Unnecessary complexity in the standards: http://harmful.cat-v.org/software/xml/soap/simple 2.) draconian error-checking. I assume the move to JSON was to get away from

Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
eter declaration. On Sunday, January 10, 2016 at 12:25:57 PM UTC-5, Laws wrote: > > The implication, as I read it, is that there is some place where I do > something like this: > > response-in-amazon-format (make-response company-name > outputSpeech-text false)] >

Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
t be some other element of your environment which you have not > shared here which is throwing sand in the gears. > > On Sunday, January 10, 2016 at 1:28:00 AM UTC-6, Laws wrote: >> >> I've been staring at this for awhile, and moving it around, and re-typing >> it, witho

Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-10 Thread Laws
your > OP is missing a couple of closing ). > > > Jony > > On Sunday, 10 January 2016 07:28:00 UTC, Laws wrote: >> >> I've been staring at this for awhile, and moving it around, and re-typing >> it, without seeing what the real error is. >> >>

Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
I would guess that I was dealing with some variant of this: http://dev.clojure.org/jira/browse/CLJ-1629 but I can not figure out how my function is malformed. On Sunday, January 10, 2016 at 2:28:00 AM UTC-5, Laws wrote: > > I've been staring at this for awhile, and moving it aro

Re: java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
And yes, I did try running "lein clean". On Sunday, January 10, 2016 at 2:28:00 AM UTC-5, Laws wrote: > > I've been staring at this for awhile, and moving it around, and re-typing > it, without seeing what the real error is. > > I have a file called server.clj whi

java.lang.IllegalArgumentException: Parameter declaration make-response should be a vector

2016-01-09 Thread Laws
I've been staring at this for awhile, and moving it around, and re-typing it, without seeing what the real error is. I have a file called server.clj which includes this at the top in its namespace declaration: (ns salesvoice.server (:require [salesvoice.query :as query] In query.clj, I

Re: How to use a Java SDK from Amazon?

2016-01-09 Thread Laws
at got me passed the dependency errors. On Saturday, January 9, 2016 at 5:14:51 PM UTC-5, Laws wrote: > > I'm not sure if this is a Clojure question, but I'm not sure where else to > ask. I've been working on an app for the Amazon Echo. I'm trying to deal > wit

Re: How to use a Java SDK from Amazon?

2016-01-09 Thread Laws
n issues: Compiling salesvoice.core Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory, compiling:(query.clj:1:1) Have others dealt with this issue, when using an SDK that uses slf4j? Is there an obvious way to configure this? On Saturday, January 9, 2016 a

Re: How to use a Java SDK from Amazon?

2016-01-09 Thread Laws
Nevermind. I just noticed they offer a Jar: https://github.com/amzn/alexa-skills-kit-java/tree/master/repo/alexa-skills-kit/alexa-skills-kit/1.1 I'll just use that. Ignore this post. On Saturday, January 9, 2016 at 5:14:51 PM UTC-5, Laws wrote: > > I'm not sure if this is a

How to use a Java SDK from Amazon?

2016-01-09 Thread Laws
I'm not sure if this is a Clojure question, but I'm not sure where else to ask. I've been working on an app for the Amazon Echo. I'm trying to deal with this requirement, which I must deal with if I am to get the app into the Amazon app store: Check the request signature to verify the authenti

Re: [ANN] dewdrop 0.1.0 -- lenses made simple(r?)

2016-01-01 Thread Laws
William, thank you for this. At a cultural level, I feel like the Clojure community is often torn between being popular, on the one hand, versus answering critics from the Haskell community, on the other hand. The strength of Clojure is exactly that it takes inscrutable academic ideas and makes

Any examples of using core.async offer!

2016-01-01 Thread Laws
I am looking for examples of some of the newer stuff in core.async. Has anyone used offer! in real code? If yes, why and how? Can you post an example of the code? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to