I've also been using my own version of a map-to-values function
extensively and it would be really nice to have something like that,
either in contrib or in core. It comes in handy surprisingly often.
Best,
Thomas
On Sep 6, 5:40 pm, Nicolas Oury wrote:
> Dear all,
>
> is there a function to map
On 6 September 2010 23:22, Cameron Pulsford wrote:
[...]
> Changing my declares to defs did the trick did though and learning
Does this break it again?
(do (def *macros*))
Because that's all that declare does:
user=> (macroexpand-1 '(declare *macros*))
(do (def *macros*))
--
Michael Wood
-
Docstrings seem designed for fairly terse comments about the nature of
the function. It's great for providing little hints about how the
function works to jog one's memory by typing (doc ...) in the REPL, or
for searching with find-doc. But I just don't think I can fit the
kind of full documentat
Hi,
2010/9/7 Mark Engelberg :
> Docstrings seem designed for fairly terse comments about the nature of
> the function. It's great for providing little hints about how the
> function works to jog one's memory by typing (doc ...) in the REPL, or
> for searching with find-doc. But I just don't thin
Just a quick thought (and before I've had my coffee no less!), but I
think what I'd do is replace the boolean *end-search* with a
*search-state* var that could be either :idle, :running or :stopping.
Then in search-stops, just set *search-state* to :stopping -- you
don't need to actually wait for t
Hello Sunil ,
Using windows xp , just got into clojure , not much knowledge
Thanks
AV
On Sep 6, 8:00 pm, Sunil S Nandihalli
wrote:
> Hi Abraham,
> Make sure that the jar file of the "external" library you are referring to
> is in path. If you are developing clojure code .. I would strongly adv
> I'd be happy to show my frame-hash implementation as long
> as you won't laugh too hard at it. I'll throw it up on github sometime
> soon after I clean it up a bit. I like it because a video treated as
> just a sequence of hash-maps which flows through an image processing
> pipeline.
Sounds excel
On Sep 6, 5:48 pm, "K." wrote:
> Hello,
>
> I've got a concurrency problem and it's not really clear to me how to
> solve it. I have a Swing GUI doing a search in background with agents
> and the results are displayed one after the other, also in background.
>
> Here is, largely simplified, how I
Hello,
I am trying to set up an env that would be hosted on my dropbox or usb stick
so i can access it anywhere.
Problem is that it works at home, but at work lein deps is unable to fetch
the jars.
C:\TEMP\My Dropbox\dev\hello-www>lein deps
Downloading: org/clojure/clojure/1.2.0/clojure-1.2.0.po
Hi,
Several questions / thoughts:
2010/9/6 K. :
> Hello,
>
> I've got a concurrency problem and it's not really clear to me how to
> solve it. I have a Swing GUI doing a search in background with agents
> and the results are displayed one after the other, also in background.
>
> Here is, largely
Solved.
The problem was maven proxy settings.
After adding settings.xml file to home works like a charm. I am answering
here for future googlers.
Best regards,
Karol Adamiec
On Tue, Sep 7, 2010 at 12:44 PM, Karol Adamiec wrote:
> Hello,
>
> I am trying to set up an env that would be hosted on
java.lang.Exception: Name conflict, can't def m-bind because
namespace: user refers to:#'clojure.contrib.monads/m-bind
What namespace help doc. should I read to resolve this issue ? Maybe I
should not read about monads first.
--
You received this message because you are subscribed to the Google
http://clojure.org/namespaces
You should require clojure.contrib.monad and bot use it.
(ns my-namespace
(:require (clojure.contrib.monad :as m))
m/m-bind, for example.
Then you can define your own m-bind without conflict with an existing one.
On Tue, Sep 7, 2010 at 1:13 PM, MohanR wrote:
> j
Awesome! Thanks so much!
Anthony
On Sep 7, 2:10 am, Meikel Brandmeyer wrote:
> Hi,
>
> first of all we should start with the form we finally want to have:
>
> (defrecord Foo [a b c])
>
> (defn make-Foo
> [& {:keys [a b c] :or {a :x c :z}}]
> (Foo. a b c))
>
> ; Use as: (make-Foo :b :f) => (
On Tue, Sep 7, 2010 at 2:13 PM, MohanR wrote:
> Maybe I should not read about monads first.
...and report your findings here or blog somewhere if you don't mind
:) I've been reading a lot about monads lately and can't get my head
around it yet so any help appreciated (I'm coming from Java and
Cl
> ...and report your findings here or blog somewhere if you don't mind
> :) I've been reading a lot about monads lately and can't get my head
> around it yet so any help appreciated (I'm coming from Java and
> Clojure is my first real functional language - that's why it causes
> headaches, I believ
On Sep 5, 8:56 pm, Alyssa Kwan wrote:
> Any thoughts on how to marshal functions? What about vars and dynamic
> binding?
I don't think marshaling closures will ever happen without changes to
Clojure itself. I haven't looked into how much work it would require,
or how much it would impact Clojure'
On Tue, Sep 7, 2010 at 4:04 PM, Nicolas Oury wrote:
> Hope that helps.
It did. Thanks. Would you share some examples of its use in Clojure
apps? I'd love seeing more examples where a monad-based solution is
contrasted/compared to its more traditional, common approach. I wonder
why monads are not
On 5 September 2010 20:53, HB wrote:
> It is public idea in Ruby community that Sinatra is best used for
> rapid prototyping and creating API for web application.
This opinion tends to come from developers used to larger web
frameworks like Ruby on Rails. I don't agree with this. RoR makes
certai
Monads are mostly used because they are necessary in Haskell. In
Clojure the urgent need is not there. However, you can sure get some
cleaner and/or more composable code if you use monads in your
advantage.
2010/9/7 Jacek Laskowski :
> On Tue, Sep 7, 2010 at 4:04 PM, Nicolas Oury wrote:
>
>> Hope
Perhaps you would be interested in postdoc:
http://github.com/markmfredrickson/postdoc
Postdoc allows structured documentation, runnable examples, and
related items based on namespaced identifiers. One was to allow for
separate files that included the documentation away from the code, so
as not
still i am not getting , i meant to say that , i want to use
clojure.contrib. libraries , how to make it work with my system . from
where this lib has to copied and which directory to copy...
may be lib is clj's files
Anybody'
Thanks in advance
AV
On Sep 7, 11:02 am, Abraham Varghese wrote:
> H
Hi,
I'd recommend looking at how plt-scheme solved this problem (see [1]).
They actually defined alternative readers in which either prose or code
can be the default input mechanism (with the other escaped in some way).
I don't know if Clojure's reading system is quite flexible enough to
support s
On Mon, Sep 6, 2010 at 19:50, Wilson MacGyver wrote:
> I figure enough time has passed that I want to bring this up again.
>
> For JSON, are you using clojure.contrib.json or clj-json? Why?
>
We use org.danlarkin.json, because it encodes and decodes (contrib.json
didn't when we made our decisio
You've seen a lot of recommendations for Leiningen. I suggest you try
it out: everyone seems to think it will solve your problem (Hint: it
will). But even if you have no idea what it is, the fact that everyone
is suggesting it means you should try it out before you simply repeat
the question you've
On Tue, 7 Sep 2010 08:36:27 -0700 (PDT)
Abraham wrote:
> still i am not getting , i meant to say that , i want to use
> clojure.contrib. libraries , how to make it work with my system . from
> where this lib has to copied and which directory to copy...
> may be lib is clj's files
As other have p
On Tue, Sep 7, 2010 at 1:25 AM, Mark Engelberg wrote:
> Docstrings seem designed for fairly terse comments about the nature of
> the function. It's great for providing little hints about how the
> function works to jog one's memory by typing (doc ...) in the REPL, or
> for searching with find-doc
I'm having trouble writing code in one namespace that instantiates a type
that is defined in another namespace.
I have two source files:
other.clj defines a function called my-fn and a type called huss:
(ns my-project.other)
(defrecord huss [x y z])
(defn my-fn []
(println "my-fn"))
core.
Types created by deftype & defrecord are Java classes and you'd have
to use :import to bring them into another namespace:
(ns ...
(:import my-project.other.huss))
Or if you have multiple types,
(:import [foo.bar Wibble Wobble])
It might be simpler to define a factory function and use that (th
Hi,
I'm trying to develop a clojure compiler for LLVM.
may need a small nudge in the right direction.
anyone who can mentor me on this project?
Thanks
Sreeraj.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloj
Hi Michał,
Thanks for the explanation. I hadn't made the connection between the fact
that defrecord creates a "proper" java type and the fact that a Java class
would need to be :import-ed. I agree that creating a make-huss function
might be simpler. Part of me is thinking "why don't I fall back on
These seem like good changes to me! Any plans to push?
--
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 p
On 7 September 2010 23:56, Chris Jenkins wrote:
> "why don't I fall back on defstruct
> and defmulti, at least until performance becomes important"
I believe defrecord was meant to supersede defstruct, but apparently
defstruct is not (yet?) marked as deprecated in 1.2, so sure, that
might be a re
Why does c.c.trace give different output on 1.2 than it did on 1.1?
>From
>http://learnclojure.blogspot.com/2010/02/slime-2009-10-31-user-defn-fib-n-if-n-2.html
On 1.1
user> (dotrace (fib) (fib 3))
TRACE t1880: (fib 3)
TRACE t1881: |(fib 2)
TRACE t1882: ||(fib 1)
TRACE t1882: |
Hm, I would guess that the self-call gets "hard-wired", since if you
define fib thus:
(defn fib [n]
(if (#{0 1} n)
n
(+ (#'fib (- 2 n)) (#'fib (dec n)
then it works as you expect.
Not that I'm really sure what's happening; just a conjecture. Also, I
believe I already bumped into th
I have two lein swanks going on different ports against the same
project. I open up two slime-connect's in emacs. How can I compile
(C-c C-k) my core.clj to the two different slime-connect's.
hhh
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
I don't think you can do that,
but you can connect to the same swank instance twice with M-x slime-connect
and function updates will be reflected in both repls.
--Robert McIntyre
On Tue, Sep 7, 2010 at 8:54 PM, HiHeelHottie wrote:
>
> I have two lein swanks going on different ports against the s
Hi,
I have recently published Indyvon -- an experimental multithreaded GUI
library for Clojure. The main idea behind the library is that base UI
element (called "layer") does not define any state (has no location,
size, parent element). Dynamic layout of layers is captured at the
rendering time an
Phil Hagelberg writes:
> On Tue, Sep 7, 2010 at 1:25 AM, Mark Engelberg
> wrote:
[...]
>> Javadoc has an interesting property: it considers that the first
>> sentence serves as a summary for the doc. The "sentence" delimiter is
>> just the point in the case of javadoc.
>
> Emacs docstrings work
On Tue, Sep 7, 2010 at 1:25 AM, Mark Engelberg wrote:
> Docstrings seem designed for fairly terse comments about the nature of
> the function. It's great for providing little hints about how the
> function works to jog one's memory by typing (doc ...) in the REPL, or
> for searching with find-doc
Hello everybody,
I recently came across giws
http://www.scilab.org/products/other/giws
a tool to call java code from c/c++ all it really needs to generate all the
jni-wrappers is a simple xml file which indicates the class name and the
member functions .. some thing as simple as ...
On Tue, Sep 7, 2010 at 8:36 AM, Abraham wrote:
> still i am not getting , i meant to say that , i want to use
> clojure.contrib. libraries , how to make it work with my system . from
> where this lib has to copied and which directory to copy...
> may be lib is clj's files
One word: Leiningen :)
-
On Tue, Sep 7, 2010 at 10:23 PM, Sean Corfield wrote:
> I'm watching this thread and I'm wondering what kind of documentation
> people are talking about here. I've always been used to using
> self-documenting function / variable names and short comments for
> documenting everything. Clearly you gu
Hey all, I know everyone is excited about the first clojure-conj and I
will be there myself! BUT, I would also like to draw your attention to
the Strange Loop conference Oct 14-15th in St. Louis. Strange Loop
will feature 8 talks on Clojure (http://strangeloop2010.com/tag/
Clojure ) as well as a k
It's been in contrib's master branch for a while now. Here's the
updated doc:
http://clojure.github.com/clojure-contrib/branch-master/logging-api.html
On Sep 7, 3:01 pm, ka wrote:
> These seem like good changes to me! Any plans to push?
--
You received this message because you are subscribed
45 matches
Mail list logo