Re: [core.logic] What's the difference between "q" and a fresh LVar? Or: "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to java.lang.Number"

2016-04-09 Thread Kevin Downey
Check 'lein deps :tree' for conflicting core.logic versions, and delete the target directory to make sure you don't have old classfiles sitting around. On 04/09/2016 04:47 AM, Daniel Ziltener wrote: > Oops, yes, in my actual code it was both ":db/id", so that's not the > issue. It's really

Re: Clojure IoT?

2016-04-09 Thread Bruce Durling
Gregg, We've done a fair bit as has opensensors.io and xively/pachube. What have you been doing? cheers, Bruce On Sat, Apr 9, 2016 at 11:38 PM, Gregg Reynolds wrote: > A very general question : is anybody other than me working with Clojure for > IoT stuff? > > -- > You

Clojure IoT?

2016-04-09 Thread Gregg Reynolds
A very general question : is anybody other than me working with Clojure for IoT stuff? -- 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 -

Re: Extracting tags from parsed html

2016-04-09 Thread Danny Freeman
Thanks for the reply! I like how simple the solution is. I ended up with a function looking like this: (defn get-tags [tag html] (let [tags (-> (clojure.zip/xml-zip html) (xml-> clojure.data.zip/descendants tag))] (for [t tags] (first t The data structure

[ANN] clojure.java.jdbc 0.5.5

2016-04-09 Thread Sean Corfield
What? org.clojure/java.jdbc “0.5.5” Clojure contrib wrapper for JDBC database operations Where? https://github.com/clojure/java.jdbc#change-log Why? In the previous versions (0.5.0 and earlier), options to most functions were specified as inline unrolled

Re: Extracting tags from parsed html

2016-04-09 Thread James Reeves
If you parse into data structure compatible with clojure.xml, then you can use an XML zipper to find the links in the document. (-> s pl.danieljanus.tagsoup/parse-xml clojure.zip/xml-zip (clojure.data.zip/xml-> clojure.data.zip/descendants :a)) - James On 9 April 2016 at

Puzzle solving in Clojure

2016-04-09 Thread Cornelius Goh
Just my 2-cent suggestion : at your Permutation recursion function, may be try "recur" instead. -- 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

Extracting tags from parsed html

2016-04-09 Thread Danny Freeman
I have been working on a program that will take a website, and extract all the links from the body of the HTML page. I am using tagsoup to create a tree structure from an html page. The current issue I am running into is traversing the tree structure

Re: Attempt At Futures

2016-04-09 Thread Leonardo Borges
Something like imminent might be useful here. In particular the section about combinators: https://github.com/leonardoborges/imminent#combinators On Sat, Apr 9, 2016 at 9:33 PM Gary Verhaegen wrote: > You could: > > * Create all futures *without* deref'ing them, so

[ANN] geheimnis 0.1.0 - RSA + AES for clj & cljs

2016-04-09 Thread Christian Weilbach
>From the README: Implementation of cross-platform (clj, cljs) cryptography. The library supports AES/CBC/Pkcs7Padding with a 256 bit key and RSA with arbitrary keysize. If you need something which is not provided, please open an issue. While `geheimnis` is not supposed to cover all cryptographic

Re: leiningen dependency management

2016-04-09 Thread Chris Price
We run into this sort of thing quite a bit. Our solution so far has been: 1. Always use `:pedantic? :abort` in the project file. It can be annoying, but we've found that's much better to get annoying errors about version conflicts at build time than to get cryptic failures at runtime, such as

Re: [core.logic] What's the difference between "q" and a fresh LVar? Or: "java.lang.ClassCastException: clojure.core.logic.LVar cannot be cast to java.lang.Number"

2016-04-09 Thread Daniel Ziltener
Oops, yes, in my actual code it was both ":db/id", so that's not the issue. It's really confusing - today, it works. No idea why. I restarted the REPL multiple times to try it, and it never worked. Today it worked with the exact same code file on the first try. After getting a very strange

Re: Attempt At Futures

2016-04-09 Thread Gary Verhaegen
You could: * Create all futures *without* deref'ing them, so they all start in parallel; * Loop through the futures, asking them if they have finished, and print those that have (and remove them from the list) But if you want to get each result as it comes back, it's probably a better fit for

Re: leiningen dependency management

2016-04-09 Thread 'Sven Richter' via Clojure
Hi, Thanks for your responses. I will go and try the :provided profile and see how it works out. Thanks, Sven Am Samstag, 9. April 2016 02:51:15 UTC+2 schrieb Daniel Ziltener: > > Hi Sven, > > When you're sure the project depending your library does also has a > dependency on a third library,

Re: Attempt At Futures

2016-04-09 Thread Kevin Downey
The thing to remember is map is lazy, so you are lazily (on demand) creating a bunch of futures. Then doseq walks through those futures, demanding one at a time. You deref the future immediately after doseq requested it from the lazy-seq and are blocking on its completion then doseq can move on to