Re: deftest and var's metadata

2014-05-27 Thread Nahuel Greco
ok, just for the record, I fixed it. Instead of (resolve 'a) you must use (ns-resolve 'test-namespace 'a), because lein test runs the tests in namespace 'userinstead of the one that defined the test (as I wrongly assumed). Also the first test for the existence of the var is wrong, I assumed resolve

Re: clojure.lang.Atom cannot be cast to a java.lang.Num

2014-05-27 Thread Dylan Gleason
Thank you, Ambrose. It appears I forgot to dereference both index and offset when trying to read the values associated with the atoms. Thanks Phillippe -- I went with your recursive solution and bypassed mutation via atoms altogether -- a much cleaner solution. On Tue, May 27, 2014 at 2:15 AM, Ph

Re: [ANN] core.async (and more) video tutorials

2014-05-27 Thread Juan Manuel Gimeno Illa
El martes, 27 de mayo de 2014 19:55:12 UTC+2, tbc++ escribió: > > Thanks for all the suggestions. > > 1) Yes, there seems to be an issue with downloading free videos. From what > I'm seeing in the admin settings I only have the option for "paid and > downloadable" and "free". Free disables the

Re: practice for learning clojure

2014-05-27 Thread Randy Chiu
Hi Gregg, Your suggestion is very good and explicit,thanks for your response. I'd like to ask you another question since you mentioned : >>> spend *a lot* of time studying other people's solutions, looking at both the factors of elegance and readability in solutions. do you have any good projects

core.match incorrect docstring?

2014-05-27 Thread Dom Kiva-Meyer
The clojure.core.match/match docstring states that it takes "...a vector of occurrences, vars. Clause question-answer syntax is like `cond`. Questions must be wrapped in a vector..." https://github.com/clojure/core.match/blob/5429e20f5db8c398d745f15f7a85f65976f45397/src/main/clojure/clojure/core/ma

Re: practice for learning clojure

2014-05-27 Thread Gregg Williams
Hi, Randy, I'm several years into learning Clojure. Here's what has worked for me: * Use either Light Table or (if you're determined) Emacs as your IDE. * I learned a lot from taking this free online course: http://iloveponies.github.io/120-hour-epic-sax-marathon/index.html * I have *all* the pu

Re: [ANN] core.async (and more) video tutorials

2014-05-27 Thread Timothy Baldridge
Thanks for all the suggestions. 1) Yes, there seems to be an issue with downloading free videos. From what I'm seeing in the admin settings I only have the option for "paid and downloadable" and "free". Free disables the downloading. I'll contact PivotShare and see if they can change that. 2) Sou

Re: regex strings

2014-05-27 Thread Stephen Gilardi
clojure.string/replace replaces the portion of the string matched by the regex with the replacement. If you add ".*" to the regex, the regex will match the entire input string and the form will evaluate to "First". --Steve On May 27, 2014, at 11:24 AM, Glen Rubin wrote: > I have a string of t

regex strings

