Hi,
There's a brief transcript of a conversation with Tassilo under the ns.
He also wrote a nice blog post on the technique
http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/
Thanks,
Ambrose
On Mon, Mar 11, 2013 at 12:21 PM, JvJ kfjwhee...@gmail.com
I don't think you will be able to do a parallel fold on a lazy-seq which
is what clojure.data.xml/parse returns. Vectors are the only persistent
collection that supports parallel fold and something tells me it's
because they are NOT lazy...
why can't you 'vec' the result of xml/parse and then
So I understand that:
(- foo bar wibble)
is equivalent to
(wibble (bar (foo)))
With the advantage that the latter version is better, in the sense that
it's clearer what the final result is (the result of the call to wobble).
What I don't understand is the need for - the only thing it seems
The idea is to transform into a lazy sequence of eager chunks. That
approach should work.
On Monday, March 11, 2013 11:40:01 AM UTC+1, Jim foo.bar wrote:
I don't think you will be able to do a parallel fold on a lazy-seq which
is what clojure.data.xml/parse returns. Vectors are the only
For the sake of nitpicking, you are still using camelCase instead of
hyphenation in make-student.
On 11 March 2013 02:18, Craig Ching craigch...@gmail.com wrote:
Alright, thanks Gary and Marko, I really appreciate the advice!
On Sunday, March 10, 2013 8:26:47 AM UTC-5, Marko Topolnik wrote:
I wouldn't say imperative, rather pipelined. - can be used to represent a
deeply nested expression as a pipeline.
On 11 March 2013 13:58, edw...@kenworthy.info wrote:
So I understand that:
(- foo bar wibble)
is equivalent to
(wibble (bar (foo)))
With the advantage that the latter
On Monday, March 11, 2013 12:03:59 PM UTC+1, Michael Klishin wrote:
2013/3/11 edw...@kenworthy.info javascript:
What I don't understand is the need for - the only thing it seems to do
is make something Lispy appear to be imperative.
Is that it?
When you have longer chains of functions,
On Monday, March 11, 2013 2:18:32 AM UTC+1, Craig Ching wrote:
Ok, I *think* I understand what you're saying. I did try an anonymous
function at one point, but gave it up, I don't know why I did because it
ended up working pretty well after reading your advice. How's this then?
(defn-
Fixed, thanks.
Stu
On Sun, Mar 10, 2013 at 7:28 PM, ke.mar...@gmail.com wrote:
I think there's a typo in the download link on
http://clojure.org/downloads:
It says http://repo1.maven.org/maven2/org/clojure/clojure/1.5.*0*
On 2013-03-11, at 6:58 AM, edw...@kenworthy.info wrote:
So I understand that:
(- foo bar wibble)
is equivalent to
(wibble (bar (foo)))
With the advantage that the latter version is better, in the sense that it's
clearer what the final result is (the result of the call to wobble).
Hi Gary,
On Monday, March 11, 2013 6:02:12 AM UTC-5, Gary Verhaegen wrote:
For the sake of nitpicking, you are still using camelCase instead of
hyphenation in make-student.
This part?
{:id (str teacher-name ! student-name)
:TeacherName teacher-name
:StudentName
On Monday, March 11, 2013 6:35:09 AM UTC-5, Marko Topolnik wrote:
This kind if formatting hurts readability for people used to the style
that most Clojure code adopts, which would look something like this:
(defn- make-student [teacher-name student-name age]
{:id (str teacher-name !
On 11 Mar 2013, at 10:40, Jim foo.bar jimpil1...@gmail.com wrote:
why can't you 'vec' the result of xml/parse and then use fold on that? Is it
a massive seq?
In my case, it's the Wikipedia XML dump, so around 40GiB (so no, that wouldn't
work :-)
--
paul.butcher-msgCount++
Snetterton,
On 11 Mar 2013, at 11:00, Marko Topolnik marko.topol...@gmail.com wrote:
The idea is to transform into a lazy sequence of eager chunks. That approach
should work.
Exactly. Right - I guess I should put my money where my mouth is and see if I
can get it working...
--
paul.butcher-msgCount++
Hello everyone,
on march 29th I'm moving from Milan (Italy) to Boston and I'm going to stay
there for a month. During that month I'm pretty sure I'm going to visit NYC for
few days. It would be an honor for me to have the opportunity to meet any
clojurean living in Boston and NYC. There few
The Clojure NYC meetup gets together about once a month:
http://www.meetup.com/Clojure-NYC/
On Mon, Mar 11, 2013 at 10:06 AM, Giacomo Cosenza
mimmo.cose...@gmail.comwrote:
Hello everyone,
on march 29th I'm moving from Milan (Italy) to Boston and I'm going to
stay there for a month. During
The Boston Clojure group is very healthy, engaging, and enjoyable:
http://www.meetup.com/Boston-Clojure-Group/
And, if you get out further my way, we'd love to have you as a guest at the
Functional Programmer Connoisseurs:
http://www.meetup.com/Functional-Programming-Connoisseurs/
Cheers,
-
But to understand the first you have to expand it into the second- which
means understanding the arcane squiggle - and how it differs from the
equally arcane squiggle -. Nasty, sticky, syntactic sugar :)
I suspect that early on, still being a Clojure noobie, I'll stick with the
'proper' Lisp
I'm with you. I don't like it personally. Every time I come across it
reading code I have to stop and think about what exactly it does.
On Monday, March 11, 2013 10:00:13 AM UTC-5, edw...@kenworthy.info wrote:
But to understand the first you have to expand it into the second- which
means
On 11/03/13 15:08, Dave Kincaid wrote:
I'm with you. I don't like it personally. Every time I come across it
reading code I have to stop and think about what exactly it does.
I didn't use to like it either but after coding rubik's cube I've come
to appreciate it more...imagine this:
(-
Consistency in any code base matters, so if you're going to thread, thread in
similar scenarios.
For me it's kind of like coffee. It's an acquired taste.
'(Devin Walters)
On Mar 11, 2013, at 10:14 AM, Jim foo.bar jimpil1...@gmail.com wrote:
On 11/03/13 15:08, Dave Kincaid wrote:
I'm with
- and - are for some reason really hard to grasp for
many when starting out - me included.
On Mon, Mar 11, 2013 at 11:58 AM, edw...@kenworthy.info wrote:
So I understand that:
(- foo bar wibble)
is equivalent to
(wibble (bar (foo)))
Correct, but that misses the point. Thinking about -
I wrote a post about - and - a few years ago that might be helpful.
http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/
--
--
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
- can also be used in conjunction with a well designed DSL to
construct values in a very readable fashion. clj-time has some great
examples of this:
http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-from-now
(- 30 minutes from-now)
I just added aliasing support. This way you can have interface keywords
and depend on those. Then instead of redefining all functions to use a
different key, you just change the alias.
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Hey,
I got an assignment to implement an algorithm to calculate strongly
connected components in a graph (
http://en.wikipedia.org/wiki/Kosaraju's_algorithm). The graph is rather
big, it has ~900.000 vertices.
In its first pass, it needs to do a depth-first search on the graph and
Hello,
I have two lists which contain java objects of the same class. I am trying
to find out if there is a clojure function which i can use to compare those
lists based on a key and return the objects from list A that do not exist
in list B.
Is there such a function in clojure? If not, what
Thanks for pointing out the conversation! It helps. So did the article.
All this logic programming makes my brain hurt... but in a good way.
On Monday, 11 March 2013 06:11:30 UTC-4, Ambrose Bonnaire-Sergeant wrote:
Hi,
There's a brief transcript of a conversation with Tassilo under the ns.
Well, java.util.List specifies a retainAll(Collection c) method which is
basically the intersection between the 2 collections (the Collection
this is called on and the argument). You are actually looking for the
'difference' but if you have the intersection and the total it's pretty
trivial to
On 11/03/13 18:35, Jim - FooBar(); wrote:
Well, java.util.List specifies a retainAll(Collection c) method which
is basically the intersection between the 2 collections (the
Collection this is called on and the argument). You are actually
looking for the 'difference' but if you have the
Also, since I can't find the function lvar-in?, I'm assuming it works
something like this:
(defn lvar-in?
[a x]
(lvar? (walk a x)))
On Monday, 11 March 2013 14:34:12 UTC-4, JvJ wrote:
Thanks for pointing out the conversation! It helps. So did the article.
All this logic programming
Hey Jim,
Thanks for your replies for starters.
Indeed I do not care what will happen to the original lists, i only care to
find out which objects from list A do not exist in list B. Ignore the key
part.
I was aware of the functionality which is provided by java.util.List but I
was hoping for
There is clojure.data/diff, but whether it would work for you would depend on
whether Clojure's = would compare your Java objects for equality in the way
that you wanted. You could try it out on some test case to see.
http://clojure.github.com/clojure/clojure.data-api.html#clojure.data/diff
Clojure itself is being pragmatic about many many things... If you want
removeAll() then use it...what can be better than a single method call?
mind you though, what Andy said applies here. It depends what you want
to compare for...you want to do a 'deep' comparison (per =) or fall back
to
That's what the web ui expects (I'm not really using teachers and
students, but the actual data we do use is camel case) and there's actually
a really good reason it uses what it uses. I'll make sure I didn't miss
any others though, thanks!
You still have the option that I've
On Monday, March 11, 2013 4:00:13 PM UTC+1, edw...@kenworthy.info wrote:
But to understand the first you have to expand it into the second- which
means understanding the arcane squiggle - and how it differs from the
equally arcane squiggle -. Nasty, sticky, syntactic sugar :)
I suspect
Hi,
I'm not sure who to contact for this, so I guess this is the best medium.
In Belgium we are starting up de first Belgian clojure user group. This
month our first meetup will take place.
Information can be found here: http://lanyrd.com/2013/belgiumclj/
We would like to create a website
I have two lists which contain java objects of the same class. I am trying
to find out if there is a clojure function which i can use to compare those
lists based on a key and return the objects from list A that do not exist
in list B.
Lists as in Clojure lists, or as in
Another approach, preserving the order of list-a, would be
(remove (comp (into #{} (map key-fn list-b)) key-fn) list-a)
On Monday, March 11, 2013 10:01:09 PM UTC+1, Marko Topolnik wrote:
I have two lists which contain java objects of the same class. I am trying
to find out if there is a
On Mar 11, 2013, at 14:00, Thomas Goossens wrote:
In Belgium we are starting up de first Belgian clojure user group. ...
We would like to create a website that will be all about clojure in
Belgium: meetups, jobs, stories. But we also need a domain name.
So I was wondering whether I could
David Powell writes:
I've made installers for clojure-based programs using InnoSetup
before, and wouldn't mind doing it if people think it is a good idea.
If someone contributes a wizard-builder that I can run on my Debian
system, I can run it as part of the release process and store the
One exists here: http://dev.clojure.org/display/community/Clojure+User+Groups
Cheers,
--
'(Devin Walters)
On Monday, March 11, 2013 at 4:19 PM, Rich Morin wrote:
On Mar 11, 2013, at 14:00, Thomas Goossens wrote:
In Belgium we are starting up de first Belgian clojure user group. ...
Martin Jul writes:
An alternative to GNU tools is to use the things that ship with
Windows PowerShell and are on most developer's machines already, e.g.
using the Invoke-RestMethod commandlet as an alternative to wget and
curl.
So the latest version of bin/lein (which will become 2.1.0)
I assume this has been discussed to death already, but isn't there some way
to get clojure-doc and clojuredocs to live under the same umbrella?
Another idea I'd like to throw out there:
I have the domains getclojure.org/com. Since clojure-doc.org is all about
getting clojure, it seems like it
Thank you all for your replies.
@Marko, well, at first my question was intended to be more generic, but in
reality I am dealing with two java.util.Lists
I probably didn't described very well what I wanted in the first place. All
the objects in those lists contain an id property which has a
On Monday, March 11, 2013 10:55:12 PM UTC+1, Ryan wrote:
Thank you all for your replies.
@Marko, well, at first my question was intended to be more generic, but in
reality I am dealing with two java.util.Lists
I only asked because if they aren't java.util.Lists to begin with, you'd
Devin Walters writes:
I assume this has been discussed to death already, but isn't there some way
to get clojure-doc and clojuredocs to live under the same umbrella?
I believe this is the plan; it's just blocked on not having the manpower
to port clojuredocs.org's web UI off Rails and build
I only asked because if they aren't java.util.Lists to begin with, you'd
definitely not want to convert into one just to use removeAll.
What if, i had two clojure lists, with hash-maps which have the same keys
and based on a specific key, i wanted to find the items from list-a which
do
On 11/03/13 21:55, Ryan wrote:
I probably didn't described very well what I wanted in the first
place. All the objects in those lists contain an id property which
has a unique value. I am trying to find out, which objects from the
first list, based on that id property, are not included in list
In addition to clj-time, I tend to use - with date-clj as well:
(- (today)
(subtract 30 :days))
And I find something like this:
(- (- response :body :postalCodes)
(map to-location) (sort-by :city))
much easier to read than:
(sort-by :city (map to-location
I don't see why this should be arcane.
it is quite simple to understand. but yes, you do have to understand it.
like anything.
this is good sugar...probably a fructose derivative...
On Tuesday, 12 March 2013 02:00:13 UTC+11, edw...@kenworthy.info wrote:
But to understand the first you have
@Dave Sann: Yup, I like it, it must be good sugar. I find it makes the code
much more readable.
On Tuesday, March 12, 2013 8:05:40 AM UTC+6, Dave Sann wrote:
I don't see why this should be arcane.
it is quite simple to understand. but yes, you do have to understand it.
like anything.
Has this effort started up yet? Is there a github url?
I'd really love to see clojuredocs.org showing the 1.5 apis. Willing to
help make that happen!
On Tuesday, March 12, 2013 12:03:22 AM UTC+2, Phil Hagelberg wrote:
Devin Walters writes:
I assume this has been discussed to death
I also found clojure-doc.org accidentally, and was surprised it didn't show
up in earlier searches, especially in the context of the high quality of
the documentation.
I think merging the two resources (clojuredocs and clojure-doc) would
greatly help (I'd be happy to help in this effort), and
54 matches
Mail list logo