This isn't foolproof Léo, but sometimes folks use docstrings to make that
distinction i.e. if it's got a docstring it's part of the public API.
Codox, for example, takes this approach when deciding what to include in
generated API documentation.
On 4 March 2018 at 12:50, Léo Noel
I enjoyed the post. It's easy for those of us who've been in the community
for a while to take such things for granted and not properly explain them
to new folks.
One suggestion - perhaps concurrency and immutability each deserve their
own section? That wouldd give you a chance to dig deeper into
If you look on the core.async Github page
https://github.com/clojure/core.async, it describes this as what you need
to pull the latest alpha into your project.clj:
[org.clojure/clojure 1.6.0]
[org.clojure/core.async 0.1.346.0-17112a-alpha]
There's also a link to a list of other versions on
I think it's useful to think of macros as an odd form of I/O. Just as you
would separate out your templating from your domain functions, separate out
your defmacro from regular functions that just happen to manipulate
symbols. These functions will be easier to test.
On 23 March 2015 at 16:23,
That sounds a cool idea.
One interesting challenge will be how specific you can make the types of
things like unit generators, which can be used in very different ways e.g.
low frequency for vibrato, high frequency for tones themselves.
On 21 March 2015 at 17:14, Ambrose Bonnaire-Sergeant
function with the current dispatch value to learn
new types via normal occurrence typing is almost always sufficient to type
check the current defmethod body.
Thanks for the feedback.
Ambrose
On Fri, Mar 13, 2015 at 5:20 PM, Chris Ford christophertf...@gmail.com
wrote:
I like the paper
I like the paper.
One small piece of feedback - I didn't understand what about the
multimethods section justifies the claim of surprising synergy in the
introduction. Perhaps you could elaborate on the novelty?
Chris
El 12/03/2015 02:50, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com
As an example of pushing data into an external DSL you could check out John
Cowie's Scenic wrapper for Bidi - https://github.com/johncowie/scenic.
Note that Scenic loads data from the external file at _compile_ time - so
it comes closer to being like embedding a DSL in Clojure source and less
Perhaps it would help if you posted a gist of the stacktrace you encounter?
On 10 February 2015 at 20:29, Gilberto Garcia giba@gmail.com wrote:
Hi All,
I'm new to clojure and I'm trying to create a simple rest api to create
and manages to token.
I'm trying to use Stuart's component
#toro_tokens_rest.components.database.Database{:path /tmp/dev-leveldb},
:jetty-server nil}
So, I bet I'm doing something wrong.
On Tue, Feb 10, 2015 at 9:45 AM, Chris Ford christophertf...@gmail.com
wrote:
Perhaps it would help if you posted a gist of the stacktrace you
encounter?
On 10 February 2015 at 20:29, Gilberto
James might be too modest to mention this as an exemplar as he's the
maintainer, but for me, Ring https://github.com/ring-clojure/ring is a
great example of the success of data-as-API. HTTP requests are represented
as a nested map with well-known keys, and middleware works with these
fields or
A little more context on what I'm considering.
I work in a team of about 10 developers on a Clojure project. In the larger
enterprise there are mainly Java applications.
I'm interested in a way to visualise which parts of the codebase are
getting sticky and might require intervention. As well as
Hi all,
Are there any good tools for measuring the health of a Clojure codebase?
What is even useful to measure for Clojure? Afferent/efferent coupling,
cyclomatic complexity and unit test coverage are metrics I would use for
Java, but do they apply equally to Clojure?
I'm aware of Clique
Unless you are worrying about concurrency, you probably don't need an atom
at all:
(def sx2 [2 3 4])
(println (sx2 1))
On 14 January 2014 14:45, Andreas Olsson photoguy@gmail.com wrote:
Okay,..
..learning one step at a time hear. =)
I´m good at basic.. this is some thing else.
Den
Hi,
Clojure allows the creation of macros, which means that developers can
define new things that look like the keywords from other languages.
For example, even defn is just a macro that builds on top of the underlying
def and fn forms.
I expect that the Twitter storm team have a macro called
Can you explain what the code is supposed to do in English? Java is a
little hard to read. :-)
Are you doing Huffman coding or similar?
On 18 August 2013 16:51, Hussein B. hubaghd...@gmail.com wrote:
Hi!
Would you please help me transforming this imperative code into functional
one?
The
written in an imperative style that I'm
trying to transfer into a functional one.
The amount of mutation and the if statements are blocking me from doing it
in Clojure.
On Sunday, August 18, 2013 4:27:43 PM UTC+2, Chris Ford wrote:
Can you explain what the code is supposed to do in English
bar 8))
On 18 August 2013 18:03, Chris Ford christophertf...@gmail.com wrote:
This is close, though it only permits values at leaves and stores the
values in the reverse order. Depending on what you need, this might be
sufficient:
(defn insert [container letters value]
(update-in container
Two obviously. It's the only compromise between those who want everything
to be a prime number, and those who want everything to be a power of two.
On 14 August 2013 18:48, Phillip Lord phillip.l...@newcastle.ac.uk wrote:
Răzvan Rotaru razvan.rot...@gmail.com writes:
Statistics. I want to
. At LambdaJam I saw Chris Ford give a great
demo of functional composition [music]. I want to show my 16-yo the same
code working, since he's really doing well with Racket (and Gregor
Kiczales' MOOC via UBC) and loving it, and he loves music and music
composition too.
Chris Ford posted his code here
Ooops. Try this instead:
(use 'goldberg.variations.canone-alla-quarta)
On 4 August 2013 17:57, Geoffrey Knauth ge...@knauth.org wrote:
On Sunday, August 4, 2013 9:06:35 AM UTC-5, Chris Ford wrote:
Thanks for taking an interest. :-)
Of course, Chris. Your stuff is fantastic. I can't
Cool!
If you want to make the Swing stuff more idiomatic, you could take a look
at Seesaw https://github.com/daveray/seesaw.
On 2 August 2013 17:11, eliassona...@yahoo.com wrote:
Below is a little (stupid) snake game I wrote using core.async and swing.
It uses channels for timer, keyboard
Seniority is relative. All you need to be able to teach someone is maybe a
year's more experience than them.
If you had the time to dedicate to this idea, some kind of structured jam
could be useful. At LambdaJam this month, each afternoon we had a puzzle of
some kind (spelling correction etc) to
If you don't regularly use vim, and you want a pre-canned Clojure setup,
you can try https://github.com/ctford/vim-fireplace-easy, which is a
project of Dave Ray's I updated for Fireplace.
Cheers,
Chris
On 28 July 2013 22:29, Joe Cooljure clooj...@gmail.com wrote:
One of the cool things
I use a similar macro in my music
codehttps://github.com/ctford/leipzig/blob/master/src/leipzig/scale.clj,
because I want to take a sequence and explicitly give parts of it names.
(defmacro defs [names docstring values]
`(do ~@(map
(fn [name value] `(def ~name ~docstring ~value))
I find the modelling Clojure data structures very similar to working out
what your aggregates roots are for domain-driven design or using a document
data store.
I would suggest avoiding using refs in a customer map. In this case, it
sounds like customer is your natural aggregate root, so you
Hi Mingqi,
Could you please give us some more context? What kind of configuration are
you trying to manage?
Cheers,
Chris
On 17 June 2013 10:45, Mingqi mingqi.s...@gmail.com wrote:
I need a configuration solution
--
--
You received this message because you are subscribed to the Google
Robert, the Leiningen survey might under-report Windows-based usage of
Clojure, as I think Eclipse+Counter-clockwise is especially popular there.
On 17 June 2013 02:03, Robert Levy r.p.l...@gmail.com wrote:
There's the State of Clojure Survey:
Antonio, I think he means that the onus is on the consumer of an API to
make a sensible decision about what they depend on. Consumers could choose
to depend on implementation details rather than provided abstractions. When
they do so, they need to accept the burden of adapting should those
On every project I've ever worked on, specs were ephemera, falling out of
date almost immediately despite occasional herculean efforts to keep them
up-to-date.
Personally, the best answer I've found to the spec/code dilemma to be
automated tests, as they evolve along with the code and fail if
The reason and is a macro is that it's designed to short-circuit - ie if
the first result is false the rest shouldn't even be evaluated.
Using it on raw booleans works, because booleans evaluate to themselves,
but it's really designed to be given forms.
The absence of a pure function for
You could try lein -o to make sure that your startup isn't blocking on
network.
On 14 May 2013 01:50, yizhen wei yizhenwe...@gmail.com wrote:
I heard using a sdd can reduce the time a lot. Maybe 5x?
Can someone confirm on that?
On Monday, May 13, 2013 6:17:38 PM UTC-4, Warren Lynn wrote:
Wish I could be there...
On 14 May 2013 15:45, BERYANN PARKER beryann.par...@gmail.com wrote:
Hi Sam,
thanks for the link,
good project and good ! I like very much your philosophy: The source
code is our instrument and we play it live
i follow it now!
Cheers!
Beryann
Le lundi 13 mai
Sounds to me like there's enough meat in this topic for someone to consider
submitting a talk to the upcoming EuroClojure http://euroclojure.com/2013/ or
Clojure/conj http://clojure-conj.org/ on what Clojure means for DI. It's
a commonly asked question, and it could be an opportunity for The
IMHO it's a bit subjective, but empty? is defined as (not (seq coll)), so
using (not (empty? coll)) is really saying (not (not (seq coll))), which
feels a bit backwards.
Using seq also plays nicely with if-let:
(if-let [foo (seq hey)] (print foo))
(if-let [foo (seq )] (print foo))
Chris
On 11
A good question. One way is to use partial application to bake the data
source into a fn:
(def read (partial read-from-db *data-source*))
On 10 May 2013 14:04, Colin Yates colin.ya...@gmail.com wrote:
(newbie, getting better each day!)
I assume we all know DI. Through the use of a central
Jorge, reinventing the wheel is a very worthwhile pursuit. Maybe you'll
come up with something new, and certainly you'll learn something.
Thanks for sharing.
Chris
On 29 April 2013 08:23, Baishampayan Ghose b.gh...@gmail.com wrote:
One more reason to read Clojure's source code. Trust me,
I'm a little unclear as to what your specific challenge is. I understand
you're trying to test fns that take a map produced by the JSON parser, and
extract specific fields.
Would it be sufficient to just create literal maps to fake the output of
the JSON parser, use those as inputs to your
You could also consider visually breaking up Java code that is across
multiple files. You've got // Contents of: comments, but a break in the
grey background would also be helpful.
Nice post. The world needs more people willing to explain basic concepts in
a clear, un-patronising way.
Cheers,
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
Sometimes people separate a macro into the macro itself, and a normal
function that does the actual work.
The normal function often has the same name as the macro but with a *
suffix.
Chris
On 28 February 2013 13:38, Dave Sann daves...@gmail.com wrote:
I see cases of * after function names.
Can you give an example use case?
Personally, I would be a little surprised to find out that identity worked
like this. After all, why return the first argument, why not the last? Or a
vector of all the arguments?
Cheers,
Chris
On 27 February 2013 15:02, Jim foo.bar jimpil1...@gmail.com wrote:
Murtaza, I'm guessing you probably didn't want to send us all your resume...
Cheers,
Chris
On 13 February 2013 09:57, Murtaza Husain murtaza.hus...@sevenolives.comwrote:
Alex are you still looking for clojure developers. I am attaching my
resume.
On Saturday, June 16, 2012 11:44:41 PM
If someone does write a Lisp with significant whitespace, can we please
call it Whitespathe?
On 7 February 2013 10:30, Marco Munizaga drchoc...@gmail.com wrote:
We had this talk with scheme. They called it I expressions. Here is the
link http://srfi.schemers.org/srfi-49/srfi-49.html
Do it
Thanks to everyone who worked hard to make 0.8.0 happen, especially Sam. :-)
On 27 January 2013 02:00, Sam Aaron samaa...@gmail.com wrote:
On 26 Jan 2013, at 20:17, Sam Aaron samaa...@gmail.com wrote:
I pulled out the GUI widgets from this release as I found a number of
issues with them at
This seems like quite a specialised function to have in a core string
library.
To me, the only behaviour that would be generic enough to include in a core
library would be to capitalise all the letters of the string.
On 12 December 2012 17:12, Pierre Allix pierre.allix.w...@gmail.com wrote:
When considering the availability of a debugger, keep in mind that your
workflow might be different when you code Clojure compared to how you
approach Java, Ruby etc.
Because functions require less context to run than methods of an object, I
find that experimenting at the REPL (or rather
Are you using Seesaw 1.4.1? I just upgraded to 1.4.2, which fixed the same
issue with Overtone. In general, Phil Hagelberg advised me it's a result of
a bad dependency somewhere.
I found that this error meant that I couldn't run my project without
network connectivity (unless I did lein -o).
to run clear-implementations! if one
does want to forget all the implementations.
On Wednesday, September 5, 2012 6:48:36 AM UTC-4, Chris Ford wrote:
I was watching David Nolan's talk about predicate
dispatchhttp://blip.tv/clojure/david-nolen-predicate-dispatch-5953889,
and he articulated
I was watching David Nolan's talk about predicate
dispatchhttp://blip.tv/clojure/david-nolen-predicate-dispatch-5953889,
and he articulated something that I've found frustrating about multimethods
- the set of implementations is open, but the dispatch function is closed.
That means that if your
Hi,
clojure.org seems to be down. I've mailed h...@wikispaces.com.
Cheers,
Chris
--
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
Looks like it's back up.
On 27 August 2012 20:28, Chris Ford christophertf...@gmail.com wrote:
Hi,
clojure.org seems to be down. I've mailed h...@wikispaces.com.
Cheers,
Chris
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
Adam Frey from wikispaces pinged me back. Seems like he fixed whatever the
problem was.
On 27 August 2012 20:42, Mayank Jain firesof...@gmail.com wrote:
Working fine for me.
On Tue, Aug 28, 2012 at 12:58 AM, Chris Ford
christophertf...@gmail.comwrote:
Hi,
clojure.org seems to be down
Would you be able to post some code demonstrating what you have observed,
perhaps reduced to the minimal case?
Cheers,
Chris
On 18 August 2012 13:49, Vincent vincent@gmail.com wrote:
Dear ,
I am using clojure.test for test
in one 'deftest , i had used 3 'is function to assert
I use quite a few of these in my Overtone rendering of
Bachhttp://skillsmatter.com/podcast/home/functional-composition
:
; Defining a scale function from intervals
(defn sum-n [series n] (reduce + (take n series)))
(defn scale [intervals]
(fn [degree]
(if-not (neg? degree)
(sum-n
Will this be the best Clojure event?
http://skillsmatter.com/event/clojure/haskell-exchange-2012
Chris
On 31 July 2012 16:15, cassiel n...@cassiel.com wrote:
Yep... my presentation proposal went in last week...
I really hope that refactoring-aware diffs are on their way. They'll allow
for a whole class of merge conflicts to be resolved automatically.
Chris
On 18 July 2012 14:19, Leonardo Borges leonardoborges...@gmail.com wrote:
I haven't been following this discussion that closely so far but I'd
When it comes to new graduates, they'll probably latch onto Clojure just as
quickly as to Java or anything else.
At EuroClojure, Jon Pither and Hakan Raberg mentioned that in their mixed
Java/Clojure ecosystem they train new hires on Clojure, which eventually
makes them better Java programmers!
While it would be possible to support it, I don't think that it makes sense
for maps (or sets).
While first and next need to be supported to make maps and sets sequable, I
don't think that conceptually the elements are ordered.
Cheers,
Chris
On 12 June 2012 11:03, Yoshinori Kohyama
Meikel is quite right. I should have said that maps and sets support seq...
I guess the question should then be, should nth call seq on its argument?
On 12 June 2012 11:31, Meikel Brandmeyer (kotarak) m...@kotka.de wrote:
Hi,
Am Dienstag, 12. Juni 2012 12:10:08 UTC+2 schrieb Chris Ford
Another advantage to choosing the first element as a pivot is that you can
use destructuring:
(defn qsort [[pivot coll]]
(if coll)
On 8 June 2012 08:44, Mark Engelberg mark.engelb...@gmail.com wrote:
last and drop-last are slow operations on seqs, and no matter what you
pass in for the
To add to Tassilo's answer, quoting blocks evaluation all the way down. So
even though I don't have the functions foo or bar defined:
user= '(foo (bar))
(foo (bar))
There's no error, because neither is evaluated.
Chris
On 28 May 2012 18:58, Tassilo Horn tass...@member.fsf.org wrote:
Maris
Personally, I would intuitively assume that none of the bindings from
if-let would be available in the else branch.
On 16 May 2012 14:36, Moritz Ulrich ulrich.mor...@googlemail.com wrote:
On Wed, May 16, 2012 at 3:16 PM, Aaron Cohen aa...@assonance.org wrote:
What should happen on the else
Are there any Clojure dojos near where you live? We have a monthly one in
London, which is a great way for people of different experience levels to
come together.
Cheers,
Chris
On 14 May 2012 12:45, James abbott...@gmail.com wrote:
When a new technology (a programming language) comes out,
64 matches
Mail list logo