I believe the documentation is imprecise as you point out. The "loc"
returned by next at the :end, is not a location as it lacks meta data. I
don't think this is intentional, but clearly I could be wrong.
I don't see any immediate issues in patching next like below so it returns
a real loc, and
Hi Caleb,
This surprised me as well. It seems that if you try to fold a map, the
function has two arguments:
(r/fold + (r/map (fn [k v] v) {:a 1 :b 2})) ;; works
(r/reduce + (r/map (fn [k v] v) {:a 1 :b 2})) ;; doesn't work
(r/reduce + (r/map (fn [[k v]] v) {:a 1 :b 2})) ;; works
(r/
What version of neo4j are you using?
For your swap! you are mixing transients and atoms
(swap! id-map #(assoc! % res id))
should be:
(swap! id-map assoc res id)
The swap! fn will apply the value of the atom id-map to the fn as the first
argument, followed by the remaining arguments, and then se
Hi all,
I am trying to figure out a better way to loop the following map than using
nested doseq. The map has the following structure:
(def m
> {"outerKeyA" {:innerKeyA {"string id" {:foo 1 :bar 2}}}
>"outerKeyB" {:innerKeyB {"string id" {:bar 5 :baz 10)
So, right now i am doing the
I was going to type in the example with multiple bindings, but this
will probably be more helpful:
http://blog.jayfields.com/2013/05/clojure-combining-calls-to-doseq-and-let.html
On Tue, Dec 3, 2013 at 6:05 PM, Ryan wrote:
> Hi all,
>
> I am trying to figure out a better way to loop the following
Seems to me that you can make a case for "a seq is sort of like an
immutable PersistentIterator would be".
Iterator -> next (get object)
seq -> first (get object)
Iterator -> next (mutate to point to next object)
seq -> next (return new seq whose first is next object)
On Tue, Dec 3, 2013 at
Tree-seq? But then, if the data is structured so each level has a distinct
purpose, that's not really a great fit.
Perhaps we need a for/doseq analog of assoc-in, update-in, etc.?
At the very least I think this might work:
(doseq [[outer-keys collections] m
[collection-name collection] c
`update-in` could be helpful, depending on what exactly you're doing.
(doseq [keyA keys, keyB otherkeys]
(update-in m [keyA keyB] some-function))
On Tuesday, December 3, 2013 6:05:14 PM UTC-5, Ryan wrote:
>
> Hi all,
>
> I am trying to figure out a better way to loop the following map than
> u
Hi all,
I'm fairly new to clojure (a few months), but not new to lisp or indeed
functional languages in general and I have around 10 years of experience
programming dynamic languages in general.
I've recently been using luminus to build a RESTful web API and I've been
honestly surprised by how
CRUD against an SQL database is not imo the sweet spot for Clojure, at
least not if you're comparing it against things like Rails or Django. With
most of the NoSql stores out there, there's a Clojure client that let's you
basically say, "Here's a map, upsert it," which is essentially what you ca
Don't you need to supply a combiner for fold? /no-experience
--
--
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 you
Take a look at Liberator, which is specifically designed for building
REST APIs - but bear in mind the mindset of the Clojure community is
generally to compose several libraries to create the specific solution
you need, rather than having any "full stack" frameworks.
That said, 14 hours to create
Hi Sean,
On Wednesday, December 4, 2013 12:03:45 AM UTC, Sean Corfield wrote:
>
> Take a look at Liberator, which is specifically designed for building
> REST APIs
I did have a quick look at liberator earlier but by that time i'd scratched
most of my itch with compojure. I do intend to look in
On Tuesday, December 3, 2013 3:26:53 PM UTC-8, James Laver wrote:
> So, am I missing something? Are there any libraries people can recommend
> that will make my life easier? Am I just looking at this in completely
the wrong way?
It sounds like half of your problems are arising from DB migrations.
On Tue, Dec 3, 2013 at 4:20 PM, James Laver wrote:
> I did have a quick look at liberator earlier but by that time i'd scratched
> most of my itch with compojure. I do intend to look into it in more depth
> though since there's a lot of application left to write.
Yes, there's a lot of detail in R
My 2c on this :
We are doing similar things at my current client - with less pain. I
suspect you've been unlucky in your choice of libraries, and maybe
expecting more than you get in clojure's ecosystem - ruby, python etc have
been around a lot longer, and with a lot more focus on database use.
We
Did you look at Caribou? It seems more like a "complete" solution -
http://let-caribou.in
David
On Tue, Dec 3, 2013 at 6:26 PM, James Laver wrote:
> Hi all,
>
> I'm fairly new to clojure (a few months), but not new to lisp or indeed
> functional languages in general and I have around 10 years
On Wed, Dec 4, 2013 at 7:00 AM, Sean Corfield wrote:
>
> As Phil says, rolling your own migrations, native to Postgres, is
> probably the best way to go in that area. At World Singles, we use
> external SQL files with a prefix indicating DB "level" and an
> indicator of dev vs prod migration, and
On Tuesday, December 3, 2013 8:48:34 PM UTC-8, Korny wrote:
>
> * Compojure for routing, and static resources - the only middleware we had
> to write was for advanced json parsing
>
What is advanced json parsing?
--
--
You received this message because you are subscribed to the Google
Group
Ah! And you just missed the survey.
;-)
On Tuesday, December 3, 2013 4:20:52 PM UTC-8, James Laver wrote:
>
> Part of the 14 hours has been a learning curve for the libraries involved.
> I also seem to have spent rather too patching what I perceive to be holes
> where facilities should be in th
I dislike all the migration libraries, because they all make migrations
super complex for what I usually want to do. Wrote my own based of some
code Phil Hagelberg pointed me to months ago:
https://github.com/runa-dev/kits/blob/master/src/kits/db_migrator.clj
On Tue, Dec 3, 2013 at 9:21 PM, Bria
Hi,
I see that the repeated-type requires a constant repeat count. Are you
planning to include a more dynamic version à la Gloss prefixes/headers?
The lib looks really nice. Binary handling libraries are really helpful.
Thanks,
Cesar Canassa
On Mon, Dec 2, 2013 at 7:09 PM, Alex P wrote:
> I
22 matches
Mail list logo