Re: Benefits to partial functions.

2019-10-21 Thread Alex Engelberg
All functions returned by a given arity of partial or comp are of the same Java class under the hood, whereas defining an anonymous function always generates a new class, and I've heard that fewer classes can result in better performance from a JIT perspective. But I'm just speculating and haven't

[JOB] Software Engineer | Amperity | Seattle

2018-07-27 Thread Alex Engelberg
Amperity is a Clojure-powered startup with a lean but mean team of 18 engineers. We're looking to add talented engineers to help build a disruptive SaaS business to revolutionize marketing as we know it today. Our product is almost 100% Clojure, and we use Clojure every day for: -

Re: Future

2018-05-19 Thread Alex Engelberg
Not sure what's going on with shutdown-agents, but you could call (run! deref ...) to wait for all the futures to complete. On Sat, May 19, 2018 at 3:29 PM Renata Soares wrote: > Hello, > > I am using future this way: > > (doall (map #(future () (range 1 max-size))

Re: Generating a deck of cards in Clojure using generator functions (a la Python)

2017-03-15 Thread Alex Engelberg
e.core). > > While for and map-indexed solutions work fine for this example, sometimes > it may be clearer to the reader to be extra explicit about the looping > constructs, etc. Also, if there were other operations in the inner loop > before & after the yield statement, it might

Re: [ANN] Instaparse 1.4.4

2016-12-24 Thread Alex Engelberg
> Thanks! > > On Fri, Dec 23, 2016 at 04:52:12PM -0800, Mark Engelberg wrote: > > Instaparse is a library for generating parsers from context-free > grammars. > > https://github.com/engelberg/instaparse > > > > The big news for this release is that Alex Engelberg has co

Re: finding clojure functions from the mangled names

2016-12-09 Thread Alex Engelberg
If you're seeing "fn_123", it's probably coming from an anonymous function. Giving those functions a name with the (fn my-name [] ...) syntax will make the stack trace a little easier to decipher: user=> ((fn [] (/ 1 0))) ArithmeticException Divide by zero clojure.lang.Numbers.divide

Re: Reader macro not ignoring form?

2016-09-17 Thread Alex Engelberg
This appears to be a more general issue that can be reproduced by sending " " as a single command to the REPL. I was able to get similar behavior by sending in other types of malformed expressions. When I hit enter the second time, the valid form came through. user=> ​​:) ​1​ ​ RuntimeException

[ANN] cljsee 0.1.0

2016-06-14 Thread Alex Engelberg
https://github.com/aengelberg/cljsee Cljsee is a Leiningen plugin that applies the idea of cljx to the new cljc reader conditional format. In other words, as a build step, it parses .cljc files and outputs .clj and/or .cljs files with only the relevant code. The purpose of this library is to

Calling empty on a map entry

2014-10-18 Thread Alex Engelberg
(def map-entry (first {1 2})) (empty map-entry) = nil Up until now my understanding was that map entries are completely interchangeable with vectors, in that you can conj and assoc just like vectors, and you can even call them like functions. I figured that calling empty on a map entry would

Re: solving an equation for all solutions with constraints: core.logic.fd

2014-06-10 Thread Alex Engelberg
It doesn't totally make sense to me that you would have integer variables with real coefficients. If the coefficients are irrational and are not scaled versions of each other, then the problem is impossible. Otherwise, you can just scale them by a common factor and make them integers. For

Re: [ANN] clj-generators - generator magic inspired by Python

2014-06-06 Thread Alex Engelberg
Gary, I fully acknowledge that there are many ways to create lazy sequences that are much more elegant and efficient. However, as I mentioned, I'm very fascinated by generators in Python, and I mostly wanted to toy around with how to implement it in Clojure. Also, as I mentioned, for beginners

[ANN] clj-generators - generator magic inspired by Python

2014-06-03 Thread Alex Engelberg
https://github.com/aengelberg/clj-generators My all-time favorite feature of Python is generators. It allows you to write lazy sequences imperatively. def infinite_range(): x = 1 while True: yield x x += 1 for i in infinite_range(): if (i 5): break else:

[ANN] lein-4clj

2014-03-19 Thread Alex Engelberg
4clojure http://www.4clojure.com/ is a great site for practicing various datatypes and concepts in Clojure. However, the code editor on the website is somewhat limited, mostly because it doesn't have a REPL to test out individual parts of your code. I'm not affiliated with 4clojure in any way,

Re: [ANN] lein-4clj

2014-03-19 Thread Alex Engelberg
://github.com/bfontaine/lein-fore-prob? I haven't really looked since back when https://github.com/broquaint/lein-foreclojure-plugin was new (in lein 1!), but it seems like there is a lein2 plugin already. On Wednesday, March 19, 2014 4:37:46 PM UTC-7, Alex Engelberg wrote: 4clojure http://www

Re: [ANN] loco 0.1.0

2014-03-08 Thread Alex Engelberg
to add support for floating point domains in the future? - Olli On Saturday, March 8, 2014 6:41:43 AM UTC+7, Alex Engelberg wrote: Loco is now on version 0.2.0. The only major change is that I renamed $all-different? to $distinct (now takes a list of args instead of a variable number

Re: [ANN] loco 0.1.0

2014-03-07 Thread Alex Engelberg
by eliminating question marks. I realize that this is a small set of changes to push so early, but I figured it was best to get it out there as early as possible so people won't get too attached to the old functions. --Alex On Tuesday, March 4, 2014 1:46:51 PM UTC-8, Alex Engelberg wrote: Hi

Re: Solving allocation problems; code review and core.logic

2014-03-05 Thread Alex Engelberg
I released a library yesterday called Locohttp://github.com/aengelberg/loco, which might be what you're looking for. (David mentioned JaCoP, which is very similar to the Java library that Loco runs on.) You might also want to check out this blog

[ANN] loco 0.1.0

2014-03-04 Thread Alex Engelberg
Hi everyone. About 6 months ago, I created a Constraint Programming library called CloCoPhttps://github.com/aengelberg/clocop. It was a Clojure wrapper for a Java library, and it mostly maintained the imperative propagation style. However, I was recently inspired to rework the library to have

Re: [ANN] CloCoP - constraint programming for Clojure

2013-09-13 Thread Alex Engelberg
AM UTC-7, Dmitry Groshev wrote: Great stuff! I'm wondering what's the realworld difference between JaCoP and CHOCO. Why did you choose the former? On Tuesday, September 10, 2013 5:39:46 AM UTC+4, Alex Engelberg wrote: http://github.com/aengelberg/clocop CloCoP is a Clojure wrapper

Re: [ANN] CloCoP - constraint programming for Clojure

2013-09-12 Thread Alex Engelberg
contributing tests/examples, I would send a lot more. вторник, 10 сентября 2013 г., 5:39:46 UTC+4 пользователь Alex Engelberg написал: http://github.com/aengelberg/clocop CloCoP is a Clojure wrapper of the Java library JaCoP. The acronyms stand for Clojure/Java Constraint Programming

[ANN] CloCoP - constraint programming for Clojure

2013-09-09 Thread Alex Engelberg
http://github.com/aengelberg/clocop CloCoP is a Clojure wrapper of the Java library JaCoP. The acronyms stand for Clojure/Java Constraint Programming. This invites comparison to the core.logic library, and you may wonder why we need both. There are a few ways in which, in my opinion, the JaCoP