Re: Any data about just how much loc Clojure shaves off java?

2017-11-19 Thread Rangel Spasov
Very hard to give any sort of scientifically or statistically accurate 
answer to this question but I'll go for it nevertheless ;).

I would say 5-10x (half to one order of magnitude). 

On Sunday, November 19, 2017 at 2:01:12 PM UTC-8, Didier wrote:
>
> Hi there,
>
> Out of pure curiosity, I was wondering if there was any rewrite or 
> equivalent code out there between Java and Clojure that showed exactly how 
> many LOC you save from switching to Clojure. Especially for larger 
> endeavour. 
>
> 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/d/optout.


Re: ANN: ClojureScript 1.9.542, spec changes & REPL enhancement

2017-10-13 Thread Rangel Spasov
Sorry, that was false alarm. Ok, that's kinda funny: 

Without paying attention I saw this on the top of the mailing list in 
google groups and just copy/pasted the version number and tried to build, 
only to just realize that I DOWNGRADED to a ClojureScript release from May 
12th LOL. My bad.
Somehow this thread got bumped to the top of groups.google.com.

Everything is working OK with the latest 
ClojureScript [org.clojure/clojurescript "1.9.946"]

Sorry for the false alarm!

Rangel


On Friday, October 13, 2017 at 11:34:24 AM UTC-7, David Nolen wrote:
>
> Will need something more minimal. Thanks.
>
> David
>
> On Fri, Oct 13, 2017 at 2:08 PM, Rangel Spasov <rasp...@gmail.com 
> > wrote:
>
>> I'm getting this (I'm guessing related to the changes around CLJS-485 
>> RegExp flags):
>>
>> (iOS simulator screenshot attached).
>>
>>
>> As you can see, the RN/JS stack traces are not very useful in this case. 
>> I can dig deeper if needed to find exactly where it fails (I have a few 
>> places where I use RegExp).
>>
>> Thanks all!
>> Rangel
>>  
>>
>> On Friday, May 12, 2017 at 1:31:54 PM UTC-7, David Nolen wrote:
>>>
>>> ClojureScript, the Clojure compiler that emits JavaScript source code.
>>>
>>> README and source code: https://github.com/clojure/clojurescript
>>>
>>> Leiningen dependency information:
>>>
>>> [org.clojure/clojurescript "1.9.542"]
>>>
>>> This release is primarily about staying in sync with the latest changes 
>>> to spec. It
>>> also includes a small but significant enhancement to REPLs to allow 
>>> handling multiple forms.
>>>
>>> As always, feedback welcome!
>>>
>>> ## 1.9.542
>>>
>>> ### Enhancements
>>> * CLJS-1572: REPL doesn't give error for expressions with too many right 
>>> parentheses
>>>
>>> ### Changes
>>> * cljs.spec -> cljs.spec.alpha
>>> * CLJS-2013 - Add MapEntry type
>>> * CLJS-2015: Self-host: `defmacro` should return the Var
>>> * CLJS-2017: Upgrade Closure Compiler to latest April 2017 release
>>>
>>> ### Fixes
>>> * CLJS-485: RegExp flags are being dropped by string/replace
>>> * CLJS-1518: Case macro expansion evaluates expression twice
>>> * CLJS-2024: Self-host: `find-ns-obj` broken for namespaces with 'a' as 
>>> the first segment
>>> * CLJS-2028: `realized?` throws on LazyTransformer
>>> * CLJS-2010: refer-clojure :rename throws on valid invocations
>>> * CLJS-2007: Whitespace optimizations should respect :main option.
>>>
>>> -- 
>> 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/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.


Re: About determinism of async

2017-10-10 Thread Rangel Spasov
I think simply wrapping the two values in a vector is the only thing that's 
needed in this case. Simply do a put like (>!! ch [my-val-1 my-val-2]) and 
take from the channel from another place. If my-val-1 and my-val-2 are not 
immediately available, you can have a separate mechanism (atoms, (loop 
[...] (recur ...)) or another set of core.async channels perhaps) that 
"collects" them until they are ready to be sent together as one value.  

partition-all on its own does not really help with the ordering here. For 
example:

(let [ch (chan 42 (partition-all 2))]
  (>!! ch :x')
  (thread   ;in another thread 
far, far away
(!! ch :y'))

  (!! ch :x'')

  ;take from ch
  ( [:x' :x'']

or 

=> [:x' :y']

But again as I said, you can employ partition-all separately as a 
"collecting" mechanism before doing the (>!! ch [my-val-1 my-val-2]). 
Didn't write an example for that but let me know if that's not clear and I 
can put together a few lines.

On Tuesday, October 10, 2017 at 7:50:20 AM UTC-7, Gary Trakhman wrote:
>
> So, at the point where you need 2 things to be consecutive, wrap them up 
> in a vector so they're one thing. `(partition-all 2)` will return a 
> transducer xform that chunks up your message stream by 2 
> https://clojuredocs.org/clojure.core/partition-all, and if you need to 
> undo it you can do so with the `cat` transducer 
> https://clojuredocs.org/clojure.core/cat .  
>
> On Tue, Oct 10, 2017 at 10:42 AM JokkeB  
> wrote:
>
>> Thanks for the response. That's what I suspected.
>>
>> How does partition help me in this case? I can't see any way of using it.
>>
>> How about onto-chan, would that be deterministic? Or any other function?
>>
>>
>> tiistai 10. lokakuuta 2017 17.33.22 UTC+3 Gary Trakhman kirjoitti:
>>
>>> I think a core assumption is that all writes can yield control at any 
>>> time to other worker go processes.  I wouldn't rely on the consecutive 
>>> behavior even if it were true, nondeterminism is a good assumption with 
>>> core.async.  If you need that particular guarantee, consider a call to 
>>> partition?
>>>
>>> On Tue, Oct 10, 2017 at 10:30 AM JokkeB  wrote:
>>>
>> I'm wondering about a case when using async:

 I have a channel where I write from multiple threads. One of the 
 sources is a go-loop with a timeout, so each second I write something to 
 the channel. If I do two consecutive writes inside the go block, can 
 another thread write between the two writes? Or can I rely on the two 
 messages being consecutive in the channel?

 -- 
 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/d/optout.

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


Re: ANN: ClojureScript 1.9.854

2017-07-28 Thread Rangel Spasov
Works for me on iOS JavaScriptCore  (RN 0.45). 

Thanks David and all ClojureScript contributors!

Rangel

P.S. The only issue with a library that I saw was 
with 
https://github.com/tailrecursion/cljs-priority-map/blob/master/src/cljs/tailrecursion/priority_map.cljs#L4


*Invalid :refer, var cljs.reader/reader-error does not exist *

I assume this is on the library side to fix with the latest ClojureScript 
update but just FYI if anyone runs into it.

On Friday, July 28, 2017 at 2:55:04 PM UTC-7, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "1.9.854"]
>
> This is a significant feature release. Notable new features include
> comprehensive NPM dependency support, overhauled code splitting,
> enhanced JavaScript module preprocessing, declared global exports for
> foreign libs, and checked array operations. There are also a large
> number of fixes, changes, and minor enhancementes. For more detailed
> descriptions of the major enhancements, please refer to the last month
> of posts https://clojurescript.org/news/news.
>
> As always, feedback welcome!
>
> ## 1.9.854
>
> ### Enhancements
> * CLJS-2280: Provide process.env :preload and auto-configure
> * CLJS-2279: Infer `:module-type ` for provided `node_modules`
> * CLJS-2250: Support :foreign-libs overrides via :provides
> * CLJS-2243: Self-host: Add support for :global-exports
> * CLJS-2232: Self-host: Add support for string-based requires
> * add *print-fn-bodies* knob, set to false
> * CLJS-2198: Safe array operations
> * CLJS-2217: Support `:rename` for JS modules
> * CLJS-2214: Support :global-exports for foreign libraries
> * CLJS-1428: Add a cljs.core/*command-line-args* var
> * CLJS-2061: Support ns :require for JS libs, allow strings along with 
> symbol
> * CLJS-2148: Add warnings for invalid use of aget and aset
> * CLJS-2143: Add support for symbol preprocess values
>
> ### Changes
> * CLJS-2273: Bump tools.reader to 1.0.3 and development dependencies
> * CLJS-2235: Allow passing extra maven opts to build scripts
> * CLJS-2267: Allow ^:const inlined vars to affect if emission
> * CLJS-2245: Add support for using a local `node_modules` installation 
> through a new `:node-modules` compiler flag
> * CLJS-2002: Don't throw when no *print-fn* is set
> * support Clojure primitive array type hints, core.async no longer
>   gives warnings
> * CLJS-2213: Node.js target should use node_modules index to emit platform 
> specific require
> * CLJS-2200: bump to tools.reader 1.0.2
> * CLJS-2135: require macro prints last result of loaded-libs
> * CLJS-2192: Add ChakraCore testing facilities
> * CLJS-1800: Defer to tools.reader for cljs.reader functionality
> * CLJS-2163: Clean up uses of aget / aset on objects
> * CLJS-2184: Add `ns-publics` and `ns-imports`
> * CLJS-2183: Assert arguments are quoted symbols in some core macros
> * CLJS-2182: Assert argument to resolve is a quoted symbol
> * CLJS-2186: Update docstrings for aget/aset to be consistent with Clojure
> * CLJS-2180: Allow compiling `:modules` with whitespace optimizations
> * CLJS-1822: Use `:file-min` when processing JS modules with advanced 
> optimizations
> * CLJS-2169: Error when compiling with :source-map and advanced 
> optimizations
> * CLJS-2037: Throw if overwriting alias in current namespace
> * CLJS-2160: Add loaded? and prefetch functions to cljs.loader
> * CLJS-2148: Add unsafe-get and use goog.object
> * CLJS-2161: Bump Closure Compiler to June 2017 release
>
> ### Fixes
> * CLJS-1854: Self-host: Reload ns with const
> * CLJS-2278: JavaScript object literals are printed wth keys that cannot 
> be read
> * CLJS-2276: Self-host: Need test.check dep for CLJS-2275
> * CLJS-2275: cljs.spec.alpha/fdef resolves eagerly
> * CLJS-2259: Extra .cljs_node_repl directory containing cljs.core output
> * CLJS-2274: Update CI script to install deps
> * CLJS-2269: Warn on top level code split loads
> * CLJS-2272: Tests that depended on default install deps behavior failing
> * CLJS-2255: Clean up :npm-deps
> * CLJS-2263: Docstring for neg-int? backwards
> * CLJS-2262: Correct comment that *warn-on-infer* is file-scope
> * CLJS-2258: Stack overflow regression for sequence xform applied to 
> eduction
> * CLJS-2256: Generated code doesn't add newline after sourceMappingURL 
> comment
> * CLJS-2254: Module Indexing: Provide relative paths for a package's main 
> module
> * CLJS-2248: Build API tests rely on Yarn
> * CLJS-2239: Self-host: Add `:target :nodejs` to the docstrings in cljs.js
> * CLJS-2251: Follow-up fix to CLJS-2249 and related commit
> * CLJS-2249: Provide a test for d4b871cce73
> * CLJS-2246: Revert CLJS-2245 and CLJS-2240 and fix `lein test`
> * CLJS-2244: Orphaned processed JS modules breaks :modules
> * CLJS-2242: Lots of undeclared Var warns in cljs.spec.gen.alpha
> * CLJS-2241: Multiple requires of 

Re: ANN: Cognitect acquired by Microsoft

2017-04-03 Thread Rangel Spasov
Good one! :) 

On Saturday, April 1, 2017 at 1:00:16 PM UTC-7, Gregg Reynolds wrote:
>
> made ya look!
>

-- 
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: ANN: ClojureScript 1.9.493, another bugfix release

2017-02-26 Thread Rangel Spasov
I did some digging/manual shrinking. 

It seems that any core.async code with the latest version of ClojureScript does 
not compile under :advanced. I suspect the problem lies with the bump of Google 
Closure dependency and/or core.async.

I made a repo showing a minimal case:

https://github.com/raspasov/cljs-1.9.494-core-async-broken

On Friday, February 24, 2017 at 8:51:10 PM UTC-8, Rangel Spasov wrote:
> Forgot to add: this is my :compiler settings map. 
> 
> {:output-to  "index.ios.js"
>  :main   "env.ios.main"
>  :output-dir "target/ios"
>  :static-fns true
>  :optimize-constants true
>  :parallel-build true
>  ;:pretty-print   true
>  ;:pseudo-names   true
>  :source-map "cljs-source-map.js"
>  :optimizations  :advanced
>  :externs["externs/externs.js"]
>  :closure-defines    {"goog.DEBUG" false}}
> 
> On Friday, February 24, 2017 at 8:46:03 PM UTC-8, Rangel Spasov wrote:
> > Hey guys,
> > 
> > I'm getting this error. It seems that it's happening inside the transpiled 
> > core.async sources. The error carrot at line 1444 points at the semicolon, 
> > pretty strange.
> > 
> > 
> > Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager 
> > println
> > SEVERE: 
> > /Users/raspasov/projects/project123/target/ios/cljs/core/async.js:1444: 
> > ERROR - Parse error. No newline allowed before '=>'
> > var inst_33727 = async(inst_33726); (^ points at the semicolon)
> > 
> > 
> > Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager 
> > printSummary
> > WARNING: 1 error(s), 4 warning(s)
> > ERROR: JSC_PARSE_ERROR. Parse error. No newline allowed before '=>' at 
> > /Users/raspasov/projects/project123/target/ios/cljs/core/async.js line 1444 
> > : 34
> > 
> > I tried both :parallel-build true/false but it doesn't make a difference. 
> > It works fine on [org.clojure/clojurescript "1.9.473"]
> > 
> > 
> > Here's how the async.js source looks like around line 1444.
> > 
> > return cljs.core.cst$kw$recur;
> > } else {
> > if((state_val_33738 === (2))){
> > var state_33737__$1 = state_33737;
> > return 
> > cljs.core.async.impl.ioc_helpers.take_BANG_(state_33737__$1,(4),jobs);
> > } else {
> > if((state_val_33738 === (3))){
> > var inst_33735 = (state_33737[(2)]);
> > var state_33737__$1 = state_33737;
> > return 
> > cljs.core.async.impl.ioc_helpers.return_chan(state_33737__$1,inst_33735);
> > } else {
> > if((state_val_33738 === (4))){
> > var inst_33726 = (state_33737[(2)]);
> > var inst_33727 = async(inst_33726); <<<<<<<<<<<<<<<< This is the error line 
> > number 1444
> > var state_33737__$1 = state_33737;
> > if(cljs.core.truth_(inst_33727)){
> > var statearr_33743_33989 = state_33737__$1;
> > (statearr_33743_33989[(1)] = (5));
> > 
> > } else {
> > var statearr_33744_33990 = state_33737__$1;
> > (statearr_33744_33990[(1)] = (6));
> > 
> > }
> > 
> > return cljs.core.cst$kw$recur;
> > } else {
> > if((state_val_33738 === (5))){
> > var state_33737__$1 = state_33737;
> > var statearr_33745_33992 = state_33737__$1;
> > (statearr_33745_33992[(2)] = null);
> > 
> > (statearr_33745_33992[(1)] = (2));
> > 
> > 
> > return cljs.core.cst$kw$recur;
> > } else {
> > if((state_val_33738 === (6))){
> > var state_33737__$1 = state_33737;
> > var statearr_33746_33993 = state_33737__$1;
> > (statearr_33746_33993[(2)] = null);
> > 
> > (statearr_33746_33993[(1)] = (7));
> > 
> > 
> > return cljs.core.cst$kw$recur;
> > } else {
> > if((state_val_33738 === (7))){
> > var inst_33733 = (state_33737[(2)]);
> > var state_33737__$1 = state_33737;
> > var statearr_33747_33994 = state_33737__$1;
> > (statearr_33747_33994[(2)] = inst_33733);
> > 
> > (statearr_33747_33994[(1)] = (3));
> > 
> > 
> > return cljs.core.cst$kw$recur;
> > } else {
> > return null;
> > }
> > }
> > }
> > }
> > }
> > }
> > }
> > 
> > 
> > On Friday, February 24, 2017 at 4:21:35 PM UTC-8, David Nolen wrote:
> > > Just cut 1.9.494 to back out some macros that were made unintentionally 
> > > private.
> > > 
> > > 
> > > On Fri, Feb 24, 2017 at 4:47 PM, David Nolen <dnolen...@gmail.com> wrote:
> > > 
&g

Re: ANN: ClojureScript 1.9.493, another bugfix release

2017-02-24 Thread Rangel Spasov
Forgot to add: this is my :compiler settings map. 

{:output-to  "index.ios.js"
 :main   "env.ios.main"
 :output-dir "target/ios"
 :static-fns true
 :optimize-constants true
 :parallel-build true
 ;:pretty-print   true
 ;:pseudo-names   true
 :source-map "cljs-source-map.js"
 :optimizations  :advanced
 :externs["externs/externs.js"]
 :closure-defines{"goog.DEBUG" false}}

On Friday, February 24, 2017 at 8:46:03 PM UTC-8, Rangel Spasov wrote:
> Hey guys,
> 
> I'm getting this error. It seems that it's happening inside the transpiled 
> core.async sources. The error carrot at line 1444 points at the semicolon, 
> pretty strange.
> 
> 
> Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager 
> println
> SEVERE: 
> /Users/raspasov/projects/project123/target/ios/cljs/core/async.js:1444: ERROR 
> - Parse error. No newline allowed before '=>'
> var inst_33727 = async(inst_33726); (^ points at the semicolon)
> 
> 
> Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager 
> printSummary
> WARNING: 1 error(s), 4 warning(s)
> ERROR: JSC_PARSE_ERROR. Parse error. No newline allowed before '=>' at 
> /Users/raspasov/projects/project123/target/ios/cljs/core/async.js line 1444 : 
> 34
> 
> I tried both :parallel-build true/false but it doesn't make a difference. It 
> works fine on [org.clojure/clojurescript "1.9.473"]
> 
> 
> Here's how the async.js source looks like around line 1444.
> 
> return cljs.core.cst$kw$recur;
> } else {
> if((state_val_33738 === (2))){
> var state_33737__$1 = state_33737;
> return cljs.core.async.impl.ioc_helpers.take_BANG_(state_33737__$1,(4),jobs);
> } else {
> if((state_val_33738 === (3))){
> var inst_33735 = (state_33737[(2)]);
> var state_33737__$1 = state_33737;
> return 
> cljs.core.async.impl.ioc_helpers.return_chan(state_33737__$1,inst_33735);
> } else {
> if((state_val_33738 === (4))){
> var inst_33726 = (state_33737[(2)]);
> var inst_33727 = async(inst_33726); <<<<<<<<<<<<<<<< This is the error line 
> number 1444
> var state_33737__$1 = state_33737;
> if(cljs.core.truth_(inst_33727)){
> var statearr_33743_33989 = state_33737__$1;
> (statearr_33743_33989[(1)] = (5));
> 
> } else {
> var statearr_33744_33990 = state_33737__$1;
> (statearr_33744_33990[(1)] = (6));
> 
> }
> 
> return cljs.core.cst$kw$recur;
> } else {
> if((state_val_33738 === (5))){
> var state_33737__$1 = state_33737;
> var statearr_33745_33992 = state_33737__$1;
> (statearr_33745_33992[(2)] = null);
> 
> (statearr_33745_33992[(1)] = (2));
> 
> 
> return cljs.core.cst$kw$recur;
> } else {
> if((state_val_33738 === (6))){
> var state_33737__$1 = state_33737;
> var statearr_33746_33993 = state_33737__$1;
> (statearr_33746_33993[(2)] = null);
> 
> (statearr_33746_33993[(1)] = (7));
> 
> 
> return cljs.core.cst$kw$recur;
> } else {
> if((state_val_33738 === (7))){
> var inst_33733 = (state_33737[(2)]);
> var state_33737__$1 = state_33737;
> var statearr_33747_33994 = state_33737__$1;
> (statearr_33747_33994[(2)] = inst_33733);
> 
> (statearr_33747_33994[(1)] = (3));
> 
> 
> return cljs.core.cst$kw$recur;
> } else {
> return null;
> }
> }
> }
> }
> }
> }
> }
> 
> 
> On Friday, February 24, 2017 at 4:21:35 PM UTC-8, David Nolen wrote:
> > Just cut 1.9.494 to back out some macros that were made unintentionally 
> > private.
> > 
> > 
> > On Fri, Feb 24, 2017 at 4:47 PM, David Nolen <dnolen...@gmail.com> wrote:
> > 
> > 
> > ClojureScript, the Clojure compiler that emits JavaScript source code.
> > 
> > 
> > README and source code: https://github.com/clojure/clojurescript
> > 
> > 
> > Leiningen dependency information:
> > 
> > 
> > [org.clojure/clojurescript "1.9.493"]
> > 
> > 
> > This is a bugfix release.
> > 
> > 
> > As always, feedback welcome!
> > 
> > 
> > ### Fixes
> > * CLJS-1948: Possible race condition in compiler w/ parallel-build true
> > * CLJS-1941: `cljs.compiler/cljs-files-in` shouldn't return `.cljc` files 
> > if a `.cljs` file exists for the namespace
> > * CLJS-1940: Undeclared var warning when invoking a protocol method on a 
> > `js` interop form
> > * CLJS-1951: Missing 0 and 1 arity versions of interleave
> > * CLJS-1952: Bump Closure Compiler to Feb 2017 release
> > * CLJS-1937: Self-host: undeclared cljs.core$macros/mod when

Re: ANN: ClojureScript 1.9.493, another bugfix release

2017-02-24 Thread Rangel Spasov
Hey guys,

I'm getting this error. It seems that it's happening inside the transpiled 
core.async sources. The error carrot at line 1444 points at the semicolon, 
pretty strange.


Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/raspasov/projects/project123/target/ios/cljs/core/async.js:1444: 
ERROR - Parse error. No newline allowed before '=>'
var inst_33727 = async(inst_33726); (^ points at the semicolon)


Feb 24, 2017 8:38:19 PM com.google.javascript.jscomp.LoggerErrorManager 
printSummary
WARNING: 1 error(s), 4 warning(s)
ERROR: JSC_PARSE_ERROR. Parse error. No newline allowed before '=>' at 
/Users/raspasov/projects/project123/target/ios/cljs/core/async.js line 1444 : 34

I tried both :parallel-build true/false but it doesn't make a difference. It 
works fine on [org.clojure/clojurescript "1.9.473"]


Here's how the async.js source looks like around line 1444.

return cljs.core.cst$kw$recur;
} else {
if((state_val_33738 === (2))){
var state_33737__$1 = state_33737;
return cljs.core.async.impl.ioc_helpers.take_BANG_(state_33737__$1,(4),jobs);
} else {
if((state_val_33738 === (3))){
var inst_33735 = (state_33737[(2)]);
var state_33737__$1 = state_33737;
return cljs.core.async.impl.ioc_helpers.return_chan(state_33737__$1,inst_33735);
} else {
if((state_val_33738 === (4))){
var inst_33726 = (state_33737[(2)]);
var inst_33727 = async(inst_33726);  This is the error line 
number 1444
var state_33737__$1 = state_33737;
if(cljs.core.truth_(inst_33727)){
var statearr_33743_33989 = state_33737__$1;
(statearr_33743_33989[(1)] = (5));

} else {
var statearr_33744_33990 = state_33737__$1;
(statearr_33744_33990[(1)] = (6));

}

return cljs.core.cst$kw$recur;
} else {
if((state_val_33738 === (5))){
var state_33737__$1 = state_33737;
var statearr_33745_33992 = state_33737__$1;
(statearr_33745_33992[(2)] = null);

(statearr_33745_33992[(1)] = (2));


return cljs.core.cst$kw$recur;
} else {
if((state_val_33738 === (6))){
var state_33737__$1 = state_33737;
var statearr_33746_33993 = state_33737__$1;
(statearr_33746_33993[(2)] = null);

(statearr_33746_33993[(1)] = (7));


return cljs.core.cst$kw$recur;
} else {
if((state_val_33738 === (7))){
var inst_33733 = (state_33737[(2)]);
var state_33737__$1 = state_33737;
var statearr_33747_33994 = state_33737__$1;
(statearr_33747_33994[(2)] = inst_33733);

(statearr_33747_33994[(1)] = (3));


return cljs.core.cst$kw$recur;
} else {
return null;
}
}
}
}
}
}
}


On Friday, February 24, 2017 at 4:21:35 PM UTC-8, David Nolen wrote:
> Just cut 1.9.494 to back out some macros that were made unintentionally 
> private.
> 
> 
> On Fri, Feb 24, 2017 at 4:47 PM, David Nolen  wrote:
> 
> 
> ClojureScript, the Clojure compiler that emits JavaScript source code.
> 
> 
> README and source code: https://github.com/clojure/clojurescript
> 
> 
> Leiningen dependency information:
> 
> 
> [org.clojure/clojurescript "1.9.493"]
> 
> 
> This is a bugfix release.
> 
> 
> As always, feedback welcome!
> 
> 
> ### Fixes
> * CLJS-1948: Possible race condition in compiler w/ parallel-build true
> * CLJS-1941: `cljs.compiler/cljs-files-in` shouldn't return `.cljc` files if 
> a `.cljs` file exists for the namespace
> * CLJS-1940: Undeclared var warning when invoking a protocol method on a `js` 
> interop form
> * CLJS-1951: Missing 0 and 1 arity versions of interleave
> * CLJS-1952: Bump Closure Compiler to Feb 2017 release
> * CLJS-1937: Self-host: undeclared cljs.core$macros/mod when compiling 
> cljs/core.cljs
> * CLJS-1936: cljs.analyzer declares vars which are only used in Clojure
> * CLJS-1949: Self-host: cljs.compiler/munge doesn't preserve JVM compiler 
> semantics
> * CLJS-1950: Eliminate instances of #^
> * CLJS-1943: Self-host: `cljs.pprint`'s macros can't be compiled
> * CLJS-1945: cljs.spec/every-impl kind-fn kind-form dead code
> * CLJS-1944: Can't spec generate non-vector collections
> * CLJS-1946: Self-hosted: don't emit `goog.require` calls for foreign libs if 
> optimizations different than `:none`
> * CLJS-1636: Mark some symbols in core macros ns as private
> * CLJS-1939: Fix Node load_file call for foreign-deps
> * CLJS-1942: Self-host: `cljs.env.macros` and `cljs.analyzer.macros` can't be 
> loaded
> * CLJS-1935: When calling cljs.spec/valid?, subsequent predicates of 
> cljs.spec/and are evaluated even when early predicate is unsatisfied

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

Re: Contribute Specter to Clojure core?

2017-02-14 Thread Rangel Spasov
Nathan - Specter has been an indispensable part of any 
Clojure/ClojureScript that I've started in the recent 1+ years. From my 
experience with it so far (and I'm definitely not using it to its full 
potential) it has had one killer feature and that is modifying a nested 3+ 
levels deep data structure that randomly contains vectors, maps, set, et 
al. For that use case it is a KILLER library - it's outright amazing (and I 
don't use that word lightly!). From that perspective, that would be two 
thumbs up for including it in Clojure proper (if it was up to me).

Here comes the BUT :). The more I've used Specter, the more I've come to 
the opinion that the less you need Specter, the simpler your data structure 
"architecture" (I generally dislike that word hence the quotes lol) tends 
to be. In a bad case scenario, Specter might encourage someone to come up 
with a very deeply nested data structure when a much shallower would do the 
job. Now, I definitely know and generally agree with "100 functions on 1 
data structure is better than 10 functions on 10 data structures" 
recommendation. But from my 4+ years experience with Clojure, over-nesting 
your data structures tends to become a little bit like OOP inheritance 
where you overspecialize the data and the details about your data. 
Especially in the domain of UI programming/React/ReactNative but also for 
general backend data-processing and transformation I've found it easier AND 
simpler to rely more on data "composition" rather than data "inheritance". 
In other words, keeping your data structures generally shallow, 2 or 
maximum 3 levels deep.

All that being said, there's many, many cases where the data you're 
presented with is set in stone either by the problem domain or another 
person before you (or your past self :) ). In those cases, Specter is 
ESSENTIAL. Places where I use it to great effect are random/unknown data 
structure processing for scraping/parsing HTML and processing various API 
responses where the data shape and structure is not under your control.

Thank you once again for developing this great library - I'm looking 
forward to everyone's responses in this thread!

On Tuesday, February 14, 2017 at 1:02:55 PM UTC-8, Nathan Marz wrote:
>
> One of the most common questions I get about Specter is whether it will 
> ever become part of Clojure core. I think it's an interesting proposal and 
> would like to see what the community and core team thinks.
>
> The primary reason for contributing would be that Specter makes Clojure a 
> stronger language. For a language that embraces simplicity, I've always 
> viewed the complexity of dealing with nested data structures a glaring 
> weakness of Clojure. The existing stuff in Clojure, like clojure.walk, 
> zippers, update-in, etc., just doesn't cut it. This problem is very common, 
> and Specter completely solves it with near-optimal performance.
>
> The main thing that makes me hesitate to suggest this is getting 
> bottlenecked on Clojure's dev process. However, Specter is very well 
> developed at this point so it doesn't need to move fast anymore.
>
> Please share your thoughts.
>

-- 
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: ANN: ClojureScript 1.9.293

2016-10-19 Thread Rangel Spasov
Works on our Cljs + React Native + om.next iOS app - thanks everyone 
involved! 

P.S.
For anyone using Om.next: make sure to bump to "1.0.0-alpha47".

On Wednesday, October 19, 2016 at 11:30:01 AM UTC-7, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "1.9.293"]
>
> This release fixes a major issue with transit analysis caching where
> files were leaked. It also includes a very significant compiler
> enhancement thanks to Antonio Monteiro - you can now create
> ClojureScript files without declaring a namespace. This opens the door
> to making a much larger class of Clojure programs portable to
> ClojureScript. `require` and other ns related macros are now available
> granted that they appear at the top of the file. Please take careful
> note that they are not functions and cannot be used in dynamic
> situations. Still this eases writing simple scripts and the door is
> now open to finally support data literals in a comprehensive way.
>
> We also bumped the Google Closure compiler dependency. Please note
> that Closure Compiler has made breaking changes around JS module
> processing so this version of ClojureScript is pinned to this latest
> release.
>
> A huge thanks to the many people old and new that contributed to this
> release.
>
> As always, feedback is most welcome!
>
> ## 1.9.293
>
> ### Enhancements
> * CLJS-1346: Support require outside of ns
>
> ### Changes
> * CLJS-1762: Bump Closure Compiler, refactor module support
> * CLJS-1658: testing for protocol membership may return false positives
> * CLJS-1536: REPL def symbol init collision
> * CLJS-1805: Source map should take false
> * CLJS-1804: Self-host: process namespace side-effects for new require 
> without NS
> * CLJS-1803: Use new require capability in REPLs
> * CLJS-1796: Measure Google Closure specific optimization time
> * CLJS-1782: Self-host: allow namespaces to require their own macros
> * CLJS-1563: :source-map option to cljs.build.api/build should take nil
> * CLJS-1785: Warn on reference to js/foo shadowed by local binding
>
> ### Fixes
> * make String an implicit ns like Math. revert char? and clarify 
> docstring. add unit tests for char?
> * fix cljs.spec.test/check docstring
> * CLJS-1826: Self-host: load-deps doesn't honor `:reload` and `reload-all`
> * CLJS-1825: :source-map error when passing `false` under simple 
> optimizations
> * CLJS-1821: `add-preloads` should only touch sources if `:preloads` 
> option specified
> * CLJS-1814: Move docstrings for require, etc. from `cljs.repl` to their 
> new definitions in `cljs.core`
> * CLJS-1809: Add 0/1 arity to `into`
> * CLJS-1824: transit cache feature leaks files
> * CLJS-1294: Let macroexpand(-1) accept any quoted argument.
> * CLJS-1818: (hash false) returns different value from Clojure
> * CLJS-1817: Strange result when assoc'ing 0 to persistent hash map
> * CLJS-1815: Fix failing analyzer tests
> * follow-up on CLJS-460 defmulti ignores optional :hierarchy argument
> * CLJS-1807: Better error messages for `ns*` calls
> * CLJS-1802: Generated namespaces should be of the form 
> `cljs.user.file`
> * CLJ-1935: Use multimethod dispatch value method lookup to take 
> hierarchies into account in multi-spec
> * CLJS-1682 :foreign-libs with module conversion does not works properly 
> if it is used form deps.cljs
> * CLJS-1710: spec/double-in not implemented
> * CLJS-1787: Make cljs.spec explain pluggable
> * CLJS-1781: Add cljs.hash-map-test to self-parity tests
> * CLJS-1788: Port CLJ-2004: include retag in multi-spec form
> * CLJS-1765: Empty iterator for hash maps with nil key
> * CLJS-1784: nth doesn't throw on strings or arrays
> * CLJS-1773: Self-host: Don't resolve unqualified symbols / keywords with 
> $macros
> * CLJS-1770: goog-defines broken for integers
> * CLJS-1600: Destructuring defprotocol fn args causes defrecord impls to 
> silently fail
> * CLJS-1335: resolve-macro-var: information missing for macros
> * CLJS-1633: Improve error associated with invalid foreign-libs :file path
> * CLJS-1775: `get` with `nil` returns as if `get` with `0`
> * CLJS-1780: Records without extmaps fail to iterate
> * CLJS-1774: Self-host: Report filenames in warns in test-self-parity
> * CLJS-1779: keyword 2-arity constructor accepts anything for both 
> parameters which leads to different hashing
>
>

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

Re: core.async top use cases

2016-09-18 Thread Rangel Spasov
http://aleph.io/aleph/literate.html

"Alternately, we can use a core.async 
 goroutine to create our response, 
and convert the channel it returns using manifold.deferred/->source, and 
then take the first message from it. This is entirely equivalent to the 
previous implementation."

"Returns a streamed HTTP response, consisting of newline-delimited numbers 
every 100 milliseconds. While this would typically be represented by a lazy 
sequence, instead we use a Manifold stream. Similar to the use of the 
deferred above, *this means we don't need to allocate a thread per-request.*
"

I have tried the examples, it all works. Haven't done any benchmarks 
against using thread per-request though - you should think if your use-case 
can really benefit from this approach.

Rangel

On Saturday, September 17, 2016 at 11:37:38 PM UTC-7, Matan Safriel wrote:
>
> Hi,
>
> It's very easy to see how core.async solves callback hell for front-end 
> development with clojurescript.
> In what use cases would you use it for server-side? we already have 
> non-blocking IO from Java, and we have clojure agents. So what's a bunch of 
> salient use cases?
> Are there prominent clojure http server implementations which rely on it 
> for transcending the threaded web service paradigm?
>
> Thanks,
> Matan
>
>

-- 
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: [ANN] Clojure 1.9.0-alpha12

2016-09-10 Thread Rangel Spasov
Yup- upgraded to [aleph "0.4.2-alpha8"] and it's fixed - thanks again! 

On Friday, September 9, 2016 at 8:54:36 PM UTC-7, Alex Miller wrote:
>
> Oh yeah, I fixed that one a while back. :)  I think there is a newer 
> release of aleph with the change.
>
> On Fri, Sep 9, 2016 at 10:11 PM, Rangel Spasov <rasp...@gmail.com 
> > wrote:
>
>> Ah, got it - 
>> https://github.com/ztellman/aleph/commit/7d6f2f5bf743301c5a4ab0705725bf9b50b91896
>>  
>> - thanks!
>>
>> On Friday, September 9, 2016 at 6:22:15 PM UTC-7, Alex Miller wrote:
>>>
>>> The keys of an :or destructuring map should be symbols, not keywords.
>>>
>>>

-- 
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: [ANN] Clojure 1.9.0-alpha12

2016-09-09 Thread Rangel Spasov
Ah, got it 
- 
https://github.com/ztellman/aleph/commit/7d6f2f5bf743301c5a4ab0705725bf9b50b91896
 
- thanks!

On Friday, September 9, 2016 at 6:22:15 PM UTC-7, Alex Miller wrote:
>
> The keys of an :or destructuring map should be symbols, not keywords.
>
> On Sep 9, 2016, at 7:52 PM, Rangel Spasov <rasp...@gmail.com > 
> wrote:
>
> Hey guys, 
>
> I'm getting this compilation error with Alpha 12 (use the gist link)
>
> https://gist.github.com/raspasov/188a8e60f1f6e695b6492cf2d3d19471
>
> Rangel
>
> On Wednesday, September 7, 2016 at 2:15:25 PM UTC-7, Alex Miller wrote:
>>
>> Clojure 1.9.0-alpha12 is now available.
>>
>> Try it via
>>
>> - Download: 
>> https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha12
>> - Leiningen: [org.clojure/clojure "1.9.0-alpha12"]
>>
>> 1.9.0-alpha12 includes the following changes since 1.9.0-alpha11:
>>
>> - spec performance has been improved for many use cases
>> - spec explain printer is now pluggable via the dynamic var 
>> clojure.spec/*explain-out*
>>   which should be a function that takes an explain-data and prints to 
>> *out* 
>> - when a macro spec fails during macroexpand, throw ex-info with 
>> explain-data payload
>>   rather than IllegalArgumentException
>> - pprint prints maps with namespace literal syntax when 
>> *print-namespace-maps* is true
>> - CLJ-1988 - coll-of, every extended to conform sequences properly
>> - CLJ-2004 - multi-spec form was missing retag
>> - CLJ-2006 - fix old function name in docstring
>> - CLJ-2008 - omit macros from checkable-syms
>> - CLJ-2012 - fix ns spec on gen-class signatures to allow class names
>> - CLJ-1224 - record instances now cache hasheq and hashCode like maps
>> - CLJ-1673 - clojure.repl/dir-fn now works on namespace aliases
>>
> -- 
> 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 a topic in the 
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/lQ5beZB6QYE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojure+u...@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.


Re: [ANN] Clojure 1.9.0-alpha12

2016-09-09 Thread Rangel Spasov
Hey guys, 

I'm getting this compilation error with Alpha 12 (use the gist link)

https://gist.github.com/raspasov/188a8e60f1f6e695b6492cf2d3d19471

Rangel

On Wednesday, September 7, 2016 at 2:15:25 PM UTC-7, Alex Miller wrote:
>
> Clojure 1.9.0-alpha12 is now available.
>
> Try it via
>
> - Download: 
> https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha12
> - Leiningen: [org.clojure/clojure "1.9.0-alpha12"]
>
> 1.9.0-alpha12 includes the following changes since 1.9.0-alpha11:
>
> - spec performance has been improved for many use cases
> - spec explain printer is now pluggable via the dynamic var 
> clojure.spec/*explain-out*
>   which should be a function that takes an explain-data and prints to *out* 
> - when a macro spec fails during macroexpand, throw ex-info with 
> explain-data payload
>   rather than IllegalArgumentException
> - pprint prints maps with namespace literal syntax when 
> *print-namespace-maps* is true
> - CLJ-1988 - coll-of, every extended to conform sequences properly
> - CLJ-2004 - multi-spec form was missing retag
> - CLJ-2006 - fix old function name in docstring
> - CLJ-2008 - omit macros from checkable-syms
> - CLJ-2012 - fix ns spec on gen-class signatures to allow class names
> - CLJ-1224 - record instances now cache hasheq and hashCode like maps
> - CLJ-1673 - clojure.repl/dir-fn now works on namespace aliases
>

-- 
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: map/filter/remove etc. change underlying structure

2016-09-09 Thread Rangel Spasov
When I first started learning Clojure 3.5 years ago I was "bit" by this in 
my first month or so of doing Clojure but after spending a little bit of 
time to understand how the sequence abstraction works it was never a 
problem again. I agree with everything that Alex says here. 

On Friday, September 9, 2016 at 10:04:44 AM UTC-7, Alex Miller wrote:
>
>
> On Friday, September 9, 2016 at 11:36:22 AM UTC-5, Alan Thompson wrote:
>>
>> Hi Colin,
>>
>> I too have been bitten by this type of inconsistency in clojure.core 
>> functions. 
>>
>
> I disagree that the problem here is consistency. The core functions are 
> very consistent, but I think it's easy to build an insufficiently detailed 
> mental model of what should happen when you're not aware of the distinction 
> between collection functions (take and return data structures - things like 
> conj, merge, assoc, get) and sequence functions (take and return sequences 
> or really seq-ables - map, filter, etc).
>  
>
>> The root of the problem is that conj has different behavior for lists and 
>> vectors, and that a seq behaves like a list. When map, filter, etc convert 
>> the source vector into a seq, the behavior of conj changes accordingly.
>>
>
> In my opinion, the root of the problem is not being aware enough of when 
> you move from working with data structures (like vectors) into working with 
> sequence abstractions. Becoming more aware of the distinction and when 
> those transitions occur is one of the more subtle aspects of learning 
> Clojure.
>
> I wrote this not too long ago on a very similar question on reddit:
>
>
> https://www.reddit.com/r/Clojure/comments/4ve288/conj_i_just_dont_get_it_can_someone_help_me/
>
> In order to avoid this kind of unpredictability, 
>>
>
> Just to belabor it, everything here is totally predictable already.
>  
>
>> you may wish to explore some of the functions to the Tupelo library. The 
>> goal is to make things simpler, more obvious & predictable, and as 
>> bulletproof as possible. One example is the append function.  Here is a 
>> sample program comparing conj and append:
>>
>> (ns clj.core
>>   (:require [tupelo.core :as t] ))
>> (t/refer-tupelo)
>>
>> (def v [1 2 3])
>>
>> (conj v 4)  => [1 2 3 4]
>> (conj (map identity v) 4)   => (4 1 2 3)
>> (conj (remove (constantly false) v) 4)  => (4 1 2 3)
>> (conj (filter identity v) 4)=> (4 1 2 3)
>>
>>
> As I wrote in the link above, I don't ever write code like this. When 
> working with data in terms of seqs (map,remove,filter) you should be 
> thinking in aggregates not in terms of individual values. Calling conj 
> around a sequence is taking you from level of abstraction down into a lower 
> level. This never comes up when I write Clojure (not exaggerating for 
> effect, it just doesn't). 
>
> I can't suggest an alternative here because the example is too narrow. 
> Occasionally (much less now that we have transducers) I will have data in a 
> seq and want to put it in a collection - into, vec, set are all sufficient 
> to do so. Usually I find that either I can just leave it as a seq and 
> continue OR that I can back up and make a collection instead of a seq in 
> the first place (by using transducers, into, etc).
>  
>
>> (t/append v 4)  => [1 2 3 4]
>> (t/append (map identity v) 4)   => [1 2 3 4]
>> (t/append (remove (constantly false) v) 4)  => [1 2 3 4]
>> (t/append (filter identity v) 4)=> [1 2 3 4]
>>
>>
>>
> I disagree with everything about this. :) In my opinion you are working 
> against Clojure's strengths in going down this path.
>  
>
>> I think simpler and more bulletproof functions can go a long toward 
>> making Clojure easier to use, especially for beginners or when you are 
>> uncertain about the exact type of a parameter.
>>
>
> I think more work on understanding the collection and sequence layers 
> would pay far greater dividends than what you are suggesting.
>

-- 
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: [ANN] Clojure 1.9.0-alpha11

2016-08-19 Thread Rangel Spasov
Great - thanks Alex! All the efforts around clojure.spec will definitely 
bring consistency in the world of Clojure codebases : )

On Friday, August 19, 2016 at 9:05:16 PM UTC-7, Alex Miller wrote:
>
> That looks like a bug in lein-cljsbuild. cljsbuild/crossover.clj is 
> failing due to (import java.io.File java.net.URLDecoder) - should be 
> (:import java.io.File java.net.URLDecoder).
>
> PR filed here: https://github.com/emezeske/lein-cljsbuild/pull/447
>
>
>
> On Friday, August 19, 2016 at 9:55:17 PM UTC-5, Rangel Spasov wrote:
>>
>> Ran into this problem with ClojureScript/ReactNative/Re-natal project:
>>
>> Compiling ClojureScript...
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: Call to 
>> clojure.core/ns did not conform to spec:
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer-clojure 
>> at: [:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-require at: 
>> [:args :clauses :require :clause] predicate: #{:require}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-import at: 
>> [:args :clauses :import :clause] predicate: #{:import}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-use at: [:args 
>> :clauses :use :clause] predicate: #{:use}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer at: [:args 
>> :clauses :refer :clause] predicate: #{:refer}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-load at: [:args 
>> :clauses :load :clause] predicate: #{:load}
>>
>> In: [3 0] val: import fails spec: :clojure.core.specs/ns-gen-class at: 
>> [:args :clauses :gen-class :clause] predicate: #{:gen-class}
>>
>> :clojure.spec/args  (cljsbuild.crossover (:use [clojure.java.io :only 
>> [as-url resource]]) (:require [cljsbuild.util :as util] [clojure.string :as 
>> string] [fs.core :as fs]) (import java.io.File java.net.URLDecoder))
>>
>> , compiling:(cljsbuild/crossover.clj:1:1)
>>
>> at clojure.lang.Compiler.macroexpand1(Compiler.java:6795)
>>
>> at clojure.lang.Compiler.macroexpand(Compiler.java:6861)
>>
>> at clojure.lang.Compiler.eval(Compiler.java:6935)
>>
>> at clojure.lang.Compiler.load(Compiler.java:7403)
>>
>> at clojure.lang.RT.loadResourceScript(RT.java:374)
>>
>> at clojure.lang.RT.loadResourceScript(RT.java:365)
>>
>> at clojure.lang.RT.load(RT.java:455)
>>
>> at clojure.lang.RT.load(RT.java:421)
>>
>> at clojure.core$load$fn__7645.invoke(core.clj:6008)
>>
>> at clojure.core$load.invokeStatic(core.clj:6007)
>>
>> at clojure.core$load.doInvoke(core.clj:5991)
>>
>> at clojure.lang.RestFn.invoke(RestFn.java:408)
>>
>> at clojure.core$load_one.invokeStatic(core.clj:5812)
>>
>> at clojure.core$load_one.invoke(core.clj:5807)
>>
>> at clojure.core$load_lib$fn__7590.invoke(core.clj:5852)
>>
>> at clojure.core$load_lib.invokeStatic(core.clj:5851)
>>
>> at clojure.core$load_lib.doInvoke(core.clj:5832)
>>
>> at clojure.lang.RestFn.applyTo(RestFn.java:142)
>>
>> at clojure.core$apply.invokeStatic(core.clj:659)
>>
>> at clojure.core$load_libs.invokeStatic(core.clj:5889)
>>
>> at clojure.core$load_libs.doInvoke(core.clj:5873)
>>
>> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>>
>> at clojure.core$apply.invokeStatic(core.clj:659)
>>
>> at clojure.core$require.invokeStatic(core.clj:5911)
>>
>> at clojure.core$require.doInvoke(core.clj:5911)
>>
>> at clojure.lang.RestFn.invoke(RestFn.java:436)
>>
>> at user$eval15.invokeStatic(form-init1217511081856523183.clj:1)
>>
>> at user$eval15.invoke(form-init1217511081856523183.clj:1)
>>
>> at clojure.lang.Compiler.eval(Compiler.java:6951)
>>
>> at clojure.lang.Compiler.eval(Compiler.java:6940)
>>
>> at clojure.lang.Compiler.load(Compiler.java:7403)
>>
>> at clojure.lang.Compiler.loadFile(Compiler.java:7341)
>>
>> at clojure.main$load_script.invokeStatic(main.clj:276)
>>
>> at clojure.main$init_opt.invokeStatic(main.clj:278)
>>
>> at clojure.main$init_opt.invoke(main.clj:278)
>>
>> at clojure.main$initialize.invokeStatic(main.clj:309)
>>
>> at clojure.main$null_opt.invokeStatic(main.clj:343)
>>
>> at clojure.main$null_opt.invoke(main.clj:340)
>>
>> at clojure.main$main.invokeStatic(main.clj:422)
>>
>> at clojure.main$main.doInvoke(main.clj:385)
>>
>> at cloj

Re: [ANN] Clojure 1.9.0-alpha11

2016-08-19 Thread Rangel Spasov
Ran into this problem with ClojureScript/ReactNative/Re-natal project:

Compiling ClojureScript...

Exception in thread "main" java.lang.IllegalArgumentException: Call to 
clojure.core/ns did not conform to spec:

In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer-clojure at: 
[:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-require at: [:args 
:clauses :require :clause] predicate: #{:require}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-import at: [:args 
:clauses :import :clause] predicate: #{:import}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-use at: [:args 
:clauses :use :clause] predicate: #{:use}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer at: [:args 
:clauses :refer :clause] predicate: #{:refer}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-load at: [:args 
:clauses :load :clause] predicate: #{:load}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-gen-class at: 
[:args :clauses :gen-class :clause] predicate: #{:gen-class}

:clojure.spec/args  (cljsbuild.crossover (:use [clojure.java.io :only 
[as-url resource]]) (:require [cljsbuild.util :as util] [clojure.string :as 
string] [fs.core :as fs]) (import java.io.File java.net.URLDecoder))

, compiling:(cljsbuild/crossover.clj:1:1)

at clojure.lang.Compiler.macroexpand1(Compiler.java:6795)

at clojure.lang.Compiler.macroexpand(Compiler.java:6861)

at clojure.lang.Compiler.eval(Compiler.java:6935)

at clojure.lang.Compiler.load(Compiler.java:7403)

at clojure.lang.RT.loadResourceScript(RT.java:374)

at clojure.lang.RT.loadResourceScript(RT.java:365)

at clojure.lang.RT.load(RT.java:455)

at clojure.lang.RT.load(RT.java:421)

at clojure.core$load$fn__7645.invoke(core.clj:6008)

at clojure.core$load.invokeStatic(core.clj:6007)

at clojure.core$load.doInvoke(core.clj:5991)

at clojure.lang.RestFn.invoke(RestFn.java:408)

at clojure.core$load_one.invokeStatic(core.clj:5812)

at clojure.core$load_one.invoke(core.clj:5807)

at clojure.core$load_lib$fn__7590.invoke(core.clj:5852)

at clojure.core$load_lib.invokeStatic(core.clj:5851)

at clojure.core$load_lib.doInvoke(core.clj:5832)

at clojure.lang.RestFn.applyTo(RestFn.java:142)

at clojure.core$apply.invokeStatic(core.clj:659)

at clojure.core$load_libs.invokeStatic(core.clj:5889)

at clojure.core$load_libs.doInvoke(core.clj:5873)

at clojure.lang.RestFn.applyTo(RestFn.java:137)

at clojure.core$apply.invokeStatic(core.clj:659)

at clojure.core$require.invokeStatic(core.clj:5911)

at clojure.core$require.doInvoke(core.clj:5911)

at clojure.lang.RestFn.invoke(RestFn.java:436)

at user$eval15.invokeStatic(form-init1217511081856523183.clj:1)

at user$eval15.invoke(form-init1217511081856523183.clj:1)

at clojure.lang.Compiler.eval(Compiler.java:6951)

at clojure.lang.Compiler.eval(Compiler.java:6940)

at clojure.lang.Compiler.load(Compiler.java:7403)

at clojure.lang.Compiler.loadFile(Compiler.java:7341)

at clojure.main$load_script.invokeStatic(main.clj:276)

at clojure.main$init_opt.invokeStatic(main.clj:278)

at clojure.main$init_opt.invoke(main.clj:278)

at clojure.main$initialize.invokeStatic(main.clj:309)

at clojure.main$null_opt.invokeStatic(main.clj:343)

at clojure.main$null_opt.invoke(main.clj:340)

at clojure.main$main.invokeStatic(main.clj:422)

at clojure.main$main.doInvoke(main.clj:385)

at clojure.lang.RestFn.applyTo(RestFn.java:137)

at clojure.lang.Var.applyTo(Var.java:700)

at clojure.main.main(main.java:37)

Caused by: java.lang.IllegalArgumentException: Call to clojure.core/ns did 
not conform to spec:

In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer-clojure at: 
[:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-require at: [:args 
:clauses :require :clause] predicate: #{:require}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-import at: [:args 
:clauses :import :clause] predicate: #{:import}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-use at: [:args 
:clauses :use :clause] predicate: #{:use}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-refer at: [:args 
:clauses :refer :clause] predicate: #{:refer}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-load at: [:args 
:clauses :load :clause] predicate: #{:load}

In: [3 0] val: import fails spec: :clojure.core.specs/ns-gen-class at: 
[:args :clauses :gen-class :clause] predicate: #{:gen-class}

:clojure.spec/args  (cljsbuild.crossover (:use [clojure.java.io :only 
[as-url resource]]) (:require [cljsbuild.util :as util] [clojure.string :as 
string] [fs.core :as fs]) (import java.io.File java.net.URLDecoder))


at clojure.spec$macroexpand_check.invokeStatic(spec.clj:627)

at clojure.spec$macroexpand_check.invoke(spec.clj:616)

at clojure.lang.AFn.applyToHelper(AFn.java:156)

at clojure.lang.AFn.applyTo(AFn.java:144)

at 

Re: tips on writing modern idiomatic code

2016-06-22 Thread Rangel Spasov
Great book resources, IMO:

Clojure Programming (Emerick, Carper, Grand; O’Reilly) - book
Clojure Applied (Alex Miller, Ben Vandgrift) - book

If you understand the majority of what those books say and why, read Zach's 
Elements of Clojure.

General recommendations:
- understand why transducers, use them where appropriate (Rich's talks are 
good intros to 'why')
- understand why core.async, CSP in general, use it where appropriate 
(Rich's talks again)
- understand clojure.spec

In terms of code readability and documentation, I would aspire to one day 
write as much documentation as Aphyr does here:

https://github.com/aphyr/tesser/blob/master/core/src/tesser/core.clj 

I think there isn't a single idiomatic way to write Clojure. If there's a 
"way", it's probably the "Out of the tar pit 
paper" http://shaffner.us/cs/papers/tarpit.pdf 

My general code quality test is can you explain/draw your code decisions to 
a stranger on a piece of paper in 60 seconds. 

Cheers,
Rangel

On Tuesday, June 21, 2016 at 5:46:22 AM UTC-7, Sergey Didenko wrote:
>
> Hi,
>
> What would you advise for writing-rewriting your Clojure code in MODERN 
> idiomatic way?
>
> Using Kibit?
>
> Pasting your code samples on some review site?
>
> Asking help in IRC channel?
>
> Asking here?
>
> Reading some noticeable open source projects? 
>
> Reading some new Clojure book?
>
> I ask about the latest Clojure specifically. 
>
> I have not given very focused attention to Clojure since version 1.4 and 
> would like to grasp the WHOLE PICTURE of "good" modern Clojure. Currently 
> it feels like a lot of latest knowledge is located in different pieces all 
> over the internet. Or may be I just don't know where to look.
>
>
>

-- 
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: [ANN] Clojure 1.9.0-alpha5

2016-06-10 Thread Rangel Spasov
Add the latest tools.analyzer as a dependency solved the problem. 

[org.clojure/tools.analyzer "0.6.9"]

Thanks guys!

On Thursday, June 9, 2016 at 6:40:12 AM UTC-7, Nicola Mometto wrote:
>
> I commented about this in the #clojure-dev slack channel, I believe 
> http://dev.clojure.org/jira/browse/CLJ-1874 to be the cause of this issue 
>
>
> > On 9 Jun 2016, at 14:32, Alex Miller <al...@puredanger.com > 
> wrote: 
> > 
> > I think it's quite likely that you have multiple copies of 
> tools.analyzer (and possibly other libs) on your classpath. Can you take a 
> look at your deps and see if that might be the case? 
> > 
> > A particular thing to watch for is if any dep is AOT compiled and 
> transitively pulled in a dependency lib somehow. 
> > 
> > "lein deps :tree" is a good place to start, but it doesn't tell you 
> what's actually inside the jars. There used to be a Maven plugin that would 
> track down multiple class definitions across the dependency classpath, 
> can't remember what it was called. It would be cool if such a thing also 
> existed for Lein that would find multiple .clj/.cljc/.class files for a ns 
> on the classpath. Or maybe someone has already written that, don't know. 
> > 
> > 
> > On Wednesday, June 8, 2016 at 5:13:20 PM UTC-5, Rangel Spasov wrote: 
> > Hey guys - getting this compiler exception when I tried alpha 5 (up to 
> alpha 4 it was all good). 
> > 
> > WARNING: boolean? already refers to: #'clojure.core/boolean? in 
> namespace: clojure.tools.analyzer.utils, being replaced by: 
> #'clojure.tools.analyzer.utils/boolean? 
> > 
> > WARNING: boolean? already refers to: #'clojure.core/boolean? in 
> namespace: clojure.tools.analyzer, being replaced by: 
> #'clojure.tools.analyzer.utils/boolean? 
> > 
> > #error { 
> > 
> >  :cause Attempting to call unbound fn: 
> #'clojure.tools.analyzer.utils/boolean? 
> > 
> >  :via 
> > 
> >  [{:type clojure.lang.Compiler$CompilerException 
> > 
> >:message java.lang.IllegalStateException: Attempting to call unbound 
> fn: #'clojure.tools.analyzer.utils/boolean?, 
> compiling:(manifold/stream/async.clj:62:16) 
> > 
> >:at [clojure.lang.Compiler analyzeSeq Compiler.java 6890]} 
> > 
> >   {:type java.lang.IllegalStateException 
> > 
> >:message Attempting to call unbound fn: 
> #'clojure.tools.analyzer.utils/boolean? 
> > 
> >:at [clojure.lang.Var$Unbound throwArity Var.java 43]}] 
> > 
> >  :trace 
> > 
> > 
> > -- 
> > 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/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.


Re: [ANN] Clojure 1.9.0-alpha5

2016-06-08 Thread Rangel Spasov
Sean - thanks for the detailed explanation. I will try to investigate if 
nobody has any other ideas. 

On Wednesday, June 8, 2016 at 4:15:05 PM UTC-7, Sean Corfield wrote:
>
> I ran into this same problem with Encore but found it very, very hard to 
> repro in a simple project.
>
>  
>
> The underlying issue is that clojure.tools.analyzer.utils defines boolean? 
> but doesn’t exclude core’s version (since it’s new in Alpha 5 and libraries 
> haven’t caught up). That normally wouldn’t be a problem: you’d get a 
> warning, the function would be defined anyway, and life moves on.
>
>  
>
> What seems to be happening – in circumstances that I don’t yet understand 
> – is that through some compilation path down the line from that point, you 
> end up with a version of that namespace in memory that _*does not have 
> the definition*_ of the function.
>
>  
>
> For me it was bytes? which was defined in Encore and the call failed in 
> Nippy. That was a cljx project that had the defn of bytes? inside a (do …) 
> with several other definitions. Lifting the defn up out of the do solved 
> the problem. So did adding a refer-clojure/exclude declaration. However, I 
> couldn’t reproduce the defn-in-do behavior in the REPL or in a simple 
> project. The problem you’re seeing is different insofar as the defn is 
> already at the top level but similar otherwise (and follows a dynamic 
> compilation path where manifold.stream requires another namespace at load 
> time, depending on whether core.async is available). 
>
>  
>
> As I said on Slack, this feels like a compiler bug to me: having a 
> conflict with a clojure.core function should not lead to that function 
> definition (silently) being ignored in some namespace.
>
>  
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> On 6/8/16, 3:13 PM, "Rangel Spasov" <clo...@googlegroups.com  
> on behalf of rasp...@gmail.com > wrote:
>
>  
>
> Hey guys - getting this compiler exception when I tried alpha 5 (up to 
> alpha 4 it was all good).
>
>  
>
> WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: 
> clojure.tools.analyzer.utils, being replaced by: 
> #'clojure.tools.analyzer.utils/boolean?
>
> WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: 
> clojure.tools.analyzer, being replaced by: 
> #'clojure.tools.analyzer.utils/boolean?
>
> #error {
>
>  :cause Attempting to call unbound fn: 
> #'clojure.tools.analyzer.utils/boolean?
>
>  :via
>
>  [{:type clojure.lang.Compiler$CompilerException
>
>:message java.lang.IllegalStateException: Attempting to call unbound 
> fn: #'clojure.tools.analyzer.utils/boolean?, 
> compiling:(manifold/stream/async.clj:62:16)
>
>:at [clojure.lang.Compiler analyzeSeq Compiler.java 6890]}
>
>   {:type java.lang.IllegalStateException
>
>:message Attempting to call unbound fn: 
> #'clojure.tools.analyzer.utils/boolean?
>
>:at [clojure.lang.Var$Unbound throwArity Var.java 43]}]
>
>  :trace
>
>  [[clojure.lang.Var$Unbound throwArity Var.java 43]
>
>   [clojure.lang.AFn invoke AFn.java 32]
>
>   [clojure.tools.analyzer.utils$classify invoke utils.clj 106]
>
>   [clojure.tools.analyzer$analyze_const doInvoke analyzer.clj 167]
>
>   [clojure.lang.RestFn invoke RestFn.java 425]
>
>   [clojure.tools.analyzer$fn__563 invoke analyzer.clj 86]
>
>   [clojure.lang.MultiFn invoke MultiFn.java 233]
>
>   [clojure.tools.analyzer$analyze_in_env$fn__567 invoke analyzer.clj 127]
>
>   [clojure.core$mapv$fn__8938 invoke core.clj 6758]
>
>   [clojure.core.protocols$fn__8715 invokeStatic protocols.clj 167]
>
>   [clojure.core.protocols$fn__8715 invoke protocols.clj 124]
>
>   [clojure.core.protocols$fn__8670$G__8665__8679 invoke protocols.clj 19]
>
>   [clojure.core.protocols$seq_reduce invokeStatic protocols.clj 31]
>
>   [clojure.core.protocols$fn__8696 invokeStatic protocols.clj 75]
>
>   [clojure.core.protocols$fn__8696 invoke protocols.clj 75]
>
>   [clojure.core.protocols$fn__8644$G__8639__8657 invoke protocols.clj 13]
>
>   [clojure.core$reduce invokeStatic core.clj 6676]
>
>   [clojure.core$mapv invokeStatic core.clj 6749]
>
>   [clojure.core$mapv invoke core.clj 6749]
>
>   [clojure.tools.analyzer$parse_invoke invoke analyzer.clj 781]
>
>   [clojure.tools.analyzer$_parse invoke analyzer.clj 809]
>
>   [clojure.tools.analyzer.jvm$parse invoke jvm.clj 383]
>
>   [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 271]
>
>   [cl

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-08 Thread Rangel Spasov
Hey guys - getting this compiler exception when I tried alpha 5 (up to 
alpha 4 it was all good).

WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: 
clojure.tools.analyzer.utils, being replaced by: 
#'clojure.tools.analyzer.utils/boolean?

WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: 
clojure.tools.analyzer, being replaced by: 
#'clojure.tools.analyzer.utils/boolean?

#error {

 :cause Attempting to call unbound fn: 
#'clojure.tools.analyzer.utils/boolean?

 :via

 [{:type clojure.lang.Compiler$CompilerException

   :message java.lang.IllegalStateException: Attempting to call unbound fn: 
#'clojure.tools.analyzer.utils/boolean?, 
compiling:(manifold/stream/async.clj:62:16)

   :at [clojure.lang.Compiler analyzeSeq Compiler.java 6890]}

  {:type java.lang.IllegalStateException

   :message Attempting to call unbound fn: 
#'clojure.tools.analyzer.utils/boolean?

   :at [clojure.lang.Var$Unbound throwArity Var.java 43]}]

 :trace

 [[clojure.lang.Var$Unbound throwArity Var.java 43]

  [clojure.lang.AFn invoke AFn.java 32]

  [clojure.tools.analyzer.utils$classify invoke utils.clj 106]

  [clojure.tools.analyzer$analyze_const doInvoke analyzer.clj 167]

  [clojure.lang.RestFn invoke RestFn.java 425]

  [clojure.tools.analyzer$fn__563 invoke analyzer.clj 86]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_in_env$fn__567 invoke analyzer.clj 127]

  [clojure.core$mapv$fn__8938 invoke core.clj 6758]

  [clojure.core.protocols$fn__8715 invokeStatic protocols.clj 167]

  [clojure.core.protocols$fn__8715 invoke protocols.clj 124]

  [clojure.core.protocols$fn__8670$G__8665__8679 invoke protocols.clj 19]

  [clojure.core.protocols$seq_reduce invokeStatic protocols.clj 31]

  [clojure.core.protocols$fn__8696 invokeStatic protocols.clj 75]

  [clojure.core.protocols$fn__8696 invoke protocols.clj 75]

  [clojure.core.protocols$fn__8644$G__8639__8657 invoke protocols.clj 13]

  [clojure.core$reduce invokeStatic core.clj 6676]

  [clojure.core$mapv invokeStatic core.clj 6749]

  [clojure.core$mapv invoke core.clj 6749]

  [clojure.tools.analyzer$parse_invoke invoke analyzer.clj 781]

  [clojure.tools.analyzer$_parse invoke analyzer.clj 809]

  [clojure.tools.analyzer.jvm$parse invoke jvm.clj 383]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 271]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_let invoke analyzer.clj 503]

  [clojure.tools.analyzer$parse_let_STAR_ invoke analyzer.clj 528]

  [clojure.tools.analyzer$_parse invoke analyzer.clj 809]

  [clojure.tools.analyzer.jvm$parse invoke jvm.clj 383]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 271]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 272]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 272]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_let invoke analyzer.clj 503]

  [clojure.tools.analyzer$parse_let_STAR_ invoke analyzer.clj 528]

  [clojure.tools.analyzer$_parse invoke analyzer.clj 809]

  [clojure.tools.analyzer.jvm$parse invoke jvm.clj 383]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 271]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 272]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$parse_do invoke analyzer.clj 284]

  [clojure.tools.analyzer$_parse invoke analyzer.clj 809]

  [clojure.tools.analyzer.jvm$parse invoke jvm.clj 383]

  [clojure.tools.analyzer$analyze_seq invoke analyzer.clj 271]

  [clojure.tools.analyzer$fn__556 invoke analyzer.clj 63]

  [clojure.lang.MultiFn invoke MultiFn.java 233]

  [clojure.tools.analyzer$analyze invoke analyzer.clj 115]

  [clojure.tools.analyzer.jvm$analyze$fn__3425 invoke jvm.clj 469]

  [clojure.lang.AFn applyToHelper AFn.java 152]

  [clojure.lang.AFn applyTo AFn.java 144]

  [clojure.core$apply invokeStatic core.clj 651]

  [clojure.core$with_bindings_STAR_ invokeStatic core.clj 1953]

  [clojure.core$with_bindings_STAR_ doInvoke core.clj 1953]

  [clojure.lang.RestFn invoke RestFn.java 425]

  [clojure.tools.analyzer.jvm$analyze invoke jvm.clj 456]

  [clojure.core.async.impl.ioc_macros$state_machine invoke ioc_macros.clj 
1109]

  [clojure.core.async$go doInvoke async.clj 413]

  [clojure.lang.RestFn invoke RestFn.java 442]

  [clojure.lang.Var invoke Var.java 388]

  [clojure.lang.AFn applyToHelper AFn.java 160]

  [clojure.lang.Var applyTo 

Re: Transducers improve performance more than expected

2016-05-08 Thread Rangel Spasov
In my experience, the more intermediate collections you eliminate, the more 
you gain:

*Transducers:*

(criterium.core/with-progress-reporting
  (criterium.core/quick-bench
(into []
  (comp
(map inc))
  (range 10


 Execution time mean : 3.803073 ms
Execution time std-deviation : 69.000641 µs
   Execution time lower quantile : 3.715792 ms ( 2.5%)
   Execution time upper quantile : 3.875992 ms (97.5%)
   Overhead used : 8.938753 ns

*Good-old sequences:*

(criterium.core/with-progress-reporting
  (criterium.core/quick-bench
(->> (range 10)
 (map inc)
 (into []


 Execution time mean : 5.104560 ms
Execution time std-deviation : 150.661809 µs
   Execution time lower quantile : 4.904680 ms ( 2.5%)
   Execution time upper quantile : 5.284278 ms (97.5%)
   Overhead used : 8.938753 ns

Some improvement ~30% faster. However, with a lot of intermediary 
collections:

*Transducers:*

(criterium.core/with-progress-reporting
  (criterium.core/quick-bench
(into []
  (comp
(map inc)
(filter odd?)
(map dec)
(filter even?)
(map (fn [n] (+ 3 n)))
(filter odd?)
(map inc)
(filter odd?)
(map dec)
(filter even?)
(map (fn [n] (+ 3 n)))
(filter odd?))
  (range 10


 Execution time mean : 6.036796 ms
Execution time std-deviation : 95.168278 µs
   Execution time lower quantile : 5.882058 ms ( 2.5%)
   Execution time upper quantile : 6.125739 ms (97.5%)
   Overhead used : 8.938753 ns

*Good-old sequences:*

(criterium.core/with-progress-reporting
  (criterium.core/quick-bench
(->> (range 10)
 (map inc)
 (filter odd?)
 (map dec)
 (filter even?)
 (map (fn [n] (+ 3 n)))
 (filter odd?)
 (map inc)
 (filter odd?)
 (map dec)
 (filter even?)
 (map (fn [n] (+ 3 n)))
 (filter odd?)
 (into []


 Execution time mean : 12.826507 ms
Execution time std-deviation : 345.613000 µs
   Execution time lower quantile : 12.379043 ms ( 2.5%)
   Execution time upper quantile : 13.193640 ms (97.5%)
   Overhead used : 8.938753 ns

In this case, transducers are more than twice as fast. 

On Sunday, May 8, 2016 at 3:03:23 PM UTC-7, JvJ wrote:
>
> I've been doing some code profiling lately, and I made one small change 
> that drastically improved performance.
>
>
> I had this function:
>
> (defn run-systems
>   "Run the systems in the order specified over
>   the cross-map specified."
>   ([cm] (run-systems system-order cm))
>   ([order cm]
>(reduce (fn [acc f]
>  (->> (get-profile f)
>   (cross-cols acc)
>
>   (mapcat (comp entity-pairs 
> f))
>
>   (into cm )))
> cm order)))
>
>
>
> Executing this function 1000 times in a row gives a runtime of about 218 
> ms.
>
> By making a small change and using mapcat as a transducer:
>
> (defn run-systems
>   "Run the systems in the order specified over
>   the cross-map specified."
>   ([cm] (run-systems system-order cm))
>   ([order cm]
>(reduce (fn [acc f]
>  (->> (get-profile f)
>   (cross-cols acc)
>   (into cm (mapcat (comp entity-pairs f)
> cm order)))
>
>
> The runtime goes all the way down to 169 ms.
>
> I knew that removing intermediate collections helped performance, but I 
> wasn't expecting such a drastic improvement.
>
> Does anyone know similar simple tricks (either transducer-related or not 
> transducer-related) that could further improve performance of these types 
> of operations?
>
> (Runtime results are averaged over many runs using the criterium profiling 
> library, so it's not just a fluke of thread scheduling).
>

-- 
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: Porting Clojure to Native Platforms

2016-04-26 Thread Rangel Spasov
tbc++ - given your experience, would you consider a Clojure port to Erlang 
VM a viable idea for production workloads? I know Elixir comes pretty 
close, but I still prefer Lisp : ) .

On Monday, April 25, 2016 at 1:50:45 PM UTC-7, tbc++ wrote:
>
> As someone who has spent a fair amount of time playing around with such 
> things, I'd have to say people vastly misjudge the raw speed you get from 
> the JVM's JIT and GC. In fact, I'd challenge someone to come up with a 
> general use, dynamic language that is not based on the JVM and comes even 
> close to the speed of Clojure. 
>
> A LLVM/C++/RPython based version of Clojure would on a good day come in at 
> about 1/10 the speed of Clojure on the JVM for general use cases. 
>
>
> On Mon, Apr 25, 2016 at 2:18 PM, Raoul Duke  > wrote:
>
>> > The main motivation would be performance gains.
>>
>> blah? so many impedance mismatches and layers of indirection that i
>> don't think it will gain much? i mean, it would probably be better to
>> spend time tuning gc parameters or something. just a rant / guess.
>> e.g. robovm is for some use cases perfectly fine performance wise
>> believe it or not.
>>
>> --
>> 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/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: [ANN] Aleph 0.4.1

2016-04-05 Thread Rangel Spasov
Zach - thank you for all the work you do on Aleph, I use it every day!

On Saturday, April 2, 2016 at 11:44:53 PM UTC-7, Zach Tellman wrote:
>
> This release represents a number of incremental improvements to 0.4.0, 
> which has been handling billions of daily requests for close to a year.  
>
> * Documentation can be found at http://aleph.io/
> * Literate examples of usage can be found at 
> http://aleph.io/aleph/literate.html
> * Comparative benchmarks can be found at 
> https://www.techempower.com/benchmarks/#section=data-r12=peak=plaintext=4,
>  
> which may or may not be relevant to your particular use case
>
> If anyone has questions, I'm happy to answer them.
>

-- 
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: Core.async performance with many channels

2016-04-03 Thread Rangel Spasov
Without knowing too much about the internals, but having used 
core.async/channels a lot, I don't think "hundreds" of channels will be a 
problem ever. However, as always the devil is in the details. People might 
be able to give better feedback if you give more details about your use 
case. 

On Saturday, April 2, 2016 at 7:59:50 PM UTC-7, JvJ wrote:
>
>
> Lately, I've been working on a game in Clojure, and I've been trying out 
> various ways of modelling the game state and objects.
>
> One of these ideas is to give each object its own channel and make a fully 
> asynchronous architecture.
>
> I would like to know if having potentially hundreds of channels operating 
> at once would be a significant performance issue.
>
> 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/d/optout.


Re: ANN: ClojureScript 1.8.40

2016-03-28 Thread Rangel Spasov
No more warnings, thank you! : )

On Monday, March 28, 2016 at 5:19:26 AM UTC-7, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "1.8.40"]
>
> This release addresses some minor unintentional interactions with 3rd 
> party ClojureScript tooling like Figwheel.
>
> As always feedback welcome!
>
> ## 1.8.40
>
> ### Fixes
> * CLJS-1603: Only warn for misspelled comp/REPL opts
> * :warning-handlers missing for known compiler options
> * CLJS-1592: Self-host: Robustness for core tests
>
>

-- 
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: [ANN] Engraver: a tool for managing Onyx clusters

2016-03-21 Thread Rangel Spasov
I'm continuously impressed by the work you guys are doing! Keep it up!

On Monday, March 21, 2016 at 7:27:49 AM UTC-7, Michael Drogalis wrote:
>
> Hi everyone,
>
> I'm happy to announce the release of the Onyx Platform's newest creation - 
> Engraver.
> Engraver is a command line tool for managing and deploying cloud 
> infrastructure to
> support Onyx. You can get up and running with a secure, HA set up in just 
> a few commands.
>
> Blog post: 
> http://www.onyxplatform.org/jekyll/update/2016/03/21/Engraver-A-Tool-for-Managing-Onyx-Clusters.html
>
> Cheers,
> -- Michael Drogalis
>

-- 
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: ANN: ClojureScript 1.8.34

2016-03-19 Thread Rangel Spasov
Thanks, David!

I get those warnings when compiling via "lein figwheel":

WARNING: Unknown option ':compiler-env'.

WARNING: Unknown option ':special-fns'.

WARNING: Unknown option ':warn-on-undeclared'.


Otherwise, everything seems fine.

Rangel

On Friday, March 18, 2016 at 11:04:46 AM UTC-7, David Nolen wrote:
>
> ClojureScript, the Clojure compiler that emits JavaScript source code.
>
> README and source code: https://github.com/clojure/clojurescript
>
> Leiningen dependency information:
>
> [org.clojure/clojurescript "1.8.34"]
>
> There are many minor fixes in this release around bootstrapped
> ClojureScript. This release also fixes a subtle bug with the
> new :parallel-build feature.
>
> As always feedback welcome!
>
> ## 1.8.34
>
> ### Changes
> * CLJS-1582: Type-hint extend-type first arg for primitives
> * CLJS-1590: split, split-lines differs from Clojure on empty string
> * CLJS-1594: NaN and both infinities cannot be elements of a set
> * CLJS-1597: Redundant IPrintWithWriter test in pr-writer-impl
> * CLJS-1583: (hash (symbol "/")) does not match (hash '/)
> * bump tools reader
> * CLJS-1492: Warn when using :optimisations instead of :optimizations
> * less cryptic error if :main doesn't correspond to any file
> * CLJS-744: ISequential types should implement JS indexOf, lastIndexOf
> * CLJS-1411: make-array signature differs from clojure
>
> ### Fixes
> * CLJS-1589: Self-host: case fail with nil
> * CLJS-1596: Self-host: :load-macros and :analyze-deps don't work in 
> cljs.js
> * CLJS-1420: get-in behavior differs from Clojure by always deferring to 
> the 3 arity fn
> * CLJS-1585: Self-host: Alias-scoped keywords
> * CLJS-1577: Self-host: syntax-quote resolves on dot forms
> * CLJS-1564: Self-host: cached macro *loaded* update
> * CLJS-1584: Self-host: core/str error with condp
> * CLJS-1521: Self-host: Macro namespaces cannot be aliased
> * CLJS-1573: Self-host: Invalid UTF escaping in cljs-in-cljs
> * CLJS-1570: :parallel-build causes invalid truth check in 
> cljs.reader/read-number
> * CLJS-1568: LazyTransformer doesn't implement IMeta
> * CLJS-1578: Corrupted Analysis Files Break Compilation
> * CLJS-1579: cljs.source-map/invert-reverse-map discards gcol
> * CLJS-1580: Self-host: goog.provide offsets source-maps
> * CLJS-1569: IndexedSeq doesn't implement IWithMeta / IMeta
> * CLJS-1567: make-array macro missing > 2 arg arity
> * CLJS-1571: Make special-symbol? true for 'var
> * CLJS-1555: make-array macro missing 2 arg arity
> * CLJS-970: generate assert message when compiling
> * CLJS-1565: Self-host: whitespace optimization is broken
> * CLJS-1541: Self-host: Cannot require 'cljs.js using cljs.jar
> * CLJS-1550: Enhance docstring for extend-type wrt type-sym
> * CLJS-1551: Self-host: assert-args dormant in macros
> * CLJS-1552: doc for & should match fn
> * CLJS-1488: cljs.repl/source Cannot read source of cljs functions that 
> use #js reader
> * CLJS-1557: Make special-symbol? return true for catch and finally
> * CLJS-1542: Self-host: cljs/compile-str not handling errors properly
> * CLJS-1318: Fix typo in documentation of `specify`
> * CLJS-620: Warnings are generated when using a macro in argument position
> * CLJS-1547: Wrong output encoding when compile with goog.LOCALE
> * CLJS-1546: cljs.core/run! does not always return nil
>
>

-- 
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: [ANN] Elements of Clojure

2016-03-19 Thread Rangel Spasov
Zach - that's great, can't wait to read all of it!

Rangel

On Thursday, March 17, 2016 at 10:47:55 AM UTC-7, Zach Tellman wrote:
>
> I'm writing a book about Clojure, aimed at people who already know the 
> core concepts, and want to use them more effectively.  The first chapter, 
> "Names", is complete and can be read for free.  Details can be found at 
> http://elementsofclojure.com/.  
>
> I'm happy to answer any questions here, or on the book's mailing list at 
> https://groups.google.com/forum/#!forum/elements-of-clojure.
>

-- 
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: [ANN] Inlein 0.1.0

2016-03-13 Thread Rangel Spasov
Very nice, super simple to get started with. Got it running within a 
minute! Definite will make use of this : )

On Sunday, March 13, 2016 at 7:09:22 AM UTC-7, Jean Niklas L'orange wrote:
>
> Hi all Clojurians,
>
> Alex Miller did some research 
>  on 
> slow boot times with Clojure/scripting in
> Clojure not too long ago.
>
> What I found weird was that there were no tool for doing Clojure 
> scripting. It's
> possible to do this with both Leiningen and Boot, but neither were 
> originally
> designed for scripts nor fast startup times. I have personally found this 
> a bit
> annoying in the past, as I have had good reasons to use Clojure for 
> scripting.
>
> Therefore, I have created a new tool called Inlein . 
> You can think of it as a
> Leiningen for scripts, where the project.clj is inlined into the script 
> itself.
> Inlein itself starts up very fast, so the startup time of a script is more 
> or
> less only the time it takes to start Clojure and the dependencies you drag 
> in.
>
> You could probably use this for a lot of things. The first thing that 
> comes to
> mind is obviously long-running scripts and CLI programs, but it could also 
> be
> used for customised REPLs, independent of Boot and Leiningen.
>
> There are probably many uses for Inlein that I haven't thought of yet, but 
> if
> you want inspiration, you can have a look in the examples directory 
> .
>
> Inlein is located over at https://github.com/hyPiRion/inlein and the 0.1.0
> version can be downloaded from
> https://github.com/hyPiRion/inlein/releases/0.1.0/
>
> To get started, you can take a look over at the Getting Started page 
>  on the
> wiki.
>
> -- Jean Niklas
>
>

-- 
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: Style, Efficiency, and updating nested structure

2015-11-11 Thread Rangel Spasov
I have been using Specter https://github.com/nathanmarz/specter recently 
with great success for doing all kinds of transformation:

(let [project-id 10
  new-role :r3
  projects
  [{:project-id 1 :project-roles [:r1]}
   {:project-id 2 :project-roles [:r2]}]

  ^IPersistentVector project-exists? 
  (s/select [s/ALL :project-id #(= % project-id)] projects)]
  
  (if (not (empty? project-exists?))
;project exists, transform with specter
(s/transform
  [s/ALL
   (fn [x] (= project-id (get x :project-id)))
   :project-roles]
  (fn [x]
(conj x new-role))
  projects)
;doesn't exist, simply conj to the vector
(conj projects {:project-id project-id :project-roles [new-role]})))

On Wednesday, November 11, 2015 at 1:25:51 PM UTC-8, Dave Tenny wrote:
>
> A colleague and I are debating various things clojure as we were exploring 
> alternative ways to solve a problem.
>
> Here's the description of the problem that a particular function is trying 
> to solve, and the first implementation of it.
>
> (defn update-roles 
>   "Given a vector of maps of the form {:project_id N :project_name S 
> :project_roles [...roles...]}
>   if there is already a map for the indicated project id/name, add 
> new-role to it and returned
>   a copy the updated input vector, otherwise return a vector with a new 
> map entry for the newly found
>   project and initial role.  This function is basically aggregating tuples 
> from the database."
>   [projects project-id project-name new-role]
>   (let [updated? (atom nil)
>
> projects* (mapv (fn [m] 
>   (if (= (:project_id m) project-id)
> (do (reset! updated? true)
> (assoc m :project_roles (conj (:project_roles 
> m) new-role)))
> m))
> projects)]
> (if @updated?
>   projects*
>   (conj projects {:project_id project-id :project_name project-name 
> :project_roles 
> [new-role]}
>
>
> ;; (update-roles [{:project_id 1 :project_name "One" :project_roles [:own
> ]}] 2 "Two" :edit)
> ;; => [{:project_id 1, :project_name "One", :project_roles [:own]} 
> {:project_id 
> 2, :project_name "Two", :project_roles [:edit]}]
> ;; (update-roles [{:project_id 1 :project_name "One" :project_roles [:own
> ]}] 1 "Two" :edit)
> ;; => [{:project_id 1, :project_name "One", :project_roles [:own :edit]}]
>
>
>
> Now here's another implementation:
>
> (defn update-or-insert-project-role
>   [prj-roles prj-role]
>   (let [to-insert-prj-id (:project_id prj-role)
> by-pid   (group-by :project_id prj-roles)]
> (case (get by-pid to-insert-prj-id)
>   nil (conj prj-roles prj-role)
>   (->> (update-in by-pid [to-insert-prj-id 0 :project_roles] #(apply conj 
> % (:project_roles prj-role)))
>(mapcat second)
>(into [])
>
> ;; (def prj-roles [{:project_id 1, :project_name "One", :project_roles 
> [:own]} {:project_id 3 :project_name "Three" :project_roles [:edit]}])
> ;; (update-or-insert-project-role prj-roles {:project_id 2 :project_name 
> "Two" :project_roles [:edit]})
> ;; => [{:project_id 1, :project_name "One", :project_roles [:own]} 
> {:project_id 3, :project_name "Three", :project_roles [:edit]} {:project_id 
> 2, :project_name "Two", :project_roles [:edit]}]
> ;; (update-or-insert-project-role prj-roles {:project_id 1 :project_name 
> "One" :project_roles [:edit]})
> ;; => [{:project_id 1, :project_name "One", :project_roles [:own :edit]} 
> {:project_id 3, :project_name "Three", :project_roles [:edit]}]
>
>
>
>
> The function is called in a loop to aggregate rows from a database, though 
> it isn't an overriding concern, we're not going millions of records in this 
> case.
>
> The first thing my colleague and I disagreed on was the calling sequence, 
> arguing over which is more readable.
> The second thing was whether efficiency in this context is really 
> important, or whether it's all moot in clojure.  
>
> Finally, I'm sure there's a better way, probably with Zippers or 
> something, but neither of us have used them. Suggestions for the stylistic 
> and operational epitome of clojure expression on this routine are welcome!
>
> Superficially, and probably incorrect in multiple ways, here is a poor 
> attempt at breaking down efficiency in terms of search/traversal and memory 
> allocations.  This was done by someone with no knowledge of clojure 
> internals (including the library implementations of the called functions).
>
> ;; Comparing the two routines per function call, for existing project case 
> (i.e. where roles are updated)
> ;;
> ;; Assuming each routine allocates new vector for new-role placement in 
> existing project
> ;; and MapEntry for assoc of new vector on project_roles, so they aren't 
> included in allocations 
> ;; below since both routines have to do it.
> ;;
> ;; Note that x-element map allocates storage 

Re: [ANN] core.async-0.2.371

2015-10-29 Thread Rangel Spasov
I assume this is a pretty reliable way:

(:require [clojure.core.async.impl.protocols :refer [closed?]])

(closed? a-chan)

On Thursday, October 29, 2015 at 2:07:00 PM UTC-7, Lucas Bradstreet wrote:
>
> Fantastic release. I've been waiting for poll! and offer! for a while. 
>
> What is the recommended way to check whether a channel is closed? 
> Previously if the channel returned nil, then we know the channel is 
> closed, however with poll! we can't tell between the channel being 
> closed or just empty. 
>
> Thanks again, 
>
> Lucas 
>
> On 29 October 2015 at 05:06, Alex Miller  > wrote: 
> > I am happy to announce a long-overdue core.async release. 
> > 
> > Dependency info:  [org.clojure/core.async "0.2.371"] 
> > 
> > There are a few new features in this release: 
> > 
> > 1) promise-chan is a function that returns a new kind of channel (with a 
> > custom buffer) with promise semantics. Specifically, channels make a 
> > one-time transition to having a deliverable value. promise-chan takes an 
> > optional transducer, and an optional exception-handler (like chan). A 
> > promise channel can take exactly one value that consumers will receive. 
> Once 
> > full, puts complete but val is dropped (no transfer). 
> > Consumers will block until either a value is placed in the channel or 
> the 
> > channel is closed (and nil will be delivered). 
> > 
> > 2) offer! and poll! are two new non-blocking functions available on 
> > channels. 
> > 
> > offer! puts a val into a channel if it can do so immediately and will 
> never 
> > block. Returns true if offer succeeds. 
> > poll! takes a val from a channel if it can do so immediately and will 
> never 
> > block. Return a value if successful, nil otherwise. 
> > 
> > All changes: 
> > 
> > ASYNC-103 - NEW promise-chan 
> > ASYNC-104 - NEW non-blocking offer!, poll! 
> > ASYNC-124 - dispatch multiple pending takers resulting from expanding 
> > transducer 
> > ASYNC-101 - async/reduce now respects reduced 
> > ASYNC-112 - replace "transformer" with "transducer" in deprecation 
> messages 
> > ASYNC-6 - alts! docs updated to explicitly state ports is a vector 
> > Support (try (catch :default)) in CLJS exception handling 
> > Use cljs.test 
> > Updated tools.analyzer.jvm version (and other upstream deps) - fixes 
> various 
> > analyzer errors 
> > 
> > 
> > -- 
> > 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/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.


Re: [ANN] core.async-0.2.371

2015-10-28 Thread Rangel Spasov
That's great, thanks everyone involved in this release. Already made use of 
offer! : ) .

On Wednesday, October 28, 2015 at 2:06:41 PM UTC-7, Alex Miller wrote:
>
> I am happy to announce a long-overdue core.async release.
>
> Dependency info:  [org.clojure/core.async "0.2.371"]
>
> There are a few new features in this release:
>
> 1) *promise-chan* is a function that returns a new kind of channel (with 
> a custom buffer) with promise semantics. Specifically, channels make a 
> one-time transition to having a deliverable value. *promise-chan* takes 
> an optional transducer, and an optional exception-handler (like chan). A 
> promise channel can take exactly one value that consumers will receive. 
> Once full, puts complete but val is dropped (no transfer).
> Consumers will block until either a value is placed in the channel or the 
> channel is closed (and nil will be delivered). 
>
> 2) *offer!* and *poll!* are two new non-blocking functions available on 
> channels.
>
> offer! puts a val into a channel if it can do so immediately and will 
> never block. Returns true if offer succeeds.
> poll! takes a val from a channel if it can do so immediately and will 
> never block. Return a value if successful, nil otherwise.
>
> All changes:
>
>- ASYNC-103  - NEW 
>promise-chan
>- ASYNC-104  - NEW 
>non-blocking offer!, poll!
>- ASYNC-124  - dispatch 
>multiple pending takers resulting from expanding transducer
>- ASYNC-101  - 
>async/reduce now respects reduced
>- ASYNC-112  - replace 
>"transformer" with "transducer" in deprecation messages
>- ASYNC-6  - alts! docs 
>updated to explicitly state ports is a vector
>- Support (try (catch :default)) in CLJS exception handling
>- Use cljs.test
>- Updated tools.analyzer.jvm version (and other upstream deps) - fixes 
>various analyzer errors
>
>
>

-- 
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: No recent activity for core.async?

2015-09-30 Thread Rangel Spasov
We've been using the library very actively from both Clojure and 
ClojureScript and have no problems with it - no reasons to worry about the 
alpha label I think :).


On Saturday, September 26, 2015 at 2:49:22 AM UTC-7, Rafik NACCACHE wrote:
>
> core.async didn't move since more than a year.
>
> Is any new release coming soon? I actually use this library intensively, 
> and the fact it is staying alpha for more than a year starts giving me some 
> shivers :)
>
> Thank you for any updates !!
>

-- 
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: [ANN] Clojure 1.8.0-alpha4

2015-08-03 Thread Rangel Spasov
Thanks for the new alpha everyone!

Getting a compiler error below.

I think it's because of:

https://github.com/hugoduncan/clj-ssh/blob/develop/src/clj_ssh/ssh.clj 

(defn ^int session-port
  Return the port for a session
  [^Session session]
  (.getPort session))

Is this by design?

Rangel

#error {

 :cause Only long and double primitives are supported

 :via

 [{:type clojure.lang.Compiler$CompilerException

   :message java.lang.IllegalArgumentException: Only long and double 
primitives are supported, compiling:(clj_ssh/ssh.clj:345:1)

   :at [clojure.lang.Compiler analyzeSeq Compiler.java 6894]}

  {:type java.lang.IllegalArgumentException

   :message Only long and double primitives are supported

   :at [clojure.lang.Compiler$FnMethod parse Compiler.java 5312]}]

 :trace

 [[clojure.lang.Compiler$FnMethod parse Compiler.java 5312]

  [clojure.lang.Compiler$FnExpr parse Compiler.java 3975]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6885]

  [clojure.lang.Compiler analyze Compiler.java 6688]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6875]

  [clojure.lang.Compiler analyze Compiler.java 6688]

  [clojure.lang.Compiler access$300 Compiler.java 38]

  [clojure.lang.Compiler$DefExpr$Parser parse Compiler.java 593]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6887]

  [clojure.lang.Compiler analyze Compiler.java 6688]

  [clojure.lang.Compiler analyze Compiler.java 6649]

  [clojure.lang.Compiler eval Compiler.java 6950]

  [clojure.lang.Compiler load Compiler.java 7393]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5445 invoke core.clj 5871]

  [clojure.core$load invokeStatic core.clj 5870]

  [clojure.core$load_one invokeStatic core.clj 5671]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5394 invoke core.clj 5716]

  [clojure.core$load_lib invokeStatic core.clj 5715]

  [clojure.core$load_lib doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$load_libs invokeStatic core.clj 5753]

  [clojure.core$load_libs doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$require invokeStatic core.clj 5775]

  [clojure.core$require doInvoke core.clj -1]

  [clojure.lang.RestFn invoke RestFn.java 930]

  [cloud_monkey.ssh$eval21651$loading__5337__auto21652 invoke ssh.clj 1]

  [cloud_monkey.ssh$eval21651 invokeStatic ssh.clj 1]

  [cloud_monkey.ssh$eval21651 invoke ssh.clj -1]

  [clojure.lang.Compiler eval Compiler.java 6946]

  [clojure.lang.Compiler eval Compiler.java 6935]

  [clojure.lang.Compiler load Compiler.java 7393]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5445 invoke core.clj 5871]

  [clojure.core$load invokeStatic core.clj 5870]

  [clojure.core$load_one invokeStatic core.clj 5671]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5394 invoke core.clj 5716]

  [clojure.core$load_lib invokeStatic core.clj 5715]

  [clojure.core$load_lib doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$load_libs invokeStatic core.clj 5753]

  [clojure.core$load_libs doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$require invokeStatic core.clj 5775]

  [clojure.core$require doInvoke core.clj -1]

  [clojure.lang.RestFn invoke RestFn.java 1289]

  [cloud_monkey.execution_pipeline$eval21645$loading__5337__auto21646 
invoke execution_pipeline.clj 1]

  [cloud_monkey.execution_pipeline$eval21645 invokeStatic 
execution_pipeline.clj 1]

  [cloud_monkey.execution_pipeline$eval21645 invoke execution_pipeline.clj 
-1]

  [clojure.lang.Compiler eval Compiler.java 6946]

  [clojure.lang.Compiler eval Compiler.java 6935]

  [clojure.lang.Compiler load Compiler.java 7393]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5445 invoke core.clj 5871]

  [clojure.core$load invokeStatic core.clj 5870]

  [clojure.core$load_one invokeStatic core.clj 5671]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5394 invoke core.clj 5716]

  [clojure.core$load_lib invokeStatic core.clj 5715]

  [clojure.core$load_lib doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$load_libs invokeStatic core.clj 5753]

  [clojure.core$load_libs 

Re: [ANN] Clojure 1.8.0-alpha3

2015-07-29 Thread Rangel Spasov
Hey guys,

I'm getting this compiler error after upgrading to alpha3, I assume it has 
something to do with the direct linking changes?

I think it's related to clj-ssh library, and this method specifically:

(defn- ^{:tag (Class/forName [B)} as-bytes
  Return arg as a byte array.  arg must be a string or a byte array.
  [arg]
  (if (string? arg)
(.getBytes ^String arg ascii)
arg))

The exception is below:

#error {

 :cause Unable to resolve classname: (Class/forName [B)

 :via

 [{:type clojure.lang.Compiler$CompilerException

   :message java.lang.IllegalArgumentException: Unable to resolve 
classname: (Class/forName [B), compiling:(clj_ssh/ssh.clj:94:1)

   :at [clojure.lang.Compiler analyzeSeq Compiler.java 6891]}

  {:type java.lang.IllegalArgumentException

   :message Unable to resolve classname: (Class/forName [B)

   :at [clojure.lang.Compiler$HostExpr tagToClass Compiler.java 1132]}]

 :trace

 [[clojure.lang.Compiler$HostExpr tagToClass Compiler.java 1132]

  [clojure.lang.Compiler tagClass Compiler.java 8384]

  [clojure.lang.Compiler$FnMethod parse Compiler.java 5309]

  [clojure.lang.Compiler$FnExpr parse Compiler.java 3977]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6882]

  [clojure.lang.Compiler analyze Compiler.java 6685]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6872]

  [clojure.lang.Compiler analyze Compiler.java 6685]

  [clojure.lang.Compiler access$300 Compiler.java 38]

  [clojure.lang.Compiler$DefExpr$Parser parse Compiler.java 593]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6884]

  [clojure.lang.Compiler analyze Compiler.java 6685]

  [clojure.lang.Compiler analyze Compiler.java 6646]

  [clojure.lang.Compiler eval Compiler.java 6947]

  [clojure.lang.Compiler load Compiler.java 7390]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5436 invoke core.clj 5869]

  [clojure.core$load invokeStatic core.clj 5868]

  [clojure.core$load_one invokeStatic core.clj 5669]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5385 invoke core.clj 5714]

  [clojure.core$load_lib invokeStatic core.clj 5713]

  [clojure.core$load_lib doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$load_libs invokeStatic core.clj 5751]

  [clojure.core$load_libs doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$require invokeStatic core.clj 5773]

  [clojure.core$require doInvoke core.clj -1]

  [clojure.lang.RestFn invoke RestFn.java 930]

  [cloud_monkey.ssh$eval21511$loading__5328__auto21512 invoke ssh.clj 1]

  [cloud_monkey.ssh$eval21511 invokeStatic ssh.clj 1]

  [cloud_monkey.ssh$eval21511 invoke ssh.clj -1]

  [clojure.lang.Compiler eval Compiler.java 6943]

  [clojure.lang.Compiler eval Compiler.java 6932]

  [clojure.lang.Compiler load Compiler.java 7390]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5436 invoke core.clj 5869]

  [clojure.core$load invokeStatic core.clj 5868]

  [clojure.core$load_one invokeStatic core.clj 5669]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5385 invoke core.clj 5714]

  [clojure.core$load_lib invokeStatic core.clj 5713]

  [clojure.core$load_lib doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$load_libs invokeStatic core.clj 5751]

  [clojure.core$load_libs doInvoke core.clj -1]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invokeStatic core.clj 635]

  [clojure.core$require invokeStatic core.clj 5773]

  [clojure.core$require doInvoke core.clj -1]

  [clojure.lang.RestFn invoke RestFn.java 1289]

  [cloud_monkey.execution_pipeline$eval21505$loading__5328__auto21506 
invoke execution_pipeline.clj 1]

  [cloud_monkey.execution_pipeline$eval21505 invokeStatic 
execution_pipeline.clj 1]

  [cloud_monkey.execution_pipeline$eval21505 invoke execution_pipeline.clj 
-1]

  [clojure.lang.Compiler eval Compiler.java 6943]

  [clojure.lang.Compiler eval Compiler.java 6932]

  [clojure.lang.Compiler load Compiler.java 7390]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5436 invoke core.clj 5869]

  [clojure.core$load invokeStatic core.clj 5868]

  [clojure.core$load_one invokeStatic core.clj 5669]

  [clojure.core$load_one invoke core.clj -1]

  [clojure.core$load_lib$fn__5385 invoke core.clj 5714]

  [clojure.core$load_lib 

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-21 Thread Rangel Spasov
Hey guys,

Getting this error with 1.8.0-alpha2, I think related to aleph (using 
0.4.0, latest version at the moment).

#error {

 :cause IllegalName: compile__stub.aleph.http.core.aleph.http.core/HeaderMap

 :via

 [{:type clojure.lang.Compiler$CompilerException

   :message java.lang.NoClassDefFoundError: IllegalName: 
compile__stub.aleph.http.core.aleph.http.core/HeaderMap, 
compiling:(aleph/http/core.clj:81:1)

   :at [clojure.lang.Compiler analyzeSeq Compiler.java 6798]}

  {:type java.lang.NoClassDefFoundError

   :message IllegalName: 
compile__stub.aleph.http.core.aleph.http.core/HeaderMap

   :at [java.lang.ClassLoader preDefineClass ClassLoader.java 654]}]

 :trace

 [[java.lang.ClassLoader preDefineClass ClassLoader.java 654]

  [java.lang.ClassLoader defineClass ClassLoader.java 758]

  [java.lang.ClassLoader defineClass ClassLoader.java 642]

  [clojure.lang.DynamicClassLoader defineClass DynamicClassLoader.java 46]

  [clojure.lang.Compiler$NewInstanceExpr compileStub Compiler.java 7815]

  [clojure.lang.Compiler$NewInstanceExpr build Compiler.java 7680]

  [clojure.lang.Compiler$NewInstanceExpr$DeftypeParser parse Compiler.java 
7590]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6791]

  [clojure.lang.Compiler analyze Compiler.java 6592]

  [clojure.lang.Compiler analyze Compiler.java 6553]

  [clojure.lang.Compiler$BodyExpr$Parser parse Compiler.java 5929]

  [clojure.lang.Compiler$LetExpr$Parser parse Compiler.java 6247]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6791]

  [clojure.lang.Compiler analyze Compiler.java 6592]

  [clojure.lang.Compiler analyze Compiler.java 6553]

  [clojure.lang.Compiler$BodyExpr$Parser parse Compiler.java 5929]

  [clojure.lang.Compiler$FnMethod parse Compiler.java 5359]

  [clojure.lang.Compiler$FnExpr parse Compiler.java 3959]

  [clojure.lang.Compiler analyzeSeq Compiler.java 6789]

  [clojure.lang.Compiler analyze Compiler.java 6592]

  [clojure.lang.Compiler eval Compiler.java 6847]

  [clojure.lang.Compiler eval Compiler.java 6839]

  [clojure.lang.Compiler load Compiler.java 7295]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5448 invoke core.clj 5866]

  [clojure.core$load doInvoke core.clj 5865]

  [clojure.lang.RestFn invoke RestFn.java 408]

  [clojure.core$load_one invoke core.clj 5671]

  [clojure.core$load_lib$fn__5397 invoke core.clj 5711]

  [clojure.core$load_lib doInvoke core.clj 5710]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invoke core.clj 632]

  [clojure.core$load_libs doInvoke core.clj 5749]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invoke core.clj 632]

  [clojure.core$require doInvoke core.clj 5832]

  [clojure.lang.RestFn invoke RestFn.java 551]

  [aleph.http.server$eval9251$loading__5340__auto9252 invoke server.clj 
1]

  [aleph.http.server$eval9251 invoke server.clj 1]

  [clojure.lang.Compiler eval Compiler.java 6850]

  [clojure.lang.Compiler eval Compiler.java 6839]

  [clojure.lang.Compiler load Compiler.java 7295]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5448 invoke core.clj 5866]

  [clojure.core$load doInvoke core.clj 5865]

  [clojure.lang.RestFn invoke RestFn.java 408]

  [clojure.core$load_one invoke core.clj 5671]

  [clojure.core$load_lib$fn__5397 invoke core.clj 5711]

  [clojure.core$load_lib doInvoke core.clj 5710]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invoke core.clj 632]

  [clojure.core$load_libs doInvoke core.clj 5753]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invoke core.clj 632]

  [clojure.core$require doInvoke core.clj 5832]

  [clojure.lang.RestFn invoke RestFn.java 457]

  [aleph.http$eval1594$loading__5340__auto1595 invoke http.clj 1]

  [aleph.http$eval1594 invoke http.clj 1]

  [clojure.lang.Compiler eval Compiler.java 6850]

  [clojure.lang.Compiler eval Compiler.java 6839]

  [clojure.lang.Compiler load Compiler.java 7295]

  [clojure.lang.RT loadResourceScript RT.java 372]

  [clojure.lang.RT loadResourceScript RT.java 363]

  [clojure.lang.RT load RT.java 453]

  [clojure.lang.RT load RT.java 419]

  [clojure.core$load$fn__5448 invoke core.clj 5866]

  [clojure.core$load doInvoke core.clj 5865]

  [clojure.lang.RestFn invoke RestFn.java 408]

  [clojure.core$load_one invoke core.clj 5671]

  [clojure.core$load_lib$fn__5397 invoke core.clj 5711]

  [clojure.core$load_lib doInvoke core.clj 5710]

  [clojure.lang.RestFn applyTo RestFn.java 142]

  [clojure.core$apply invoke core.clj 632]

  [clojure.core$load_libs doInvoke core.clj 5749]

  [clojure.lang.RestFn applyTo RestFn.java 137]

  [clojure.core$apply invoke core.clj 632]

  

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-21 Thread Rangel Spasov
Ok, I think someone already mentioned this - sorry. Got it to compile by 
bumping to [potemkin 0.4.1] - thanks Zach + all : ) 

On Tuesday, July 21, 2015 at 12:24:43 PM UTC-7, Rangel Spasov wrote:

 Hey guys,

 Getting this error with 1.8.0-alpha2, I think related to aleph (using 
 0.4.0, latest version at the moment).

 #error {

  :cause IllegalName: 
 compile__stub.aleph.http.core.aleph.http.core/HeaderMap

  :via

  [{:type clojure.lang.Compiler$CompilerException

:message java.lang.NoClassDefFoundError: IllegalName: 
 compile__stub.aleph.http.core.aleph.http.core/HeaderMap, 
 compiling:(aleph/http/core.clj:81:1)

:at [clojure.lang.Compiler analyzeSeq Compiler.java 6798]}

   {:type java.lang.NoClassDefFoundError

:message IllegalName: 
 compile__stub.aleph.http.core.aleph.http.core/HeaderMap

:at [java.lang.ClassLoader preDefineClass ClassLoader.java 654]}]

  :trace

  [[java.lang.ClassLoader preDefineClass ClassLoader.java 654]

   [java.lang.ClassLoader defineClass ClassLoader.java 758]

   [java.lang.ClassLoader defineClass ClassLoader.java 642]

   [clojure.lang.DynamicClassLoader defineClass DynamicClassLoader.java 46]

   [clojure.lang.Compiler$NewInstanceExpr compileStub Compiler.java 7815]

   [clojure.lang.Compiler$NewInstanceExpr build Compiler.java 7680]

   [clojure.lang.Compiler$NewInstanceExpr$DeftypeParser parse Compiler.java 
 7590]

   [clojure.lang.Compiler analyzeSeq Compiler.java 6791]

   [clojure.lang.Compiler analyze Compiler.java 6592]

   [clojure.lang.Compiler analyze Compiler.java 6553]

   [clojure.lang.Compiler$BodyExpr$Parser parse Compiler.java 5929]

   [clojure.lang.Compiler$LetExpr$Parser parse Compiler.java 6247]

   [clojure.lang.Compiler analyzeSeq Compiler.java 6791]

   [clojure.lang.Compiler analyze Compiler.java 6592]

   [clojure.lang.Compiler analyze Compiler.java 6553]

   [clojure.lang.Compiler$BodyExpr$Parser parse Compiler.java 5929]

   [clojure.lang.Compiler$FnMethod parse Compiler.java 5359]

   [clojure.lang.Compiler$FnExpr parse Compiler.java 3959]

   [clojure.lang.Compiler analyzeSeq Compiler.java 6789]

   [clojure.lang.Compiler analyze Compiler.java 6592]

   [clojure.lang.Compiler eval Compiler.java 6847]

   [clojure.lang.Compiler eval Compiler.java 6839]

   [clojure.lang.Compiler load Compiler.java 7295]

   [clojure.lang.RT loadResourceScript RT.java 372]

   [clojure.lang.RT loadResourceScript RT.java 363]

   [clojure.lang.RT load RT.java 453]

   [clojure.lang.RT load RT.java 419]

   [clojure.core$load$fn__5448 invoke core.clj 5866]

   [clojure.core$load doInvoke core.clj 5865]

   [clojure.lang.RestFn invoke RestFn.java 408]

   [clojure.core$load_one invoke core.clj 5671]

   [clojure.core$load_lib$fn__5397 invoke core.clj 5711]

   [clojure.core$load_lib doInvoke core.clj 5710]

   [clojure.lang.RestFn applyTo RestFn.java 142]

   [clojure.core$apply invoke core.clj 632]

   [clojure.core$load_libs doInvoke core.clj 5749]

   [clojure.lang.RestFn applyTo RestFn.java 137]

   [clojure.core$apply invoke core.clj 632]

   [clojure.core$require doInvoke core.clj 5832]

   [clojure.lang.RestFn invoke RestFn.java 551]

   [aleph.http.server$eval9251$loading__5340__auto9252 invoke 
 server.clj 1]

   [aleph.http.server$eval9251 invoke server.clj 1]

   [clojure.lang.Compiler eval Compiler.java 6850]

   [clojure.lang.Compiler eval Compiler.java 6839]

   [clojure.lang.Compiler load Compiler.java 7295]

   [clojure.lang.RT loadResourceScript RT.java 372]

   [clojure.lang.RT loadResourceScript RT.java 363]

   [clojure.lang.RT load RT.java 453]

   [clojure.lang.RT load RT.java 419]

   [clojure.core$load$fn__5448 invoke core.clj 5866]

   [clojure.core$load doInvoke core.clj 5865]

   [clojure.lang.RestFn invoke RestFn.java 408]

   [clojure.core$load_one invoke core.clj 5671]

   [clojure.core$load_lib$fn__5397 invoke core.clj 5711]

   [clojure.core$load_lib doInvoke core.clj 5710]

   [clojure.lang.RestFn applyTo RestFn.java 142]

   [clojure.core$apply invoke core.clj 632]

   [clojure.core$load_libs doInvoke core.clj 5753]

   [clojure.lang.RestFn applyTo RestFn.java 137]

   [clojure.core$apply invoke core.clj 632]

   [clojure.core$require doInvoke core.clj 5832]

   [clojure.lang.RestFn invoke RestFn.java 457]

   [aleph.http$eval1594$loading__5340__auto1595 invoke http.clj 1]

   [aleph.http$eval1594 invoke http.clj 1]

   [clojure.lang.Compiler eval Compiler.java 6850]

   [clojure.lang.Compiler eval Compiler.java 6839]

   [clojure.lang.Compiler load Compiler.java 7295]

   [clojure.lang.RT loadResourceScript RT.java 372]

   [clojure.lang.RT loadResourceScript RT.java 363]

   [clojure.lang.RT load RT.java 453]

   [clojure.lang.RT load RT.java 419]

   [clojure.core$load$fn__5448 invoke core.clj 5866]

   [clojure.core$load doInvoke core.clj 5865]

   [clojure.lang.RestFn invoke RestFn.java 408]

   [clojure.core$load_one invoke core.clj 5671]

   [clojure.core$load_lib$fn__5397 invoke core.clj 5711

Re: ANN: ClojureScript 0.0-3308, fixes enhancements

2015-06-02 Thread Rangel Spasov
Works for me, thanks! 

FYI for anyone using Transit - upgrade to the latest version to prevent 
warnings.

com.lucasbradstreet/cljs-uuid-utils lib also causes warnings, I switched to 
the cljs.core/random-uuid to avoid that.

Thanks,
@raspasov

On Monday, June 1, 2015 at 11:47:58 AM UTC-7, David Nolen wrote:

 ClojureScript, the Clojure compiler that emits JavaScript source code.

 README and source code: https://github.com/clojure/clojurescript

 Leiningen dependency information:

 [org.clojure/clojurescript 0.0-3308]

 This release bumps the Clojure dependecy to 1.7.0-RC1 and includes fixes 
 and minor
 enhancements.

 As always feedback welcome!

 ## 0.0-3308

 ## Changes
 * Clojure 1.7.0-RC1 dependency
 * CLJS-1292: Add IPrintWithWriter implementation for TaggedLiteral
 * add cljs.core/random-uuid
 * flush immediately when forwarding Node process out  err
 * CLJS-1256 cache UUID hash value
 * CLJS-1226: Added the :end-run-test event to cljs.test and a dummy event 
 handler for it

 ## Fixes
 * CLJS-1200: compare behaves differently from Clojure
 * CLJS-1293: Warning settings not conveyed via REPL
 * CLJS-1291: pprint whitespace/letter checks are incomplete
 * CLJS-1288: compiler doesn't emit goog.require for foreign library when 
 optimization level is not set
 * check that we actually read something in cjls.repl.server/read-request
 * clarify cljs.test/run-tests docstring
 * CLJS-1285: load-file regression
 * CLJS-1284: IndexedSeq -seq implementation incorrect for i = alength of 
 internal array
 * finish CLJS-1176, remove stray .isAlive method call
 * add zero arity `newline` to match Clojure
 * CLJS-1206: Images in HTML don't show up when served from localhost:9000
 * CLJS-1272: :include-macros description inaccurate in require
 * CLJS-1275: Corrected :test-paths in project.clj
 * CLJS-1270: Docstring for delay not printed by cljs.repl/doc
 * CLJS-1268: cljc support for cljs.closure/compile-file
 * CLJS-1269: realized? docstring refers to promise and future
 * match Clojure behavior for get on string / array. Need to coerce key 
 into int.
 * CLJS-1263: :libs regression, can no longer specify specific files
 * CLJS-1209: Reduce produces additional final nil when used w/ eduction
 * CLJS-1261: source fn fails for fns with conditional code



-- 
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: Help with async operations

2015-05-17 Thread Rangel Spasov
You can checkout the new pipeline stuff, I think it fits what you're 
looking for nicely:

https://gist.github.com/raspasov/7c9d8f2872d6065b2145


On Saturday, May 16, 2015 at 10:54:16 PM UTC-7, Oleg Dashevskii wrote:

 Hi,

 I’m new to Clojure async operations (while have a good understanding of 
 other things) and want to get a bit of advice. Atoms  agents still confuse 
 me.

 What I’m implementing is a small REST webservice with custom in-memory 
 database. Database is indexed by unique key, basically it’s a map (I’ll 
 denote it as MAP). There are two basic operations:

 *PUT /api/…/KEY.* Initiate an update for given KEY. The HTTP response 
 should be returned immediately, and the processing should be done 
 asynchronously. The processing consists of downloading a data file from web 
 and doing some data crunching, the result should go into MAP.

 *GET /api/…/KEY.* Use (get MAP KEY) and request params to generate 
 response synchronously.

 The tricky part (well, for me :) is that parallel PUT requests should be 
 possible. The downloading and processing can and should go in parallel, 
 independently, whereas updating the MAP should come synchronized, 
 one-after-the-other.

 How would you implement this?

 --
 Oleg.


-- 
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: Why does the following Clojure code take 10x the time the C# version does? How to improve the Clojure version?

2015-05-14 Thread Rangel Spasov
All the advice here is valid; type hinting + eliminating boxed math will 
probably give you the biggest gains. By adding one type hint in the proper 
place sometimes I've been able to make my code go 5-10x faster.

I've used tools like YourKit to great advantage to be able to pinpoint 
exactly which parts of the code contribute most to the slowness.

I.e. your time is better spent optimizing a fn that's called 1k times per 
second and it's a little slow (for example, missing a type hint and has to 
do reflection or using boxed math) vs. a fn that's very slow but is only 
called once a minute.

@raspasov

On Thursday, May 14, 2015 at 1:02:42 AM UTC-7, Amith George wrote:

 I wrote the following code to solve this challenge - 
 https://www.reddit.com/r/dailyprogrammer/comments/35s2ds/20150513_challenge_214_intermediate_pile_of_paper/
 .

 Code - 
 https://github.com/amithgeorge/reddit-dailyprogrammer-clojure/blob/56ce1dbb6a08e96150dc85934caecfeb68108a53/src/rdp/214_intermediate.clj

 I executed the -main function using `lein run 1`. 

 Output

 ;; lein run 1

 0 12605919
 1 3578145
 2 15356894
 3 19134293
 4 2394558
 5 15030409
 6 6424953
 7 14893444
 8 1592254
 9 1914025
 10 7075106
 Elapsed time: 501168.972435 msecs

 The code originally used an immutable hashmap, but I lost patience waiting 
 for the computation to end. With mutable hashmap, it still takes around 8 
 mins.

 I wrote a C# version of the above code - 
 https://gist.github.com/amithgeorge/766b8220f39d48221e58. It finishes 
 under 40secs. The C# exe was built under Release mode and executed directly 
 from the commandline. I expected the Clojure version to perform similarly.

 Any tips on what I am doing wrong?

 -
 Explanation of the code - Create a vector of all paper sheets, such that 
 the sheet placed last is the first element of the vector and the last 
 element is the canvas. To compute the frequency of each visible color - for 
 each point in the canvas find the first sheet in the vector that covers the 
 point. Store/increment its count in the hashmap. I understand there might 
 be better more efficient ways to solve this, but currently I am interested 
 in why the Clojure versions is so slow vis-a-vis the C# version.



-- 
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: Why does the following Clojure code take 10x the time the C# version does? How to improve the Clojure version?

2015-05-14 Thread Rangel Spasov
Ok, IF there's such a spot : ) .

On Thursday, May 14, 2015 at 9:57:53 PM UTC-7, raould wrote:

  I.e. your time is better spent optimizing a fn that's called 1k times 
 per 
  second and it's a little slow (for example, missing a type hint and has 
 to 
  do reflection or using boxed math) vs. a fn that's very slow but is only 
  called once a minute. 

 not all apps, and not all developers, end up with code that has hot 
 spots (ha ha). 


-- 
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: ANN: ClojureScript 0.0-3255 - pretty printer latest Closure Compiler / Library

2015-05-10 Thread Rangel Spasov
0.0-3269 fixed it for me, thanks guys!

On Sunday, May 10, 2015 at 7:20:13 AM UTC-7, David Nolen wrote:

 Just cut 0.0-3269 which adds the missing analysis and source map bits back 
 into the artifacts. It also cleans up :libs support and fixes a related 
 regression with Closure compatible libraries that follow classpath 
 conventions (like transit-js). Both :libs Closure libraries and classpath 
 aware Closure compatible libraries now enjoy REPL support.

 David

 On Sun, May 10, 2015 at 9:41 AM, David Nolen dnolen...@gmail.com 
 javascript: wrote:

 It appears there are still some important bits missing from the 
 artifacts. Working through the issues and will cut a release soon.

 David

 On Sun, May 10, 2015 at 12:22 AM, Rangel Spasov rasp...@gmail.com 
 javascript: wrote:

 Hey guys,

 0.0-3264 fails for me with:

 clojure.lang.ExceptionInfo: failed compiling 
 file:resources/public/js/compiled/out/cljs/core.cljs

  at clojure.core$ex_info.invoke (core.clj:4591)

 Caused by: java.lang.IllegalArgumentException: No implementation of 
 method: :make-reader of protocol: #'clojure.java.io/IOFactory found for 
 class: nil

  at clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:554)

 0.0-3255 seems fine. 

 @raspasov

 On Saturday, May 9, 2015 at 12:33:52 PM UTC-7, David Nolen wrote:

 Just released 0.0-3264, it fixes a critical issue where .js files were 
 missing from the artifacts due to the changed build. Also included are a 
 several fixes around the :libs feature, REPLs, and stack trace mapping.

 David

 On Fri, May 8, 2015 at 3:23 PM, David Nolen dnolen...@gmail.com 
 wrote:

 ClojureScript, the Clojure compiler that emits JavaScript source code.

 README and source code: https://github.com/clojure/clojurescript

 Leiningen dependency information:

 [org.clojure/clojurescript 0.0-3255]

 A big thanks goes out to Jonathan Boston and Shaun Lebron for this
 release. Thanks to their efforts ClojureScript now includes a full
 port of clojure.pprint under the cljs.pprint namespace. This was the
 last major namespace in need of porting to ClojureScript.

 The release also bumps several dependencies: Clojure 1.7.0-beta2,
 tools.reader 0.9.2, Closure Compiler v20150505, and Closure Library
 0.0-20150505-021ed5b3.

 This release also fixes some regressions around async testing,
 docstring REPL support, arglist meta, and more.

 As always feedback welcome!

 ## 0.0-3255

 ### Changes
 * Update Closure Library dependency
 * CLJS-1252: Update Closure Compiler Dependency to v20150505
 * .clj - .cljc for important analysis / compilation bits
 * add public cljs.compiler.api namespace
 * CLJS-1224: cljs.repl: Memoize stack frame mapping
 * depend on tools.reader 0.9.2

 ### Enhancements
 * add cljs.pprint/pp macro
 * CLJS-710: port clojure.pprint
 * CLJS-1178: Compiler does not know Math ns is not not-native
 * add getBasis methods to deftype and defrecord ctors a la Clojure JVM
 * support ^long and ^double type hints

 ### Fixes
 * fix cljs-1198 async testing regression
 * CLJS-1254: Update REPL browser agent detection CLJS-1253: Create/Use
   new Closure Library Release
 * CLJS-1225: Variadic function with same name as parent function gives
   runtime error in advanced compile mode.
 * CLJS-1246: Add cljs.core/record? predicate.
 * CLJS-1239: Make eduction variadic.
 * CLJS-1244: tagged-literal precondition check missing wrapping vector
 * CLJS-1243: Add TaggedLiteral type  related fns
 * CLJS-1240: Add cljs.core/var?
 * CLJS-1214: :arglists meta has needless quoting CLJS-1232: bad
   arglists for doc, regression
 * CLJS-1212: Error in set ctor for  8-entry map literal
 * CLJS-1218: Syntax quoting an alias created with :require-macros
   throws ClassCastException
 * CLJS-1213: cljs.analyzer incorrectly marks all defs as tests when
   eliding test metadata
 * CLJS-742: Compilation with :output-file option set fails


  -- 
 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 
 javascript:
 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/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

Re: ANN: ClojureScript 0.0-3255 - pretty printer latest Closure Compiler / Library

2015-05-09 Thread Rangel Spasov
Hey guys,

0.0-3264 fails for me with:

clojure.lang.ExceptionInfo: failed compiling 
file:resources/public/js/compiled/out/cljs/core.cljs

 at clojure.core$ex_info.invoke (core.clj:4591)

Caused by: java.lang.IllegalArgumentException: No implementation of method: 
:make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil

 at clojure.core$_cache_protocol_fn.invoke (core_deftype.clj:554)

0.0-3255 seems fine. 

@raspasov

On Saturday, May 9, 2015 at 12:33:52 PM UTC-7, David Nolen wrote:

 Just released 0.0-3264, it fixes a critical issue where .js files were 
 missing from the artifacts due to the changed build. Also included are a 
 several fixes around the :libs feature, REPLs, and stack trace mapping.

 David

 On Fri, May 8, 2015 at 3:23 PM, David Nolen dnolen...@gmail.com 
 javascript: wrote:

 ClojureScript, the Clojure compiler that emits JavaScript source code.

 README and source code: https://github.com/clojure/clojurescript

 Leiningen dependency information:

 [org.clojure/clojurescript 0.0-3255]

 A big thanks goes out to Jonathan Boston and Shaun Lebron for this
 release. Thanks to their efforts ClojureScript now includes a full
 port of clojure.pprint under the cljs.pprint namespace. This was the
 last major namespace in need of porting to ClojureScript.

 The release also bumps several dependencies: Clojure 1.7.0-beta2,
 tools.reader 0.9.2, Closure Compiler v20150505, and Closure Library
 0.0-20150505-021ed5b3.

 This release also fixes some regressions around async testing,
 docstring REPL support, arglist meta, and more.

 As always feedback welcome!

 ## 0.0-3255

 ### Changes
 * Update Closure Library dependency
 * CLJS-1252: Update Closure Compiler Dependency to v20150505
 * .clj - .cljc for important analysis / compilation bits
 * add public cljs.compiler.api namespace
 * CLJS-1224: cljs.repl: Memoize stack frame mapping
 * depend on tools.reader 0.9.2

 ### Enhancements
 * add cljs.pprint/pp macro
 * CLJS-710: port clojure.pprint
 * CLJS-1178: Compiler does not know Math ns is not not-native
 * add getBasis methods to deftype and defrecord ctors a la Clojure JVM
 * support ^long and ^double type hints

 ### Fixes
 * fix cljs-1198 async testing regression
 * CLJS-1254: Update REPL browser agent detection CLJS-1253: Create/Use
   new Closure Library Release
 * CLJS-1225: Variadic function with same name as parent function gives
   runtime error in advanced compile mode.
 * CLJS-1246: Add cljs.core/record? predicate.
 * CLJS-1239: Make eduction variadic.
 * CLJS-1244: tagged-literal precondition check missing wrapping vector
 * CLJS-1243: Add TaggedLiteral type  related fns
 * CLJS-1240: Add cljs.core/var?
 * CLJS-1214: :arglists meta has needless quoting CLJS-1232: bad
   arglists for doc, regression
 * CLJS-1212: Error in set ctor for  8-entry map literal
 * CLJS-1218: Syntax quoting an alias created with :require-macros
   throws ClassCastException
 * CLJS-1213: cljs.analyzer incorrectly marks all defs as tests when
   eliding test metadata
 * CLJS-742: Compilation with :output-file option set fails




-- 
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 is best practice regarding transducers

2015-05-07 Thread Rangel Spasov
I used transducers here 
https://github.com/raspasov/neversleep/blob/master/src/neversleep_db/node_keeper.clj
 

Look at all the functions ending in -xf, they return transducers that are 
being attached to core.async channels. 

On Wednesday, May 6, 2015 at 8:15:42 AM UTC-7, larry google groups wrote:

 I would like to write a detailed blog post about how developers are 
 actually using transducers. If you have a public project on Github that is 
 using transducers, would you please point me to it? I would like to see 
 what you did. 

 If you are not using transducers, but you plan to in the near future, I 
 would be curious to see the code where you think they could help you.


-- 
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: ANN: clojure-objc 1.7.0-beta2

2015-05-07 Thread Rangel Spasov
Have you built or released on the App Store any apps using this? I'm just 
wondering if you'd classify it as feature complete and ready to use or 
it's more in the experimental phase.

On Thursday, May 7, 2015 at 11:32:20 AM UTC-7, Gal Dolber wrote:

 Thanks! Yes, thats the project from Google that translates java to objc

 On Thu, May 7, 2015 at 3:23 PM Rangel Spasov rasp...@gmail.com 
 javascript: wrote:

 This is very cool! I saw some references to 
 https://github.com/google/j2objc - is that what the project uses to do 
 the Java - ObjC?



 On Wednesday, May 6, 2015 at 8:13:10 PM UTC-7, Gal Dolber wrote:

 Clojure-objc, the Clojure compiler that targets objc runtimes.

 clojure-objc https://github.com/galdolber/clojure-objc 1.7.0-beta2

- 

Sync with clojure 1.7.0-beta2
- 

Remote REPL fully working
- 

Use the same hashing on NSString as java.lang.String to enable ‘case’
- 

Almost all tests were transcompiled and pass on objc
- 

Include j2objc in the releases

 lein-objcbuild https://github.com/galdolber/lein-objcbuild 0.1.5

- 

Incremental compilation of functions
- 

Automatically manage and download all the release binaries

 clojure-objc-sample https://github.com/galdolber/clojure-objc-sample

- 

Use uikit https://github.com/galdolber/uikit
- 

Add sample code to use the Remote REPL


 Now it's very easy to get started, the lein plugin is doing all the 
 heavy lifting.

 Here's a quick screencast of the plugin and the REPL
 https://github.com/galdolber/lein-objcbuild/blob/master/README.md 
 https://github.com/galdolber/clojure-objc-sample/raw/master/ios.gif


 Feedback is welcome!

  -- 
 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 
 javascript:
 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/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.


Re: ANN: clojure-objc 1.7.0-beta2

2015-05-07 Thread Rangel Spasov
This is very cool! I saw some references 
to https://github.com/google/j2objc - is that what the project uses to do 
the Java - ObjC?


On Wednesday, May 6, 2015 at 8:13:10 PM UTC-7, Gal Dolber wrote:

 Clojure-objc, the Clojure compiler that targets objc runtimes.

 clojure-objc https://github.com/galdolber/clojure-objc 1.7.0-beta2

- 

Sync with clojure 1.7.0-beta2
- 

Remote REPL fully working
- 

Use the same hashing on NSString as java.lang.String to enable ‘case’
- 

Almost all tests were transcompiled and pass on objc
- 

Include j2objc in the releases

 lein-objcbuild https://github.com/galdolber/lein-objcbuild 0.1.5

- 

Incremental compilation of functions
- 

Automatically manage and download all the release binaries

 clojure-objc-sample https://github.com/galdolber/clojure-objc-sample

- 

Use uikit https://github.com/galdolber/uikit
- 

Add sample code to use the Remote REPL


 Now it's very easy to get started, the lein plugin is doing all the heavy 
 lifting.

 Here's a quick screencast of the plugin and the REPL
 https://github.com/galdolber/lein-objcbuild/blob/master/README.md 
 https://github.com/galdolber/clojure-objc-sample/raw/master/ios.gif


 Feedback is welcome!



-- 
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 is best practice regarding transducers

2015-05-07 Thread Rangel Spasov
I used it 
here 
https://github.com/raspasov/neversleep/blob/master/src/neversleep_db/node_keeper.clj
 

Look at all the functions ending in -xf, they return transducers that are 
being attached to core.async channels. 

On Wednesday, May 6, 2015 at 8:15:42 AM UTC-7, larry google groups wrote:

 I would like to write a detailed blog post about how developers are 
 actually using transducers. If you have a public project on Github that is 
 using transducers, would you please point me to it? I would like to see 
 what you did. 

 If you are not using transducers, but you plan to in the near future, I 
 would be curious to see the code where you think they could help you.


-- 
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: Who's using Clojure?

2015-03-06 Thread Rangel Spasov
Haha this is the funniest thing I've read in a while! Good luck, forge on! 
:)

On Thursday, March 5, 2015 at 7:47:41 AM UTC-8, Michael Richards wrote:

 I'm about to start training 4 devs on my team at Oracle in Clojure.  My 
 manager is very nervous about putting Clojure into the product.  I'm 
 forging on regardless :)  I rewrote some components of our product in 
 Clojure in my spare time, mainly as a proof of concept that we could do 
 some of our analytics in the streaming model rather than in the data 
 warehousing model.  As sometimes happens, the POC was so simple and fast 
 that the team is now interested in productizing it.

 In our last 1-1 meeting, my manager told me he had searched LinkedIn for 
 Clojure and only got 9000 matches.   Whereas his search for Java turned 
 up 80 million or some such.  My rebuttal is that those are the 9000 
 smartest developers, so you should be trying to recruit them.


 --mike


 On Tuesday, April 19, 2011 at 7:38:14 AM UTC-7, Damien wrote:

 Hi Everyone,

 I'm on a mission: introducing Clojure in my company, which is a big 
 consulting company like many others.

 I started talking about Clojure to my manager yesterday.
 I was prepared to talk about all the technical benefits and he was 
 interested.
 I still have a long way to go but I think that was a good start.

 However I need to figure out how to answer to one of his questions: who 
 is using Clojure?

 Obviously I know each of you is using Clojure, that makes almost 5,000 
 people.
 I know there is Relevance and Clojure/core.
 I read about BackType or FlightCaster using Clojure.

 But, let's face it, that doesn't give me a killer answer.

 What could help is a list of success stories, a bit like MongoDB 
 published here:
 http://www.mongodb.org/display/DOCS/Production+Deployments

 Is there a place where I could find this kind of information for Clojure?

 Thanks

 -- 
 Damien Lepage
 http://damienlepage.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/d/optout.


Re: Breaking out of a sequence

2015-03-02 Thread Rangel Spasov
How about:

(doseq [i [1 2 3 4] :while ( i 3)] 
   (println i))

Alternatively, if you need some outside state you can:


(let [stop-i (atom 3)] 
   (doseq [i [1 2 3 4] :while ( i @stop-i)] 
  (println i)))

Rangel
@raspasov

On Sunday, March 1, 2015 at 2:30:22 AM UTC-8, Cecil Westerhof wrote:

 I have a program where I change a lot of records based on id's in a 
 sequence. It is a manual process, so I want to give the user an option to 
 terminate the sequence. What would be the correct way to stop (for example) 
 a doseq?

 -- 
 Cecil Westerhof
  

-- 
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: Breaking out of a sequence

2015-03-02 Thread Rangel Spasov
How about:

(doseq [i [1 2 3 4] :while ( i 3)] 
   (println i))

Alternatively, if you need some outside state you can:

(let [stop-i (volatile! 3)] 
   (doseq [i [1 2 3 4] :while ( i @stop-i)] 
  (println i)))

Rangel
@raspasov

On Sunday, March 1, 2015 at 2:30:22 AM UTC-8, Cecil Westerhof wrote:

 I have a program where I change a lot of records based on id's in a 
 sequence. It is a manual process, so I want to give the user an option to 
 terminate the sequence. What would be the correct way to stop (for example) 
 a doseq?

 -- 
 Cecil Westerhof
  

-- 
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: [ANN] Understanding the Persistent Vector

2015-03-02 Thread Rangel Spasov
Great work!

On Saturday, February 28, 2015 at 8:14:17 AM UTC-8, Jean Niklas L'orange 
wrote:

 Hello fellow Clojurians,

 I am happy to announce that I have finished my blogpost series on the 
 persistent
 vector. It consists of five parts:

1. The basic algorithms 
http://hypirion.com/musings/understanding-persistent-vector-pt-1
2. Indexing 
http://hypirion.com/musings/understanding-persistent-vector-pt-2
3. The tail optimisation 
http://hypirion.com/musings/understanding-persistent-vector-pt-3
4. Transients 
http://hypirion.com/musings/understanding-clojure-transients
5. Performance 
http://hypirion.com/musings/persistent-vector-performance-summarised 
(which is a summary of this detailed blogpost 
http://hypirion.com/musings/persistent-vector-performance)

 I hope this will help you to get a good understanding of how the 
 algorithms on
 the data structure work, how the optimisations work, and how efficient it 
 is on
 the JVM.

 Constructive criticism, both positive and negative, is appreciated.

 Enjoy!

 (NB: I haven't gotten around to fix the illustrations in part 3, so
 unfortunately it will be a bit hard to read if you print it out in 
 grayscale.
 It's on my todo-list.)

 -- Jean Niklas L'orange



-- 
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: [ANN] Clojure 1.7.0-alpha5 now available

2015-01-12 Thread Rangel Spasov
Hey guys,

I noticed that PersistentVector.create() is missing one arity that used to 
exist before:

PersistentVector.create(List items)

... which caused this 
library 
https://github.com/ninjudd/clojure-protobuf/blob/develop/src/flatland/protobuf/PersistentProtocolBufferMap.java#L479
 
to throw

NoSuchMethodError 
clojure.lang.PersistentVector.create(Ljava/util/List;)Lclojure/lang/PersistentVector;
 

I can fix the library, I don't think it will be a big problem, just making 
sure that's something you guys were OK with breaking - it's more like an 
implementation detail as far as I can see. 

Thanks,
Rangel
@raspasov

On Sunday, January 11, 2015 at 6:34:07 AM UTC-8, Alex Miller wrote:

 I would greatly appreciate hearing any feedback about this (or any other) 
 alpha, even if it's just: everything looks ok. 

 We've had a couple of regressions reported and that is hugely helpful as 
 we can quickly turn around fixes for the next one.   

 Interested particularly in: regressions, performance +/-, and for this 
 alpha, AOT.

-- 
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: book for a beginner with some exercises

2014-10-14 Thread Rangel Spasov
Aphyr's blog is a really good resource for both beginners and advanced 
users alike, highly recommended, here's the starting 
tutorial: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome

Just look up all his Clojure from the ground up posts on the blog.

On Tuesday, October 14, 2014 4:57:50 AM UTC-7, Roelof Wobben wrote:

 Hello, 

 Is there a book for a beginner in Clojure where I can learn things and 
 practice the things I learned with some exercises ?

 Roelof



-- 
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: Is Clojure a language for growth?

2014-08-20 Thread Rangel Spasov
Good reasons 
here http://www.quora.com/Clojure/Why-would-someone-learn-Clojure 

On Wednesday, August 20, 2014 3:37:41 AM UTC-7, aboy021 wrote:

 Is Clojure a suitable language for a company that needs to grow quickly?

 If a company wants to be able to hire staff and get them up to speed, as 
 well as have options for bringing in contractors and outsourcing some work, 
 is Clojure a good choice?

 We've had trouble finding Clojure devs, and others have complained of how 
 hard it is to learn Clojure and read the code from open source projects, 
 especially for those with backgrounds in languages like C++.

 I think Clojure should be a good fit for us because it is expressive, 
 flexible, and we are still discovering new aspects of the problem domain. 
 I'm biased on this because I really enjoy Clojure at home, and want to use 
 it commercially.

 I'm really looking for arguments that will help me persuade my boss that 
 the risk of starting our next project in Clojure is one worth taking.

 Thanks for any suggestions.


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