Re: Migrating from nrepl.el to cider

2014-01-11 Thread Pink Bobsledder
This is a me too.

I've found this seemingly related 
https://github.com/clojure-emacs/cider/issues/367

This appears to be a cider problem more than a clojure issue, perhaps 
directing this inquiry there would be more beneficial?

Anyway, my fix is to ignore it - it seems that my repl works fine and I'm 
able to get work done despite it. I'm using CIDER 0.5.0alpha, so I guess 
I'm expecting some rough edges. The url I posted above seems to suggest 
that They are aware of the issue.

On Tuesday, December 31, 2013 7:56:46 AM UTC-8, Gary Trakhman wrote:

 I've seen the pprint error on startup often.


 On Tue, Dec 31, 2013 at 9:47 AM, mwillson cdr...@gmail.com 
 javascript:wrote:

 Folks,

 I've recently migrated to cider on two platforms, Mac OS X (Mavericks) 
 and Debian Wheezy.  With each, I encountered one issue, but different in 
 each case.  If these are worth reporting formally, I'd be happy to do so.

 1. Mac OS X

 Once cider was installed, I was unable to use cider-jack-in; it just 
 hung.  In the process list was this:

 -bin/tcsh -c echo lein repl :headless | eval $SHELL -l


 tcsh is my default emacs shell but It looks like tcsh is not like other 
 shells; the invocation of lein is not echo'd to the login shell.  Replacing 
 the emacs default shell with /bin/bash solved the problem.

 This is probably a rare use-case, but I suppose could affect FreeBSD 
 users.

 2. Debian Wheezy

 The java environment is:

 OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
 OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

 This issue manifested itself as an error when issuing cider-jack-in. 
  Intermittently it would generate a stack trace:

 java.lang.IllegalAccessError: pp does not exist
   at clojure.core$refer.doInvoke (core.clj:3849)
   clojure.lang.RestFn.applyTo (RestFn.java:139)
   clojure.core$apply.invoke (core.clj:619)
   clojure.core$load_lib.doInvoke (core.clj:5394)
   clojure.lang.RestFn.applyTo (RestFn.java:142)
   clojure.core$apply.invoke (core.clj:619) ...


 Figuring intermittent issues might be caused by a race between the lein 
 repl coming up and the cider environment, I added a short pause to 
 cider-init-repl-buffer, just before the requires in nrepl-repl-requires-
 sexp are evaluated:

  defun cider-init-repl-buffer (connection buffer optional noprompt)
 Initialize the REPL for CONNECTION in BUFFER.
   Insert a banner, unless NOPROMPT is non-nil.
 (with-current-buffer buffer
   (unless (eq major-mode (quote cider-repl-mode))
 (cider-repl-mode))
   ;; use the same requires by default as clojure.main does
   (sit-for 1) ; allow lein repl to come up fully?
   (cider-eval-sync nrepl-repl-requires-sexp)
   (cider-repl-reset-markers)
   (unless noprompt
 (cider-repl--insert-banner-and-prompt nrepl-buffer-ns))
   (cider-remember-clojure-buffer cider-current-clojure-buffer)
   (current-buffer)))


 The problem has not recurred (yet).

 Anyone else seen similar things?

 -mark
  
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 Note that posts from new members are moderated - please be patient with 
 your first post.
 To unsubscribe from this group, send email to
 clojure+u...@googlegroups.com javascript:
 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+u...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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/groups/opt_out.


Re: How can I improve this?

2014-01-11 Thread Mark Engelberg
Very clever!