2014-05-27 Thread Glen Rubin
I have a string of the general form: Name: Last,First Middle ID: GA88192 I am trying to extract the first name by invoking string.replace function, for example to extract the first name I invoke the following where 'nameidstring' is the general form above: (clojure.string/replace nameidstri

Re: Building clojure compiler in eclipse

2014-05-27 Thread Alex Miller
Yep, Java 1.6+ is required. We test with 1.6, 1.7, 1.8. -- 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 p

Re: Remote function calls / simple distributed computation

2014-05-27 Thread Gary Johnson
Check out Tim Baldridge's Hermod library: https://github.com/halgari/com.tbaldridge.hermod It's a very lightweight system that lets you create mailboxes (which listen on ports) on each of your independent JVMs. Then you can pass messages between them using core.async. This should give you most

Re: practice for learning clojure

2014-05-27 Thread Plínio Balduino
Hi, Randy ClojureDocs has lots of examples with documentation, 4clojure and Clojure Koans are excellent start points and you can learn a lot reading the Clojure portion of Clojure source code. Regards Plinio Balduino 11 982 611 487 > On 27/05/2014, at 08:58, Randy Chiu wrote: > > Hi all, >

Re: emacs - some output goes to stdout when using cider

2014-05-27 Thread Don Hill
Thanks for the explanation. I will also check out emacs-live On Mon, May 26, 2014 at 10:31 PM, Carlo Zancanaro wrote: > On Mon, May 26, 2014 at 08:32:45AM -0700, Don Hill wrote: > > I am in a project with a test.clj file and if I do a (println "Hi") C-x > C-e > > it goes to repl as expected. If

practice for learning clojure

2014-05-27 Thread Randy Chiu
Hi all, I'm new to clojure and want to find some suggestion for learning clojure. I googled some project about "how to learn clojure" but without any perfect answers until now. I worked on linux kernel in last several years mainly with C, and I'm recently interested in lisp. I try to read some b

Re: [ANN] core.async (and more) video tutorials

2014-05-27 Thread Ivan Ryakhov
Greate work, Tim! My advice is to split the screen by vertical but not horisontal. Your code are not so wide and there is a lot of empty space on the right side. I think it would be useful to place a REPL to the right side of the screen to obtain a vast space for code and REPL ineractions. What

Re: [ANN] monarch 0.2.0 - Simple database migrations for Clojure.

2014-05-27 Thread Dave Della Costa
Just to add to the chorus--environ (https://github.com/weavejester/environ) is a good, basic option which we've had lots of success using. (2014/05/27 18:08), Andrey Antukh wrote: > Nomad is an other tool like > confijulate: https://github.com/james-henderson/nomad > > I use it in some projects a

Re: clojure.lang.Atom cannot be cast to a java.lang.Num

2014-05-27 Thread Philippe Guillebert
Also, you should be using loop/recur instead of mutating atoms here, this is the functional way. You already laid out your 2 loop bindings, and a stop condition. This should be straightforward. Philippe. Le 27 mai 2014 09:44, "Dylan Gleason" a écrit : > I am trying to read a TCP request via an

Re: [ANN] monarch 0.2.0 - Simple database migrations for Clojure.

2014-05-27 Thread Andrey Antukh
Nomad is an other tool like confijulate: https://github.com/james-henderson/nomad I use it in some projects and seems better documented that confijulate and uses edn as file format. Andrey 2014-05-27 10:43 GMT+02:00 Ray Miller : > On 27 May 2014 09:35, Manuel Paccagnella > wrote: > > > >> I'v

Re: How to refactor data safely?

2014-05-27 Thread Jakub Holy
Hello, thank you all for your tips! I'm away from my PC for a month so I will experiment with your proposals when I come back. @Ulises, @Betrand: Hiding the access behind functions to limit the change to them is something I have also though of. The disadvantage is that I loose the benefit of de

Re: [ANN] core.async (and more) video tutorials

2014-05-27 Thread Juan Manuel Gimeno Illa
Seems strange. I get 0 downloads remaining for all the videos (both the free and the paid). Juan Manuel El martes, 27 de mayo de 2014 09:44:29 UTC+2, Las escribió: > > Hi, > > >> Btw When I click on the download video button, nothing gets downloaded. >> Tried on Firefox/Chrome - Mac. Is that a

Re: [ANN] monarch 0.2.0 - Simple database migrations for Clojure.

2014-05-27 Thread Ray Miller
On 27 May 2014 09:35, Manuel Paccagnella wrote: > >> I've found confijulate, here. It might be useful. > > > Well, ok. Another configuration library that I wasn't aware of when I wrote > confunion. Another one that I found after writing mine is carica, which > seems quite good. There are a bunch o

Re: [ANN] monarch 0.2.0 - Simple database migrations for Clojure.

2014-05-27 Thread Manuel Paccagnella
Il giorno martedì 27 maggio 2014 08:16:49 UTC+2, Atamert Ölçgen ha scritto: > > You are welcome. Thanks for the library! > > Second that. > I have given it some more thought and I now realize local overrides for > leiningen config might not be a good idea. Perhaps application > configuration s

Re: clojure.lang.Atom cannot be cast to a java.lang.Num

2014-05-27 Thread Ambrose Bonnaire-Sergeant
You're adding two atoms together here: (reset! index (+ index offset)) Thanks, Ambrose On Tue, May 27, 2014 at 3:43 PM, Dylan Gleason wrote: > I am trying to read a TCP request via an instance of DataInputStream and > am running into this error with the following code: > > (defn receive > [s

Re: [ANN] core.async (and more) video tutorials

2014-05-27 Thread László Török
Hi, > Btw When I click on the download video button, nothing gets downloaded. > Tried on Firefox/Chrome - Mac. Is that a known issue? > Same here. I could only download the videos I paid for, but not the free one. > Also, I had sent you this email via support on that site but didn't get > any r

clojure.lang.Atom cannot be cast to a java.lang.Num

2014-05-27 Thread Dylan Gleason
I am trying to read a TCP request via an instance of DataInputStream and am running into this error with the following code: (defn receive [socket] (with-open [reader (DataInputStream. (.getInputStream socket))] (let [length (read-length reader) bytes-in (byte-array length)

Re: [ANN] monarch 0.2.0 - Simple database migrations for Clojure.

2014-05-27 Thread Ray Miller
On 27 May 2014 01:02, Michael Cramm wrote: > Good question. I had originally wanted a separate, untracked config file but > couldn't decide on a format. (like separating out protocol, host, port, etc) > Exporting the environment variable felt the most non-committal at the time. Don't underestimat