Hi,
In my code, I have many lines like:
(assert )
(assert )
(assert )
Now, is there a way to have the entire sexp highlighted in light
grey? (Rather than as normal code).
The logic being "assertions are meant more like comments", and when
reading, I'd prefer to not se
Hi all,
do you have any idea how I can define a variable, global or inside a
function, used to store for example the FutureTask objects resulted from
ExecutorService submit(fn) call,I want to put all futures in a collection
and later call 'get' on each of them. bellow is a sample of that code:
Hello
This is not written as functional code. You have to understand that :
(cons f futures)
creates a new "version" of futures with f in front of it and cons *returns
it to you*. Put another way,* futures is not modified by cons*. In your
dotimes construct, the consed value is lost each loo
Thank Philippe for your advices,I came from java environment and seems I
still remain with some 'bad' habits.
On Friday, May 23, 2014 12:04:52 PM UTC+3, Philippe Guillebert wrote:
>
> Hello
>
> This is not written as functional code. You have to understand that :
>
> (cons f futures)
>
> cre
You guys should check stoic:
https://github.com/juxt/stoic
>From the readme:
This library marries Stuart Sierras Component library with distributed
> config. Feed Stoic a SystemMap and it will ensure that the relevant
> components are bounced when their config changes. Config-suppliers are
>
On Thursday, May 22, 2014 8:17:51 PM UTC+9, Jesse wrote:
>
> Hey guys, I am trying to build a program that can instruct a single
> elevator, 2 floor system how to behave based on the state of an atom that
> is being constantly checked for updates by a loop. The state of the atom at
> a given t
I have got in a shape where it works fine, but with slightly unusual
behavior. I am looking for advice on refactoring, So if someone could
please have a look.
https://gist.github.com/gamma235/4ea0d7a0d0efb8d4399f
Jesse
On Thursday, May 22, 2014 8:25:39 PM UTC+9, Rob Day wrote:
>
> I haven
Ok, so I'm a bit over the edge about how good code should be written,
as many of you might have guessed...
but it could be worse:
http://sourcecodepoetry.com
"good code reads well, best code rhymes"
and, best of all, it is a contest!
Tim Daly
/me mutters about being one-upped :-(
--
You recei
On Fri, May 23, 2014 at 8:23 AM, wrote:
> Ok, so I'm a bit over the edge about how good code should be written,
> as many of you might have guessed...
>
> but it could be worse:
> http://sourcecodepoetry.com
> "good code reads well, best code rhymes"
>
> and, best of all, it is a contest!
>
> Ti
The videos look very good and seem very interesting.
One idea: some video about how to create & configure a project in cursive
would be helpful as well.
Juan Manuel
El viernes, 23 de mayo de 2014 05:56:45 UTC+2, tbc++ escribió:
>
> I'm using Cursive Clojure (Intelij). It has a "Presentation Mod
It's only a reformulation of Ulises comment but I would say:
1) abstract away how the data is accessed
2) introduce change one function at a time by swapping the past accessor
with the new accessor (really it is like a getter/setter)
3) if you have final consumer(s) you might need to introduce a
I have been working hard to understand the issue, and it seems to related to
the creation of lots of functions using eval.
for instance if you run: (for [_ (range 1)] (eval (read-string "(fn [x]
(inc x))")))
2 or 3 time it will consume all PermGen. Is there any way to palliate this
problem?
Hi Herwig,
I spent some time going through the design, and a email thread
(particularly Chouser and Christophe's responses), plus I spent a bit more
time on my own implementation where it was clear that I'd missed some
things.
I've yet to go through your code in fine detail, so I'll still have so
I haven't looked into the details, but you might want to check out this
Clojure ticket to see if it is related:
http://dev.clojure.org/jira/browse/CLJ-1152
Andy
On Fri, May 23, 2014 at 8:53 AM, Pablo Nussembaum wrote:
> I have been working hard to understand the issue, and it seems to re
It should be related somehow. Although, in my case I'm not dynamically
generating protocols or multimethods, the app only generates a plain old
functions.
In the ticket it says that there is a way to clear the protocols internal
cache. So I'll try to switch my code to generate protocols and tes
On Fri 23 May 2014 at 01:29:54AM +0200, Bronsa wrote:
> When using tools.analyzer.jvm you have to remember that its primary
> use-case is as a front-end for a compiler, in this case :tag and
> :o-tag serve to inform tools.emitter.jvm when to emit a cast thus
> might not always reflect the :tag met
There seem to be two kinds of definitions of what a record could be:
1. A full representation of a resource,e.g. (defrecord User [id name age
gender address])
2. A *handle* to a resource, e.g. (defrecord User [id]), e.g. [wikipedia]
below
Some protocols only ever need a handle, not the full res
I would say do one of:
- define your own constructor functions like (defn user [id] ...)
- use the map->User constructors created by defrecord
- do not specify the non-required keys as fields in the defrecord
- use plain maps
On Friday, May 23, 2014 4:47:43 PM UTC-4, Elliot wrote:
>
> There see
Jakub,
I'll be interested to learn how you work this out. I also work with data
whose structure is known to functions in various modules, thus its very
shape is a contract. This is coming from the other end of encapsulating
everything in Java classes and interfaces. Also, I write test cases at
On May 23, 2014, at 2:19 AM, sorin cristea wrote:
> Thank Philippe for your advices,I came from java environment and seems I
> still remain with some 'bad' habits.
Coming from Java, the main thing to bear in mind in Clojure is that you do not
have "variables" in the sense you are used to and yo
20 matches
Mail list logo