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 w

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

2017-10-13 Thread Rangel Spasov
omething more minimal. Thanks. > > David > > On Fri, Oct 13, 2017 at 2:08 PM, Rangel Spasov > wrote: > >> I'm getting this (I'm guessing related to the changes around CLJS-485 >> RegExp flags): >> >> (iOS simulator screenshot attached). >>

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

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

Re: ANN: Cognitect acquired by Microsoft

2017-04-02 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

Re: ANN: ClojureScript 1.9.493, another bugfix release

2017-02-26 Thread Rangel Spasov
/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

Re: ANN: ClojureScript 1.9.493, another bugfix release

2017-02-24 Thread Rangel Spasov
eudo-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, &

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

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 struc

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.

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 p

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

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

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

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

Re: [ANN] Clojure 1.9.0-alpha11

2016-08-19 Thread Rangel Spasov
o (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

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

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

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-09 Thread Rangel Spasov
ld 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 alph

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-08 Thread Rangel Spasov
ilently) 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

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

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

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 pla

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

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 S

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

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

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

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 co

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 >

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]}] ^IPersistentVect

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 recommen

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 fe

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

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 #

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

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

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

Re: ANN: ClojureScript 0.0-3308, fixes & enhancements

2015-06-01 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 N

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

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

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 whic

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

2015-05-10 Thread Rangel Spasov
here 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 > > wrote: >> >>> Hey guys, >>> >>> 0.0-3264

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: #'cloju

Re: ANN: clojure-objc 1.7.0-beta2

2015-05-07 Thread Rangel Spasov
> Thanks! Yes, thats the project from Google that translates java to objc > > On Thu, May 7, 2015 at 3:23 PM Rangel Spasov > 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

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 wro

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

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

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

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 >

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

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 w

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

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

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