I am grateful to you for testing. Your feedback sent me down a different
road which lead me to the answer. I decided the repl was for some reason
not working, so I thought I would run lein uberjar and see how the app
ran, but when I ran lein uberjar I saw that I had an error that kept the
app
Hi
I'm trying to interface with a web service that expects a base64 code
produced as followed (I included both the direct output of digest and the
base64 encoding):
require 'openssl'
digest = OpenSSL::Digest::Digest.new('sha256')
OpenSSL::HMAC.digest(digest, key, string)
=
Just a quick guess but it seems like the ruby version base64 encodes the
BINARY version of the digest, while the clojure version encodes the HEX
version of the digest.
The sign function also converts to hex, so if you put that into base64
encode you get the same (wrong) result, use the
Thanks. This solved the problem :)
Bye
On Fri, Feb 7, 2014 at 12:57 PM, Thomas Heller th.hel...@gmail.com wrote:
Just a quick guess but it seems like the ruby version base64 encodes the
BINARY version of the digest, while the clojure version encodes the HEX
version of the digest.
The sign
I've been playing with some code recently. I was wondering how hard
would it be to implement, for example ISeq in clojure. The plan was to
use deftype and a few bits of other code.
The ISeq interface looks like this:
public interface ISeq extends IPersistentCollection {
Object first();
ISeq
Okay. So there's one big thing you're doing wrong here just from reading
your grammars: you are complecting the datastructures and valid _tokens_
which make up the clojure language with the _meaing_ associated therewith
by the language. If you discard such things as destructuring as part of
Hi
I don't have editing rights for wiki so I post project idea here:
*Quil on ClojureScript**Brief explanation: *Quilhttp://github.com/quil/quilis
a drawing and animation library for clojure. It is basically wrapper
over Processing http://processing.org. Currently Quil works only on
vanilla
On Feb 6, 2014, at 6:45 PM, Zach Tellman z...@factual.com wrote:
At Factual we get a lot of data thrown at us, and often don't have control
over the rate at which it comes in. As such, it's preferable that our buffer
isn't bounded by the process' memory, since a temporary blip in
The theme of this release is rules as data
Yay!
Great job Ryan. I look forward to checking out your changes.
On Thu, Feb 6, 2014 at 10:15 PM, Ryan Brush rbr...@gmail.com wrote:
The 0.4.0 release of Clara is up on Clojars. The github page is at [1].
The theme of this release is rules as
I tend to agree, I think. I certainly can't think of a syntax that would
make me happy. It just feels like a bit of a smell that I keep using -
to process sequences in similar ways.
The data.zip xml- macro is an example of something like what I'm
thinking about - it lets you process sequences
Thank Nikita, added.
Ambrose
On Fri, Feb 7, 2014 at 9:17 PM, Nikita Beloglazov nikelandj...@gmail.comwrote:
Hi
I don't have editing rights for wiki so I post project idea here:
*Quil on ClojureScript**Brief explanation:
*Quilhttp://github.com/quil/quilis a drawing and animation library
I think
(- things
(map wrangle)
(map pacify)
(filter effable)
(map #(aggravate % :bees :sharks))
(reduce mapinate {})
is optimal for the following reason:
If you're doing map and map alone, i.e.
(- things
(map f1)
(map f2)
(map f3)
(map f4))
then you can do:
Thanks for pointing that out. Changed defn*, defrecord*, fn*, letfn* to
defn', defrecord', fn', and letfn'. Added tests for fn' and letfn'.
--
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
On Feb 5, 2014, at 11:42 PM, Michał Marczyk wrote:
This returns
(.getTotalPhysicalMemorySize
(java.lang.management.ManagementFactory/getOperatingSystemMXBean))
You could use this in your project.clj, perhaps by including
~(str -Xms (quot (.getTotalPhysicalMemorySize ...)
Does anyone know what to put in :jvm-opts in project.clj to use the G1 garbage
collector? I see a lot about how G1 works and how to configure it in web search
results, but not this little nugget of info.
Also, if anyone has any advice about GC for my use case I'd love to hear it. My
use case
I do it like this:
in my .bashrc
export JVM_OPTS=-XX:+UseG1GC
export LEIN_JVM_OPTS=-XX:+UseG1GC
You can verify that it's working by checking jvisualvm's view of the
jvm-opts on the relevant processes. Running it system-wide has given me
reduced memory-pressure on my lappie with no downside.
On Feb 7, 2014, at 11:35 AM, Gary Trakhman wrote:
I do it like this:
in my .bashrc
export JVM_OPTS=-XX:+UseG1GC
export LEIN_JVM_OPTS=-XX:+UseG1GC
You can verify that it's working by checking jvisualvm's view of the jvm-opts
on the relevant processes. Running it system-wide has
What if you put -XX:+UseG1GC in :jvm-opts ?
2014-02-07 17:38 GMT+01:00 Lee Spector lspec...@hampshire.edu:
On Feb 7, 2014, at 11:35 AM, Gary Trakhman wrote:
I do it like this:
in my .bashrc
export JVM_OPTS=-XX:+UseG1GC
export LEIN_JVM_OPTS=-XX:+UseG1GC
You can verify that
Both G1 and ConcurrentMarkSweep GC are meant to lower pauses (increase
responsiveness), but generally increase total running time. So I don't know
if it's ideal for the scenario you describe.
On Friday, February 7, 2014 5:38:09 PM UTC+1, Lee wrote:
On Feb 7, 2014, at 11:35 AM, Gary Trakhman
You may also use a let form wrapped around your entire defproject if you
want to avoid the duplication of code present in your example.
Andy
On Fri, Feb 7, 2014 at 8:22 AM, Lee Spector lspec...@hampshire.edu wrote:
On Feb 5, 2014, at 11:42 PM, Michał Marczyk wrote:
This returns
On Feb 7, 2014, at 11:41 AM, Laurent PETIT wrote:
What if you put -XX:+UseG1GC in :jvm-opts ?
Ah yes -- I should have seen that even though I may not want to take Gary's
suggestion of putting it in .bashrc, he had given me the magic string to
include in :jvm-opts too!
I will give that a try.
On Feb 7, 2014, at 11:45 AM, Andy Fingerhut wrote:
You may also use a let form wrapped around your entire defproject if you want
to avoid the duplication of code present in your example.
Thanks -- I actually noticed that after I posted. I don't know why, but I never
thought of project.clj as
next() should return either the remaining seq or null (think Clojure
function next)
more() should return either the remaining seq or empty list (like Clojure
function rest)
Inside Clojure, most seqs extend ASeq, which implements more() on top of
the abstract next():
public ISeq more(){
Hi Bob,
Right now the API only allows for single puts, and fsyncing is
all-or-nothing. However, this is just an artifact of my major use case for
the library, which relies on upstream batching of tasks. I'm planning an
0.1.1 release which has an explicit `sync` method, and support for
In case anyone cares :)
https://github.com/framework-one/fw1-clj
FW/1 is a lightweight, convention-based MVC framework. It is a port to Clojure
of FW/1 for CFML (the most popular MVC framework for the ColdFusion Markup
Language, in active development since mid-2009).
Release 0.2.4
•
Hey everyone, I just wanted to get some feedback on whether or not this is
a good idea. I've seen clj-refactor.el recommended a decent amount, but as
a dyed-in-the-wool take-no-prisoners vim user, I can't use it. I've always
thought it was weird that refactoring was so tightly coupled to
Let us say you had this:
(defn create-new-canvas-text [inputs]
(let [{text-selected-id :new} (dataflow/old-and-new inputs [:design
:params :text :selected-id])
{text-params :new} (dataflow/old-and-new inputs [:design :params
:text])
text-value (:value text-params)
]
Room Key is hiring Clojure developers to work at our technology
headquarters in beautiful Charlottesville, Virginia.
Our backend stack is Clojure / AWS / Solr / Postgres, which fronts a JSON
API for our single-page javascript application. See this job posting, or
reach out to j...@roomkey.com
I think this is an awesome idea. I think it should be easy to build on top
of vim-fireplace to integrate with vim, and I will surely beta test for you.
On Feb 7, 2014 4:51 PM, Curtis Gagliardi gagliardi.cur...@gmail.com
wrote:
Hey everyone, I just wanted to get some feedback on whether or not
A couple ideas put forth:
1. Incanter charts with d3 (http://d3js.org/) ? Perhaps facilitated by
Dribnet's Strokes library (https://github.com/dribnet/strokes).
2. Finding ways to integrate Incanter and Clojurescript.
Thoughts?
-Avram
On Monday, February 3, 2014 11:59:24 AM UTC-8,
I haven't attempted any code manipulation, just analysis and indexing, but
I embarked on a similar idea here:
https://github.com/duelinmarkers/insfactor and here:
http://github.com/duelinmarkers/insfactor.el. (Nothing Vim-related there,
the similar part is trying to put as much as possible of the
This is something I stole from Phil Hagelberg's starter kit.
It doesn't work all the time, and in some cases might do some things you don't
particularly want, but I still use it:
(defun untabify-buffer ()
(interactive)
(untabify (point-min) (point-max)))
(defun indent-buffer ()
Consider the following:
(cons 1 '(2 3 4)) == (1 2 3 4)
(cons 1 [2 3 4]) == (1 2 3 4)
(conj '(a b c) 1) == (1 a b c)
(conj '[a b c] 1) == [a b c 1]
Now, I would like something that _always_
* appends to the end
cons is almost what I want, except it always
This might be an interesting area for a Google Summer of Code project if
someone would be willing to mentor such a thing and come up with a
high-level plan.
http://dev.clojure.org/display/community/Project+Ideas
On Friday, February 7, 2014 3:51:29 PM UTC-6, Curtis Gagliardi wrote:
Hey
Hi,
I have a short question, why map builds up a LazySeq instead of an input
collection as found below:
user= (type (map #(mod % 3) #{3 6}))
clojure.lang.LazySeq
user= (type (map #(mod % 3) '(3 6)))
clojure.lang.LazySeq
user= (type (map #(mod % 3) [3 6]))
clojure.lang.LazySeq
user= (type (map
Why should it build a concrete result?
Here's my reasons why it makes sense to be lazy here:
- It would use more memory otherwise. Since, if you are transforming a list
to a set there's got to a transformed copy of the original data structure
when it's materialized.
- It might take longer than
The main change is the introduction of a new protocol IVerifyConstraint.
Implementations of it will be called before a constraint is added to the
constraint store - this is the hook needed for detecting incompatible
constraints.
More information here: http://github.com/clojure/core.logic
On Sat, Feb 8, 2014 at 3:05 AM, Andy C andy.coolw...@gmail.com wrote:
set-s are indeed a sticky point here since the result of a map would
different depending in the convention.
No the result would be the same. Only the order of the elements in the lazy
sequence would differ, but that's to
user= (map #(mod % 3) #{3 6})
(0 0)
user= (set (map #(mod % 3) #{3 6}))
#{0}
--
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
I do perceive sets, lists, vector as atoms which are indivisible (well,
this is not true but this is popular meaning) from semantics standpoint.
Therefore map is just a function which processes them as whole, again from
semantics point of view. Implementation and laziness should not matter
really
Andy C, I think that in the Clojure world, there is a widespread view that
lazy sequences should be the (or one of the) primary datatypes, that
iteration should usually produce lazy sequences, etc. They are something
like the default in Clojure. Clojure includes a systematically organized
I am looking here:
https://github.com/jkk/formative/blob/master/src/formative/parse.cljx
and I see this line:
#+cljs [cljs.reader :as reader]
So I look here to see what the # is doing:
http://clojure.org/reader
and I read:
Dispatch (#)
The dispatch macro causes the reader to use a reader
Since a few of these higher order functions--map, filter, reduce, etc.--are
so common and useful, I wonder whether there could be sufficient benefit to
having some abbreviations for them. I know that some of these characters
are already taken, but just to sketch the idea:
(-- things %wrangle
For efficient appends at the end you need a vector. Using the sequence
library can be tricky while you're putting together your data structures
because it's likely that you'll not done yet with type-specific functions.
You'll need to re-create your vector after using map/filter/etc to be able
That answers my question pretty well, thanks.
On Thursday, February 6, 2014 11:20:42 PM UTC-8, Reid McKenzie wrote:
Okay. So there's one big thing you're doing wrong here just from reading
your grammars: you are complecting the datastructures and valid _tokens_
which make up the clojure
I actually like the laziness by default but as you suggest, wish there is a
way to switch it on/off for blocks of the code (rather than compiler
option). Scala guys did some research and in most practical cases Lists are
very short hence they are not lazy and evaluated at once. Just an
interesting
On Feb 7, 2014, at 22:17 , Andy C andy.coolw...@gmail.com wrote:
Having map to produce a lazy seq implies that the input must be serializable
(or linear).
That's just what map is in Clojure: an operation on sequences. It works on
various concrete types because those can be viewed as
You should use a vector, but it's also possible to use concat. For example,
(concat '(1 2 3) [4]) will give you (1 2 3 4).
This made me curious as to the best way to get a collection into vector, so
I played around with it some:
user= (def r 10)
#'user/r
user= (def coll (range 1))
On Fri, Feb 7, 2014 at 9:08 PM, Travis Moy moytra...@gmail.com wrote:
Surprisingly it looks like (concat coll '(:a)) is faster than (conj coll-v
:a). That's not really what I would expect; does anybody have a good
explanation for this? Did I just bork the test somehow, or - I mean,
obviously
On Fri, Feb 7, 2014 at 9:41 PM, Andy C andy.coolw...@gmail.com wrote:
I do perceive sets, lists, vector as atoms which are indivisible (well,
this is not true but this is popular meaning) from semantics standpoint.
Therefore map is just a function which processes them as whole, again from
Can you give a code example?
- Matt
On Thursday, February 6, 2014 3:15:13 AM UTC-5, Andy Smith wrote:
Hi,
I was wondering why use/require and import take quoted forms as their
arguments, other alternatives could be strings or keywords, so what is
special about the choice of quoted form
On Friday, February 7, 2014 10:17:15 PM UTC-6, Andy C wrote:
But what really bothers me is that laziness / not laziness affects the
result of evaluation as in above example. That is against some fundamental
rules of FP (gotta check how Haskell does it :-P).
Well, it's not really laziness
But you're misunderstanding what map does: it converts its collection
arguments to _sequences_ and then it processes those sequences. Map
doesn't operate on sets, or vectors, or maps, only on sequences.
Scala goes out of its way to retain input types as output types on
many of its collection
Ah! That makes more sense. Yeah, after I forced it to realize the sequence,
it turned out that concat was a lot slower than sticking it into an array:
#'user/r
user= (def coll (range 1))
#'user/coll
user= (def coll-v (into [] coll))
#'user/coll-v
user= (time (dotimes [_ r] (count
54 matches
Mail list logo