Thank you Mars0i!!
I have a first edition copy of JOC and really like the way it just lays
things out for you. I am hesitating to buy the 2nd edition, though, due to
the hefty price-tag, though I am curious about logic programming and data.
Would you say it is worth the money?
I am now
Thanks Andrew and Gary. You've saved me a lot of time!
On Friday, 2 May 2014 02:43:51 UTC+1, Gary Trakhman wrote:
Oh, nice, I was concerned about reconnections and backfill issues, if I
have to change anything substantial again I'll reimplement on top of the
java api that provides this out
in case you are not aware of it https://github.com/clojure/tools.trace may
already do just what you want.
but if not, then how about this show fn takes a symbol as arg? that is how
tools.trace/trace-vars does it.
On Friday, May 2, 2014 3:28:49 AM UTC+1, Erlis Vidal wrote:
Hi guys,
I want
Thanks for that great work ! Reminds me of similar techniques in the
context of logic programming : http://www.info.ucl.ac.be/~pvr/edcg.html :)
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Exactly!
By the way, I posted the same
questionhttp://stackoverflow.com/questions/23415815/more-functional-way-to-do-thisto
stackoverflow.
A. Webb seems to agree with Steve, showing a version using reduced.
Thank you for the response, guys!
On Friday, May 2, 2014 1:38:09 AM UTC+5:30, Guru
That is NOT what I said. Please go back and read my response more
carefully.
Apologies, guess I disagree only with Gregg on that point then.
Anyway, I think speculating about the necessity of such a
documentation system is not the best thing to do - I suggest we give it a
try,
Hi,
The steps to run on Heroku have been elaborated in the README, including
setting up the database:
https://github.com/thegeez/clj-crud/blob/master/README.md
I've also disabled the ability to change the name of the Admin account, so
the Admin/admin login stays valid.
-Gijs
On Thursday,
You need to pass not the function itself, but its Var. Because Vars are the
ones that hold metadata.
(show #'elementary/nothing-but-the-truth true)
On Friday, May 2, 2014 4:28:49 AM UTC+2, Erlis Vidal wrote:
Hi guys,
I want to write a function (show) that will receive a function as
You could implement show as a macro that resolves the var before calling
the fn:
(defmacro show [f args]
(let [f-var# (resolve f)]
`(let [r# (~f ~@args)]
(println ~f-var# r#
user (show + 1 2)
#'clojure.core/+ 3
- Toby
unlo...@bytopia.org writes:
You need to pass not the
A simpler version:
(defmacro show [f args]
(let [f-var# (resolve f)]
`(println ~f-var# (~f ~@args
On Friday, May 2, 2014 8:04:30 AM UTC-4, Toby Crawley wrote:
You could implement show as a macro that resolves the var before calling
the fn:
(defmacro show [f args]
(let
Wow,
Thank you all!
I'll try all the proposal but I think I'll use the tool.trace recommended
by Henry.
On Fri, May 2, 2014 at 8:08 AM, Toby Crawley t...@tcrawley.org wrote:
A simpler version:
(defmacro show [f args]
(let [f-var# (resolve f)]
`(println ~f-var# (~f ~@args
I've been trying out my code in both Clojure http://tryclj.com/ and
ClojureScript http://clojurescript.net REPLs.
1. Ratio not being a type in js might cause inconsistencies if not used
carefully. (for eg in a web app that uses both clj and cljscript)
2. Lazy sequences in Clojure are lazy in
On Thu, May 1, 2014 at 9:49 PM, Sean Corfield s...@corfield.org wrote:
On Apr 30, 2014, at 4:08 PM, Val Waeselynck val.vval...@gmail.com wrote:
As for what Gregg and Sean objected - that Clojure code is
self-sufficient as documenting itself - I have to simply disagree.
That is NOT what I
On Fri, May 2, 2014 at 4:00 AM, Val Waeselynck val.vval...@gmail.comwrote:
That is NOT what I said. Please go back and read my response more
carefully.
Apologies, guess I disagree only with Gregg on that point then.
I guess this illustrates a point that is usually overlooked: no matter
Nice to know about the 7 models book. I wasn't aware of it. I can't give
you an opinion about JoC 2nd vs. 1st ed., though. I haven't read either
thoroughly. I only got the first edition when I bought the pre-release 2nd
edition package last fall. I don't have an e-reading platform that I
I have a sequence from a call to 'sort'.
I want a list.
What is the best way to do this?
(apply list (sort ...))?
Will it have problems on large sequence inputs?
I can't use (into () (sort ...))
since that conjoins and ruins the sort order.
--
You received this message because you are
Hi Dave
Sorry if I didn't get it, but doesn't sort already return a list?
Could explain?
Plínio
On Fri, May 2, 2014 at 11:53 AM, Dave Tenny dave.te...@gmail.com wrote:
I have a sequence from a call to 'sort'.
I want a list.
What is the best way to do this?
(apply list (sort ...))?
I believe what he wants is a persistentlist. You could get one from (apply
list) or more succinctly/esoterically (list* ..)
Sort returns a seq view over the array returned by java.util.Array.sort()
(defn sort
Returns a sorted sequence of the items in coll. If no comparator is
supplied,
Ah, scratch that, list* returns a seq as well.
On Fri, May 2, 2014 at 11:07 AM, Gary Trakhman gary.trakh...@gmail.comwrote:
I believe what he wants is a persistentlist. You could get one from
(apply list) or more succinctly/esoterically (list* ..)
Sort returns a seq view over the array
I have been curious about this too. I was playing around with it a few
weeks ago and came up with this:
https://github.com/cprice404/clj-shared-test-sandbox/blob/master/test/shared_tests_foo/core_test.clj
Which is pretty gross; it uses `binding` + a dynamic var in the shared test
namespace,
Sort returns a seq, but not necessarily something for which list? is true.
On Fri, May 2, 2014 at 11:01 AM, Plínio Balduino pbaldu...@gmail.comwrote:
Hi Dave
Sorry if I didn't get it, but doesn't sort already return a list?
Could explain?
Plínio
On Fri, May 2, 2014 at 11:53 AM, Dave
Hi!
I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace.
When I run `(tools.namespace.repl/refresh)` from within vim via fireplace,
it usually (perhaps always) works the first time. Say there is a simple
error like a misspelled word. The second time I try to run
And to be clear, the fireplace issues that I found when searching for a
solution have all been fixed and closed.
On Friday, May 2, 2014 6:06:59 PM UTC+2, Oskar Kvist wrote:
Hi!
I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace.
When I run `(tools.namespace.repl/refresh)` from
Thanks. I did something similar. I have different implementations per db,
so use a global *db* var:
(ct/deftest run-tests
(matrix1)) ; matrix1 tests against *db*
(ct/deftest test-h2
(binding [*db* (h2/create-db2 test {:subprotocol h2:mem})]
(run-tests)))
(defn test-ns-hook []
(Just as an aside, there is a conference called Write the Docs.
see http://writethedocs.org)
The only way to find out is to read the code - that is, the algorithm,
not just the names. (This code was documented, by the way.) In my
experience clashes between the natural language semantics of
On 2 May 2014, at 10:08, d...@axiom-developer.org wrote:
(Just as an aside, there is a conference called Write the Docs.
see http://writethedocs.org)
The only way to find out is to read the code - that is, the
algorithm,
not just the names. (This code was documented, by the way.) In my
You can use the `testing` macro and wrap it in a function, which accepts
your type/protocol implementation or even individual protocol methods as
args. Example here:
https://github.com/thi-ng/geom/blob/master/test/core.org#callable-contexts
On 2 May 2014 18:08, Brian Craft craft.br...@gmail.com
How Programmers Comment When They Thin Nobody's Watching
http://www.cgl.uwaterloo.ca/~commenting
Documentation is essential to software development. Experienced
programmers know this well from having worked with poorly
documented code. They wish to improve their documentation
techniques and
Wow, I never would have figured that out from the docs. Thanks.
Just found a different problem with my solution: nested tests, as described
in the docs, prevent the use of fixtures. You have to add test-ns-hook when
using nested tests, and then fixtures aren't run.
On Friday, May 2, 2014
On 2 May 2014 18:08, d...@axiom-developer.org wrote:
Writing just the code is about as effective as a book containing
only the physics equations with no text, correct but opaque.
A physics equation doesn't completely describe a system. A program does.
Any software designer worth his title
Hi, Sindhu.
The problem is in how you've specified the org.apache.hadoop/hadoop-core
dependency (I just ran into this
myselfhttps://github.com/paxan/ccooo/pull/1very recently). It
shouldn't be in the
:dev profile, it should be in the :provided profile. This should work for
you:
(defproject
The non-standard license might make using this library difficult to use for
some companies. You may want to consider using an existing open source
license that's broadly similar, such as MIT.
- James
On 2 May 2014 09:00, Fabien Todescato fabien.todesc...@gmail.com wrote:
Thanks for that great
Suppose one is using seesaw, and wants to have a canvas with lots of
images and whatnot drawn inside it. The github examples pretty well
cover that. However, what if you want the paint function to behave
differently depending on some data elsewhere? (For example, the canvas
is supposed to be a
Someone asked something similar on reddit and my response had a couple
examples of rendering app state:
http://www.reddit.com/r/Clojure/comments/23uweq/watchers_and_paint_and_repaint_oh_my/ch7iw4s
Hope this helps,
Dave
On Fri, May 2, 2014 at 1:27 PM, Christopher Howard
dohI had set up the database but hadn't run the migration. Thank you
Gjis!
On Friday, May 2, 2014 5:11:55 AM UTC-5, Gijs S. wrote:
Hi,
The steps to run on Heroku have been elaborated in the README, including
setting up the database:
James,
3. I want to know how the library works internally.
The third use-case is the only time literate programming makes sense, but
it's also the least used of the three. I'm also not hugely convinced it's
actually much use - whenever I read literate programs in Clojure I find
myself
This is code Clojure programmers depend on to work. Are you suggesting
that it is easier to read this code than a few paragraphs of natural
language?
I must say I really find it puzzling that there is so much
resistance to writing words. It's not that hard.
if the code is so bad that it
Looks good, thanks!
Am Freitag, 2. Mai 2014 01:49:11 UTC+2 schrieb Colin Fleming:
There's this one here: http://mooc.cs.helsinki.fi/clojure, which is run
by the University of Helsinki. I haven't done the course but I heard good
things about it.
On 2 May 2014 11:21, Ivan Schuetz
On 2 May 2014 23:01, u1204 d...@axiom-developer.org wrote:
I've attached a piece of code from Clojure, including the terse
documentation. I presume one of the early Clojure authors wrote it
so I assume it is best case, production code by Java experts.
1. The code you've attached wasn't
There's a lot in between the amazingly common practice of barely commenting
code--as if it was self-explanatory--and literate programming. Part of the
reason I comment my code is so that *I* can understand it later.
--
You received this message because you are subscribed to the Google
Groups
I find both sides of this argument to be bafflingly extremist.
On one side, we have people who think that literate programming is so
important and so compelling, that the state and ease of the tooling
surrounding it doesn't really matter.
On the other side, we have people who insist that
On 2 May 2014 23:43, Mark Engelberg mark.engelb...@gmail.com wrote:
On the other side, we have people who insist that well-written code never
needs an explanation, and argue that explanations actively make things
worse.
Just to be clear, this isn't something I'm arguing for.
- James
--
On Friday, May 2, 2014 5:39:51 PM UTC-5, Mars0i wrote:
There's a lot in between the amazingly common practice of barely
commenting code--as if it was self-explanatory--and literate programming.
Part of the reason I comment my code is so that *I* can understand it
later.
Also, I fully
Although, sometimes it works. I don't know exactly what conditions triggers
it. Maybe it depends on where the error is, what type of error it is, or
something else. Sigh.
On Friday, May 2, 2014 6:06:59 PM UTC+2, Oskar Kvist wrote:
Hi!
I'm using Vim, vim-fireplace, `lein repl`, and
On Fri 2 May 2014 at 09:06:59AM -0700, Oskar Kvist wrote:
Hi!
I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace.
When I run `(tools.namespace.repl/refresh)` from within vim via
fireplace, it usually (perhaps always) works the first time. Say
there is a simple error like a
Hi guns, thanks for your input!
I see, but it only happens from within Vim, not if I run `ctnr/refresh` in
the repl outside vim. I made an issue on fireplace's github that describes
how to reproduce the
problem. https://github.com/tpope/vim-fireplace/issues/149
On Friday, May 2, 2014 6:06:59
On Fri 2 May 2014 at 05:16:41PM -0700, Oskar Kvist wrote:
Hi guns, thanks for your input!
I see, but it only happens from within Vim, not if I run `ctnr/refresh` in
the repl outside vim. I made an issue on fireplace's github that describes
how to reproduce the problem.
Yeah once one knows how to, it's not that bad. I used to restart the repl
when this happened before and it was really annoying. :P Still, it would be
great if fireplace could do something about it. :p
On Saturday, May 3, 2014 2:33:09 AM UTC+2, guns wrote:
On Fri 2 May 2014 at 05:16:41PM
Hi,
I'm currently running cljs with :optimizations none.
I would like to inject a trivial static analysis phase of my cljs code.
I.e, something like:
*.cljs files - call a clojure function of mine, which sees
everything as sexps - standard pipeline to generate *.js files
Is there
Wow! I had no idea about the daily specials mailing list. I have joined now
though, so if I see a JOC special pop up I'll snatch it up.
I don't have an e-reading platform that I like, so I have only been reading
bits and pieces of either edition.
I find using my laptop with ibooks and a
50 matches
Mail list logo