Re: Top-down code in namspaces

2014-06-01 Thread u1204
>Specifically, I like to write my code in a top-down. > >What I mean by that is that within a file the highest-level functions sit >at the top, and are implemented in terms of lower-level functions further >down. > >The idea is that through sensible naming, a reader should be able to stop >readi

[ANN] Clojure cheatsheet with search capability

2014-06-01 Thread Andy Fingerhut
Thanks to Francois du Toit, the versions of the Clojure cheatsheet available at the link below now have the ability to let you search for all symbols beginning with a string you type in, with color highlighting of matches. http://jafingerhut.github.io The one below is my favorite because you

Re: help with the lawyers?

2014-06-01 Thread Joshua Ballanco
When dealing with lawyers, I find it best to keep things simple: Is there no other project in the entire federal government developed with Eclipse or some other EPL licensed code? Somehow, I find that hard to believe. On Friday, May 30, 2014 at 6:31, rcg wrote: > Hello; > > Developing web s

Re: text processing function

2014-06-01 Thread Mike Fikes
Hey Glen, it appears that zipmap most directly corresponds to your initial question. The only complicating aspect is your desire for nils, which (concat result (repeat nil)) addresses. (zipmap [:fullname :lastname :firstname :middlename] (concat result (repeat nil))) If it weren't for the

[ANN] Historian : drop-in state management for React (Om / Reagent / ...)

2014-06-01 Thread Frozenlock
Hello there! https://github.com/Frozenlock/historian One of the big sales pitch of React.js (and cljs immutable data structure) is how it enables us to easily make 'undo'. Here's a library that does just that. You tell it which atom(s) you want to be able to undo/redo and it will keep track o

[ANN] Eastwood the Clojure lint tool version 0.1.3

2014-06-01 Thread Andy Fingerhut
Eastwood is a Clojure lint tool. It analyzes Clojure source code in Leiningen projects, reporting things that may be errors. Installation instructions are in the documentation here: https://github.com/jonase/eastwood/#installation--quick-usage The previous release was 0.1.2 in April 2014.

REPL using Emacs Cider

2014-06-01 Thread Timur
hi everyone, I have a question about using nREPL (cider) in Emacs. In my clojurescript project, I start the repl server using cider-jack-in command. However, whenever I try to execute a function from the clojure file, a CompilerException is thrown with the message unable to resolve symbol... W

Re: text processing function

2014-06-01 Thread Mike Fikes
Just golfing for fun: (apply hash-map (interleave [:fullname :lastname :firstname :middlename] (concat ["John Lou Doe" "Doe" "John"] (repeat nil ;=> {:firstname "John", :lastname "Doe", :middlename nil, :fullname "John Lou Doe"} -- You received this message because you are subscribed to

Re: text processing function

2014-06-01 Thread Glen Rubin
These are both very good and usable answers. Thank you both! On Sunday, June 1, 2014 9:36:58 AM UTC-7, James Reeves wrote: > > What about: > > {:fullname (get result 0), :lastname (get result 1), :firstname (get > result 2), :middlename (get result 3)} > > If the "get" function can't find a resu

Re: Clojure binding for OrientDB

2014-06-01 Thread Daniel Kersten
clj-orient hasn't been updated in 2 years, while OrientDB is in very active development. Therefore, I would say that it is now quite dated. A good alternative would be to use the Tinkepop API and looking into https://github.com/clojurewerkz/archimedes - OrientDB has transitioned to using Tinkerpop

Re: [ANN] JSON/CLJ/EDN comparison table

2014-06-01 Thread Patrick Logan
All things being equal, I would prefer a Lisp-based format rather than JSON, yes. (My involvement with that approach goes back 25 years: https://en.wikipedia.org/wiki/Electronic_Design_Interchange_Format ) But EDN + this convention would be something only my software would support, and anyone I

Re: text processing function

2014-06-01 Thread James Reeves
What about: {:fullname (get result 0), :lastname (get result 1), :firstname (get result 2), :middlename (get result 3)} If the "get" function can't find a result, it returns nil. - James On 1 June 2014 17:09, Glen Rubin wrote: > I am doing some text processing using clojure and attempting to

Re: text processing function

2014-06-01 Thread Mike Fikes
Array destructuring appears to provide what you want with respect to nils (note the extra set of square braces within the argument list): (defn make-map [[fullname lastname firstname middlename]] {:fullname fullname :lastname lastname :firstname firstname :middlename middl

text processing function

2014-06-01 Thread Glen Rubin
I am doing some text processing using clojure and attempting to extract a person's name by regex and then assign it to a map. The result I get takes one of several forms: nil (if i can't find the name) [fullname] [fullname lastname] [fullname lastname firstname] [fullname lastname firstname

Re: Top-down code in namspaces

2014-06-01 Thread Luc Prefontaine
a) move out helpers or core code out of the API name space b) tag stuff left not part of the API as private in the API name space c) keep the API at the bottom d) do the above iteratively as code evolves So far it's been workable ( > 2 locs so far). Not too much name space switche

Top-down code in namspaces

2014-06-01 Thread Glen Mailer
Hi everyone, I'm looking to get some opinions on code style. Specifically, I like to write my code in a top-down. What I mean by that is that within a file the highest-level functions sit at the top, and are implemented in terms of lower-level functions further down. The idea is that through s

Re: Clojure binding for OrientDB

2014-06-01 Thread Paulo Suzart
Hi Zubair, It seems to be more then active: https://github.com/orientechnologies/orientdb/blob/master/history.txt This is the most recent release. But the bindings for many languages seems so outdated. :( Regards On Monday, May 26, 2014 11:11:47 AM UTC-3, Zubair Quraishi wrote: > > Hi Eduardo,

Re: [ANN] JSON/CLJ/EDN comparison table

2014-06-01 Thread Jozef Wagner
How about format which can represent either graph or structure, depending on users needs? I would argue that EDN is more suitable for linked data than JSON is. Its support for identifiers and tagged elements allows for pretty straightforward serialization of linked data. See https://gist.github