Re: What's the best option similar to Vert.x, Reactor, Nodejs for use with Clojure?

2016-01-03 Thread kovas boguta
I would also look at https://github.com/ztellman/aleph and
https://github.com/ztellman/manifold, but like Timothy says its hard to
judge without more details.




On Sun, Jan 3, 2016 at 4:24 PM, Timothy Baldridge 
wrote:

> I've done some evaluations of Vert.x in the past and was rather
> underwhelmed. What is it that you are trying to accomplish? Stuff like
> Pedestal offers async web services, but without the complexity of an
> traditional evented server. So perhaps if we had a better idea of your
> requirements we could be a bit more helpful.
>
> So I'd say, look into Pedestal and then define what you need that it
> cannot do. Same for other toolkits like ring and httpkit.
>
> Timothy
>
> On Sun, Jan 3, 2016 at 12:59 PM, adrians  wrote:
>
>>
>> It used to be that Vert.x 2.x had integration for Clojure, but version
>> 3.x hasn't added it yet. Has anyone used this version through the Java API
>> and if so, how painful was it? Is Reactor any
>> better in that respect? What are people using when they want this kind of
>> back end?
>>
>> --
>> 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.
>>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was that–lacking
> zero–they had no way to indicate successful termination of their C
> programs.”
> (Robert Firth)
>
> --
> 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.
>

-- 
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.


[Clojurescript] .getElementById returns NULL

2016-01-03 Thread Nathan Smutz
Sorry if this is something trivial.  I tried to do some due diligence 
googling with no luck.
The function getElementById seems to be returning null where it shouldn't.

I'm currently using
lein-cljsbuild 1.1.2 
clojure 1.7.0
clojurescript 1.7.170
and compiling with optimizations: :none

Here's my HTML:


  

  
 
Test text
  


Here's my Clojurescript:
(ns gol-cljs.core)
(.log js/console (. js/document getElementById "test-content"))

This prints "null" to Chrome's browser console.
Attempting any operations on (. js/document getElementById "test-content")) 
gives errors about trying to do things with "null".

Is there some requirement I'm missing for accessing the dom?

Best,
Nathan


-- 
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.


Re: What's the best option similar to Vert.x, Reactor, Nodejs for use with Clojure?

2016-01-03 Thread Timothy Baldridge
I've done some evaluations of Vert.x in the past and was rather
underwhelmed. What is it that you are trying to accomplish? Stuff like
Pedestal offers async web services, but without the complexity of an
traditional evented server. So perhaps if we had a better idea of your
requirements we could be a bit more helpful.

So I'd say, look into Pedestal and then define what you need that it cannot
do. Same for other toolkits like ring and httpkit.

Timothy

On Sun, Jan 3, 2016 at 12:59 PM, adrians  wrote:

>
> It used to be that Vert.x 2.x had integration for Clojure, but version 3.x
> hasn't added it yet. Has anyone used this version through the Java API and
> if so, how painful was it? Is Reactor any
> better in that respect? What are people using when they want this kind of
> back end?
>
> --
> 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.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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.


Re: [Clojurescript] .getElementById returns NULL

2016-01-03 Thread Ryan Fowler
On Sun, Jan 3, 2016 at 8:04 PM, Nathan Smutz  wrote:

>
> (.log js/console (. js/document getElementById "test-content"))
>
>
​I suspect you need something more like this: ​
 (.log js/console (.getElementById js/document "test-content"))​

-- 
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.


Re: org-mode Clojure babel

2016-01-03 Thread Stuart Sierra
I recently adapted my Emacs config 

 
to work with Org 8.3.2 and CIDER 0.10.0. Here it is. 

 
This is just my personal setup, not something I can support. Posting here 
in case someone else might find it useful.
–S

On Monday, December 21, 2015, martin_clausen wrote:
>
> I found that
>
> Org-mode version 8.3.2 and CIDER 0.11.0 snapshot (package: 20151212.1044)
>
> works great and can be easily be installed from repos.
>

-- 
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.


Re: Reducing the pain of a clojars outage

2016-01-03 Thread Nando Breiter
I've spent some time looking into both Cloudflare and Fastly over the
weekend. Fastly seems to have a sophisticated purging mechanism which the
ticket mentions would be a requirement. See
https://docs.fastly.com/guides/purging/

Initial setup is dead easy (for both), basically requiring a signup and a
change to the DNS record, adding a CNAME. Fastly charges for bandwidth and
caches everything. Cloudflare charges monthly flat rates but only caches
the most popular assets, unless the subscriber pays $200 a month. In a
nutshell, you have full control over the content cached in the CDN with
Fastly and full control of the price paid, but not the service rendered,
with Cloudflare.



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