On Fri, Jan 10, 2014 at 8:10 PM, Håkan Råberg hakan.rab...@gmail.comwrote:

 Another style, using channels for local state, but could been plain old
 iterators, slight golf warning:

 (require '[clojure.core.async :refer [to-chan !!]])

 (defn uniquify [s formatter]
   (let [g (memoize #(to-chan (cons % (map (partial formatter %) (next
 (range))]
 (map (fn f [x] ((some-fn #{x} f) (!! (g x s)))

 (uniquify [a a a a b a_2 a_3 a_3_1 a_3_1 a] #(str %1
 _ %2))
 ;= [a a_1 a_2 a_3 b a_2_1 a_3_1 a_3_1_1 a_3_1_2 a_4]


 On Friday, 10 January 2014 14:59:10 UTC, Colin Yates wrote:

 I have a sequence of file names and I want to make them unique.
  (uniquify [a b c a]) = [a b c a_1])

 This is what I have come up with, but surely there is a better way?

 What would you all do?  Feedback welcome (including the word 'muppet' as
 I am sure I have missed something simple) :)

 (defn uniquify
   Return a sequence, in the same order as s containing every element
   of s. If s (which is presumed to be a string) occurs more than once
   then every subsequent occurrence will be made unique.

   Items will be updated to include an incrementing numeric count using
   the specified formatter function. The formatter function will be
   given the name and the number and should return a combination of the
   two.

   The set of unique s's in the returned sequence will be the count of
   s's in s.
   ([s] (uniquify s (fn [item duplicates] (str item _ duplicates
   ([s formatter]
  (let [occurrences (atom {})
register-occurrence (fn [item]
  (if (get @occurrences item)
(swap! (get @occurrences item) inc)
(swap! occurrences assoc item (atom
 1)))
  @(get @occurrences item))
process (fn [item]
  (let [duplicates (dec (register-occurrence item))]
(if ( duplicates 0)
  (formatter item duplicates)
  item)))
unique-s (map process s)]
unique-s)))

  --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: How can I improve this?

2014-01-11 Thread Alex Baranosky
I've been finding uses for Brandon Bloom's transduce mini-library left and
right lately. There is a class of problems where you want to track some
state as you process a seq, and transduce.lazy/map-state enables you to do
that (https://github.com/brandonbloom/transduce).

Here's my solution using it. It is concise and stateless:

(defn uniqify [coll]
  (map-state (fn [elem-times-seen x]
   (let [x (if-let [times-seen (elem-times-seen x)]
 (str x _ times-seen)
 x)
 elem-times-seen' (update-in elem-times-seen [x]
(fnil inc 0))]
 [elem-times-seen' x]))
 {}
 coll))


On Sat, Jan 11, 2014 at 12:32 AM, Mark Engelberg
mark.engelb...@gmail.comwrote:

 Very clever!


 On Fri, Jan 10, 2014 at 8:10 PM, Håkan Råberg hakan.rab...@gmail.comwrote:

 Another style, using channels for local state, but could been plain old
 iterators, slight golf warning:

 (require '[clojure.core.async :refer [to-chan !!]])

 (defn uniquify [s formatter]
   (let [g (memoize #(to-chan (cons % (map (partial formatter %) (next
 (range))]
 (map (fn f [x] ((some-fn #{x} f) (!! (g x s)))

 (uniquify [a a a a b a_2 a_3 a_3_1 a_3_1 a] #(str %1
 _ %2))
 ;= [a a_1 a_2 a_3 b a_2_1 a_3_1 a_3_1_1 a_3_1_2 a_4]


 On Friday, 10 January 2014 14:59:10 UTC, Colin Yates wrote:

 I have a sequence of file names and I want to make them unique.
  (uniquify [a b c a]) = [a b c a_1])

 This is what I have come up with, but surely there is a better way?

 What would you all do?  Feedback welcome (including the word 'muppet' as
 I am sure I have missed something simple) :)

 (defn uniquify
   Return a sequence, in the same order as s containing every element
   of s. If s (which is presumed to be a string) occurs more than once
   then every subsequent occurrence will be made unique.

   Items will be updated to include an incrementing numeric count using
   the specified formatter function. The formatter function will be
   given the name and the number and should return a combination of the
   two.

   The set of unique s's in the returned sequence will be the count of
   s's in s.
   ([s] (uniquify s (fn [item duplicates] (str item _ duplicates
   ([s formatter]
  (let [occurrences (atom {})
register-occurrence (fn [item]
  (if (get @occurrences item)
(swap! (get @occurrences item) inc)
(swap! occurrences assoc item (atom
 1)))
  @(get @occurrences item))
process (fn [item]
  (let [duplicates (dec (register-occurrence item))]
(if ( duplicates 0)
  (formatter item duplicates)
  item)))
unique-s (map process s)]
unique-s)))

  --
 --
 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/groups/opt_out.


  --
 --
 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/groups/opt_out.


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

Best Hadoop Online Training with vast experience trainers in Hyderabad

2014-01-11 Thread Sairam Shankar
SunItLabs provides the best Software’s training for various Computer IT 
courses through Webex, Gotomeeting. We are providing Hadoop Training based 
on specific needs of the learners especially we will give innovative one to 
one Classes which has great opportunities in the present IT market. We also 
provides Class room course to contend with today’s competitive IT world.

Contact Number : India :+91 9030928000,

Email : i...@sunitlabs.com ,

Web: http://www.sunitlabs.com/hadoop-online-training/

-- 
-- 
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/groups/opt_out.


[beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread Mark Johns
HI everyone, I am new to Clojure in terms of practice. I like the 
philosophy of Clojure and I want to start using it.

I need to build a simple model: button and indicator (progress bar).
Button interacts with indicator. That's it.
When the button is pressed - indicator fills,
when the button is not pressed - indicator depletes.

Where do I start? Give me a hint.

Thanks.

-- 
-- 
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/groups/opt_out.


Re: [ANN] Eastwood 0.1.0 Clojure lint tool

2014-01-11 Thread Jonas
Andy and Nicola has done truly amazing work with this release! Check out 
the graph describing issues created/solved for tools.analyzer(.jvm) during 
the last 60 days: 
http://dev.clojure.org/jira/secure/ConfigureReport.jspa?projectOrFilterId=project-10371periodName=dailydaysprevious=60cumulative=trueversionLabels=majorselectedProjectId=10371reportKey=com.atlassian.jira.plugin.system.reports%3Acreatedvsresolved-reportNext=Next

Cheers,
Jonas

On Saturday, January 11, 2014 9:30:46 AM UTC+2, Andy Fingerhut wrote:

 Eastwood is a Clojure lint tool.  It analyzes Clojure source code in 
 Leiningen projects, reporting things that may be errors.

 Installation instructions are in the documentation here:

 https://github.com/jonase/eastwood

 For example, did you know that if you use clojure.test to write tests, and 
 have multiple deftest definitions in the same namespace with the same name, 
 then the tests in all but the last deftest will never be run, whether those 
 tests would pass or fail?  Eastwood can find those duplicate names, as well 
 as other occurrences of the same Var name defined more than once.

 Eastwood can also warn about misplaced doc strings, calling deprecated 
 functions or Java methods, expressions that are suspicious because they 
 always return the same value (e.g. (= expr) is always true), expressions 
 whose return value is not used and appear to have no side effects, and a 
 few others.  See the documentation linked above for a complete list.

 Jonas Enlund wrote the original version of Eastwood with the help of 
 several other contributors.  Version 0.1.0 is an update by Jonas, Nicola 
 Mometto, and myself.  It uses the new Clojure contrib libraries 
 tools.reader for reading the code, and tools.analyzer and 
 tools.analyzer.jvm for parsing the source into abstract syntax trees, 
 making it straightforward to write many of the linters.  Thanks especially 
 to Nicola Mometto for tireless enhancements and bug fixes to those 
 libraries.

 You can file issues on the Github issue tracker if you encounter problems, 
 but please read the Known Issues section of the documentation before 
 filing problems.  Several issues have already been discovered, and their 
 causes documented, while testing Eastwood on most of the Clojure contrib 
 libraries, Clojure itself, and over 35 other open source libraries.

 Go squash some bugs!

 Andy Fingerhut



-- 
-- 
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/groups/opt_out.


Can't remember the name of that plugin

2014-01-11 Thread Robin Heggelund Hansen
Hi!

Just looked at the eastwood lint today, awesome project. It reminded me of 
another clojure plugin which analyzes your code and tells you how it could 
be written more idiomaticly. I can't remember the name of this plugin, does 
anyone know?

-- 
-- 
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/groups/opt_out.


Re: [ANN] tools.analyzer(.jvm) 0.1.0-alpha1

2014-01-11 Thread Ambrose Bonnaire-Sergeant
Congrats!

FWIW I won't be porting core.typed while tools.analyzer is still in alpha
but I'll definitely be pointing people your way.

Thanks,
Ambrose

On Sat, Jan 11, 2014 at 9:23 AM, Nicola Mometto brobro...@gmail.com wrote:


 Today I released the first version of the tools.analyzer[1] and
 tools.analyzer.jvm[2] contrib libraries, here are the leiningen
 coordinates:

 [org.clojure/tools.analyzer 0.1.0-alpha1]
 [org.clojure/tools.analyzer.jvm 0.1.0-alpha1]

 Right now the only documentation for both those libraries is in the form
 of docstrings and can be found at
 http://clojure.github.io/tools.analyzer/ and
 http://clojure.github.io/tools.analyzer.jvm/ more extended documentation
 will be available before the first non-alpha release, hopefully very soon.

 While this is an alpha release, during the last months a big amount of
 bugs have been fixed thanks to the work of Andy Fingerhut who moved the
 Eastwood[3] linter from Ambrose's analyzer to tools.analyzer.jvm; thanks
 to this, the analyzer has been run with success on a large number of
 popular clojure libraries including almost all clojure contrib libraries
 and clojure's own namespaces, thus proving that it's effectively working.

 Please, try it out and if you find any bug report them in the Bug
 Tracker[4] (tools.analyzer and tools.analyzer.jvm share the same JIRA
 project) or if you have any questions, feel free to ask them and I'll do
 my best to answer them.

 Thanks,
 Nicola


 [1] https://github.com/clojure/tools.analyzer
 [2] https://github.com/clojure/tools.analyzer.jvm
 [3] https://github.com/jonase/eastwood
 [4] http://dev.clojure.org/jira/browse/TANAL

 --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: Can't remember the name of that plugin

2014-01-11 Thread Baishampayan Ghose
Kibit https://github.com/jonase/kibit ~BG

On Sat, Jan 11, 2014 at 7:39 PM, Robin Heggelund Hansen
skinney...@gmail.com wrote:
 Hi!

 Just looked at the eastwood lint today, awesome project. It reminded me of
 another clojure plugin which analyzes your code and tells you how it could
 be written more idiomaticly. I can't remember the name of this plugin, does
 anyone know?

 --
 --
 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/groups/opt_out.



-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
-- 
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/groups/opt_out.


Re: Migrating from nrepl.el to cider

2014-01-11 Thread mwillson
Thanks for the report - your are probably right re the attribution; I'll 
make a comment on the cider issue list.

Thanks,
-mark

On Saturday, 11 January 2014 08:11:33 UTC, Pink Bobsledder wrote:

 This is a me too.

 I've found this seemingly related 
 https://github.com/clojure-emacs/cider/issues/367

 This appears to be a cider problem more than a clojure issue, perhaps 
 directing this inquiry there would be more beneficial?

 Anyway, my fix is to ignore it - it seems that my repl works fine and I'm 
 able to get work done despite it. I'm using CIDER 0.5.0alpha, so I guess 
 I'm expecting some rough edges. The url I posted above seems to suggest 
 that They are aware of the issue.

 On Tuesday, December 31, 2013 7:56:46 AM UTC-8, Gary Trakhman wrote:

 I've seen the pprint error on startup often.


 On Tue, Dec 31, 2013 at 9:47 AM, mwillson cdr...@gmail.com wrote:

 Folks,

 I've recently migrated to cider on two platforms, Mac OS X (Mavericks) 
 and Debian Wheezy.  With each, I encountered one issue, but different in 
 each case.  If these are worth reporting formally, I'd be happy to do so.

 1. Mac OS X

 Once cider was installed, I was unable to use cider-jack-in; it just 
 hung.  In the process list was this:

 -bin/tcsh -c echo lein repl :headless | eval $SHELL -l


 tcsh is my default emacs shell but It looks like tcsh is not like other 
 shells; the invocation of lein is not echo'd to the login shell.  Replacing 
 the emacs default shell with /bin/bash solved the problem.

 This is probably a rare use-case, but I suppose could affect FreeBSD 
 users.

 2. Debian Wheezy

 The java environment is:

 OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1~deb7u1)
 OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

 This issue manifested itself as an error when issuing cider-jack-in. 
  Intermittently it would generate a stack trace:

 java.lang.IllegalAccessError: pp does not exist
   at clojure.core$refer.doInvoke (core.clj:3849)
   clojure.lang.RestFn.applyTo (RestFn.java:139)
   clojure.core$apply.invoke (core.clj:619)
   clojure.core$load_lib.doInvoke (core.clj:5394)
   clojure.lang.RestFn.applyTo (RestFn.java:142)
   clojure.core$apply.invoke (core.clj:619) ...


 Figuring intermittent issues might be caused by a race between the lein 
 repl coming up and the cider environment, I added a short pause to 
 cider-init-repl-buffer, just before the requires in nrepl-repl-requires-
 sexp are evaluated:

  defun cider-init-repl-buffer (connection buffer optional noprompt)
 Initialize the REPL for CONNECTION in BUFFER.
   Insert a banner, unless NOPROMPT is non-nil.
 (with-current-buffer buffer
   (unless (eq major-mode (quote cider-repl-mode))
 (cider-repl-mode))
   ;; use the same requires by default as clojure.main does
   (sit-for 1) ; allow lein repl to come up fully?
   (cider-eval-sync nrepl-repl-requires-sexp)
   (cider-repl-reset-markers)
   (unless noprompt
 (cider-repl--insert-banner-and-prompt nrepl-buffer-ns))
   (cider-remember-clojure-buffer cider-current-clojure-buffer)
   (current-buffer)))


 The problem has not recurred (yet).

 Anyone else seen similar things?

 -mark
  
 -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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/groups/opt_out.


Re: Can't remember the name of that plugin

2014-01-11 Thread Robin Heggelund Hansen
Great! Thanks :)

kl. 15:25:21 UTC+1 lørdag 11. januar 2014 skrev Baishampayan Ghose følgende:

 Kibit https://github.com/jonase/kibit ~BG 

 On Sat, Jan 11, 2014 at 7:39 PM, Robin Heggelund Hansen 
 skinn...@gmail.com javascript: wrote: 
  Hi! 
  
  Just looked at the eastwood lint today, awesome project. It reminded me 
 of 
  another clojure plugin which analyzes your code and tells you how it 
 could 
  be written more idiomaticly. I can't remember the name of this plugin, 
 does 
  anyone know? 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  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+u...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 



 -- 
 Baishampayan Ghose 
 b.ghose at gmail.com 


-- 
-- 
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/groups/opt_out.


Re: [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Peter Taoussanis
Hi Dan,

This seems like a really smart approach to me. I've been playing with a 
number of ways of structuring a large Cljs application recently - and the 
way Cloact cooperates with atom derefs is pretty inspired. It's flexible, 
it's fast, it's natural - and it makes transition from a non-React codebase 
easy (trivial in my case since I already using Hiccup).

Seriously great stuff, thank you for sharing this!

BTW for those looking for single-state snapshots (for undos, tooling, 
debugging, etc.) - all you'd need to do is merge any individual atom 
snapshots that constitute your full application state. It should be easy to 
extend Cloact (or something like Reflex https://github.com/lynaghk/reflex) 
to do the state tracking automatically.

Cheers! :-)

- Peter Taoussanis

-- 
-- 
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/groups/opt_out.


Re: How can I improve this?

2014-01-11 Thread Alex Osborne
On Sat, January 11, 2014 9:22 pm, Alex Baranosky wrote:
 There is a class of problems where you want to track some state as you
process a seq

This is an interesting exercise.  I find said class of problem comes up
fairly frequently and I usually end up with something scary-looking using
reduce or lazy-seq that I'm never quite satisfied with.  I often feel
there's some missing flow control mechanism just out of reach.

As another point of comparison here's a straightforward imperative version
(of the simplified problem):

(defn unique [words]
  (let [occurrences (java.util.HashMap.)]
(for [word words]
  (let [n (get occurrences word 0)]
(.put occurrences word (inc n))
(if (zero? n) word (str word _ n))

i.e. if a tree falls in the woods... style mutation. :-)

 and transduce.lazy/map-state enables you to do that
(https://github.com/brandonbloom/transduce)

The imperative solution led me towards something like the for-like form
of map-state.  A macro that's a hybrid of for and loop such that it
takes both for and loop style bindings:

(defn unique [words]
  (for-loop [word words] [occurrences {}]
(let [n (get occurences word 0)]
  (yield (if (zero? n) word (str word _ n))
(assoc occurrences word (inc n))

Imagine yield is somewhat like recur in that it takes new values to
bind for the next iteration but its first argument is the sequence element
to return for the current step.  Like recur yield must be in the tail call
position.

The above might expand into this:

(defn uniquify [words format]
  ((fn uniquify* [occurrences words]
(lazy-seq
  (let [[word  rest] words
n (get occurrences word 0)]
(when word
  (cons (if (zero? n) word (str word _ n))
(uniquify* (assoc occurrences word (inc n))
   rest))
   {} words))



-- 
-- 
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/groups/opt_out.


Re: [ANN] dynalint 0.1.0

2014-01-11 Thread Morgawr Havenlost
This is really nice! 
I just added it to my lein profile so I can use it to test my software. I 
was testing it and I got this output:

WARNING (Dynalint id 1):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 2):  clojure.core/select-keys first argument should be 
a map: nil
WARNING (Dynalint id 3):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 4):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 5):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 6):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 7):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 8):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 9):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 10):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 11):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 12):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 13):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 14):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 15):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 16):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 17):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 18):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 19):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 20):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 21):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 22):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 23):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 24):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 25):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 26):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 27):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 28):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 29):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 30):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 31):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 32):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 33):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 34):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 35):  clojure.set/union should have set arguments: nil
WARNING (Dynalint id 36):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 37):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 38):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 39):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 40):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 41):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 42):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 43):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 44):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 45):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 46):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 47):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 48):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 49):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 50):  clojure.core/dissoc first argument should be a 
map: nil
WARNING (Dynalint id 51):  clojure.core/dissoc first argument should be a 
map: nil

