* Does the fact that I got into this situation indicate that I'm doing
something wrong? (The above code is clearly contrived, but I did run into
this in a real program)
- Russell
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
On Tuesday, September 5, 2017 at 2:03:36 PM UTC-7, Laverne Schrock wrote:
>
>
> On Tuesday, September 5, 2017 at 1:50:59 PM UTC-5, Russell Mull wrote:
>>
>> It's not really clear what you're trying to do, so it's hard to offer
>> further advice.
&g
, and it devolves to the same case.
It's not really clear what you're trying to do, so it's hard to offer
further advice. But you might find the whole enterprise a bit less
confusing if you use keywords or strings in the places you're using
symbols.
- Russell
--
You receiv
My team, which works on https://github.com/puppetlabs/puppetdb, is hiring a
software engineer. We mostly use Clojure.
https://puppet.com/company/careers/jobs?gh_jid=685071
(The page says Portland, but we're gladly open to anyone in US time zones)
- Russell
--
You received this me
worth
pursuing? Are there any pitfalls I should be considering? Does the
syntax/structure of the integration test setup sort of make sense, or is it
hopelessly confusing? Any ideas on how to improve it?
Thanks for your time,
Russell
--
You received this message because you are su
partial implementation is here:
https://gist.github.com/e7f8230920225496370ae38fc55f2175
If there's any interest in this, I can clean it up and release it as a
standalone library. It necessarily reaches into some of the guts of
core.spec, so it may be more suitable as a patch to spec itself, if
b.com/HealthUnlocked/lein-docker-compose
Leiningen plugin dependency:
[healthunlocked/lein-docker-compose "0.1.0"]
(You'll also need to be using environ and lein-environ for the plugin to
work.)
Russell @ HealthUnlocked
PS. We are hiring :-)
--
You received this message because you a
Suppose you have a reactive process, something that receives a message,
processes it, updates its, state, and repeats. For example:
(go-loop [s :initial]
(case ( :processsing
:processing ->: :processing
:processing -> :stopping
:stopping -> (done)
This is pretty easy to write as a regular expre
Every language has many pre-defined core functions, so we can quickly get
on building what we really want. This ease of use does come at a cost,
though. Do we really know the power of the magic that we are wielding?
In this webinar we will look at how to learn a language by implementing
models
that is likely to be added?
Thanks,
Russell
--
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 patient with your
first
How do you do pattern matching on lists in Clojure? I've tried using
core.match but the examples all deal with vectors, and trying to specify a
list in the apparently obvious ways gets an error message about invalid
list syntax.
--
You received this message because you are subscribed to the Go
up:
> https://github.com/webyrd/probKanren
>
Do you know if there have been any publications on this work? I've looked
around a little bit, but I can only find the source code.
- Russell
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
onstruct to
set up a function before it works, using alter-var-root! or robert-hooke,
is well into "spooky action at a distance" territory and should be avoided
if possible.
- Russell
--
You received this message because you are subscribed to the Google
Groups "Clojure" g
present the examples and results in the appropriate place,
depending on the context, or (b) automatically recompute those results (or
test against them) with a bit of tooling.
Of these, only the example usages case feels like it would be useful
outside LP, and thus be a candidate for common m
So far I'm finding the book instructive! Good job. As far as the detour,
I'd keep in mind that in general Rich likely isn't in favor of it on this
list but on the other hand I didn't find that the criticism was personal as
no names were mentioned and I commiserate about so called "architects"
cau
ist. Is
this useful, confusing? Wrong in places? please let me know if you have any
feedback!
http://mullr.github.io/micrologic/literate.html
Cheers,
Russell
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
Looks like the barber's loop doesn't check the "running" atom, so it will
never stop...
If you wanted to get rid of the atom for counting haircuts you could use a
go-loop with a haircut count as an argument. Something like:
(go-loop [haircuts 0]
(if @running
(do (cut-hair!)
(recur
jurescript/blob/master/src/clj/cljs/test.clj
Russell
On Wed, Dec 24, 2014 at 10:13 AM, Yehonathan Sharvit
wrote:
> What about the 'are' macro?
>
>
>
> On Wed, Dec 24, 2014 at 7:38 PM, Russell Mull
> wrote:
>
>> Things that aren't in cljs.test:
>
texts instead of *testing-contexts*
- :testing-vars instead of *testing-vars*
And that's it. It looks like a nearly complete port.
- Russell
On Tuesday, December 23, 2014 1:59:45 PM UTC-8, Yehonathan Sharvit wrote:
>
> What is the gap between clojure.test and cljs.test?
ments,
suggestions, and pull requests are welcome! It's available on Clojars - add
[lein-tern
"0.1.0"] to the plugins vector of your project.clj.
Thanks,
Russell
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to th
I wonder if Go could be a good substrate for native-compiled Clojure.
On Sun, Jan 5, 2014 at 5:27 PM, Mikera wrote:
> On Sunday, 5 January 2014 18:18:22 UTC, John Gabriele wrote:
>>
>> On Saturday, January 4, 2014 1:12:12 PM UTC-5, Michael Gardner wrote:
>>
>>>
>>> > Hopefully the landscape for
I sometimes find that, when the formatting gets hairy, I need to either
refactor my code or use one of the pipeline macros.
(->> nums
(filter even?)
(reduce +))
- Russell
On Wednesday, December 11, 2013 11:24:16 AM UTC+9, Plinio Balduino wrote:
>
> Hi there
>
> Wha
ld be
> improved, and I'd probably wind up going into more detail on certain topics.
> I'll probably charge a small fee (perhaps $10 or so) to cover costs.
>
> Would there be any interest in this?
>
> - James
--
Russell Whitaker
http://twitter.com/OrthoNormalRuss
--
-
> - available as a Standalone Product: Download, Unzip, Code!
>
This is huge! Maybe it seems like a trivial thing, but removing barriers to
getting started is fantastic.
Thank you Laurent, for your tireless and continuing work.
- Russell
--
--
You received this message because y
the staff in San Mateo. Candidates with backgrounds in
> Clojure programming, deep learning and data science who are interested in
> applying are encouraged to check Staples' careers page to view openings.
>
This is excellent news for Runa, congratulations to them!
--
Russell W
2013 at 2:06 PM, Ben Mabey wrote:
> Hi Russell,
> This doesn't look like a core.async specific problem, but rather the more
> general problem that protocols and records are not reload safe. What I
> believe is happening is the TimeoutQueueEntry type is being recompiled when
>
Anyone encountered after a few reloads at the repl core.async stops
working.?
Thanks
(ns repl.core
(:require [clojure.core.async :refer :all])) ;;0.1.0-SNAPSHOT
(defn producer[c]
(Thread/sleep 1000)
(go (>! c true))
(println "sleeping")
(Thread/sleep 1))
(defn consumer [c]
(let
ng something is subjective by definition. That's the purpose of the
> poll. If you are using Clojure I just want to know your subjective feeling
> towards the syntax.
>
--
Russell Whitaker
http://twitter.com/OrthoNormalRuss
http://www.linkedin.com/pub/russell-whitaker/0/b86/329
--
-
change which handler you're using based on the thing it's handling.
Russell
--
--
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 modera
:1:1)
Which is very frustrating. Is there a way to keep those namespaces refer-ed
even after I change namespace in the repl? My google-fu has failed me.
I'm using Clojure 1.5.1, emacs 24, lein 2.2, and nrepl.el 0.1.8-preview.
- Russell
--
--
You received this message because you a
But... is it also the bee's knees?
Russell Whitaker
Sent from my iPhone
On Jun 13, 2013, at 5:38 PM, Travis Vachon wrote:
> We've used Clojure at Copious (http://copious.com) to build our
> activity feed (http://www.youtube.com/watch?v=0l7Va3-wXeI) and a
> number
ployment target.
Russell
On Fri, Jun 14, 2013 at 11:11 AM, Erlis Vidal wrote:
> Hi guys!
>
> Thanks for all the responses, it looks like Linux is the predominant OS in
> the Clojure community.
>
>
>
>
> On Fri, Jun 14, 2013 at 2:06 PM, Jim - FooBar();
> wrote:
>>
&
This looks simple and useful, thanks!
Supposing I had a function that called this library, how could I go about
testing it easily? That is, the configuration file becomes implicitly an
input to the function, one that I'd like to be able to control from my
tests. Perhaps something like this coul
I find myself doing that a lot by hand, a tool to help would be very
useful. Some others that I've thought of are:
- change between (fn [x] ...) and #(...)
- pull sexp up to let, or introduce a new let (like introduce variable in
java et. al)
On Saturday, March 23, 2013 10:42:10 AM UTC+9, Alex
on a 42)
:check (or (nil? b) (< b 0)) nil]
(/ a b))
Which leads me to my question: does such a construct already exist? Or
perhaps am I doing it wrong? I've googled around for this, but I'm not
exactly sure what it's called.
Cheers,
Russell
--
--
You r
I just downloaded the sample PDF for FP-OO, and it's delightful; I'll be
springing for a copy myself.
Russell
On Tue, Dec 11, 2012 at 11:14 AM, Brian Marick wrote:
>
> On Dec 11, 2012, at 1:04 PM, Brian Marick wrote:
> > If you want to "edit" trees, using z
uremongodb.info/
--
Russell Whitaker
http://twitter.com/OrthoNormalRuss / http://orthonormalruss.blogspot.com/
http://www.linkedin.com/pub/russell-whitaker/0/b86/329
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gro
> > my wife. And I wish you my kind of success.
>
>
>
> --
> Charlie Griefer
> http://charlie.griefer.com/
>
> I have failed as much as I have succeeded. But I love my life. I love
> my wife. And I wish you my kind of success.
>
> --
> You received
>>> (let [bar-bar (. java-object getSomething)]
>>> (do
>>> (if (not (is-bar? bar))
>>> (. java-object (setSomething bar-bar)))
>>> java-object)))
>>>
>>
>>
>> The third:
>>
>> (defn my-
useful as a dispatch mechanism if the shape of the JSON data
> dictates what should happen to it. I would certainly recommend Clojure
> for what you describe, I think you will be pleasantly suprised how
> straightforward it is :)
>
> On Tue, Sep 4, 2012 at 7:05 PM, Russell Whitaker
&g
oading issues
introduced by the latter; see
today's (4 Sep 2012) clojure IRC log:
http://clojure-log.n01se.net/
Russell
> david
>
>
> On Wednesday, 5 September 2012 00:24:46 UTC+1, Russell Whitaker wrote:
>>
>> On Tue, Sep 4, 2012 at 1:52 PM, David Dawson
>>
; required but given that the system needs some algorithmic routing rules,
> clojure seemed a really nice conceptual fit over the languages I normally
> work with (imperative jvm ones, essentially)
>
> So, I'm really interested in any suggestions on how this might best be
> appro
Clojure is inherently shiny, no need to gild the lily.
What's the purpose and duration of your "code retreat"?
Russell
On Monday, August 27, 2012 2:41:20 AM UTC-7, Denis Labaye wrote:
>
> Hi,
>
> I am organizing a code retreat in September.
>
> All languages ar
ld surely slip by me when implementing my own binary-
> encoding library, but which has already been addressed by Gloss. By
> choosing a mature and well-known library instead of making your own,
> you get more features and fewer bugs.
>
> On Feb 5, 4:09 pm, Russell Christopher
> wr
I did look at Gloss before writing Marshal and decided against using it in
our application suite, I wanted something more focused utilizing
InputStream/OutputStream interface and able to handle variable sized
arrays/strings (size of array or string specified in packet).
On Sun, Feb 5, 2012 at 6:1
http://www.ultimateabguide.com/wp-content/themes/default/images/hello.php
--
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 patient
On 12 Jun 2010, at 16:18, Russell Christopher wrote:
>
> > You're right. Hope I haven't offended with the fail, I thought I had
> tested it - by iterating over a range and comparing it to Uncle Bob's but
> obviously I didn't do that right and then realized that fac
You're right. Hope I haven't offended with the fail, I thought I had tested
it - by iterating over a range and comparing it to Uncle Bob's but obviously
I didn't do that right and then realized that factorization is likely not
O(n) anyway. I'll probably take more time nex
didn't need the assoc in my previous try
(defn of [n]
(letfn [(f [res k]
(if (= 0 (rem (:n res) k))
{:n (/ (:n res) k) :fs (conj (:fs res) k)}
res))]
(:fs (reduce f {:n n :fs []} (range 2 n)
On Fri, Jun 11, 2010 at 3:15 PM, russellc wrote:
I couldn't see it! Thanks
On Fri, Jun 11, 2010 at 12:25 PM, Krešimir Šojat wrote:
> Hi,
>
> > (defn foo []
> > (letfn (bar [acc val]
> >acc)
> > (reduce bar {} (range 1 10
> >
> > doesn't compile
> > java.lang.IllegalArgumentException: Don't know how to crea
slight error w/ the previous, local-get-in should have been local-get
(defn get-in
([m ks]
(get-in m ks nil))
([m ks not-found]
(letfn [(local-get [nf m ks] (get m ks nf))]
(reduce (partial local-get not-found) m ks
On Wed, May 19, 2010 at 9:21 AM, Russell Christopher
Try #2, change the order of arguments to "get" using partial
(defn get-in
([m ks]
(get-in m ks nil))
([m ks not-found]
(letfn [(local-get-in [nf m ks] (get m ks nf))]
(reduce (partial local-get-in not-found) m ks
On Tue, May 18, 2010 at 5:23 PM, Meikel Brandmeyer wrote:
> H
Although that would return the default for a key with a nil value. So you're
probably right reduce would have to change.
On Tue, May 18, 2010 at 3:49 PM, Russell Christopher <
russell.christop...@gmail.com> wrote:
> (defn get-in
> ([m ks]
> (reduce get m ks))
(defn get-in
([m ks]
(reduce get m ks))
([m ks not-found]
(if-let [res (get-in m ks)] res not-found)))
Longer but still uses reduce
On Tue, May 18, 2010 at 12:20 PM, Stefan Kamphausen
wrote:
> Hi,
>
> On May 17, 9:34 pm, braver wrote:
> > If get-in is to be consistent with get, i
Why does this work?
(defrecord R [k])
(extend-protocol P R (p [{:keys [k]}] k))
On Fri, Apr 30, 2010 at 2:52 PM, Sean Devlin wrote:
> I think you have your destructuring backwards.
>
> You fn should probably be (fn [{k :keys}] k)
>
> For example,
>
> user=> ((fn [{k :keys}] k) {:keys "Awesome"})
http://rosettacode.org/wiki/Matrix_transposition#Clojure
Does anyone know if transpose exists in core or contrib? A cursory check
doesn't reveal it, seems like it should be available.
Thanks
On Thu, Apr 8, 2010 at 10:27 PM, Per Vognsen wrote:
> Or you can separate concerns a bit more:
>
> (def
Another one using for
(defn col-widths [arr] (for [i (range (count arr))] (apply max (map #(nth %
i) arr
On Thu, Apr 8, 2010 at 1:55 PM, John Sanda wrote:
> Thanks for the explanation. I did see in the docs that the map function can
> take multiple collections, but I guess I did not quite u
downsize, and I am very busy in searching for
more employment. Therefore, I have very little time.
Is there any way that I could contribute to a future issue on this topic? I
probably won't have much time to write until I find additional work.
Sincerely yours,
Benjamin L. Russell
--- On S
In general I think the STM solution to most concurrency issues looks
promising, however in the case of dining philosophers I found that Java
locking was easier than a ref, atom or agent solution.
;;
(import java.util.concurrent.locks.ReentrantReadWriteLock)
(defn nth-chopstick [chopsticks i side]
(def matches {\( \) \[ \]})
(defn balanced? [s]
(empty? (reduce #(if (= (matches (peek %1)) %2) (pop %1) (conj %1 %2)) []
s)))
Learning Clojure. So far I'm really liking it. This is the first time I've
tried anything outside of some REPL incantations from books, blogs, this
list, etc thus it wo
ting this project in Clojure would be
feasible?
-- Benjamin L. Russell
--
Benjamin L. Russell / DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile: +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto."
-- Matsuo Basho^
--
Benjami
RCE_FILE:6)
> [Thrown class clojure.lang.Compiler$CompilerException]
However, no definition is given for "thisfn" in the talk.
Forgive me if I am missing something very obvious, but does anybody
know where I can find the definition of "thisfn"?
-- Benjamin L. Russell
--
Benjamin L. Rus
62 matches
Mail list logo