On Sun, Jan 3, 2016 at 8:00 PM, Toby Crawley  wrote:

> Cloudflare (or a similar CDN) would be useful - we have an open issue
> to implement that, but haven't had a chance to get to it:
> https://github.com/clojars/clojars-web/issues/434
>
> - Toby
>
> On Sat, Jan 2, 2016 at 4:30 AM, Nando Breiter 
> wrote:
> > Would CloudFlare help on the short term? I haven't used the service yet,
> I
> > just ran across it researching DDoS solutions, but judging from the
> overview
> > of how it works, it might be able to cache all clojars.org assets in a
> > distributed manner and handle the DNS issue as well.
> > https://www.cloudflare.com/ If it would work, the advantage is a very
> quick
> > initial setup. All you need to do is let them handle the DNS.
> >
> >
> >
> >
> >
> > Aria Media Sagl
> > Via Rompada 40
> > 6987 Caslano
> > Switzerland
> >
> > +41 (0)91 600 9601
> > +41 (0)76 303 4477 cell
> > skype: ariamedia
> >
> > On Sat, Jan 2, 2016 at 4:31 AM, Toby Crawley  wrote:
> >>
> >> Given the recent DDoS-triggered outages at linode (including the one
> >> today that has been the worst yet, currently 10 hours at the time I'm
> >> writing this), I've been giving some more thought to how we can make
> >> future outages less painful for the community.
> >>
> >> I have an open issue[1] (but no code yet) to move the repository off
> >> of the server and on to a block store (s3, etc), with the goal there
> >> to make repo reads (which is what we use clojars for 99.9% of the
> >> time) independent of the status of the server. But I'm not sure that
> >> really solves the problem we are seeing today. Currently, we have two
> >> points of failure for repo reads:
> >>
> >> (1) the server itself (hosted on linode)
> >> (2) DNS for the clojars.org domain (also hosted on linode)
> >>
> >> moving the repo off of the server to a block store still has two
> >> points of failure:
> >>
> >> (1) the block store (aws, rackspace, etc)
> >> (2) DNS for the clojars.org domain, since we would CNAME the block
> >>  store (hosted on linode)
> >>
> >> Though the block store provider would probably be better distributed,
> >> and have more resources to withstand a DDoS (but do any block store
> >> providers have 100% uptime?).
> >>
> >> The block store solution is complex - it introduces more moving parts
> >> into clojars, and requires reworking the way we generate usage stats,
> >> and how the api gets its data. It also requires reworking the way we
> >> administer the repo (deletion requests, cleaning up failed/partial
> >> deploys). And it may not solve the availability problem at all, since
> >> we still have two points of failure.
> >>
> >> I think a better solution may be to have multiple mirrors of the repo,
> >> either run by concerned citizens or maintained by the clojars staff. I
> >> know some folks in the community already run internal caching proxies
> >> or rsynced mirrors (and are probably chuckling knowingly at those of
> >> us affected by the outage), but those proxies don't really help those
> >> in the community that don't have that internal infrastructure. And I
> >> don't want to recommend that everyone set up a private mirror - that
> >> seems like a lot of wasted effort.
> >>
> >> Ideally, it would be nice if we had a turn-key tool for creating a
> >> mirror of clojars. We currently provide a way to rsync the repo[2], so
> >> the seed for a mirror could be small, and could then slurp down the
> >> full repo (and could continue to do so on a schedule to remain up to
> >> date). We could then publish a list of mirrors that the community
> >> could turn to in times of need (or use all the time, if they are
> >> closer geographically or just generally more responsive). Any deploys
> >> would still need to hit the primary server, but deploys are are
> >> dwarfed by reads.
> >>
> >> There are a few issues with using mirrors:
> >>
> >> (1) security - with artifacts in more places, there are more
> >> opportunities to to introduce malicious versions. This could be
> >> prevented if we had better tools for verifying that the artifacts
> >> are signed by trusted 

[Clojurescript] .getElementById returns NULL

2016-01-03 Thread Francis Avila
Your problem is unrelated to clojurescript.

Your script runs before the body is loaded, so the test-content element doesn't 
exist yet.

Either load your script at the end of the body, or wrap your code in a 
document.onload event handler.

-- 
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.


ANN Elastisch 2.2.0 is released

2016-01-03 Thread Michael Klishin
Elastisch [1] is a minimalistic feature complete Clojure client
for ElasticSearch.

Release notes:
http://blog.clojurewerkz.org/blog/2016/01/04/elastisch-2-dot-2-0-is-released/

1. http://clojureelasticsearch.info/
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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.


Re: Reducing the pain of a clojars outage

