I created a ticket and posted a patch:
http://dev.clojure.org/jira/browse/CLJ-1613
On 12 December 2014 at 08:35, Michał Marczyk michal.marc...@gmail.com wrote:
(let [foo 1
bar 2
{:keys [bar foo]
:or {foo 3 bar (inc foo)}} {}]
{:foo foo :bar bar})
;= {:foo 3, :bar
Lucas,
Thanks for kicking off the discussion - great to see your proposal on this.
I think it will be really valuable if we can converge on a standard way of
representing this kind of data in Clojure/ClojureScript. Copying the
Incanter and main Clojure groups as well because I think there will
Hi all,
a short question from a newbie. I have a data structure like:
mytitle1; 2015-02-01
mytitle2; 2015-03-12
;2015-03-28
mytitle3; 2015-01-12
and want something like this
[{:title mytitle1 :events [{:date 2015-02-01}]}
{:title mytitle2 :events [{:date 2015-03-12} {:date 2015-03-28}]}
(def sample [mytitle1 2015-02-01
mytitle 2015-03-12
2015-03-28
mytitle3 2015-01-12])
;; Turns the map above into a map, skip this if you already have a map
(def working-set
(- sample
(partition 2) ;; Gives you
If you want to turn the CSV text into a string, you can either find CSV
decoders, or take a look at split-with
kl. 11:07:58 UTC+1 fredag 12. desember 2014 skrev Mathias Picker følgende:
Hi all,
a short question from a newbie. I have a data structure like:
mytitle1; 2015-02-01
mytitle2;
Hi Robin,
thanks for the example of reduce above! That was what I was looking for.
I will try it out once I'm at my desk again.
/ Mathias
--
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
Wow, I made a lot of mistakes.
It should of course reduce into [] (not {}) and then it should be conj
instead of assoc. I also made several spelling mistakes... Should
probably sleep more I guess :P
kl. 11:57:00 UTC+1 fredag 12. desember 2014 skrev Mathias Picker følgende:
Hi Robin,
Hi James!
You're right I wrote a lot about the relation between component
definition, update-system fn and system customization but very little
about BigBang...
Basically with the minimal code provided
https://github.com/milesian/BigBang/blob/master/src/milesian/bigbang.clj
(only
11LOC) I
and about ...something that's hard to do with just Component, and easy to
do with BigBang
in my last example
https://github.com/milesian/bigbang-example/blob/master/src/bigbang_example/core.clj#L60-L64
I could use 3 different library update-system actions in a specific start
sequence
I had started thinking about this problem recently too and also had broken
it down to two parts. I was going to create a simple data frame protocol
for a) and a ggplot2-inspired library which emits SVG for b). There is
prior work for plotting in Incanter (using JFreeChart) and David Liebke
core.match, an efficient pattern matcher for Clojure ClojureScript
New release version: 0.3.0-alpha1
## Dependency information
Maven pom.xml
dependency
groupIdorg.clojuer/groupId
artifactIdcore.match/artifactId
version0.3.0-alpha1/version
/dependency
Leiningen
Erg, Lein dep information should be the following of course:
Leiningen project.clj
[org.clojure/core.match 0.3.0-alpha1]
On Fri, Dec 12, 2014 at 12:54 PM, David Nolen dnolen.li...@gmail.com wrote:
core.match, an efficient pattern matcher for Clojure ClojureScript
New release version:
Looks awesome. Thanks David!
Reid
On 12/12/14 12:01, David Nolen wrote:
Erg, Lein dep information should be the following of course:
Leiningen project.clj
[org.clojure/core.match 0.3.0-alpha1]
On Fri, Dec 12, 2014 at 12:54 PM, David Nolen dnolen.li...@gmail.com wrote:
core.match, an
Hi all,
I'd like to use Clojure for processing Java annotations at compile time.
(Particularly useful for Android)
https://github.com/frankiesardo/icepick/blob/clojure/src/icepick/core.clj
I'm extending javax.annotation.processing.AbstractProcessor, I can create
the generated class, I can test
Just cut 0.3.0-alpha2, the only change is a fix for when fn
application patterns are nested in map/vector patterns.
David
On Fri, Dec 12, 2014 at 12:54 PM, David Nolen dnolen.li...@gmail.com wrote:
core.match, an efficient pattern matcher for Clojure ClojureScript
New release version:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
https://github.com/ghubber/bote
I have wrapped subethasmtp to allow to run a smtp server easily and
just catch e-mails as values as they are just messages instead of the
horrible configuration nightmares unix mail servers build around mail
Mathias,
I wrote a short article about building more complex reduce functions
here[1]. I wrote it mostly to reinforce my own knowledge. The bottom
section will be most relevant to you.
Hope it helps,
Jarrod
[1]: http://jarrodswart.com/articles/clojure-tutorial-reduce-functions
On Friday,
HI David,
- you're grouping your side-effecting code w/the code that generates the
diamond data structure here:
https://gist.github.com/ddellacosta/ba7e03951ba1bafd3ec9
While of course the diamond kata is a bit contrived and the point is to
print stuff out in the end, it also looks like
Hi guys, Does anyone know how to properly deal with refs in core.typed? I
am running into trouble. When I try to do stuff like this:
(ann my-ref (Ref1 (U Kw nil)))
(def my-ref (ref #{}))
I get this error:
IllegalArgumentException No value supplied for key: true
Hi David,
a style like I used in my solution which aims for readable conciseness
When I first looked at your code, just quickly scanning it, I felt that it
was nice and concise, but I find parameter names like 'len' and 'idx' terse
rather than concise.
In Venkat Subramaniam's words (in
2014-12-13 13:41 GMT+08:00 Jesse jesseluisd...@gmail.com:
Hi guys, Does anyone know how to properly deal with refs in core.typed? I
am running into trouble. When I try to do stuff like this:
(ann my-ref (Ref1 (U Kw nil)))
(def my-ref (ref #{}))
I get this error:
Thanks Di Xu. Good to know. I have joined the core.typed group and will
post my questions there from now on.
J
On Friday, December 12, 2014 11:41:43 PM UTC-6, Jesse wrote:
Hi guys, Does anyone know how to properly deal with refs in core.typed? I
am running into trouble. When I try to do
Hi Dave,
I think you would find it more natural to work line by line vs. the way
you constructed blocks and flipped them right/left, and you'd have less
code overall.
the problem I set myself was not to find a/the natural way to work, or to
write as little code as possible, but to
Hi David,
- Stylistically, I found your naming conventions to be too verbose
Do you mean you find the method and variable names too long?
Here was my first attempt at the diamond kata in Clojure (written in 40
minutes during a commute)
(defn print-diamond [letter]
(let [alphabet
Philip, one clarification--re: function with side-effects, I meant to link
here, which I followed up with in a later post, but I think it got lost in
the shuffle:
I think reasonable people can disagree on the details here--I think the
names I chose were good enough and would be understood by Clojure
programmers familiar with the standard data structures and core functions.
I should point out that some of these names are conventional in Clojure
land, for
26 matches
Mail list logo