Cool, very curious about the idea.
On Thursday, April 4, 2019 at 3:37:59 AM UTC+8, Nathan Marz wrote:
>
> I'm really happy to announce my startup Red Planet Labs with $5M in
> funding. We have some incredible investors on board including Max Levchin,
> Naval Ravikant, and Alexis Ohanian. We're
My two cents:
Adding spec inside the original namespace is more readable, provide
documentation just in place, and the user do not need to require a separate
namespace to get spec of your API, I will prefer it.
For users stay in < clojure 1.9.0, I use this macro in my code:
(defmacro
*Update*
Version 0.2.0 simplified the implementation even more (shaved another 10
more lines from 100 LOC), introduce flexible *fw* macro, function wrapped
in a fun-map can cache and update the cache when its dependencies updated.
*Background*
A fun-map is a map can automatically unwrap any
Yes. Fun-map can be used like a `graph` in plumbing. It actually has a macro
named `fnk` just like plumbing. Both of fun-map and plumbing can link functions
toghether by the name of arguments, hence can be used as a dependency injection
tool.
However, the implementation of fun-map is very
*Github Link: https://github.com/robertluo/fun-map*
It is a lazy map:
(def m (fun-map {:a 4 :b (delay (println "accessing :b") 10)}))
and can also be a future map:
(def m (fun-map {:a (future (do (Thread/sleep 1000) 10))
:b (future (do (Thread/sleep 1000) 20))}))
or mixed:
*- Github link: https://github.com/robertluo/fun-map*
>From the project's README:
In clojure, code is data, the fun-map turns value fetching function call into
map value accessing.
For example, when we store a delay as a value inside a map, we may want to
retrieve the value wrapped
I already defined a spec for one kind of functions:
(s/def ::my-handler (s/fspec :args ... :ret ...))
Then I define an instance of ::my-handler, e.g. real-handler, which I can
use s/fdef to register it to registry, but can I just reuse the spec like
this?
(s/fdef real-handler ::my-handler)
Cool update!
On Tuesday, June 10, 2014 10:29:34 PM UTC+8, Sun Ning wrote:
Hello Everyone,
I just released Slacker 0.12 and its cluster support module. In this
release, several bugs got fixed and there are also lovely features added
(nippy serialization, leader election, etc). For more
Is #db/id defined in datomic library?
--
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
It was an incredible language, five years with clojure is an incredible
journey, helping me understand programming better, and do programming
better. Thanks Rich!
On Wednesday, October 17, 2012 9:53:55 AM UTC+8, Rich Hickey wrote:
I released Clojure 5 years ago today. It's been a terrific
When I use
(doc clojure.test)
It triggers a ClassNotFoundException.
--
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
To interact with various javascript libraries, they often requires you
provide data in javascript object, while in clojurescript we normally
use a map. How can we transform a map to javascript object and vice
versa?
BTW, now I use (js* {width: 400, height: 300}) to do it.
--
You received this
I need a lazy map in my compojure based application to inject data
into handlers. I searched the web for an implementation, I got one
from Meikel which was written in 2008. Is there any recommendation?
Thanks.
--
You received this message because you are subscribed to the Google
Groups Clojure
On 5月28日, 下午11时01分, Sean Devlin francoisdev...@gmail.com wrote:
Can memoize do the job for you?
No. What I need is something can act as a map to replace the request
map in compojure/ring so that it can be used in any middleware/
handles.
--
You received this message because you are subscribed
Just FYI:
It's still maintained and will soon move to deftype to be ready
for 1.2. Then I will also put a release on Clojars.
Sincerely
Meikel
Thanks Meikel, I will try your implementation in my application.
--
You received this message because you are subscribed to the Google
Groups
On 5月29日, 上午12时50分, Joost jo...@zeekat.nl wrote:
I don't really see what you're trying to do with this, but as an
alternative, you can assoc lazy-seqs to a standard map. That is, if
your values are going to be seqs (IME, most of the things you want
lazy evaluation for are).
Joost.
The
I wrote a function as:
(defn repeated-seq
[f start]
(let [coll (f start)]
(concat coll (lazy-seq (repeated-seq f (last coll))
it is OK when I call it with:
(repeated-seq #(range % 5) 0)
the elements are: 0 1 2 3 4 4 5 6 7 8 8 ...
However, I want to get rid of the duplicated index
Thanks Meikel.
On 5月5日, 下午9时40分, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 5 Mai, 14:54, Robert Luo robort...@gmail.com wrote:
(defn repeated-seq
[f start]
(let [coll (f start)]
(concat coll (lazy-seq (repeated-seq f (last coll))
it is OK when I call
On 5月5日, 下午9时43分, Krukow karl.kru...@gmail.com wrote:
On May 5, 2:54 pm, Robert Luo robort...@gmail.com wrote:
[snip]
(repeated-seq #(range % 5) 0)
the elements are:0 1 2 3 4 4 5 6 7 8 8...
I think you mean,
(def s (repeated-seq #(range % (+ % 5)) 0) )
Nope. The code is what I want
Hi, I am working on a server project, which requires thousands records
of data stored in memory, and they will be accessed by thousands of
threads simultaneously.
I intend to use datalog to store all my data, sharing the whole
database by a reference.
However, I am afraid of concurrency of this
I am trying to use datalog now, have the following questions:
1. How about the memory consumption of datalog?
2. There are examples of datalog, but can I find more detailed
document about the query language?
--~--~-~--~~~---~--~~
You received this message because
Two more questions:
3. In datalog.database , it is required that every tuple must has
exactly same field as in database define, is that possible to just
define some necessary fields, and tuples appended can have additional
optional fields?
4. What is a magic transformation? I googled the term,
Thank you Josh for your answer.
I have read the sources of datalog, however, literal.clj and the ideas
of the query language behind it is unknown for me, thus I can not
understand it quite well. The same thing happens when I saw magic.clj,
in which file I saw magic transformation.
I ran the
the following code:
(read-json-string (json-str {3 1}))
results NumberFormatException, I think maybe it does not expect
integer keys for a map.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To
24 matches
Mail list logo