2016-01-03 Thread Toby Crawley
Cloudflare (or a similar CDN) would be useful - we have an open issue
to implement that, but haven't had a chance to get to it:
https://github.com/clojars/clojars-web/issues/434

- Toby

On Sat, Jan 2, 2016 at 4:30 AM, Nando Breiter  wrote:
> Would CloudFlare help on the short term? I haven't used the service yet, I
> just ran across it researching DDoS solutions, but judging from the overview
> of how it works, it might be able to cache all clojars.org assets in a
> distributed manner and handle the DNS issue as well.
> https://www.cloudflare.com/ If it would work, the advantage is a very quick
> initial setup. All you need to do is let them handle the DNS.
>
>
>
>
>
> Aria Media Sagl
> Via Rompada 40
> 6987 Caslano
> Switzerland
>
> +41 (0)91 600 9601
> +41 (0)76 303 4477 cell
> skype: ariamedia
>
> On Sat, Jan 2, 2016 at 4:31 AM, Toby Crawley  wrote:
>>
>> Given the recent DDoS-triggered outages at linode (including the one
>> today that has been the worst yet, currently 10 hours at the time I'm
>> writing this), I've been giving some more thought to how we can make
>> future outages less painful for the community.
>>
>> I have an open issue[1] (but no code yet) to move the repository off
>> of the server and on to a block store (s3, etc), with the goal there
>> to make repo reads (which is what we use clojars for 99.9% of the
>> time) independent of the status of the server. But I'm not sure that
>> really solves the problem we are seeing today. Currently, we have two
>> points of failure for repo reads:
>>
>> (1) the server itself (hosted on linode)
>> (2) DNS for the clojars.org domain (also hosted on linode)
>>
>> moving the repo off of the server to a block store still has two
>> points of failure:
>>
>> (1) the block store (aws, rackspace, etc)
>> (2) DNS for the clojars.org domain, since we would CNAME the block
>>  store (hosted on linode)
>>
>> Though the block store provider would probably be better distributed,
>> and have more resources to withstand a DDoS (but do any block store
>> providers have 100% uptime?).
>>
>> The block store solution is complex - it introduces more moving parts
>> into clojars, and requires reworking the way we generate usage stats,
>> and how the api gets its data. It also requires reworking the way we
>> administer the repo (deletion requests, cleaning up failed/partial
>> deploys). And it may not solve the availability problem at all, since
>> we still have two points of failure.
>>
>> I think a better solution may be to have multiple mirrors of the repo,
>> either run by concerned citizens or maintained by the clojars staff. I
>> know some folks in the community already run internal caching proxies
>> or rsynced mirrors (and are probably chuckling knowingly at those of
>> us affected by the outage), but those proxies don't really help those
>> in the community that don't have that internal infrastructure. And I
>> don't want to recommend that everyone set up a private mirror - that
>> seems like a lot of wasted effort.
>>
>> Ideally, it would be nice if we had a turn-key tool for creating a
>> mirror of clojars. We currently provide a way to rsync the repo[2], so
>> the seed for a mirror could be small, and could then slurp down the
>> full repo (and could continue to do so on a schedule to remain up to
>> date). We could then publish a list of mirrors that the community
>> could turn to in times of need (or use all the time, if they are
>> closer geographically or just generally more responsive). Any deploys
>> would still need to hit the primary server, but deploys are are
>> dwarfed by reads.
>>
>> There are a few issues with using mirrors:
>>
>> (1) security - with artifacts in more places, there are more
>> opportunities to to introduce malicious versions. This could be
>> prevented if we had better tools for verifying that the artifacts
>> are signed by trusted keys, and we required that all artifacts be
>> signed, but that's not the case currently. But if we had a regular
>> process that crawled all of the mirrors and the canonical repo to
>> verify that the checksums every artifact are identical, this could
>> actually improve security, since we could detect if any checksum
>> had been changed (a malicious party would have to change the
>> checksum of a modified artifact, since maven/lein/boot all confirm
>> checksums by default).
>>
>> (2) download stats - any downloads from a mirror wouldn't get
>> reflected in the stats for the artifact unless we had some way to
>> report those stats back to clojars.org. We currently generate the
>> stats by parsing the nginx access logs, mirrors could do the same
>> and report stats back to clojars.org if we care enough about
>> this. We don't get stats from the existing private mirrors, and
>> the stats aren't critical, so this may be a non-issue, and
>> definitely isn't something that has to be solved 

What's the best option similar to Vert.x, Reactor, Nodejs for use with Clojure?

2016-01-03 Thread adrians

It used to be that Vert.x 2.x had integration for Clojure, but version 3.x 
hasn't added it yet. Has anyone used this version through the Java API and 
if so, how painful was it? Is Reactor any better 
in that respect? What are people using when they want this kind of back end?

-- 
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.