Rob Nikander writes:
> Thanks for the explanation! This is very close to what I want. I see some
> confusing behavior though. See below.
>
> On Friday, January 5, 2018 at 2:40:14 PM UTC-5, Brian J. Rubinton wrote:
>>
>>
>> The work-queue channel has a fixed buffer size of 1. A collection (range
Yuri Govorushchenko writes:
> Thank you the pointers! So far I ended up with writing a small `map` macro
> which is similar to `s/keys` but checks that keys are already in the
> registry:
> https://gist.github.com/metametadata/5f600e20e0e9b0ce6bce146c6db429e2
Note that you can simply combine
Abhinav Gogna writes:
> (defn run-in-parallel
> "run-in-parallel runs 500 different threads.
> you can give each thread number of files you want to generate
> Eg: run-in-parallel 100 will generate 500*100 = 5 files"
> [y]
> (dotimes [_ 500]
> (future
> (.start (Thread. (run-me y
range-peek
> (filter (partial prime? primes))
> first)]
> (cons p (lazy-seq (sieve (conj primes p)))
>
> (last (take 1 (sieve)))
>
> This version keeps the visited primes in a vector so it will grow in
> memory but won’t overfl
All -
I'm trying to generate a lazy sequence of primes using Erastosthenes Sieve
(from Abelson & Sussman) and am encountering some issues with lazy sequence.
Here's what I have:
---
(defn divisible?
[input numerator]
(= 0 (mod input numerator)))
(defn sieve
[stream]
(lazy-seq
(con
Also keep in mind that a dynamically-bound variable is global state,
even if it's unbound by default. You might want to keep your library as
simple and possible and just pass it as the first argument. That also
greatly simplifies usage with Stuartsierra's component design.
A `with-connection' mac
You need to use `ns-resolve' to resolve the actual vars you want to use.
Here's a snippet from one of our projects which shows the approach:
```clojure
(defn ws-repl []
(require 'cemerick.piggieback
'weasel.repl.websocket)
(let [cljs-repl (ns-resolve 'cemerick.piggieback 'cljs-repl
See https://github.com/ring-clojure/ring/wiki/Static-Resources
You should be able to pass '.' signifying the directory your application
was started in (that might NOT be the same place as the jar).
viper110110 writes:
> I would like to be able to serve up files from a folder after the jar has
Fluid Dynamics writes:
> On Saturday, January 24, 2015 at 1:43:15 PM UTC-5, Elric Erkose wrote:
>>
>> Hello,
>>
>> I have an app which specifies a protocol and a record name. At runtime, it
>> searches the classpath for files implementing the specification and creates
>> a map of namespace to i
David Nolen writes:
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> New release version: 0.0-2719
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "0.0-2719"]
>
> ClojureScrip
Hello,
I'm getting the following error while working on a Clojure(Script) REPL
on a middle-sized project after some time. None of my colleagues seem to
be able to reproduce it. I'm not able to reproduce it on other projects
either.
Caused by: java.lang.OutOfMemoryError: PermGen space,
compiling
gt;>
>>
>
> --
> 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
>
Use map. for produces permutations.
Am 27.06.2014 17:02 schrieb "Glen Rubin" :
> I have a list that I want to combine in some way with an incremented list,
> so I was trying to write a for expression like this:
>
> (for [i '(my-list-of-crap), j (iterate inc 0)] (str i j))
>
>
> The problem with th
>>> more)))]
>>> (or (step coll) (
>>>
>>> => (partition-by-seq [:b :c] [])
>>>
>>> ()
>>>
>>> => (partition-by-seq [:b :c] [:a :d])
>>>
>>> ((:a :d))
>>>
>>> => (partiti
Hi,
what is the preferred way to find sub-seqs in a seq? I am trying to convert
[:a :b :c :d :a :b :c :d :a :b :c]
into
((:a) (:b :c) (:a :d) (:b :c) (:a))
using the sub-seq (:b :c) instead of positions.
partition, partition-by and the like all look at one element at a time.
What I need is a
Could it be that 0.6.1 doesn't trigger a re-render of a component when
just `:opts' has changed? I have a parent component with passes a
boolean (`:selected?') down to it's children in the `:opts'-map.
The parent-component's `render' is called, but the children's isn't anymore.
I understand that t
This snippet is wholly incomplete. Can you please provide a more
complete, testable example as well as a detailed description of the
error you're seeing?
On Tue, Apr 22, 2014 at 4:48 PM, Cecil Westerhof wrote:
> Obvious not very neat, but I tried as a first hack to do something with the
> command
Really depends on that you want. First thing coming to my mind is:
(for [l (:langs langs)
[k v] l]
(str k " " v))
This will give you a flat lazy list of strings.
On Mon, Apr 21, 2014 at 5:32 PM, Hussein B. wrote:
> Hi,
>
> For a data structure such as:
>
> (def langs {:langs [ {:lang "C
A simple repl-targeted library to introspect classes might prove
useful, but is there any reason to use such a short syntax for
everything? I'll surely have problems remembering the symbols.
On Fri, Apr 11, 2014 at 5:57 AM, zcaudate wrote:
> Please use 0.1.10 update. clojure 1.6 does not load clo
What on this page would solve your problem? I just see
Generators/Iterators, Array Comprehensions, lexical let and
destructuring assignment.
On Wed, Apr 9, 2014 at 9:39 AM, t x wrote:
> I believe
> https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7
> suffices.
>
> Howe
Checking out a project your project depend on, finding the right
version, etc. is quite cumbersome.
With Emacs/nrepl, you can just press M-. over any function to jump to
the definition, even when it's inside a jar.
You can also edit and reload it (via C-c C-c). I don't think you can
save it, but t
You are likely passing a string to the function, not a java.io.File object.
On Thu, Mar 27, 2014 at 1:16 AM, Brandon Barret wrote:
>
> I am working on a project that requires me to get the size of a file and
> access it's last date of modification. It seems like the java methods
> .length and .
The data type created by defstruct isn't anything more than a map
which can store the specified fields a bit more efficient than
'normal' maps. You can just `assoc' any other key-value pairs as in
any other map.
Also, have a look at records - I think StructMaps have been deprecated
(or at least ar
symbol.
You start with the symbol +. The function `(ns-resolve ns sym)' will
try to find a var in `ns' with the same name as `sym' and return it.
In the end, you want to call the function behind the var, so you have to
use `var-get' to get the value the var points to.
--
Moritz Ulrich
pgphkZl7qIu1U.pgp
Description: PGP signature
>>>> 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 post.
>>>> To unsubscribe from this group, send email to
>>>> clojure+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/clojure?hl=en
>>>> ---
>>>> You received this message because you are subscribed to the Google Groups
>>>> "Clojure" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an
>>>> email to clojure+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> 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 post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
--
Moritz Ulrich
pgp5NE2maqqks.pgp
Description: PGP signature
erformance penalty on state-changes should be negligible
as long as React doesn't need to modify the DOM.
--
Moritz Ulrich
--
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
N
`reduced' was added in 1.5. It looks like 4clojure is using an older
version.
On Wed, Mar 19, 2014 at 5:44 PM, Andy Smith wrote:
> Hi,
>
> Ive been looking at http://www.4clojure.com/problem/137 and I have a
> solution :
>
> (fn [x b] (reduce #(let [r (quot x %2) d (mod r b)] (if (zero? r) (redu
If so,
take a look at `file-seq':
http://clojuredocs.org/clojure_core/clojure.core/file-seq
Passed a java.io.File pointing to a directory, it gives you a sequence
of file objects in it and all its subdirectories.
To get a list of all files ending in .jar in the current directory:
It might actually be counter-productive to learn Common Lisp before
Clojure, as Clojure is so much simpler easier to learn/understand than
Common Lisp.
On Mon, Mar 10, 2014 at 4:52 PM, Dennis Haupt wrote:
> you can learn clojure without learning lisp first :)
>
>
> 2014-03-10 15:41 GMT+01:00 Roel
I think it would be more efficient to read one of the inputs into a
map for random access instead of iterating it every time.
On Sun, Mar 9, 2014 at 4:48 PM, Timothy Washington wrote:
> Hey Frank,
>
> Try opening up a repl, and running this for comprehension.
>
> (def user_textfile [[:id1 {:name
Another great talk about techniques used to structure bigger
applications is "Clojure in the Large" by Stuart Sierra. I think it
might be a bit premature if you're just getting started, but it's
definitely useful:
http://www.infoq.com/presentations/Clojure-Large-scale-patterns-techniques
On Sat, M
Om is well-suited to handle the UI-part for you. It doesn't do any
server communication or forces you into any particular programming
style or project layout.
On Thu, Feb 27, 2014 at 2:35 AM, Mark Engelberg
wrote:
> As far as I can tell, neither luminus nor caribou are well-suited to
> building,
In addition to all the other message here please note, that it's very
helpful to build a site with just http-kit, hiccup and compojure,
which are all three independent components. This gives you the freedom
to structure your application however you like without getting in your
way like many framewo
]core.clj:25
> compojure.core/if-method[fn]core.clj:107compojure.core/routing[fn]
> core.clj:2443clojure.core/somecore.clj:107compojure.core/routing
>
> Does anyone have any experience with this lib and the correct way to employ
> it, I'm not making much progress from the readme docs. Thanks.
--
Moritz Ulrich
pgpzSjHvaFY_D.pgp
Description: PGP signature
On Sat, Feb 8, 2014 at 6:39 PM, Timothy Baldridge wrote:
> First of all, you are right. Map with things like sets is a bit of iffy
> concept. Now, most of the the time, I just don't care. If I was to increment
> every value in a set I'll just do (set (map inc #{1 2 3})) and not really
> care less
On Sun, Jan 26, 2014 at 10:10 PM, Mimmo Cosenza wrote:
> You could clone and deploy it yourself into clojars. The only caveat is to
> give it an org.clojars. as group-id to make it clear it's not
> the official one.
Please don't deploy a project to the public clojars repository for
such purposes.
ng a trivial macro to make it look a bit
cleaner.
It's more or less the same for `with-open'.: You could just write the
(let [...] (try ... (finally ...))) yourself, but it's much easier to
understand the purpose when you read `with-open'.
--
Moritz Ulrich
pgpZyu7NHe8M4.pgp
Description: PGP signature
On Tue, Jan 21, 2014 at 9:43 AM, Aaron France wrote:
> Since channels yield nil when they are devoid of items, surely this is enough
> to know when the channel is empty?
That's not correct. Take-Operations block on empty channels. They
yield nil when they're closed. You could add a timeout to th
hen following the React tutorial.
I really look forward to using this library for some private and
(hopefully) work-related projects in the future.
Cheers!
--
Moritz Ulrich
pgpAxW_2KmKeQ.pgp
Description: PGP signature
Leiningen profiles in ~/.lein/profiles.clj will be merged into the
current project.clj by leiningen. Also dumented in
https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md
On Mon, Nov 25, 2013 at 3:34 PM, Dave Tenny wrote:
> With all my attention on trying to learn things about clo
Wait, RET should probably get bound to `paredit-newline' instead of
`newline-and-indent' when paredit is enabled. Try both and see which
works better :-)
On Sat, Oct 12, 2013 at 12:40 AM, Moritz Ulrich wrote:
> On Fri, Oct 11, 2013 at 11:33 PM, n aipmoro wrote:
>> I have
On Fri, Oct 11, 2013 at 11:33 PM, n aipmoro wrote:
> I have to hit the TAB key after ENTER to get indentation. I can't believe
> that was intentional (famous last words). So something must've broke.
Actually, the common Emacs convention is that RET (command: `newline')
shouldn't indent. C-j is `n
elp them much but Clojure would help them a lot
>
> (+ 1. 2.) →
> 3. They want to learn Clojure ! ☺
>
> I'd be most grateful for any help, either to complete/amend my list in 1.,
> or to provide ideas for 2.
>
>
> Best Regards,
>
> B.
>
> --
--
Moritz Ulrich
pgpcWyTfKFXAJ.pgp
Description: PGP signature
The only 'implicit' laziness in Clojure comes from lazy lists. map,
filter, and others are lazy. If you map over a list for side effects,
don't use map, use dolist or wrap the map in a doall.
On Thu, Sep 5, 2013 at 9:28 PM, Kang Tu wrote:
> Hi all,
>
> Clojure something *automatically" removed my
b.com/leonardoborges/bouncer/blob/master/CHANGELOG.md>
> for
> details.
> Feedback on this version and the new API is greatly appreciated.
>
> Cheers,
> Leonardo Borges
> www.leonardoborges.com
>
> --
--
Moritz Ulrich
--
--
You received this message because you are subsc
e email went out.
>
> -Phil
>
> --
https://leiningen.s3.amazonaws.com/downloads/leiningen-2.3.0-standalone.jar
is still AccessDenied for me.
--
Moritz Ulrich
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
Just a guess: You put 500 (or so) actions to the internal agent
queue and the agent isn't fast enough to keep up. The queue grows very
fast and goes out of memory.
On Wed, Aug 7, 2013 at 3:09 PM, Jérémie Campari
wrote:
> Hello !
>
> I don't understand why my code raise an Out of memory except
come very
> cumbersome to read :
>
> (cascalog/?<- (cascalog/stdout) [?a ?b] (generator :> ?a ?b))
>
> The same applies to SQL DSLs like korma.
>
> So, IMHO there are cases where (:use) simplifies things.
>
> --
>
> Philippe Guillebert
>
> --
Just use
NixOS, a linux distribution built on a purely functional package
manager at work and at home. Emacs with package.el and ~/.emacs.d/ in
a git repository.
On Fri, Jun 14, 2013 at 3:46 PM, Erlis Vidal wrote:
> Hi,
>
> I'm a bit curious to know in what OS do you code. Do you prefer iOS, Linux,
> Wind
If you want to keep this style, why not use a simple map of function
instead of reifying a protocol? Something like:
(defn calc-multiply [data] ...)
(defn calc-add [data] ...)
(defn make-calc [] {:calc-add #'calc-add, :calc-multiply #'calc-multiply})
Looks simpler and cleaner for me.
On Wed, Jun
It's also nice for printing on paper. Ink is expensive.
On Sun, May 5, 2013 at 6:49 PM, Michał Marczyk wrote:
> On 5 May 2013 15:19, Simone Mosciatti wrote:
>> It is probably me being stupid, but WHY ?
>
> Much easier to maintain your code when you can touch it without
> risking it soiling your
Can you please show your implementation of the other functions?
On Thu, Mar 28, 2013 at 1:11 AM, JvJ wrote:
> The function i wrote below isn't working. (is-drink q) returns all drinks
> (I tested it), but hates-drink, which should return all drinks that aren't
> liked, doesn't return anything...
Expansion: Sorry, I seem to be wrong:
=> (doc !=)
clojure.core.logic/!=
([u v])
Disequality constraint. Ensures that u and v will never
unify. u and v can be complex terms.
On Thu, Mar 28, 2013 at 7:55 PM, Moritz Ulrich wrote:
> I haven't played around with the new a
I haven't played around with the new additions to core.logic, but it
seems to me that != only works for values, not for lvars.
On Thu, Mar 28, 2013 at 1:11 AM, JvJ wrote:
> The function i wrote below isn't working. (is-drink q) returns all drinks
> (I tested it), but hates-drink, which should re
Just a shot in the dark; try:
#+BEGIN_SRC clojure
(defun org-xor (a b)
"Exclusive or."
(if a (not b) b))
#+END_SRC
On Sat, Mar 23, 2013 at 10:27 PM, Matching Socks wrote:
> I've got clojure-mode and nrepl installed, but I skipped Slime. From the
> org-mode s
C-u M-x indent-pp-sexp
On Thu, Feb 14, 2013 at 6:06 PM, Mayank Jain wrote:
> @Feng
> It doesn't clean up the way John is looking to clean some code like this:
>
>
>> (defun func1 [a b c d] (func5 (let [f (func3 c)] (func2 a b f)) (let
>> [e 5] (func4 c d e
>
>
>
>
> On Tue, Feb 12, 2013 at 9:
Laziness might be your problem, but that wouldn't explain (println
"called") working without a deref.
Can you show a bit more code around this call to `future'?
On Sun, Dec 30, 2012 at 8:31 AM, Oskar Kvist wrote:
> Hi!
>
> I'm trying to play a sound in my application, using
> http://www.javazoom
If you have a recent (24) Emacs, use M-x package-install and install
clojure-mode and nrepl. nrepl is the successor-in-spirit of slime, as
many people consider slime as deprecated. When you have access to
leiningen 2 (strongly recommended), the whole setup simplifies to:
1) Install leiningen 2 & E
I think one of the main reasons we don't use keyword arguments
everywhere is their verbosity. Most function names implicate the order
of arguments, and many functions don't take more than two or three.
It's a trade-off between how much a programmer has to remember and how
much he has to code.
On
(drop 3 (range))
)
)
)
SHOULD imho properly work in a proper clojure implementation,
n'est ce pas?
If it doesn't because of internal!!! representation
of the involved sequences,
be it chunked or something else,
than this is a huge pitfall,
which might be hard to
Now, this is a good such example, where chunking leads to behavioral error.
Has the afore mentioned interface for forced single-item consumption
meanwhile been created?
Ulrich
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
Am Mittwoch, 28. November 2012 16:42:32 UTC+1 schrieb Christophe Grand:
>
> Hi Ulrich,
>
> Wow, you got me scratching my head because your code should not even work.
> The problem I see with it is that your recursion has no base case. You
> have to know that 2 is prime to boot
a batch. While using
"iterate" instead updates "primes" each step.
Can someone more into clojure than me please correct and
better explain internal reasons of this strange behaviour.
How could one know the "batch size" of more complicated
expressions? And how could &
Don't use Aquamacs. I don't know of the current state, but some time
ago experienced the same stuff. It "somehow doesn't work" when using
Aquamacs.
I recommend Emacs.app from http://emacsformacosx.com or installation
via homebrew (brew install emacs --cocoa && brew linkapps). M-x
package-list-pack
), I
> don't see any reason why not...
>
> (defmacro defpromise [name]
>`(def ~name (promise)))
>
> Jim
How often do you need a top-level promise? Where are the advantages over
the def-only example?
--
Moritz Ulrich
pgpFttgbpDvnz.pgp
Description: PGP signature
What should :>> do? For me, it looks awfully like the operator mess they
have in Scala and Haskell.
On Thu, Nov 8, 2012 at 6:55 PM, Ben Wolfson wrote:
> A message in early 2010 notes that there had been some discussion of
> adding support for :>> to cond, but I suppose nothing came of
> that---
Use core.match: https://github.com/clojure/core.match
On Sun, Nov 4, 2012 at 10:09 PM, Vladimir Tsichevski
wrote:
> Hi gurus.
>
> Is it possible in Clojure to use pattern matching, like I can with Bigloo
> scheme, for example:
>
> (match-case '(a b a)
> ((?x ?x) 'foo)
> ((?x ?- ?x) 'bar))
>
>
(filter (comp not nit?) [nil 2 3 nil false true 4])
->
(remove nil? [...])
On Fri, Oct 26, 2012 at 12:53 PM, kevin roth
wrote:
> Be careful with the (filter identity ...) which will also remove "falses"
> from seqs.
> (filter identity [nil 2 3 nil false true 4])
> => (2 3 true 4)
> Since (identit
js file on some CDN. This would enable caching of the
biggest part of the compiled code.
--
Moritz Ulrich
pgpvKB8iufMw5.pgp
Description: PGP signature
`clojure.core/sorted-set' and `clojure.core/sorted-set-by'
http://clojuredocs.org/clojure_core/clojure.core/sorted-set
--
Moritz Ulrich
pgphaYjwAMe51.pgp
Description: PGP signature
I think the most simple reason is that it's unreadable for humans.
On Sun, Sep 16, 2012 at 6:16 AM, vhsmaia wrote:
> Hello. I'm new here, so, not sure if those were already posted. But why is
> this not used? An example would be:
> #(%a %%b %%%c) would be the same as (fn [a] (fn [b] (fn [c] (a b
This won't work, as ClojureScript doesn't includes a compiler in the
runtime. You can't eval ClojureScript code at runtime and you can't
read new anonymous functions in.
On Fri, Sep 7, 2012 at 9:18 AM, Shantanu Kumar wrote:
> Hello,
>
> Anonymous functions with #() notation (example below) expand
I usually store vars to functions when developing in the REPL. The
practical difference is that when you redefine `foo' in the above
example, calls via the `actions' map will use the "old" function as
the function itself ist stored, while after redefining `bar' calls
through `actions' will use the
This isn't true in Clojure: http://clojure.org/lisps
However, most functions treat an empty seq as nil because they call `seq'
on their arguments.
On Wed, Aug 29, 2012 at 6:41 PM, Joop Kiefte wrote:
> An empty sequence is equal to nil.
>
> 2012/8/29 Ambrose Bonnaire-Sergeant :
> > My guess is t
ntanu
This seems like a bug to me. It's caused by an implementation detail of
ClojureScript (keywords and symbols are string starting with a specific
UTF8 byte sequence).
--
Moritz Ulrich
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
.Number
> at who_is_logged_in.core$run_server.invoke(core.clj:27)
>
> I'm calling it from the command line with:
>
> java -jar who-is-logged-in-1.0.0-SNAPSHOT-standalone.jar 3456
> who-is-here-now
>
> I also tried putting the service name in quotes:
>
> java -jar
This is a result of Light Table's instarepl: The test details get
printed as string to *test-out*, which instarepl doesn't display.
Tryclj seems to have a bug where it doesn't redirect *out* to the
web-repl.
Anyway, try the following in instarepl:
(binding [*test-out* *out*]
(run-tests))
Thi
On Tue, Aug 21, 2012 at 10:04 PM, Tassilo Horn wrote:
> - The completion only completes if there's exactly one match. If
> there are multiple candidates, it simply echos them in the echo
> area. Why not doing the usual emacs completion stuff with a
> *Completions* buffer and comple
Is one of the asserts in some kind of loop or recursion?
On Sat, Aug 18, 2012 at 2:49 PM, Vincent wrote:
> Dear ,
>
> I am using clojure.test for test
>
> in one 'deftest , i had used 3 'is function to assert
> and in another 'deftest , i had used 5 'is function to assert
>
> It ran all tes
I'd vote against removing too. It's just too helpful to be able to
fire up a quick lein/swank repl to quickly try something.
On Thu, Aug 16, 2012 at 12:35 AM, Alan Malloy wrote:
> Blech. I've found having the project.clj helpful myself for the same reason
> David has: it's easy to start up lein (
Take a look at the javascript console. Most likely the `prinln'
generates an error because *print-fn* isn't bound. It's not usual to
use println on the client side. Logging to console is done via (.log
js/console obj1 obj2 ...)
On Sun, Aug 12, 2012 at 10:01 AM, mmwaikar wrote:
> Hi,
>
> I am expe
ms strange.
--
Moritz Ulrich
--
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 post.
To unsubscribe f
The source function only works for function where the .clj where the
function is defined is in the classpath. If you have control over all
functions, I'd suggest using
https://github.com/technomancy/serializable-fn when defining them.
On Wed, Aug 8, 2012 at 11:19 AM, Samuel Lê wrote:
> Dear all,
You can. Using core logic 0.8 alpha thanks to the newly introduced cKanren
extensions. It's mentioned in the (or another, I'm not sure at the moment)
video.
Am 07.08.2012 12:20 schrieb "Jim - FooBar();" :
> On 07/08/12 04:07, David Nolen wrote:
>
>> You have to be careful when using Clojure or Jav
(some identity ((juxt :k1 :k2) m)) is the first thing I can think of.
On Tue, Jul 31, 2012 at 12:48 AM, Michael Gardner wrote:
> Is there an elegant way to say '(or (:k1 m) (:k2 m)), without repeating m?
> Using a let can be awkward if the expression isn't already wrapped in one;
> '(apply #(or
Also, take a look at `partition'.
On Sun, Jul 29, 2012 at 3:19 PM, Mark Rathwell wrote:
> In your has22 definition, (by-pairs [a]) should be (by-pairs a)
>
> On Sun, Jul 29, 2012 at 9:07 AM, John Holland wrote:
>> I'm doing some exercises in coding that are meant for Java but I'm doing
>> them i
On Fri, Jul 27, 2012 at 9:37 PM, Vinzent wrote:
> Unfortunately, I can't access your site: http://kodefund.com/ gives me "The
> domain name you have requested isn't available".
Looks like your DNS server hasn't received the updated record yet.
Works fine on Google DNS.
--
You received this mess
Simply use the alternative dot-form:
(. (java.util.Date.) getDate)
(. record value)
On Mon, Jul 16, 2012 at 9:42 PM, john wrote:
> Hello,
> I have for example:
>
> (defrecord record [^long value])
>
> (def aRecord (record. 123))
>
> ; Now I want to construct code like (.value aRecord)
> ; with a
You can't unless there's a maven release for that specific branch.
There is a leiningen feature called 'checkouts' which might be used
for the kind of functionality you want.
On Sun, Jul 15, 2012 at 4:58 PM, cej38 wrote:
> I know that this might be more of a question for elsewhere, but I have be
On Fri, Jul 6, 2012 at 5:22 PM, grahamke wrote:
> (.start (Thread. (println "I ran!") "tName"))
You're missing a # here. You create a new thread object passing two
args to the Thread constructor: The return value of (println ...) and
"tName". println returns nil, so you effectively do (Thread. ni
tring and i'm currently using clojure 1.3...
> Basiclly i need the fuctionalty of . String as split, and such...
>
> On 25 בJun 2012 00:53, "Moritz Ulrich" wrote:
>>
>>
>> omer writes:
>>
>> > hi i need help!!!
>> > i have a pr
the namespace
clojure.data.string.
May I ask you if and what libraries you try to use? You might need to
update to newer versions if one of these use clojure.contrib, as it
isn't supported with 1.4 anymore.
--
Moritz Ulrich
--
You received this message because you are subscribed to the G
]
(let [[a b] (last lst)]
(if b
(concat lst (list (list x)))
(concat (butlast lst) (list (list a x))
--8<---cut here---end--->8---
You could use zippers here, but it would propably be slower.
Cheers,
Moritz
--
Moritz Ulrich
--
You received this
Because emacs is traditionally THE editor for lispy programming languages
and is so versatile. Of course there are other IDEs out there and you
should try a few, but Emacs is easily the most common tool when programming
lisp and therefore has the biggest variety of helpers available.
--
Sent from
e that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
Moritz Ulrich
--
Y
embers are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
--
Moritz Ulrich
--
You received this mess
as
>>> well?
>>>
>>> Jim
>>
>>
>
> --
> 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 m
gt;
> Author: Antoine R. Dumont
>
> Org version 7.8.09 with Emacs version 24
>
> Validate XHTML 1.0
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegrou
That's strange. You usually just run lein swank in the folder with you
project.clj. Nothing to do wrong there.
Can you show the project.clj and the directory structure of a non-working
project?
--
Sent from my mobile
Am 16.06.2012 01:07 schrieb "Dave Kincaid" :
> I'm with you, Peter. The proble
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 post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
&g
1 - 100 of 200 matches
Mail list logo