What is this referring to? Is there a way to find out which lines of code 
it's actually talking about? 
Thank you very much for yet another great tool!

Morg.

On Saturday, January 11, 2014 3:46:40 PM UTC+1, Ambrose Bonnaire-Sergeant 
wrote:

 Hi,

 For those who like analysing their programs I present Dynalint, a 
 simplistic linter. It's essentially a bunch of manually curated runtime 
 warnings and errors for the core Clojure library.

 https://github.com/frenchy64/dynalint

 Please read the README for instructions and caveats.

 Here's the gist:

 user= (require '[dynalint.lint :as dyn])
 nil
 user= (dyn/lint)
 :ok
 user= (require '[clojure.set :as set])
 nil
 user= (set/union #{1} nil)
 WARNING (Dynalint id 1):  clojure.set/union should have set arguments: nil
 #{1}
 user= (vals nil)
 nil
 user= (vals 1)
 ExceptionInfo ERROR 

Re: [ANN] dynalint 0.1.0

2014-01-11 Thread Sam Ritchie
Hey Ambrose, looks great. I tried to the leiningen plugin's test command 
and ended up with a bunch of messages like this:


WARNING (Dynalint id 146):  clojure.set/union should have set arguments: nil

but with no way to link this back to my code. Any ideas?


Ambrose Bonnaire-Sergeant mailto:abonnaireserge...@gmail.com
January 11, 2014 8:46 AM
Hi,

For those who like analysing their programs I present Dynalint, a 
simplistic linter. It's essentially a bunch of manually curated 
runtime warnings and errors for the core Clojure library.


https://github.com/frenchy64/dynalint

Please read the README for instructions and caveats.

Here's the gist:

user= (require '[dynalint.lint :as dyn])
nil
user= (dyn/lint)
:ok
user= (require '[clojure.set :as set])
nil
user= (set/union #{1} nil)
WARNING (Dynalint id 1):  clojure.set/union should have set arguments: nil
#{1}
user= (vals nil)
nil
user= (vals 1)
ExceptionInfo ERROR (Dynalint id 2): First argument to 
clojure.core/vals must be seqable: 1  clojure.core/ex-info (core.clj:4327)


user= (update-in {} [] identity)
WARNING (Dynalint id 3):  clojure.core/update-in key path should be 
non-empty: []

{nil nil}


Also lein-dynalint is a Leiningen plugin which some might find helpful.

https://github.com/frenchy64/lein-dynalint

Enjoy!
Ambrose
--
--
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/groups/opt_out.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com http://www.paddleguru.com/
Twitter http://twitter.com/paddleguru// Facebook 
http://facebook.com/paddleguru


--
--
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/groups/opt_out.
inline: postbox-contact.jpg

Re: [ANN] dynalint 0.1.0

2014-01-11 Thread Eric Normand
Hi Ambrose,

This looks great! I'll give it a try.

Eric

http://lispcast.com

On Saturday, January 11, 2014 8:46:40 AM UTC-6, Ambrose Bonnaire-Sergeant 
wrote:

 Hi,

 For those who like analysing their programs I present Dynalint, a 
 simplistic linter. It's essentially a bunch of manually curated runtime 
 warnings and errors for the core Clojure library.

 https://github.com/frenchy64/dynalint

 Please read the README for instructions and caveats.

 Here's the gist:

 user= (require '[dynalint.lint :as dyn])
 nil
 user= (dyn/lint)
 :ok
 user= (require '[clojure.set :as set])
 nil
 user= (set/union #{1} nil)
 WARNING (Dynalint id 1):  clojure.set/union should have set arguments: nil
 #{1}
 user= (vals nil)
 nil
 user= (vals 1)
 ExceptionInfo ERROR (Dynalint id 2): First argument to clojure.core/vals 
 must be seqable: 1  clojure.core/ex-info (core.clj:4327)

 user= (update-in {} [] identity)
 WARNING (Dynalint id 3):  clojure.core/update-in key path should be 
 non-empty: []
 {nil nil}


 Also lein-dynalint is a Leiningen plugin which some might find helpful.

 https://github.com/frenchy64/lein-dynalint

 Enjoy!
 Ambrose


-- 
-- 
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/groups/opt_out.


Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Dan Holmsand
Thanks a lot Peter!

Btw, there is already code that comes from Reflex in Cloact (even if it is 
mangled quite a bit by now). Very undocumented, and probably a very poor api, 
though... See ratom.clj/.cljs. There is for example a run! macro that will 
execute its body every time a deref'ed atom is changed.

Quite another thing is if it is a good idea to do that :-) If possible, I'd say 
it is better to keep state that belongs together in a single atom.

/dan

On 11 jan 2014, at 16:58, Peter Taoussanis ptaoussa...@gmail.com wrote:

 Hi Dan,
 
 This seems like a really smart approach to me. I've been playing with a 
 number of ways of structuring a large Cljs application recently - and the way 
 Cloact cooperates with atom derefs is pretty inspired. It's flexible, it's 
 fast, it's natural - and it makes transition from a non-React codebase easy 
 (trivial in my case since I already using Hiccup).
 
 Seriously great stuff, thank you for sharing this!
 
 BTW for those looking for single-state snapshots (for undos, tooling, 
 debugging, etc.) - all you'd need to do is merge any individual atom 
 snapshots that constitute your full application state. It should be easy to 
 extend Cloact (or something like Reflex https://github.com/lynaghk/reflex) to 
 do the state tracking automatically.
 
 Cheers! :-)
 
 - Peter Taoussanis
 
 -- 
 Note that posts from new members are moderated - please be patient with your 
 first post.
 --- 
 You received this message because you are subscribed to a topic in the Google 
 Groups ClojureScript group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/clojurescript/4b8ZL_4P4ZA/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 clojurescript+unsubscr...@googlegroups.com.
 To post to this group, send email to clojurescr...@googlegroups.com.
 Visit this group at http://groups.google.com/group/clojurescript.

-- 
-- 
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/groups/opt_out.


Re: [beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread t x
Two hints:
  http://clojure.org/java_interop
  http://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html


On Sat, Jan 11, 2014 at 2:45 AM, Mark Johns m3nt...@gmail.com wrote:

 HI everyone, I am new to Clojure in terms of practice. I like the
 philosophy of Clojure and I want to start using it.

 I need to build a simple model: button and indicator (progress bar).
 Button interacts with indicator. That's it.
 When the button is pressed - indicator fills,
 when the button is not pressed - indicator depletes.

 Where do I start? Give me a hint.

 Thanks.

 --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: [ANN]: Clojure/West 2014 - San Francisco - March 24-26

2014-01-11 Thread Alex Miller
Yes, there will be two concurrent tracks during most of the conference, 
separated by either topic or level. We also expect to record talks and 
release videos following the conference.

Alex

On Friday, January 10, 2014 7:15:21 PM UTC-6, Logan Linn wrote:

 This was great news to hear. Looking forward to it.

 Talks will be presented in two tracks


 Does this mean there will be two stages/presentations at a time?

 On Thursday, January 9, 2014 8:01:13 PM UTC-8, Alex Miller wrote:

 At long last, we have finalized the plans for Clojure/West 2014!  

 Site: http://clojurewest.org
 Date: March 24-25 conference, March 26 hackfest!
 Venue: Palace Hotel, San Francisco 
 http://www.sfpalace.com/
 https://goo.gl/maps/pBXav

 Call for Presentations:
 - 
 https://cognitect.wufoo.com/forms/clojurewest-2014-call-for-presentations/
 - Open from now till Jan 24th (yes, that's soon!)
 - Speakers receive: free admission, up to 3 nights hotel, US airfare or 
 $450 stipend if international
 - Tracks (sessions are 40 minutes): 
 1) Core Clojure - Talks that focus on core usage of Clojure or 
 ClojureScript, focused mostly (but not exclusively) on the less experienced 
 Clojure developer. Examples: language features, techniques, libraries, 
 tools.
 2) Production Clojure - Talks from and for those doing Clojure or 
 ClojureScript in production systems or products. Examples: integrating with 
 existing code bases, creating and communicating designs, structuring your 
 code, performance, management and organization.
 3) Crazy Clojure - Talks from those probing the boundaries of Clojure or 
 bringing Clojure into amazing new areas. Examples: music, art, alternate 
 hosts, space stations, donuts, etc.

 Talks will be presented in two tracks on March 24-25th. On the 26th, we 
 will have space available for people to get together and do what we all 
 love: write some Clojure! More info to come.

 We expect early bird registration and the sponsorship prospectus to be 
 available soon.

 Please let us know if you have any questions!

 Alex Miller and Lynn Grogan
 Questions: clojur...@cognitect.com






-- 
-- 
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/groups/opt_out.


obtain # of elements currently on a channel?

2014-01-11 Thread t x
Hi,

  I have a clojure.core.async.chan

  Is there a way to figure out the # of elements currently queued on the
channel? (preferably in O(1) time)

  I don't want to actually take any item off the channel, I just want a
progress bar, something like there are 20 transactions ahead of you in
life to be processed

Thanks!

-- 
-- 
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/groups/opt_out.


Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Peter Taoussanis

 Quite another thing is if it is a good idea to do that :-) If possible, I'd 
 say it is better to keep state that belongs together in a single atom.

Am looking at this from a performance point of view. You're marking components 
as dirty when there's any change in an atom being deref'ed by the component, 
right?

But I'm guessing it's quite common for a component to be dealing with only a 
small subset of the data within a larger state atom. (This is what Om's cursors 
are addressing, it seems). In that case (please correct me if I'm wrong) - the 
number of needless rerenders will grow with the number of component-irrelevant 
bits of information in each atom.

One simple way of addressing that is to use more, smaller atoms - or to use 
views on atoms (as Reflex does). For example instead of marking a component 
as dirty when @my-atom changes, we could mark it as dirty only when 
`(:relevant-submap @my-atom)` changes.

Does that make sense, or am I misunderstanding something?

-- 
-- 
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/groups/opt_out.


Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-11 Thread Guru Devanla
Sorry, I mixed up. I meant the second book to be 'Clojure in Action' :
http://manning.com/rathore/



On Fri, Jan 10, 2014 at 4:26 PM, Sean Corfield s...@corfield.org wrote:

 On Jan 10, 2014, at 11:26 AM, Guru Devanla grd...@gmail.com wrote:

 Another good book I thought you could get through faster in 'Pragmatic
 Clojure'.I found this book to be the next level to Clojure Programming.


 Do you mean Programming Clojure (2nd Ed) by Stuart Halloway?

 http://pragprog.com/book/shcloj2/programming-clojure

 Sean Corfield -- (904) 302-SEAN
 An Architect's View -- http://corfield.org/

 Perfection is the enemy of the good.
 -- Gustave Flaubert, French realist novelist (1821-1880)





-- 
-- 
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/groups/opt_out.


Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Dan Holmsand
On 11 jan 2014, at 18:51, Peter Taoussanis ptaoussa...@gmail.com wrote:
 
 Am looking at this from a performance point of view. You're marking 
 components as dirty when there's any change in an atom being deref'ed by the 
 component, right?
 
 But I'm guessing it's quite common for a component to be dealing with only a 
 small subset of the data within a larger state atom. (This is what Om's 
 cursors are addressing, it seems). In that case (please correct me if I'm 
 wrong) - the number of needless rerenders will grow with the number of 
 component-irrelevant bits of information in each atom.
 
 One simple way of addressing that is to use more, smaller atoms - or to use 
 views on atoms (as Reflex does). For example instead of marking a component 
 as dirty when @my-atom changes, we could mark it as dirty only when 
 `(:relevant-submap @my-atom)` changes.

Right, you could do that (there is a reaction macro in ratom.clj that is 
exactly a view on atoms).

But it would probably be better to just pass (:relevant-submap @my-atom) to a 
sub-component. The subcomponent will only be re-rendered when its arguments 
(i.e the params map and possible children) changes. 

Also, React is fast enough that a few re-renderings won't even be noticeable 
most of the time. Unless React actually has to change the DOM the cost is very 
low.

/dan

-- 
-- 
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/groups/opt_out.


Re: [beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread Joseph Smith
A Clojure Swing wrapper (and more!): https://github.com/daveray/seesaw


 On Jan 11, 2014, at 4:45, Mark Johns m3nt...@gmail.com wrote:
 
 HI everyone, I am new to Clojure in terms of practice. I like the philosophy 
 of Clojure and I want to start using it.
 
 I need to build a simple model: button and indicator (progress bar).
 Button interacts with indicator. That's it.
 When the button is pressed - indicator fills,
 when the button is not pressed - indicator depletes.
 
 Where do I start? Give me a hint.
 
 Thanks.
 -- 
 -- 
 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/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Peter Taoussanis

 But it would probably be better to just pass (:relevant-submap @my-atom) to a 
 sub-component. The subcomponent will only be re-rendered when its arguments 
 (i.e the params map and possible children) changes.

Ahh, gotcha. Of course, thank you!

 Also, React is fast enough that a few re-renderings won't even be noticeable 
 most of the time. Unless React actually has to change the DOM the cost is 
 very low.

Okay, also good to know. Very excited to start playing with this properly soon.

All the best, cheers! :-)

-- 
-- 
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/groups/opt_out.


functions inside of go blocks

2014-01-11 Thread t x
Hi,

  Consider this function:

(defn try-put! [chan msg]
(not (= (alts! [chan msg]
:default :chan-full)
:chan-full)))


Now, I understand that:
* go blocks involve deep macro walking / rewriting
* thus, I can't call this function inside of a go block

My question:
* without rewriting the above as a macro, is there a way to
call functions inside a go block?

-- 
-- 
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/groups/opt_out.


ANN Monger 1.7.0 is released

2014-01-11 Thread Michael Klishin
Monger [1] is a MongoDB Clojure driver for a more civilized age.

Release notes:
http://blog.clojurewerkz.org/blog/2014/01/11/monger-1-dot-7-0-is-released/

1. http://clojuremongodb.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/groups/opt_out.


ANN Validateur 1.7.0 is released

2014-01-11 Thread Michael Klishin
Validateur [1] is a data validation library.

1.7.0 introduces support for ClojureScript.

Release notes:
http://blog.clojurewerkz.org/blog/2014/01/11/validateur-1-dot-7-0-is-released/

1. http://clojurevalidations.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/groups/opt_out.


Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-11 Thread Sean Corfield
On Jan 11, 2014, at 10:05 AM, Guru Devanla grd...@gmail.com wrote:
 Sorry, I mixed up. I meant the second book to be 'Clojure in Action' : 
 http://manning.com/rathore/

That book was already outdated when it was released (and many of the examples 
won't work properly now).

There's a second edition coming: http://manning.com/rathore2/

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Good learning resources for Clojure novice but with a long background i programming, both OO and some Fp?

2014-01-11 Thread Guru Devanla
Sure that could be the case. But I found the coverage interesting and quite
different from the other books. There was also some good tips for using
Clojure in the real world. That said, may be its still worth a wait for
next version.

Thanks
Guru


On Sat, Jan 11, 2014 at 1:51 PM, Sean Corfield s...@corfield.org wrote:

 On Jan 11, 2014, at 10:05 AM, Guru Devanla grd...@gmail.com wrote:

 Sorry, I mixed up. I meant the second book to be 'Clojure in Action' :
 http://manning.com/rathore/


 That book was already outdated when it was released (and many of the
 examples won't work properly now).

 There's a second edition coming: http://manning.com/rathore2/

 Sean Corfield -- (904) 302-SEAN
 An Architect's View -- http://corfield.org/

 Perfection is the enemy of the good.
 -- Gustave Flaubert, French realist novelist (1821-1880)





-- 
-- 
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/groups/opt_out.


HttpKit, Enlive (html retrieval and parsing)

2014-01-11 Thread Dave Tenny
I'm just playing around with tool kits to retrieve and parse html from web 
pages and files that I already have on disk (such as JDK API documentation).

Based on too little time, it looks like [http-kit 2.1.16] will retrieve 
but not parse html, and [enlive 1.1.5] will retrieve AND parse html.

Or is there a whole built-in parse capability I'm missing in http-kiit?

Also, http-kit doesn't seem to want to retrieve content from a file:/// 
url, whereas enlive is happy with both local and remote content.

I'm just messing around, I wanted to have some REPL javadoc logic that 
didn't fire up a browser or use the swing app (whose fonts are unreadable 
for me, and half a day spent trying to change it was not fruitful).

Any tips or suggestions?  Just don't want to make sure I'm missing obvious 
things.

Thanks!



-- 
-- 
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/groups/opt_out.


Re: HttpKit, Enlive (html retrieval and parsing)

2014-01-11 Thread Dave Tenny
I was using net.cgrand.enlive-html/html-resource and org.httpkit.client/get 
for the page retrievals.

On Saturday, January 11, 2014 6:24:48 PM UTC-5, Dave Tenny wrote:

 I'm just playing around with tool kits to retrieve and parse html from web 
 pages and files that I already have on disk (such as JDK API documentation).

 Based on too little time, it looks like [http-kit 2.1.16] will retrieve 
 but not parse html, and [enlive 1.1.5] will retrieve AND parse html.

 Or is there a whole built-in parse capability I'm missing in http-kiit?

 Also, http-kit doesn't seem to want to retrieve content from a file:/// 
 url, whereas enlive is happy with both local and remote content.

 I'm just messing around, I wanted to have some REPL javadoc logic that 
 didn't fire up a browser or use the swing app (whose fonts are unreadable 
 for me, and half a day spent trying to change it was not fruitful).

 Any tips or suggestions?  Just don't want to make sure I'm missing obvious 
 things.

 Thanks!





-- 
-- 
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/groups/opt_out.


Re: HttpKit, Enlive (html retrieval and parsing)

2014-01-11 Thread Matching Socks
Java has HTTP retrieval built in.  Clojure's core functions can use file or 
http URLs:

user (slurp http://google.com;)

user (slurp file:///etc/passwd)

Parsing HTML on the other hand is a question of not just science but also 
art.  Doesn't enlive use Tag Soup?

-- 
-- 
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/groups/opt_out.


Re: [beginner] How do I make a button that could interact with indicator?

2014-01-11 Thread Matching Socks
To echo the Swing suggestion - 

Try the Seesaw REPL experiment!  I think this is it:  
https://gist.github.com/daveray/1441520  

-- 
-- 
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/groups/opt_out.


Re: HttpKit, Enlive (html retrieval and parsing)

2014-01-11 Thread Jan Herich
I don't recommend using java's built in HTTP retrieval (by passing 
java.net.URL object to enlive html-resource function).
Not only is it significantly slower then using clj-http (which uses 
apache-http client under the hood), but it's also unreliable
when issuing more parallel requests. 
Current enlive library supports plug-able parsers, the default one is 
TagSoup, but you can switch it very easily for example
for JSoup by setting *parser* dynamic var. 
You can have a look at one of my little projects where i used enlive for 
html scraping 
herehttps://github.com/janherich/lazada-quest/blob/master/src/lazada_quest/scrapper.clj
 , 
in this case, i used clj-http as 
http client:

(ns lazada-quest.scrapper
  (:require [clojure.string :as string]
[clj-http.client :as client]
[net.cgrand.enlive-html :as html]))


(defn fetch-url
  Given some url string, fetch html content of the resource served under url 
adress and return
   it in the form of enlive nodes
  [url]

  (html/html-resource (:body (client/get url {:as :stream}

It would be straightforward to replace use of clj-http with http-kit 
synchronous api, or asynchronous api with some changes

Dňa nedeľa, 12. januára 2014 0:24:48 UTC+1 Dave Tenny napísal(-a):

 I'm just playing around with tool kits to retrieve and parse html from web 
 pages and files that I already have on disk (such as JDK API documentation).

 Based on too little time, it looks like [http-kit 2.1.16] will retrieve 
 but not parse html, and [enlive 1.1.5] will retrieve AND parse html.

 Or is there a whole built-in parse capability I'm missing in http-kiit?

 Also, http-kit doesn't seem to want to retrieve content from a file:/// 
 url, whereas enlive is happy with both local and remote content.

 I'm just messing around, I wanted to have some REPL javadoc logic that 
 didn't fire up a browser or use the swing app (whose fonts are unreadable 
 for me, and half a day spent trying to change it was not fruitful).

 Any tips or suggestions?  Just don't want to make sure I'm missing obvious 
 things.

 Thanks!





-- 
-- 
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/groups/opt_out.


Re: obtain # of elements currently on a channel?

2014-01-11 Thread Brandon Bloom
Any API that lets you peek at the state of a channel is a surefire source 
of race conditions. So no, public API-wise, there isn't any way to do what 
you want. In theory, you can peek at the internals using reflection to get 
that information, but don't do that!

Instead, you can simply *count* yourself. Stick an extra go-loop on either 
end that swaps an atom with inc or dec.

On Saturday, January 11, 2014 12:19:51 PM UTC-5, t x wrote:

 Hi,

   I have a clojure.core.async.chan

   Is there a way to figure out the # of elements currently queued on the 
 channel? (preferably in O(1) time)

   I don't want to actually take any item off the channel, I just want a 
 progress bar, something like there are 20 transactions ahead of you in 
 life to be processed

 Thanks!


-- 
-- 
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/groups/opt_out.


Re: obtain # of elements currently on a channel?

2014-01-11 Thread t x
I have a another stupid question:

  How is this a race-condition / a source of problem given that:
* all I want to do is to read, I'm not writing / modifying

  In particular, the sole goal of this read is to show a counter saying
there are XYZ people ahead of you in line.

  It seems that to have a race conditions, one needs to :

  (1) thread-1 reads x
  (2) thread-2 modifies x
  (3) thread-1 writes some state depending on old value of x


On Sat, Jan 11, 2014 at 5:47 PM, Brandon Bloom brandon.d.bl...@gmail.comwrote:

 Any API that lets you peek at the state of a channel is a surefire
 source of race conditions. So no, public API-wise, there isn't any way to
 do what you want. In theory, you can peek at the internals using reflection
 to get that information, but don't do that!

 Instead, you can simply *count* yourself. Stick an extra go-loop on either
 end that swaps an atom with inc or dec.

 On Saturday, January 11, 2014 12:19:51 PM UTC-5, t x wrote:

 Hi,

   I have a clojure.core.async.chan

   Is there a way to figure out the # of elements currently queued on the
 channel? (preferably in O(1) time)

   I don't want to actually take any item off the channel, I just want a
 progress bar, something like there are 20 transactions ahead of you in
 life to be processed

 Thanks!

  --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: ClojureScript integration with Emacs/Cider ?

2014-01-11 Thread Gary Trakhman
In response to this thread, I've hacked lein-cljsbuild to dump the compiler
state, and built a version of autodoc to parse it and generate api docs.

I'm trying to figure out how exactly cider and austin will talk to each
other so I can make it happen, and I approach that I'm considering now is
to add a 'complete' operation to the piggieback middleware, since Bozhidar
says that it should work out of the box.  The information's available, and
I've demonstrated how to parse it in my autodoc-cljs port.  Hopefully
that's enough.

I've created a lein-cljsbuild issue to possibly integrate this stuff and
evoke further discussion.  It has a screenshot of autodoc generated from a
compiler dump and links to the implementations.

https://github.com/emezeske/lein-cljsbuild/issues/283


On Tue, Jan 7, 2014 at 5:35 PM, Colin Fleming
colin.mailingl...@gmail.comwrote:

 Great, let me know if you have any questions. I'm definitely planning
 ClojureScript support sometime soon. I think most of the symbol resolution
 for core cljs should work (since it's mostly the same as clj) for for pure
 cljs (including the core libs) everything at
 http://cursiveclojure.com/userguide/documentation.html should work. If
 you see anything that's not working either let me know directly or we have
 an issue tracker at https://github.com/cursiveclojure/cursive/issues.

 I'm also planning to handle JS interop but that's tricky because that
 support is only present in IntelliJ Ultimate. I'm still working out how to
 handle that but it's definitely on the roadmap.


 On 8 January 2014 00:26, Alexandru Nedelcu a...@bionicspirit.com wrote:

 On Mon, Jan 6, 2014 at 11:10 PM, Colin Fleming 
 colin.mailingl...@gmail.com wrote:

 Since Cursive (http://cursiveclojure.com) resolves everything
 statically from source, ClojureScript completion and navigation works for
 most symbols. There are still a lot that it doesn't know about since
 cljs-specific functionality is still pretty low, so js/* symbols have no
 support, and any functions included from Closure are not found either. But
 for pure cljs it should work pretty well. There are quite a few people
 using Cursive for cljs dev now, despite the slightly embarrassing lack of
 explicit support :-)



 Hi Colin,

 I just installed Cursive and looks very promising. I'll try using it.

 Do you plan to explicitly support ClojureScript? Do you have an ETA? That
 would be awesome, because viewing the implementation of Clojure's core libs
 is very valuable and from what I understand, there are differences between
 Clojure and ClojureScript (e.g. protocols are at the bottom in
 ClojureScript) and it would be valuable if I could click on a function and
 see its ClojureScript specific code and documentation. Also handling the
 Javascript interop would be awesome too.

 Thanks,

 --
 Alexandru Nedelcu
 www.bionicspirit.com

 PGP Public Key:
 https://bionicspirit.com/key.aexpk

 --
 --
 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/groups/opt_out.


  --
 --
 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/groups/opt_out.


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

Re: JAVA_OPTS not accessible in my Clojure project

2014-01-11 Thread Matching Socks
How did you start the Emacs Cider REPL? 

-- 
-- 
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/groups/opt_out.