Hi, the library looks very interesting!
I am also working on a rule based translator as part of expresso [1],
my gsoc project Algebraic Expressions, which uses the rule based
translator
to succinctly specify transformations of algebraic expressions.
You can see some examples of this in my recent bl
Am Samstag, 17. August 2013 11:19:23 UTC+2 schrieb David Chelimsky:
>
> Hey Steven, here's a variation of my first example that, I think, gets
> closer to what you're proposing (with maybe-add handled in-line):
>
> (defn to-consolidated-map [parts]
> (reduce (fn [h [k v]]
> (assoc h
Hi Christian,
Am Sonntag, 18. August 2013 18:52:54 UTC+2 schrieb Christian Sperandio:
>
> Hi,
>
> I wrote a set of functions to compare 2 words managing the keyboard
> mistakes. The common mistakes are insertion, deletion, substitution or
> inversion.
>
This sound like you're looking for an imp
The purpose is close but not the same. I want to manage the keyboard
mistakes. It comes from the need to validate keyboard input. At work, we
canceled the use of distance because is not efficient enough for name
comparing (person, medicine and others) and provided wrong result. We use
the find-erro
I kinda understand the whole problem and I also understand that this has
nothing to do with the OO IOC pattern, but I still don't exactly get what
is meant by this term. What is inverting what and where? What does
"control" refer to exactly - compared to callbacks?
M.
--
--
You received this
That would be true, if I knew what my code was going to do when I
started. But most of my code is used to investigate things that I don't
understand; so it evolves slowly over time. I don't know when I start
what "low-level" is going to be. So, I'm left with the task of removing
forward declarati
On Aug 19, 2013 5:53 AM, "Phillip Lord"
wrote:
>
> That would be true, if I knew what my code was going to do when I
> started. But most of my code is used to investigate things that I don't
> understand; so it evolves slowly over time. I don't know when I start
> what "low-level" is going to be.
The most annoying thing to me about forward declaration is that it
prevents what Uncle Bob calls 'Newspaper Style Code' where I can
structure my code in such a way that the high-level functions are
right at the top and the primitives that they might need are found
below so that I or someone else wh
Hey Maik, I appreciate it!
I'm going to look more closely at expresso, but at first glance I think
these projects have different objectives. Expresso appears to offer very
rich semantics in its domain, where Clara intentionally offers more limited
semantics in exchange for scalability and inter
Tim Visher writes:
> The most annoying thing to me about forward declaration is that it
> prevents what Uncle Bob calls 'Newspaper Style Code' where I can
> structure my code in such a way that the high-level functions are
> right at the top and the primitives that they might need are found
> bel
In the past, I've written code like the following
(defn foo [x y]
(let [x-squared (* x x)]
(if (pos? y)
(+ x-squared y)
(- x-squared y
However, the introduction of as-> has led me to write the following, at times
(defn foo [x y]
(as-> (* x x) x-squared
(if (pos? y)
Ah! fnil! That's just what I was wanting, and didn't even know it. Thanks!
I think I like this version best.
On Mon, Aug 19, 2013 at 2:44 AM, Philipp Meier wrote:
>
> Am Samstag, 17. August 2013 11:19:23 UTC+2 schrieb David Chelimsky:
>
>> Hey Steven, here's a variation of my first example that
On 8/19/13 8:58 AM, Jay Fields wrote:
In the past, I've written code like the following
(defn foo [x y]
(let [x-squared (* x x)]
(if (pos? y)
(+ x-squared y)
(- x-squared y
However, the introduction of as-> has led me to write the following, at times
(defn foo [x y]
http://deliberate-software.com/intro-to-macros/
I wrote this tutorial up for a friend of mine who is a Ruby programmer
thinking of learning Clojure, as my defense of why Clojure is worth his
time.
I will welcome any advice, code reviews, or suggestions about the post or
code samples.
Thanks!
On 18.08.2013 16:51, Hussein B. wrote:
> Would you please help me transforming this imperative code into
> functional one?
>
> The code is a typical snippet in imperative style. A lot of mutations
> that I don't even know how to start morphing it to Clojure.
>
> class Container {
> Map children
I have no involvement with this conference but thought some people in the
Clojure world might be interested in submitting talks about big data,
analytics, data science, machine learning, etc.
http://strataconf.com/strata2014/public/cfp/283
CFP closes: Sept 16th, 2013
Notification: Oct, 2013
Confe
inline
On Sunday, August 18, 2013 10:57:35 PM UTC-7, Ryan Brush wrote:
>
> The idea of Datomic as an approach to scalable working memory is
> interesting. I haven't looked at the mechanics of doing this, but it seems
> possible since Clara aims to separate the working memory system from the
> r
On 19.08.2013 20:27, Timo Mihaljov wrote:
> This example may be to artificial to be translated into Clojure. What
> use is it to store strings in a tree keyed by the string's characters?
> If you know the path to the string, you already know the string itself,
> and you don't need the tree at all!
Langohr [1] is a small, feature complete Clojure client for RabbitMQ.
1.4.1 is a bug fix release. Release notes:
http://blog.clojurewerkz.org/blog/2013/08/16/langohr-1-dot-4-1-is-released/
1. http://clojurerabbitmq.info
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
-
On Aug 19, 2013, at 06:38 , Tim Visher wrote:
> The most annoying thing to me about forward declaration is that it
> prevents what Uncle Bob calls 'Newspaper Style Code' where I can
> structure my code in such a way that the high-level functions are
> right at the top and the primitives that they
I think a regular "let" is clearer in this kind of case.
"as->" suggests to me that multiple rebindings will happen to the name: if
that is not happening then it is confusing for readers IMHO.
The only case I can think of where "as->" makes sense and the binding only
happens once is if you are
I personally think the only place as-> should be used is inside other
threading macros. When it's used anywhere else, the name-goes-second
ordering feels wrong and very awkward.
On Mon, Aug 19, 2013 at 9:58 AM, Jay Fields wrote:
> In the past, I've written code like the following
>
> (defn foo
I've found the requirement to define things in order to be a major pain in
the following reasonably common situation:
A) public API in one namespace
B) various functions used to implement public API in another namespace
A clearly depends on B. But B often needs to depend on A also: you
typicall
While I don't think I'd use it in your particular example, I like it when
it can eliminate superfluous let bindings.
(let [z (as-> (* x x) xsq
...)]
...)
On Mon, Aug 19, 2013 at 10:58 AM, Jay Fields wrote:
> In the past, I've written code like the following
>
> (defn foo [x y]
>
I agree this is a huge pain, although I don't know if I'd call it a
"forward declaration" issue as much as it is an issue with Clojure not
allowing circular dependencies among modules.
Potemkin seems to be the best way to deal with this particular scenario,
but I personally think that this is an i
What is the major benefit of as->
=> (-> 4 (#(* % %)) (+ 12) )
28
=> (-> 4 (as-> y (* y y)) (+ 12))
28
On Monday, August 19, 2013 9:13:36 AM UTC-7, Ben Mabey wrote:
>
> On 8/19/13 8:58 AM, Jay Fields wrote:
> > In the past, I've written code like the following
> >
> > (defn foo [x y]
> >
On Saturday, August 17, 2013 4:51:34 PM UTC-7, Mark Mandel wrote:
>
> On Sun, Aug 18, 2013 at 6:52 AM, John Jacobsen
>
> > wrote:
>
>> After some prototyping and development, we are now getting to the stage
>> where "lein run" and a Jetty server running from -main aren't going to cut
>> it.
>
Awesome, Steve.
Thank you for the tutorial.
Plínio
On Mon, Aug 19, 2013 at 1:10 PM, Steve Shogren wrote:
> http://deliberate-software.com/intro-to-macros/
>
> I wrote this tutorial up for a friend of mine who is a Ruby programmer
> thinking of learning Clojure, as my defense of why Clojure is
What:
Framework One - a lightweight MVC framework for convention-based
Clojure web application development.
Where:
https://github.com/framework-one/fw1-clj
Usage:
Easiest way to get started:
lein new fw1 myapp && cd myapp && PORT= lein run
Now you have a minimal web ap
[Apologies for duplication from cross-postings.]
Important Note: This year's Workshop on Scheme and Functional Programming
is co-located with Clojure/conj.
Clojure-related papers are encouraged, as are first-time and non-academic
authors. --Will
---
DEADLINE: 13 September 2013
Or you could use (*cough*) a literate (*cough*) programming (*cough*)
style :-)
--
--
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
I'll point out as well that though I thought Yegge's criticisms of
Clojure were a bit polemical (I guess that's his style), the single
pass compiler issue was one of his biggest gripes, and I do think it
still rings true. I feel like I have to babysit clojure in this
regard, when I usually feel lik
>
> I'll point out as well that though I thought Yegge's criticisms of
> Clojure were a bit polemical (I guess that's his style), the single
> pass compiler issue was one of his biggest gripes, and I do think it
> still rings true. I feel like I have to babysit clojure in this
> regard, when I
On Mon, Aug 19, 2013 at 6:41 PM, Anand Prakash wrote:
> What is the major benefit of as->
>
> => (-> 4 (#(* % %)) (+ 12) )
>
> 28
>
> => (-> 4 (as-> y (* y y)) (+ 12))
>
> 28
Solving the contrived example doesn't really help answer the original
question of preference and tradeoffs. As to the bene
I read those. Now I'm screaming :)
On Aug 18, 2013 11:40 PM, "Ben Wolfson" wrote:
> Counterpoint! He's not crazy:
> https://github.com/bwo/monads/blob/master/src/monads/util.clj#L8-43
>
>
> On Sun, Aug 18, 2013 at 9:20 PM, Sean Corfield wrote:
>
>> You're crazy :)
>>
>> On Sun, Aug 18, 2013 at 9:
Hi Jay
Thanks for the reply. I did not know how as-> works, till I saw your
example. I myself need to many a times chain things where in some cases the
variable will go at the first location and in another cases it will go to
the last location and it was a big pain to do something like what you
36 matches
Mail list logo