ing it
to the usual cider/clojure reader/evaluator.
I'd appreciate any quick pointers for how I would best go about doing this,
if any of you folks understand these tools a bit better.
Thanks in advance for any tips!
Conrad Barski
--
You received this message because you are subscribe
Thanks, that's exactly what I was looking for!
On Thursday, July 3, 2014 8:41:07 AM UTC-5, Jake McCrary wrote:
>
> Hi Conrad,
>
> Not sure if this will meet your needs but I just tried using
> humane-test-output with lein-test-refresh and had auto-running of tests
> with
ting to make it work with "lein
prism" but I can't find any documentation for that... any pointers are
welcome!
On Wednesday, July 2, 2014 1:16:47 PM UTC-5, Conrad wrote:
>
> Hi, I'm doing some tests that require diff reporting (ala "lein difftest")
> but wan
Hi, I'm doing some tests that require diff reporting (ala "lein difftest")
but want them to autoreload (ala "lein prism").
Does anyone know if there's a way to make these libraries function
together? Is there some other approach/library I should be using to get
both diff reporting and autoreloa
On Thursday, February 13, 2014 8:55:00 PM UTC-6, David Nolen wrote:
> I've been banging the drum about Om & modularity for a while now and I've
> come up with the very beginning of a simple reusable component that I think
> demonstrates the power of Om's emphasis on modularity and application wid
f when the library is
> evolving so rapidly. Keeping docstrings and tutorials in sync and fielding
> questions is keeping me plenty busy :)
>
>
>
> David
>
>
>
> On Tue, Jan 28, 2014 at 8:46 PM, Conrad Barski wrote:
>
> Is it wrong to wish "com
Is it wrong to wish "component" worked like this?
(component (render []
(div nil "Hello There!")))
(component (render-state [state]
(div nil "Hello There!"))
(component (will-mount [_]
(js/console.log "mounting!"))L
(render [
(Should have written "DSL-based" not "macro-based"
On Tuesday, December 24, 2013 1:55:19 PM UTC-6, Conrad Barski wrote:
> On Tuesday, December 24, 2013 5:27:12 AM UTC-6, Nikita Prokopov wrote:
> > Hi David,
> >
> > cool work,
> >
> > Just w
On Tuesday, December 24, 2013 5:27:12 AM UTC-6, Nikita Prokopov wrote:
> Hi David,
>
> cool work,
>
> Just wondering, why in todomvc you rely so heavily onto #js literals, and
> prefer dsl-like syntax (dom/...) instead of some declarative markup like
> hiccup? Is it because of performance reaso
Two quick questions as I am working through the OM stuff... glad if anyone here
has some pointers to point me in the right directions...
1. I seem to be unable to get "lein trampoline cljsbuild repl-listen" to serve
up a css file on my own Om project... I have my css located at "[project
root]/
I am pretty new to Clojure, so what I am trying to do may make no sense. I
am completely open to alternative ways to get similar functionality
I have a Heap protocol and two records that implement that protocol:
(defprotocol Heap
(min [this]
(insert [this x]))
In heap1.clj
(defrecord Heap1
I just saw there's a special Incanter group- I will move my question over
there...
On Saturday, February 9, 2013 4:34:56 PM UTC-6, Conrad wrote:
>
> Hi, I'm having trouble finding any examples of how to use linear-model
> with simple clojure data. As per the documentation i
k
> "(0 1 2 3 4)"
>
> On Saturday, February 9, 2013 2:41:23 PM UTC-8, AtKaaZ wrote:
>>
>> these examples to illustrate what you are saying:
>>
>> => (= "(debug 1\r\n2 nil 3)" (pr-str (lazy-seq (list 2 (println "debug"
>> 1) 3
>&g
Hi, I'm having trouble finding any examples of how to use linear-model with
simple clojure data. As per the documentation it says both x and y can be
"vectors of values" so I would think the following would work:
(linear-model [1 2 3 4] [5 4 3 4])
Since the second can also be a matrix, I would
"with-out-str". This seems clumsy and is undocumented IMHO and I am
wondering if other people feel the same.
On Saturday, February 9, 2013 12:30:20 PM UTC-6, Conrad wrote:
>
> I tested this in the latest 1.5.0-RC6:
>
> => (def k (pr-str (for [x (range
f (ever since I've encountered
>>>> the map println example I've given) but I ignored it because people didn't
>>>> seem to find it a big deal and nothing I could do about it + it only
>>>> affected me in viewing REPL output.
>>>>
>&
013 at 7:42 PM, AtKaaZ >wrote:
>>
>>> I think it's an illusion from being lazy ?
>>> => (def k (pr-str (vec (for [x (range 5)]
>>> (do (pr x)
>>> x)
>>> 01234
>
I tested this in the latest 1.5.0-RC6:
=> (def k (pr-str (for [x (range 5)]
(do (pr x)
x
#'user/k
=> k
"(012340 1 2 3 4)"
This seems wrong to me... I can see what would be needed to fix it in
clojure/core.clj, but it would requ
HI, I'm looking for functionality like the "featurec" function, but I need
to be able to capture the unused keys.
Here is how "featurec" currently works:
(run* [q]
(== q {:a 1 :b 2})
(featurec q {:b 2})))
==> ({:a 1 :b 2})
However, I need to capture the keys th
Never mind, I just found it on clojars. It is:
https://github.com/brandonbloom/backtick
On Sunday, December 2, 2012 12:24:29 PM UTC-6, Conrad wrote:
>
> I remember seeing it somewhere recently but I can't find it now...
>
> As you probably know, if you quasiquote in clojure it a
I remember seeing it somewhere recently but I can't find it now...
As you probably know, if you quasiquote in clojure it automatically adds
namespaces:
> `[foo ~1]
[mylibrary.core/foo 1]
The library I am looking for lets you write:
> (template [foo ~1])
[foo 1]
Thanks for your help!
--
You
Sounds good- That means I can use the source layout & project.clj of
core.logic as a guide to organize my library- Thanks!
On Friday, October 12, 2012 1:57:13 PM UTC-5, David Nolen wrote:
>
> On Fri, Oct 12, 2012 at 2:54 PM, Conrad >
> wrote:
> > Hi, can someone
Hi, can someone point me towards some documentation as to the proper way to
package a ClojureScript-based library that can be used in the usual way via
leiningen?
I'm thinking I'd be able to upload it to clojars.org (as I would do for a
Clojure library), but given that "Jars" are something Java
Hi Everyone... Quick question about Rich's latest talk:
In it he eloquently argues that "you don't want to systems to communicate
with each other by calling each other's methods. Instead it is better to
just move values between systems that can also be queued."
It occurs to me that RESTful web
Thanks Michal!
That worked like a charm :-)
On Oct 8, 4:10 pm, Michał Marczyk wrote:
> Just to highlight the key point: with the above setup, custom macros
> defined in files under src/clj/ are available to cljs code under
> src/cljs/ because src/clj/ is included on the classpath in the above
>
d manually editing the
CLASSPATH variable in my Ubuntu terminal every way imaginable. I have
also tried moving the "macros.clj" file into every place imaginable
(including every conceivable place in "~/clojurescript" but I am not
able to get it to work.
Can someone help me fig
Ah! I didn't know about a js namespace- Thanks for figuring that out,
Michael!
On Aug 12, 6:15 pm, Michael Wood wrote:
> On 12 August 2011 23:19, Conrad wrote:
>
> > Sorry if this has an obvious answer, but there is still only limited
> > documentation on clojurescript na
indow/Date.)
(.now Date)
I've run out of ideas for what the correct incantation is- Can someone
give me a pointer? Thanks!
-Conrad Barski
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googleg
:
> On Fri, Aug 12, 2011 at 2:34 PM, Conrad wrote:
> > In case anyone wants to know what the answer is: goog.storage was
> > added with closure library revision 888, but the version used in
> > clojurescript is revision 790. This is because Google hasn't released
> >
In case anyone wants to know what the answer is: goog.storage was
added with closure library revision 888, but the version used in
clojurescript is revision 790. This is because Google hasn't released
any pre-packaged versions of the closure library since March.
On Aug 12, 1:47 pm, Conrad
2, 1:47 pm, Conrad wrote:
> Hi everyone- I'm loving clojurescript and am trying to create a test
> app with it. This test app was going to use goog.storage, but for some
> reason this library doesn't appear to be available when I install
> clojurescript (unlike goog.dom, goog.event
sion of the closure library? If the closure library is out of
date on purpose, does anyone know when support of a more recent
closure library version is planned?
Thanks!
Conrad Barski
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
On Jul 6, 8:08 pm, David Sletten wrote:
> On Jul 6, 2011, at 10:58 PM, Conrad Taylor wrote:
>
>
>
>
>
>
>
>
>
> > On Jul 6, 7:33 pm, Benny Tsai wrote:
> >> Could you please post the entire form, including the code surrounding the
> >>
On Jul 6, 7:33 pm, Benny Tsai wrote:
> Could you please post the entire form, including the code surrounding the
> cond form (since total, amount, and country need to be defined somewhere)?
Benny, that was just sample code to zero in on the initial issue. I'm
working
through the SICP with a lot
On Jul 6, 7:16 pm, David Sletten wrote:
> Conrad,
>
> The syntax of 'cond' is actually pretty straightforward. Following the symbol
> 'cond' you have pairs of predicate forms and consequent expressions. The
> 'cond' form evaluates each predicate in
On Jul 6, 5:34 pm, Conrad Taylor wrote:
> Hi, what's the correct way to define an else clause of a cond form?
> For example,
>
> a)
>
> (cond
> (= total 20) 8.75
> (or (amount > 20) (= country "US") 9.75)
> (else 10.0))
>
> b)
>
> something like this:
>
> (cond (= total 20) 8.75
> (or (> amount 20) (= country "US")) 9.75
> :else 10.0)
>
> *See:http://dev.clojure.org/display/design/Library+Coding+Standards
Benny, thanks for the reference.
-Conrad
--
You received this message
Hi, what's the correct way to define an else clause of a cond form?
For example,
a)
(cond
(= total 20) 8.75
(or (amount > 20) (= country "US") 9.75)
(else 10.0))
b)
(cond
(= total 20) 8.75
(or (amount > 20) (= country "US") 9.75)
:default 10.0)
c)
(cond
(= total 20) 8.75
ess one can easily upgrade it to the latest
by
doing the following:
lein upgrade
Thanks for any additional information that you can provide.
-Conrad
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloju
Thanks guys for the informative replies!
-Conrad
On Feb 4, 11:30 am, Conrad wrote:
> Hi everyone: Even though I'm an intermediate clojure user, I realize
> there's some basic things I just don't understand about JARs and
> Leiningen. It seems to me the answers to th
Hi everyone: Even though I'm an intermediate clojure user, I realize
there's some basic things I just don't understand about JARs and
Leiningen. It seems to me the answers to these questions would make
great additions to the Leiningen FAQ (unless I'm the only one
boneheaded enough not to be able to
Oh yeah, here is the blog post:
http://weblog.jamisbuck.org/2011/1/20/maze-generation-wilson-s-algorithm/comments/8627#comment-8627
--
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
Hi guys- I saw this neat blog post today on Wilson's algorithm. I
think it is a great algorithm for learning how to write clean code
with the latest 1.2 or 1.3 core libraries. To start off, here is my
solution: http://clojure.pastebin.com/dd5ccDkP
I'd love to see what the rest of you can do to imp
Hi everyone- I am running an emacs slime repl via "lein swank". I want
to do some simple data input/output by writing a program that runs in
the repl. However, when I try to execute "(read)" through the slime
repl it gives a "stream closed" error. This operation works fine if
done through "lein rep
code.
On Apr 1, 11:43 am, Daniel Werner
wrote:
> Hi Conrad,
>
> thanks for putting this tutorial up. "CastingSPELs" was actually one
> of the documents that inspired me to start learning Lisp, so I'm happy
> to see it may help others get started with Clojure.
>
&
I know, I know I'll refactor the defs :-)
Thanks for the other corrections, too.
On Apr 1, 3:40 am, Stefan Kamphausen wrote:
> Hi,
>
> >http://www.lisperati.com/clojure-spels/casting.html
>
> by sheer accident I found that version just last night. You should
> probably refactor those defs of glo
will teach better habits, but it would probably be very
different from "Casting SPELs" since Clojure poses different
challenges than Common Lisp and would therefore benefit from a
different approach.
Conrad Barski
--
You received this message because you are subscribed to the Google
Group
Yeah, the Clojure namespacing does make translating symbol references
in my game-action macro a bit cumbersome... But I think Clojure's
straight-forward approach to namespacing is well worth this small
inconvenience :-)
On Mar 19, 8:54 am, alux wrote:
> JC Petkovich, thank you. I couldnt see your
My rule of thumb is to place items into maps if there are more than
2-3 elements- After that point, it becomes hard to read code that
manipulates a raw vector without position labels. Of course I have
allowances for performance-sensitive situations.
On Feb 12, 10:36 pm, Hozumi wrote:
> Hi,all
> A
Let me think about the points you make in this post and I'll shoot you
an email in the next day or so to see if I can get a better
understanding of what you need.
-Conrad
On Jan 27, 5:49 am, Jeff Rose wrote:
> I've only just skimmed the code, but it seems supporting multiple
>
DC would be awesome!
On Jan 26, 7:20 pm, David Cabana wrote:
> +1 DC
--
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 wit
First I have to focus on bugs and improve the layout algorithms. Then
I want to create an html output pipeline (unless IE suddenly gets SVG
support in the interim) I agree svg and dot would be nice as well.
On Jan 26, 1:24 am, Travis wrote:
> Any plans to add SVG support? Seems it would, if anyth
I should point out that the error involves the fact that the
graphical.clj code uses items in the 'vijual namespace in an
unqualified fashion (such as the "half" function) which I would expect
would be allowed, but the compiler complains about this.
On Jan 23, 8:58 am, Conra
actices (and also
resolve this error) it would be much appreciated!
-Conrad
On Jan 23, 8:39 am, Conrad wrote:
> Yes, I'm getting the same error- The console functions (use 'vijual)
> work fine from the clojar but the graphical functions (use
> 'vijual.graphical) are t
symbol: half in this context
> (graphical.clj:60)
>
> -Jeff
>
> On Jan 22, 11:06 pm, Conrad wrote:
>
>
>
> >http://lisperati.com/vijual/
>
> > Hope some of you find this library useful. Let me know if you have
> > feature requests or want to help me imp
va.lang.Exception: Unable to resolve symbol: half in this context
> (graphical.clj:60)
>
> -Jeff
>
> On Jan 22, 11:06 pm, Conrad wrote:
>
>
>
> >http://lisperati.com/vijual/
>
> > Hope some of you find this library useful. Let me know if you have
> > feat
http://lisperati.com/vijual/
Hope some of you find this library useful. Let me know if you have
feature requests or want to help me improve this library.
Conrad Barski
lisper...@gmail.com
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
allow the JIT to do the "is this constant?"
> work.
>
> >> mapcar
>
> map.
Richard, thanks for the information and I appreciate it. I guess I
can use
Rich Hickey's advice that if you don't find an equivalent, then it's
easy
to write in Clojure.
-Con
> I could afford some minor regressions here and there, I stopped step
> 1, and currently I'm just doing TDD with steps 2. and 3., writing
> idiomatic (at least I hope so :-) ) clojure from scratch.
>
> HTH,
>
> --
> Laurent
>
Laurent, thanks for sharing your experie
t require the above forms.
Thanks in advance,
-Conrad
--
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 yo
11:34 AM, Sean Devlin
> > wrote:
> > > Take a look at pmap
>
> > I don't think that's the kind of "parallel" being asked about.
>
> > > On Jan 8, 11:13 am, Conrad wrote:
> > >> Looping variables in a clojure "for" loop are
fferent
seqs to "map")
On Jan 8, 11:34 am, Sean Devlin wrote:
> Take a look at pmap
>
> On Jan 8, 11:13 am, Conrad wrote:
>
>
>
> > Looping variables in a clojure "for" loop are iterated in a serial,
> > cartesian fashion:
>
> > > (for
Looping variables in a clojure "for" loop are iterated in a serial,
cartesian fashion:
> (for [a (range 5) b (range 10 15)]
(+ a b))
(10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16
17 18)
I was wondering if there's a standard idiom for looping in parallel
fashion- Doe
ft-total2 [lst]
> (let [tot (atom 0)]
> (map (fn [cur]
> (let [old-tot @tot]
> (swap! tot (partial + cur))
> [cur old-tot]))
> lst)))
>
> (use 'clojure.contrib.seq-utils)
> (defn left-total3
> [coll]
> (map list coll
d more flexible than any other solution
suggested so far, I think.
On Dec 28, 9:11 am, Meikel Brandmeyer wrote:
> Hi,
>
> Am 28.12.2009 um 02:36 schrieb Conrad:
>
> > => (left-total [3 5 10 1 2 7])
> > ([3 0] [5 3] [10 8] [1 18] [2 19] [7 21])
>
> If in doubt, use lazy
ed versions.
On Dec 27, 8:52 pm, David Cabana wrote:
> Try this:
>
> (use '[clojure.contrib.seq-utils :only (reductions)])
>
> (defn left-total [lst]
> (map vector lst
> (reductions + (cons 0 lst
>
>
>
> On Sun, Dec 27, 2009 at
"conj", I mean.
On Dec 27, 11:04 pm, Conrad wrote:
> Hmmm... I didn't think of using cons/vectors to avoid the reverse...
>
> On Dec 27, 10:47 pm, David Cabana wrote:
>
>
>
> > If speed matters, I found both of these to be faster than the version
> >
That one is elegant, but uses more than the minimum number of
additions, one of the conditions I mentioned in the original post. (In
real instances of this pattern in my code, the addition contains other
function that are very costly to perform, which is part of the reason
for this post.)
On Dec 2
op [result [ ]
> tot 0
> terms lst]
>
> (if (empty? terms)
> result
> (let [f (first terms)]
> (recur (conj result [f tot])
> (+ tot f)
> (rest terms))
>
>
>
> On Sun,
t;
> (defn left-total [lst]
> (map vector lst
> (reductions + (cons 0 lst
>
>
>
> On Sun, Dec 27, 2009 at 8:36 PM, Conrad wrote:
> > I've been writing Clojure code today and have noticed the same pattern
> > show up multiple times, but can't f
52 pm, David Cabana wrote:
> Try this:
>
> (use '[clojure.contrib.seq-utils :only (reductions)])
>
> (defn left-total [lst]
> (map vector lst
> (reductions + (cons 0 lst
>
>
>
> On Sun, Dec 27, 2009 at 8:36 PM, Conrad wrote:
> &
I've been writing Clojure code today and have noticed the same pattern
show up multiple times, but can't find an elegant way to code it in
idiomatic Clojure. I feel like I'm missing an obvious solution...
anyone else see something I don't? Thanks in advance!
The problem boils down to the following
Please only contact me if you are a current resident of the Twin
Cities area. We want someone who is available for face-to-face
meetings.
con...@zipnosis.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" g
Never mind- I figured it out looking at the str-utils source...
the answer is (apply str [\t \e \s \t])
On Sep 8, 6:05 pm, Conrad wrote:
> Although this shows how to convert a string into a seq of chars, for
> the life of me I can't find a function in any libraries (or any in
Although this shows how to convert a string into a seq of chars, for
the life of me I can't find a function in any libraries (or any info
in the newsgroup) to do the reverse, i.e. (\t \e \s \t) => "test"...
The closest I can find is (print-str [\t \e \s \t])=>"t e s t"
...can anyone give me a po
Thanks again everyone for the helpful replies- The clojure community
is definitely one of the languages's strengths.
On Sep 7, 5:19 pm, Conrad wrote:
> Hi everyone! I have some data that consists of key/value pairs, but
> that need to maintain their order, in terms of when they we
pared with memory access.
>
> On Sep 8, 5:19 am, Conrad wrote:
>
> > Hi everyone! I have some data that consists of key/value pairs, but
> > that need to maintain their order, in terms of when they were added to
> > the list. In most lisps you'd do this with an ass
Ah! ArrayMap! I missed that structure in the documentation!
That was exactly what I'm looking for.
On Sep 8, 1:09 am, Chouser wrote:
> On Sep 7, 2009, at 5:19 PM, Conrad wrote:
>
>
>
> > Hi everyone! I have some data that consists of key/value pairs, but
> > that
d
anywhere?)
Anyway, I was just curious what people's thoughts were on this
issue...
-Conrad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
Thanks for the info- Using "into" definitely cuts down a lot on the
ugliness.
--~--~-~--~~~---~--~~
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 pos
Hi everyone! I was wondering if there was a better idiom in Clojure
for filtering items from a map... Suppose we want to remove all items
from a map that have an odd number as a value. Here's how I'd write
it:
=> (apply hash-map
(apply concat
(filter (fn [[key val]]
Thank you so much guys- I knew something was wrong... didn't realize
though that I was using the wrong loading command.
-Conrad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
f x remains false, despite the fact that I
reloaded the file... can someone explain to me why reloading the code
doesn't cause the variable x to be redefined back to true? It seems if
variables in "used" files aren't re-def'ed then you can't prop
Yes, I agree using loop/recur is preferable for many reasons when
possible.
On Jul 9, 8:37 pm, Daniel Lyons wrote:
> On Jul 9, 2009, at 5:56 PM, Conrad wrote:
>
>
>
> > Hi everyone:
>
> > I'm trying to optimize an inner loop and need a variable that mutates
&g
I suspect the answer will be that I should use atoms (despite the fact
that it isn't completely low level) since I see RH uses those in his
memoization example, which is pretty much the epitemy of optimizing
with a mutating local variable. :-)
On Jul 9, 7:56 pm, Conrad wrote:
> Hi
Hi everyone:
I'm trying to optimize an inner loop and need a variable that mutates
to make this work. It does NOT need to be a thread-safe variable.
What's the best way to create a "plain ol' mutating variable" in
Clojure? I know I can always use an Atom, but I was wondering if
there's a more low
Hi, is there a standard way to tell if a variable is bound? I couldn't
find a way.
Basically I want something like this, but without the horrible hacks:
(defn bound? [var]
(try (eval var)
true
(catch java.lang.Exception x false)))
> (bound? 'foo)
false
> (def foo 33)
33
ss it somewhere, or was I
right to create my own? Please let me know if I'm reinventing the
wheel.
Thanks!
Conrad Barski
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this
Yup, that fixed it.
Thanks!
-Conrad
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, sen
to clearly indicate that this code is not taking
advantage of the second core of my Core2 Duo processor... Can someone
help me understand what I'm doing wrong?
Thanks in advance!
Conrad Barski, M.D.
Additional specs on my environment:
Dell Inspiron 1420
Ubuntu Ibex
Core2 Duo c...@2.20
to clearly indicate that this code is not taking
advantage of the second core of my Core2 Duo processor... Can someone
help me understand what I'm doing wrong?
Thanks in advance!
Conrad Barski, M.D.
Additional specs on my environment:
Dell Inspiron 1420
Ubuntu Ibex
Core2 Duo c...@2.20
91 matches
Mail list logo