Generally, if the map is behaving like small struct, and you are accessing
fields of it, (:keyword map) is idiomatic, and mirrors (.fields object).
If the map is used like a data-structure, or a mapping function, then (map
:keyword) is more idiomatic.
Note that if you are using defrecords,
a) If your map represents an record with fields (for instance if
it would make sense to also represent it as record via defrecord),
then use (:field map)
b) If your map is a collection of key/vals, then use (map key)
Rationale for a): it will allow better migration path if you use
defrecords at
Hello,
I'm working on a library that uses clojure.tools.logging, and I'm using
Leiningen 2 to build it.
If I include log4j in my project's :dev-dependencies, I get weird logging
output, e.g.:
Jan 29, 2013 8:45:31 PM clojure.tools.logging$eval373$fn__377 invoke
INFO: Hello
But if I include
For completeness sake...
Am Dienstag, 29. Januar 2013 10:31:18 UTC+1 schrieb lpetit:
Rationale for b): you have an existing map, but the key may or may not
be present. Note that you can also use the version which returns
default value if there's no key in the map: (map key default-value)
Hmm, perhaps I should RTFM. Apparently :dev-dependencies no longer exists
in lein2.
Adding this to my project.clj resolves the issue:
:profiles {:dev {:dependencies [[log4j 1.2.17]]}}
On 29 January 2013 21:24, Stuart Campbell stu...@harto.org wrote:
Hello,
I'm working on a library that uses
Wanted to let everyone know that I've released nio 0.0.4 on Clojars.
nio is a library that extends clojure.java.io support to the java.nio
classes. The 0.0.4 release adds two convenience functions for reading
and setting the byte order of ByteBuffers. You can find out details
and example usage at
Hi all,
I realise this may be a slightly naive question and my implementation is
certainly naive, however I'd like to see if anyone else has attempted
anything similar. Of course, by 'dynamic-programming' I 'm not referring
to dyncamic scope but to the statistical technique which divides
You have 3 choices, all supporting a -n optional default value:
1. (:kw m),
2. (m :kw),
3. (get m :kw)
If your keyword is literal, always pick #1.
So if your keyword is not literal then you are left with either (m x) or
(get m x) -- remember x is not litteral.
The later version will work with
I have programming Clojure for almost 2 years, for a living.
Emacs is highly recommended.
Emacs Lisp = lisp, Clojure is also Lisp. Emacs has special support for
Lisp than others.
As for intellj: I think it's quite good. Emacs is the perfect one.
On Monday, January 28, 2013 7:37:54 PM
On Tue, Jan 29, 2013 at 9:28 AM, Feng Shen shen...@gmail.com wrote:
I have programming Clojure for almost 2 years, for a living.
This is probably an important part of what answer the OP is looking
for. When I was doing Clojure for about 10% of my job IntelliJ was
fine. Now that it's 90% of my
Hello Jay,
I'd like to learn a little bit more from what makes you prefer emacs
over IntelliJ.
As the main developer of Counterclockwise, I'm I could learn some
ideas, if not lessons, from your experience.
Some questions and remarks inline:
2013/1/28 Jay Fields j...@jayfields.com:
I used
i don't know emacs, so i would like to know as well what the killer
features are that make you more productive with emacs
2013/1/29 Laurent PETIT laurent.pe...@gmail.com
Hello Jay,
I'd like to learn a little bit more from what makes you prefer emacs
over IntelliJ.
As the main developer of
On Jan 29, 2013, at 9:50 AM, Dennis Haupt d.haup...@gmail.com wrote:
i don't know emacs, so i would like to know as well what the killer features
are that make you more productive with emacs
With the caveat that I've not used Eclipse or IntelliJ for Clojure development…
one thing that I
On Jan 29, 2013, at 08:50, Dennis Haupt wrote:
i don't know emacs, so i would like to know as well what the killer features
are that make you more productive with emacs
Me two. More generally, I'm interested in features that DON'T require filling
my head with zillions of obscure key sequences.
Hello,
I have noticed a couple of things that I think are standard Clojure
symbols but that aren't specified in the API documentation. These are .
and _. It may be that they are more Java than Clojure (I don't know Java
at all) and are thus supposedly known. I run across _ all of the time
_ is not special, but it is the convention to use it as the name for
variables whose value is ignored.
On Tuesday, 29 January 2013 17:42:26 UTC, cej38 wrote:
Hello,
I have noticed a couple of things that I think are standard Clojure
symbols but that aren't specified in the API
On Jan 29, 2013, at 11:42 , cej38 junkerme...@gmail.com wrote:
Should these symbols be added to the documentation?
The dot is documented at http://clojure.org/java_interop#dot -- which you'll be
pointed to if you try (doc .) at a repl. It's also linked from
http://clojure.org/special_forms.
I worked with one of the first version of Emacs written in Teco on a DEC-20 in
the 80s
then on unixes and VMS computer. I still remember some key bindings but I need
to
resort to online help a lot to bring back key bindings in my working memory.
We use Eclipse/ccw but I think that the same
On Tue, Jan 29, 2013 at 11:45 AM, Laurent PETIT laurent.pe...@gmail.com wrote:
Hello Jay,
I'd like to learn a little bit more from what makes you prefer emacs
over IntelliJ.
As the main developer of Counterclockwise, I'm I could learn some
ideas, if not lessons, from your experience.
Sure,
Rich, almost all keystrokes have names you can use from M-x - if you
prefer that to keystrokes.
On Tue, Jan 29, 2013 at 11:59 AM, Rich Morin r...@cfcl.com wrote:
On Jan 29, 2013, at 08:50, Dennis Haupt wrote:
i don't know emacs, so i would like to know as well what the killer features
are that
Question: Is this emacs also good in other stuff such as
javascript/css/html/sql Most of my projects involve writing this as
well . Does anyone have a link to an up to date instructions on how to
setup emacs for clojure ? most of what i find are out of date... e.g some
talk of swank-clojure
On 29.01.2013 16:32, Jay Fields wrote:
On Tue, Jan 29, 2013 at 9:28 AM, Feng Shen shen...@gmail.com wrote:
I have programming Clojure for almost 2 years, for a living.
This is probably an important part of what answer the OP is looking
for. When I was doing Clojure for about 10% of my job
I use it for Clojure, html, css, js - no sql tho, so I can't comment
on that. Otherwise, everything is great.
I use emacs-live, which you can add to a vanilla emacs install and get
right started. All you need to nrepl-jack-in.
On Tue, Jan 29, 2013 at 1:21 PM, Josh Kamau joshnet2...@gmail.com
Thanks! Chris' protocol commit was very good. Made the runtime stuff faster
and extensible.
On Saturday, January 26, 2013 4:29:56 PM UTC-8, Curtis Gagliardi wrote:
Great use of macros, and I found Chris Granger's protocol commit
enlightening as well, thanks.
On Tuesday, January 22, 2013
Hey all,
Prismatic has open-sourced our Plumbing and Graph library on
githubhttps://github.com/prismatic/plumbing.
Jason Wolfe gave a
talkhttp://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.htmlabout
how we use graph for systems composition at Strange loop last year.
do you mean this happens from the beginning, or only after ie. 10 minute
of
running it(I mean, it only breaks down after a while)
also, is this code on github?
Yes, the app runs for a while. Sometimes it runs for only 10 minutes. Other
times it runs for an hour. But then, eventually, this
Thanks Jay... Emacs live looks funtastic... I will give emacs another try.
Josh
On Tue, Jan 29, 2013 at 9:48 PM, Jay Fields j...@jayfields.com wrote:
I use it for Clojure, html, css, js - no sql tho, so I can't comment
on that. Otherwise, everything is great.
I use emacs-live, which you
+1 emacs live
Id seriously discourage any Emacs newbie trying vanilla Emacs for Clojure
development.
Here, I'd also like to express my greatest appreciation to the creators for
publishing and maintaining it.
Las
Sent from my phone
On Jan 29, 2013 7:48 PM, Jay Fields j...@jayfields.com wrote:
unless the error happens at runtime after a while when you're sure that
code already got executed and worked, but only errs after a while,
in which case that would be weird.
That seems to be what happens. I am glad you think it is weird because I
found it very weird.
I am reaching for
It might be something like this(pasting here):
The problem is the hyphen in the namespace.
I think that causes problems at compile time, rather than runtime, but
there is a chance you are right, so I will go through and carefully change
all hyphens to underscores in all namespace
Graph was THE library I've been waiting for to be open sourced!
Yay, thanks!
Las
Sent from my phone
On Jan 29, 2013 7:57 PM, Aria Haghighi m...@aria42.com wrote:
Hey all,
Prismatic has open-sourced our Plumbing and Graph library on
githubhttps://github.com/prismatic/plumbing.
Jason
I think someone on this mailist recently said that an exception that occurs
in a thread is sometimes lost? That is, even if I put in a lot of pprint
statements or println statements* or (stack/print-stack-trace e)
expressions, and I just want it to show up in terminal, so I can debug it,
but
I've released a screencast on friend and using its interactive-form
workflow to create a login form.
http://www.clojurewebdevelopment.com/videos/friend-interactive-form
I've got more in various stages of completion, so I'd be interested in
hearing feedback.
Thanks,
Nelson Morris
--
--
You
Perfect. Not really a problem with multiple calls to require: I run
through the list when the app starts up, require each ns, then each ns
calls its own start function at the end to configure the required
hooks--all event-driven. It's never required again.
Thanks!
On Wednesday, January 23,
2013/1/23 Sean Corfield seancorfi...@gmail.com:
On Wed, Jan 23, 2013 at 12:13 AM, Mikera mike.r.anderson...@gmail.com wrote:
It requires the compilation of the namespace when it is loaded the first
time, but that isn't particularly bad and is only a one-off cost. If you
require the plugin
I don't see any threads in your Stack Overflow post.
I thought it would be over-complicated to include all of the code. But
inside my -main function I start a new thread and call the function that
calls the function that causes this error.
They are not lost. Unhandled exceptions cause
Jay Fields writes:
On Tue, Jan 29, 2013 at 11:45 AM, Laurent PETIT laurent.pe...@gmail.com
wrote:
Hello Jay,
I'd like to learn a little bit more from what makes you prefer emacs
over IntelliJ.
As the main developer of Counterclockwise, I'm I could learn some
ideas, if not lessons, from
On Jan 29, 2013, at 4:56 PM, Michael Klishin wrote:
2013/1/30 larry google groups lawrencecloj...@gmail.com
That is good to know. I have the top level function call wrapped in a
try/catch block, but I suppose I'll get better results if I do more of the
try/catch at a lower level, closer
Am 29.01.2013 23:05, schrieb Phil Hagelberg:
Jay Fields writes:
On Tue, Jan 29, 2013 at 11:45 AM, Laurent PETIT laurent.pe...@gmail.com
wrote:
Hello Jay,
I'd like to learn a little bit more from what makes you prefer emacs
over IntelliJ.
As the main developer of Counterclockwise, I'm
On Tue, Jan 29, 2013 at 2:21 PM, Dennis Haupt d.haup...@gmail.com wrote:
you can do repl driven development with intellij as well i think.
I'm pretty sure Phil meant you can modify your editor (Emacs) using a
REPL-driven approach - which is not true of IntellIj.
--
Sean A Corfield -- (904)
On Jan 29, 2013, at 14:05, Phil Hagelberg wrote:
While it's great to list features, the specific features really aren't
the point--the point is that new features can be added with very little
friction. ...
This begs the question: what would be the lowest amount of friction that
we should try
I could define repl driven development in a lot of ways. If I'm in a
clj file is there an easy way to evaluate a sexp in the context of the
repl? Just having a repl that I cut and paste from is not a similar
experience.
Sent from my iPhone
On Jan 29, 2013, at 5:21 PM, Dennis Haupt
On Tue, Jan 29, 2013 at 1:39 PM, Laurent PETIT laurent.pe...@gmail.com wrote:
2013/1/23 Sean Corfield seancorfi...@gmail.com:
I recall a thread recently that said 'require' hits the disk every
time, even if the ns is already loaded. Did that get fixed and, if so,
when?
Yes, fixed in RC2 (at
On Jan 29, 2013, at 5:28 PM, Rich Morin wrote:
This begs the question: what would be the lowest amount of friction that
we should try for? One answer, it seems to me, is that there should be
an easy way to add features _using Clojure_. I realize that this would
not be a general solution,
On Tue, Jan 29, 2013 at 2:16 PM, László Török ltoro...@gmail.com wrote:
Graph was THE library I've been waiting for to be open sourced!
Yay, thanks!
+1 to that! Thanks so much!
--
In Christ,
Timmy V.
http://blog.twonegatives.com/
http://five.sentenc.es/ -- Spend less time on mail
--
--
Amazing work Prismatic team, is there a plan to release Flop?
http://lanyrd.com/2012/clojurewest/spdfg/
Thanks!
Ronen
On Tuesday, January 29, 2013 8:46:54 PM UTC+2, Aria Haghighi wrote:
Hey all,
Prismatic has open-sourced our Plumbing and Graph library on
Yes, we'll be releasing flop soon.
On Tuesday, January 29, 2013 4:49:45 PM UTC-8, ronen wrote:
Amazing work Prismatic team, is there a plan to release Flop?
http://lanyrd.com/2012/clojurewest/spdfg/
Thanks!
Ronen
On Tuesday, January 29, 2013 8:46:54 PM UTC+2, Aria Haghighi wrote:
Hey
Great!
Thanks again
Ronen
On Wednesday, January 30, 2013 2:53:06 AM UTC+2, Aria Haghighi wrote:
Yes, we'll be releasing flop soon.
On Tuesday, January 29, 2013 4:49:45 PM UTC-8, ronen wrote:
Amazing work Prismatic team, is there a plan to release Flop?
On Thursday, January 24, 2013 12:56:59 PM UTC-5,
sampso...@googlemail.comwrote:
Apparently installing a development environment for Clojure on Windows 7
is very difficult. What is the best way, that has a chance that it might
work?
I just wanted to repeat the link that Phil
I am pleased to announce that nrepl.el v0.1.6 has been released, and is now
available on marmalade.
Preview versions of the next release are available on Melpa.
See the Readme on github (https://github.com/kingtim/nrepl.el) for
installation and usage instructions.
Notable changes since our last
Very strange. I just switched back to my home computer. I wanted to
get all the work I had done at work this last week, so I did git pull
origin master to pull it down from github. I have not used my home
computer in a week. Then I ran lein uberjar:
lein uberjar
Retrieving
just guessing here, but is it maybe that one of the deps of your project
was (also?) updated and it's using that clojure ? I'm thinking just in case
you have something like version x.y.z-SNAPSHOT of a dep, if nothing with
SNAPSHOT then it's probably not the case. I couldn't reproduce this with a
2013/1/29 Rich Morin r...@cfcl.com:
On Jan 29, 2013, at 14:05, Phil Hagelberg wrote:
While it's great to list features, the specific features really aren't
the point--the point is that new features can be added with very little
friction. ...
This begs the question: what would be the lowest
2013/1/29 Jay Fields j...@jayfields.com:
I could define repl driven development in a lot of ways. If I'm in a
clj file is there an easy way to evaluate a sexp in the context of the
repl? Just having a repl that I cut and paste from is not a similar
experience.
Of course CCW does that for
`lein deps :tree` will show you the tree of dependencies, and you can see
which of your dependencies has a bad dependency specification overriding
the one in your project.clj. Typically it turns out a dependency is saying
something like I must have the very latest Clojure, whatever that is,
As more and more projects are using edn format for config,
communication and etc, I think that default value of *read-eval*,
which is true, is source of vulnerability such as recently reported
ring issue [1].
And I don't understand why read-string depends on *read-eval* instead
of argument.
I
Hi,
Am Mittwoch, 30. Januar 2013 07:54:36 UTC+1 schrieb Alan Malloy:
`lein deps :tree` will show you the tree of dependencies, and you can see
which of your dependencies has a bad dependency specification overriding
the one in your project.clj. Typically it turns out a dependency is saying
Try:
lein deps :tree
It sounds like one of your dependencies uses ranges?
Sean
On Tue, Jan 29, 2013 at 9:16 PM, larry google groups
lawrencecloj...@gmail.com wrote:
Very strange. I just switched back to my home computer. I wanted to
get all the work I had done at work this last week, so I
58 matches
Mail list logo