Does yagni work with cljs projects?
On Wednesday, 24 June 2015 02:27:46 UTC+3, Andrew Oberstar wrote:
>
> Haven't tried it yet, but looks good. Nice work!
>
> Andrew Oberstar
>
> On Tue, Jun 23, 2015 at 12:39 PM W. David Jarvis > wrote:
>
>> Hello everyone.
>>
>> I'm happy to announce the initia
On Tue, Jun 23, 2015 at 11:47 PM, James Henderson
wrote:
> Hi Atamert - thanks :)
>
> I thought it might be preferable to keep the call to (latch)explicit - it
> means that ylet can be used in nested calls, too - for example, to set up
> and compose groups of components/sub-systems: (contrived ex
Hi.
About the documentation - at least ring-swagger[1] doesn't force you to use
Schema as the runtime validation library, it just expects the route (and
parameter) definitions to be presented to it as Schemas. So, you could
validate the routes using bouncer and extract the ring-swagger schemas
I have a web app that apparently cannot consume UTF-8 encoding. Can
compojure generate responses in latin-1 encoding?
--
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
Yes, you can return a full response map with the desired encoding:
(GET "/" []
{:status 200
:headers {"Content-Type" "text/html; charset=ISO-8859-1"}
:body "Hello World"})
Or use the ring.util.response namespace:
(GET "/" []
(-> (resp/response "Hello World")
(resp/c
Thanks, James.
To clarify, Compojure has no problems serving the JSON content. But the
SBCL common lisp app and a third-party app (Klipfolio) both are choking on
the output. I was able to fix the SBCL app by telling Babel to use latin-1
encoding, but I need another solution for the output to
Hi everyone,
Just to let you know about an online hackathon that may be of interest to
you: http://www.codingame.com/challenge/code-of-the-rings
The concept is: 24 hours to code and optimize a solution to a problem. It's
free and open to all.
There are other games to train on the platform (page
Well, JSON should be encoded in unicode (either UTF-8, UTF-16 or UTF-32,
with UTF-8 as the default), so the clients shouldn't be having a problem if
their JSON parsers are correct.
However, you may want to try the :escape-non-ascii option that Cheshire and
Ring-JSON have. e.g.
(wrap-json-resp
Hi everyone,
CIDER 0.9.1 (codename “EuroCIDER”) is out! The release notes are here
https://github.com/clojure-emacs/cider/releases/tag/v0.9.1
This release fixes pretty much all serious issues that were discovered
shortly after 0.9.0 went
live and (as you probably have guessed by now) is dedicated
Hi,
https://github.com/muhuk/aleph-middleware
This is library that provides deferred-friendly versions of some of the
middleware that's shipped with ring-core. Specifically ones that modify
responses. They were choking on deferred's so I had to modify them a bit.
Let me know if it's useful.
--
2015-06-24 1:25 GMT+02:00 Ben Wolfson :
> On Tue, Jun 23, 2015 at 4:17 PM, Ghadi Shayban wrote:
>
>>
>> Tangentially:
>> (remove even?)
>> Will be faster than
>> (remove (fn [i] (even? i)))
>> because in the first case the dereference of the var 'even?' happens only
>> once and the value inside t
On Wed, Jun 24, 2015 at 8:29 AM, Herwig Hochleitner
wrote:
>
>
> 2015-06-24 1:25 GMT+02:00 Ben Wolfson :
>
>> On Tue, Jun 23, 2015 at 4:17 PM, Ghadi Shayban
>> wrote:
>>
>>>
>>> Tangentially:
>>> (remove even?)
>>> Will be faster than
>>> (remove (fn [i] (even? i)))
>>> because in the first case
Using a set as filter predicate is idiomatic Clojure.
If you don't know whether your filter coll is a set, you can write your
filter-contains as
(def filter-contains (comp filter set))
E. g. use as
(into [] (filter-contains [1 2 3]) [1 2 3 4])
;-> [4]
I am not up to date about optimizations
Correction: The result in the example should be [1 2 3] of course.
On Wednesday, June 24, 2015 at 6:34:20 PM UTC+2, Leon Grapenthin wrote:
>
> Using a set as filter predicate is idiomatic Clojure.
>
> If you don't know whether your filter coll is a set, you can write your
> filter-contains as
>
>
2015-06-24 18:19 GMT+02:00 Ben Wolfson :
>
> I meant a difference in speed.
>
>
A var-root fetch is a volatile read, which can have several adverse
performance effects. Most importantly, it hinders inlining, since the JIT
has to place a guard for every inlining site of a volatile read, thus it
won
Yehonathan Sharvit,
I think Google's Closure compiler already has dead code elimination, so
it's available for ClojureScript even if Yagni doesn't provide it :).
Cheers,
Juan
On Wednesday, June 24, 2015 at 5:11:01 AM UTC-3, Yehonathan Sharvit wrote:
>
> Does yagni work with cljs projects?
>
>
On Tuesday, June 23, 2015, Mike Grabowski wrote:
> ... I just can't stop thinking about non-blocking evented
> IO interactions. It just does not feel right to me to
> block the thread when e.g. logging in an user.
> Unfortunately, there are no NIO drivers for the database
> engines I am interested
As with all discussions involving interoperability, I'd love to see the
same questions answered for the JS target too. (This would of course apply
to books such as the new Clojure Applied. )
On Jun 24, 2015 9:48 AM, "Herwig Hochleitner"
wrote:
>
>
> 2015-06-24 18:19 GMT+02:00 Ben Wolfson :
>
>>
>
Thanks for the reference, I've seen it before and it looks interesting,
especially thanks to the failover built-in. It also greatly shows how
Clojure can reduce the `Java boilerplate`.
Speaking on the performance note, I am not entirely sure what's causing my
REST API to be slower than `Node.j
I think this might be rehashing some old stuff, but I haven't seen
discussion on it recently and I see this behavior is still present in 1.7
so I thought I'd ask. It's the same underlying issue as
this:
http://dev.clojure.org/jira/browse/CLJ-1532?page=com.atlassian.jira.plugin.system.issuetabpa
FMIIW, but I think they serve orthogonal purposes. Google Closure finds
code (mostly library parts your program doesn't use) that your particular
program doesn't need and omits it from the build to save disk and
bandwidth. Yagni finds obsolete code that is no longer reached in your
program or
That's a good point.
On Wednesday, June 24, 2015 at 6:53:43 PM UTC-3, Fluid Dynamics wrote:
>
> FMIIW, but I think they serve orthogonal purposes. Google Closure finds
> code (mostly library parts your program doesn't use) that your particular
> program doesn't need and omits it from the build
On Wednesday, June 24, 2015 at 4:03:39 PM UTC-4, Mike Grabowski wrote:
>
> Thanks for the reference, I've seen it before and it looks interesting,
> especially thanks to the failover built-in. It also greatly shows how
> Clojure can reduce the `Java boilerplate`.
>
> Speaking on the performance
> 350ms sounds fast enough for a low-frequency user interaction. In fact, once
> login is fast enough not to annoy your users, you don't *want* any more
> speed from it, as further speedup then only benefits blackhats trying to
> brute-force one of your users' accounts. So, it might be a feature, n
On Wednesday, June 24, 2015 at 4:56:06 PM UTC-4, Ignacio Thayer wrote:
>
> I think this might be rehashing some old stuff, but I haven't seen
> discussion on it recently and I see this behavior is still present in 1.7
> so I thought I'd ask. It's the same underlying issue as this:
> http://dev.c
Indeed. I'd argue it's better not to have unused code in the codebase in
the first place, regardless of what the Closure compiler does to help when
it comes to compiling assets.
I haven't tested this with cljs projects, but on the face of it I don't see
why Yagni's methodology wouldn't work. I
On Wednesday, June 24, 2015 at 6:37:14 PM UTC-4, raould wrote:
>
> > 350ms sounds fast enough for a low-frequency user interaction. In fact,
> once
> > login is fast enough not to annoy your users, you don't *want* any more
> > speed from it, as further speedup then only benefits blackhats tryin
> That would apply to common actions like typing and entering. Login being
> slower than that isn't likely to be as much of a bother as you likely only
> do it infrequently, maybe as much as once a day if you're paranoid and clear
> cookies nightly.
Yeah, to me that is the sort of reasoning that l
There are currently no votes for either Jira issue!
- No.1532, "pr-str captures stdout from printing side-effects of lazily
evaluated expressions"
- No.1611, "clojure.java.io/pushback-reader"
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
Mike,
I think you might be better off keeping as much as you can the same between
the two test scenarios so that you are only comparing the differences
between nodejs and clojure -- and not all kinds of other variables like
co-located services/cpu-load on your various hosts, network latency
di
30 matches
Mail list logo