Re: "proxy"ing PersistentHash to allow key->val and (reverse key)->val mapping

2014-07-25 Thread Ambrose Bonnaire-Sergeant
Hi Geoff, You probably want a sorted-map-by: user=> (sorted-map-by (fn [a b] (or (when (every? coll? [a b]) (when (= a (reverse b)) 0)) -1)) [1 2] 42 [2 1] 42) {[1 2] 42} Thanks, Ambrose On Fri, Jul 25, 2014 at 9:52 AM, Geoff Little wrote: > I'm attempting to proxy PersistentHashmap so that

Re: "proxy"ing PersistentHash to allow key->val and (reverse key)->val mapping

2014-07-25 Thread Ambrose Bonnaire-Sergeant
I know that function is simple, but I don't > understand how it provides the functionality I'm after. Do you mind > explaining what's going on? I'm playing with it now in my repl. > > Thanks!! > > > On Friday, July 25, 2014 6:48:06 PM UTC-4, Ambrose Bonna

Re: "proxy"ing PersistentHash to allow key->val and (reverse key)->val mapping

2014-07-25 Thread Ambrose Bonnaire-Sergeant
> On Friday, July 25, 2014 7:58:47 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > >> The function basically returns 0 if the keys are equivalent, or -1 >> otherwise. >> >> It satisfies a comparator, see http://docs.oracle.com/ >> javase/7/docs/api/java/util/Compara

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
I'll give it a shot.. On Sat, Jul 26, 2014 at 9:59 PM, Steve Miner wrote: > I'm giving up on this bug. My approach was adding too much complexity to > handle an edge case. Hacking the fn macro is not as easy as it looks. :-) > > I recommend the loop work-around if you run into this problem.

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
Hi Steve, I think I got it right, please have a look: http://dev.clojure.org/jira/browse/CLJ-1475 Thanks, Ambrose On Sat, Jul 26, 2014 at 10:38 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > I'll give it a shot.. > > > On Sat, Jul 26, 2014 at 9:59

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
Doh! I forgot preconditions :D Fixing.. Ambrose On Sat, Jul 26, 2014 at 11:30 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi Steve, > > I think I got it right, please have a look: > http://dev.clojure.org/jira/browse/CLJ-1475 > > Thanks, > A

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
... where g3 actually works (but runs the risk of blowing the stack). > > Michael > > > On Saturday, July 26, 2014 9:34:48 AM UTC-6, Ambrose Bonnaire-Sergeant > wrote: > >> Doh! I forgot preconditions :D >> >> Fixing.. >> Ambrose >> >> >&g

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
I reuploaded the patch 3 times for various reasons, please refresh to get the latest. Thanks, Ambrose On Sun, Jul 27, 2014 at 12:44 AM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > I handled preconditions, and added a new patch. > > Thanks, > Ambrose &g

Re: Is this behavior with recur and pre/post a bug?

2014-07-26 Thread Ambrose Bonnaire-Sergeant
Thanks for checking Steve. Ambrose On Sun, Jul 27, 2014 at 5:09 AM, Steve Miner wrote: > I tried the latest patch from Ambrose for CLJ-1475. Looks good to me. > Well done. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this

[ANN] core.cache 0.6.4

2014-08-05 Thread Ambrose Bonnaire-Sergeant
Hi, core.cache 0.6.4 is released with various bug fixes and improvements. [org.clojure/core.cache "0.6.4"] Readme Changelog - Release 0.6.4 on 2014.08.06 - Thanks to Paul Stadig and Nicola Momet

Re: [ANN] core.cache 0.6.4

2014-08-05 Thread Ambrose Bonnaire-Sergeant
Not yet. On Wed, Aug 6, 2014 at 12:18 PM, Yehonathan Sharvit wrote: > Does core.cache supports Clojurescript? > > > On Wednesday, 6 August 2014 06:48:31 UTC+3, Ambrose Bonnaire-Sergeant > wrote: >> >> Hi, >> >> core.cache 0.6.4 is released

Re: [ANN] core.cache 0.6.4

2014-08-06 Thread Ambrose Bonnaire-Sergeant
Yes please, help wanted. On Wed, Aug 6, 2014 at 1:16 PM, Yehonathan Sharvit wrote: > Do you intend to support clojurescript? Do you need help? > > > On Wed, Aug 6, 2014 at 7:36 AM, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > >> Not yet. &

Re: Create an instance of a record using a string to define the record's symbol

2014-08-06 Thread Ambrose Bonnaire-Sergeant
Hi Colin, If you must call the Java constructor, you need reflection. user=> (defrecord B [c]) user.B user=> (def s "user.B") #'user/s user=> (.newInstance (first (.getDeclaredConstructors (Class/forName s))) (object-array [1])) #user.B{:c 1} Thanks, Ambrose On Wed, Aug 6, 2014 at 6:37 PM, Col

Re: Create an instance of a record using a string to define the record's symbol

2014-08-06 Thread Ambrose Bonnaire-Sergeant
u (or anyone) explain me as to why what I was trying > didn't work? > > Thanks Ambrose. > > > On 6 August 2014 11:50, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > >> Hi Colin, >> >> If you must call the Java constructor, y

Re: idiomatic filter-not or inverting predicate

2014-08-21 Thread Ambrose Bonnaire-Sergeant
Also see clojure.core/remove. On Thu, Aug 21, 2014 at 4:04 PM, Sam Ritchie wrote: > I think you want complement, like (filter (complement odd?) ...) > > Andy C > August 21, 2014 at 2:01 PM > Hi, > > > I was wondering what is the nicest way to do filter-not in Clojure. Here > are 3 expressio

Re: GSoC: Congratulations Aleksandr and Prasant!

2014-08-25 Thread Ambrose Bonnaire-Sergeant
Fantastic! Thanks, Ambrose On Mon, Aug 25, 2014 at 2:15 AM, Mikera wrote: > Hi All, > > Prasant and Aleksandr have been working all summer making Clojure even > better for data science / numerical computing. On behalf of myself and my > co-mentor Alex Ott I want to offer congratulations to the

Re: help with sequence, "seq", Seq, and `seq`

2014-10-08 Thread Ambrose Bonnaire-Sergeant
On Wed, Oct 8, 2014 at 10:55 PM, John Gabriele wrote: > * (when calling `seq` on a coll) "...In either case, if the collection > is empty, `seq` returns nil and never an empty sequence. Functions that > promise to return seqs (not sequences), such as `next`, work the same way." > > I think that

Re: annotating functions that use destructuring in core.typed

2014-10-15 Thread Ambrose Bonnaire-Sergeant
Hi, The issue is that you can't use clojure.core/for in typed code. You must use clojure.core.typed/for , and annotate the parameters and expected type. (ann map-span (All [x y y1] [(Map x y) [y -> y1] -> (Map x y1)])) (defn map-span

Re: annotating functions that use destructuring in core.typed

2014-10-15 Thread Ambrose Bonnaire-Sergeant
oking at your gist. I still don't > *quite* understand the :- syntax, though. Is it just introducing a type > declaration to the data structure that comes after it? > > This is a super cool project, by the way. > > K > > > On Wednesday, October 15, 2014 3:14:58 PM UTC-5, Ambr

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
On Wed, Oct 22, 2014 at 9:32 AM, Fluid Dynamics wrote: > > and is guaranteed to always produce the same value for the same field. >> > > Nope: > > => (def foo (int-array [1 2 2 5 9 3])) > #'user/foo > => (def bar (seq foo)) > #'user/bar > => bar > (1 2 2 5 9 3) > => (aset foo 3 3) > 3 > => bar > (

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
of realized items. > > Jozef > > On Wed, Oct 22, 2014 at 7:51 PM, Ambrose Bonnaire-Sergeant > wrote: > > Sorry, to be specific I'm disturbed by the apparent mutation of an > immutable > > data structure after it has been observed! > > > > Thanks, &

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
this discussion elsewhere, sorry for derailing the OP. Ambrose On Thu, Oct 23, 2014 at 12:21 AM, Fluid Dynamics wrote: > On Wednesday, October 22, 2014 4:51:23 PM UTC-4, Ambrose Bonnaire-Sergeant > wrote: >> >> I missed this in the sequence spec <http://clojure.org/sequence

Re: debugging "MyClass cannot be cast to MyClass" exceptions

2014-12-06 Thread Ambrose Bonnaire-Sergeant
Perhaps this issue is biting you http://dev.clojure.org/jira/browse/CLJ-979 Thanks, Ambrose On Sat, Dec 6, 2014 at 5:22 PM, Brian Craft wrote: > Yes, I know. ;) In this case it's happening with an uberjar, not with the > repl. I do "java -jar myapp.jar", and later, while it is processing data,

[ANN] Typed Clojure 1.1.1 - Symbolic Execution

2023-08-16 Thread Ambrose Bonnaire-Sergeant
Hi, I'm excited to announce Typed Clojure 1.1.1 which includes support for symbolic execution via a new type called a "symbolic closure". I have written a guide on how to think about this new type and what it enables. In short, it can dramatically decrease the number of local annotations needed

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-25 Thread Ambrose Bonnaire-Sergeant
to be telling you everything you need to know > wrt to the missing method. > > The dispatch method is opaque (even though it is simple here), so doesn't > make sense to generically add anything additional to this message. > > On Tuesday, May 24, 2016 at 10:53:43 PM UTC-5, Amb

Re: clojure.spec

2016-05-25 Thread Ambrose Bonnaire-Sergeant
Rich, Can you talk about the design process behind fspec? What tradeoffs were in mind for fspec performing gen testing rather than a traditional function contract wrapper a la racket/contract? Thanks, Ambrose On Mon, May 23, 2016 at 5:20 PM, Rich Hickey wrote: > I did most of the design of sp

[ANN] Automatic Clojure Type Annotations

2016-08-14 Thread Ambrose Bonnaire-Sergeant
Hi, Happy to announce a new open-source Clojure tool to generate core.typed type annotations from tests. It's part of a new crowdfunding campaign I'm running, read on for details! # What is it? This tool infe

Re: [ANN] Automatic Clojure Type Annotations

2016-08-17 Thread Ambrose Bonnaire-Sergeant
Here's a demo of generating clojure.spec specs + Typed Clojure types for functions and macros. https://www.youtube.com/watch?v=DRJeHthzOjk Thanks for your support! Ambrose On Sun, Aug 14, 2016 at 10:33 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi

[ANN] Automatic specs + core.typed release

2016-08-31 Thread Ambrose Bonnaire-Sergeant
Hi, The latest core.typed release has support for generating clojure.spec specs from unit tests. [org.clojure/core.typed "0.3.25"] ...; for very recent releases :repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"} Here's an example

Re: [ANN] Automatic specs + core.typed release

2016-08-31 Thread Ambrose Bonnaire-Sergeant
lke van Foeken > > > Op woensdag 31 augustus 2016 11:17:09 UTC+2 schreef Ambrose > Bonnaire-Sergeant: > >> Hi, >> >> The latest core.typed release has support for generating >> clojure.spec specs from unit tests. >> >> [org.clojure/core.typed &

Re: [ANN] Automatic specs + core.typed release

2016-08-31 Thread Ambrose Bonnaire-Sergeant
; Hi, >>> >>> Great feature! I am trying the demo project. I am following the steps >>> from the first example, but when I get to (t/runtime-infer) I get the >>> following error: >>> AssertionError Assert failed: No namespace form found >>> ns-form

Re: [ANN] Automatic specs + core.typed release

2016-08-31 Thread Ambrose Bonnaire-Sergeant
ot;] >[org.clojure/math.combinatorics "0.1.3" :exclusions > [[org.clojure/clojure]]] >[org.clojure/tools.analyzer.jvm "0.6.8"] > [org.clojure/core.memoize "0.5.7"] > [org.clojure/tools.analyzer "0.6.7"] > [org.ow2.a

Re: [ANN] Automatic specs + core.typed release

2016-08-31 Thread Ambrose Bonnaire-Sergeant
Glad to help! Ambrose On Wed, Aug 31, 2016 at 10:33 AM, Eelke van Foeken wrote: > That was it! > > Thank you. > > Op woensdag 31 augustus 2016 16:22:57 UTC+2 schreef Ambrose > Bonnaire-Sergeant: >> >> Try using cidre-nrepl "0.13.0". It might

Re: [ANN] Clojure 1.9.0-alpha11

2016-09-01 Thread Ambrose Bonnaire-Sergeant
Hi, There seems to be some issues instrumenting functions that compile to .invokePrim calls. user=> (s/fdef blah :args (s/cat :foo int?) :ret any?) user/blah user=> (defn blah [^long a]) #'user/blah user=> (st/instrument) [clojure.core/symbol user/blah] user=> (blah 1) ClassCastException clojure

Re: [ANN] Clojure 1.9.0-alpha11

2016-09-01 Thread Ambrose Bonnaire-Sergeant
mal deref var + invoking path. > http://dev.clojure.org/jira/browse/CLJ-1941 is a similar case with some > discussion in the comments. > > On 09/01/2016 11:33 AM, Ambrose Bonnaire-Sergeant wrote: > > Hi, > > > > There seems to be some issues instrume

[ANN] An exploration of Hash Array Mapped Tries

2016-12-06 Thread Ambrose Bonnaire-Sergeant
Hi, I've been having a ton of fun this semester learning about Hash Array Mapped Tries (like PersistentHashMap). Link I have written a visual tutorial for HAMT's, as well as a reference implementation in Clojure that supports trie visualisations with Rhizome. There's also a little prototype+wri

Re: [ANN] An exploration of Hash Array Mapped Tries

2016-12-06 Thread Ambrose Bonnaire-Sergeant
Link: https://github.com/frenchy64/optimized-kw-maps On Tue, Dec 6, 2016 at 4:16 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi, > > I've been having a ton of fun this semester learning about > Hash Array Mapped Tries (like PersistentHashMa

[ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
Hi, Happy to announce a new set of tools to *automatically* *generate* types and specs for your projects. *Dependency information:* 1. core.typed [org.clojure/core.typed "0.4.2"] 2. lein-typed [lein-typed

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
troublesome, I haven't tried outputting any spec regex ops). Thanks, Ambrose On Friday, October 13, 2017 at 3:54:22 PM UTC-4, Colin Fleming wrote: > > This looks great! Can this be used to infer macro specs based on examples > of usage? > > On 14 October 2017 at 04:30, Ambrose B

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
ector. Also, [& body] arguments are common. On Friday, October 13, 2017 at 5:44:07 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > Potentially. Actually, it currently instruments and gathers data about > macros, but doesn't > <https:/

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
ingshot/commit/df20eadb17abc6677f721763c5f5059a46693517#diff-9bd43a8aebd660e08a7c41cd0f0a13d0R74> Thanks, Ambrose On Friday, October 13, 2017 at 5:46:36 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > This > <https://github.com/clojure/core.typed/blob/0552a59708bc20d26b2875776ab9cf09bbf62075/

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Ambrose Bonnaire-Sergeant
as t in hello.core > generate-tenv: 1 infer-results > finished squash-horizonally > Start follow-all > end follow-all > start remove unreachable aliases > end remove unreachable aliases > done populating > Output annotations to #object[java.net.URL 0x738a39cc > file:/tm

Re: ANN: Parallel let macro!

2017-11-29 Thread Ambrose Bonnaire-Sergeant
Cool! Check out code-walking libraries like riddley or tools.analyzer.jvm to properly support special forms and variable shadowing. I had a quick crack myself but gave up when I remembered how hard this problem

Re: [ANN] Clojure 1.10 has been released!

2018-12-18 Thread Ambrose Bonnaire-Sergeant
Thanks to everyone who designed, implemented, and tested this release! On Tuesday, December 18, 2018 at 5:33:07 AM UTC-5, Rick Moynihan wrote: > > Great news, > > Thanks to everyone who made this possible! > > R. > > On Tue, 18 Dec 2018 at 09:02, Thomas > > wrote: > >> Thank you for this release

Re: Weird GenSyms behaviour across different quoted blocks in a macro

2015-08-26 Thread Ambrose Bonnaire-Sergeant
You want an explicit gensym that scopes over both positions. (defmacro a-macro [m] (let [f (gensym "f)] `(fn [~f] ~(for [i# m] `(* (:val ~f) ~i# ) Thanks, Ambrose On Wed, Aug 26, 2015 at 5:07 PM, Rafik NACCACHE wrote: > Suppose I have the following macro, which ge

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Ambrose Bonnaire-Sergeant
Is it possible :incoming-message is mapped to nil? On Fri, Oct 16, 2015 at 2:33 PM, Lawrence Krubner wrote: > What am I doing wrong here? I want to call clojure.string/lower-case on > the :incoming-message of this-users-conversation. If there is no message, I > return an empty string. > > > (de

Re: [ANN] Clojure 1.8.0-beta2

2015-10-27 Thread Ambrose Bonnaire-Sergeant
I've been monkey-patching `clojure.core/load` to add an extension point for alternative compilers. Since I learnt about the direct linking changes, I also had to monkey-patch `use` and `require`, since they refer to `load`. This works. Any interest in disabling direct linking for `clojure.core/loa

Re: core.typed - Can't resolve alias name

2015-10-29 Thread Ambrose Bonnaire-Sergeant
If you're at the repl, you should use `cf` to evaluate `defalias` also. Sorry for the late response. Thanks, Ambrose On Thu, Oct 29, 2015 at 9:23 PM, JvJ wrote: > Reposting from the core.typed google group. Didn't get a response. > > I'm just starting with core.typed, and I can't seem to get

Re: [ANN] Clojure 1.8.0-RC1 is now available

2015-11-14 Thread Ambrose Bonnaire-Sergeant
Can we get a 3rd jar that is AOT compiled but without direct linking? I'd like the benefits of AOT load time but also to build dev-time tooling to improve core error messages. Thanks, Ambrose On Sat, Nov 14, 2015 at 7:02 AM, tcrayford wrote: > Hi, > > I ran Yeller's very extensive benchmark sui

Re: [ANN] Clojure 1.8.0-RC2

2015-11-19 Thread Ambrose Bonnaire-Sergeant
I don't think CLJ-1845 had the intended effect. user=> (alter-var-root #'load (fn [f] (fn [& args] (prn "patched") (apply f args #object[user$eval1241$fn__1242$fn__1243 0x1c857e6 "user$eval1241$fn__1242$fn__1243@1c857e6"] user=> (load) "patched" ni

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
I'm missing something, alter-var-root'ing *clojure-version* works just fine when calling (clojure-version). (alter-var-root #'*clojure-version* assoc :qualifier "patched") (clojure-version) ;=> "1.8.0-patched" Thanks, Ambrose On Fri, Nov 20, 2015

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
Alex, That sounds correct. Thanks, Ambrose On Fri, Nov 20, 2015 at 10:10 AM, Alex Miller wrote: > I see the same and I suspect it's because of the forward declare. :( > > > On Friday, November 20, 2015 at 12:25:28 AM UTC-6, Ambrose > Bonnaire-Sergeant wrote: >>

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
Wait, how does the compiler know that *clojure-version* isn't a function? On Fri, Nov 20, 2015 at 10:01 AM, Nicola Mometto wrote: > *clojure-version* is not a function, it's not affected by direct linking > > > On 20 Nov 2015, at 14:56, Ambrose Bonnaire-Sergeant < >

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
I was going to reopen the ticket and create/test a patch. Does that work for you? On Fri, Nov 20, 2015 at 10:22 AM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Alex, > > That sounds correct. > > Thanks, > Ambrose > > > On Fri, Nov 20, 201

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
Aha, thanks! On Fri, Nov 20, 2015 at 10:35 AM, Nicola Mometto wrote: > It doesn't, but direct linking only affects invocations > > > > On 20 Nov 2015, at 15:21, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > > > > Wait, how doe

Re: [ANN] Clojure 1.8.0-RC2

2015-11-20 Thread Ambrose Bonnaire-Sergeant
ng to > make another change that will affect what the patch will be. > > > On Friday, November 20, 2015 at 9:29:43 AM UTC-6, Ambrose > Bonnaire-Sergeant wrote: >> >> I was going to reopen the ticket and create/test a patch. Does that work >> for you? >&

Re: Practical ways to deal with 'bag-of-properties' syndrome, AKA dynamic typing?

2015-11-30 Thread Ambrose Bonnaire-Sergeant
Tools like Schema, core.typed or just plain old docstrings are useful. Of course, the library write must provide these. Some libraries even roll their own documentation solution, eg. the very cool tools.analyzer spec . Thanks, Ambrose

Re: [ANN] Doubling down on Onyx

2016-02-25 Thread Ambrose Bonnaire-Sergeant
Congrats! On Thu, Feb 25, 2016 at 5:07 AM, Daniel Kersten wrote: > Congratulations! Fantastic news. I think thats my cue to finally go ahead > and learn to use Onyx :) > > On Thu, 25 Feb 2016 at 00:07 Colin Fleming > wrote: > >> Hi Michael, >> >> Congratulations! That's fantastic - I'm really h

Re: find shorter clojure code automatically

2016-03-03 Thread Ambrose Bonnaire-Sergeant
Hi Jeremy, Browsing the Kibit rule base comes to mind, but I don't have a general solution. Thanks, Ambrose On Thu, Mar 3, 2016 at 1:33 PM, Jeremy Vuillermet < jeremy.vuiller...@gmail.com> wrote: > Hello, > > Every time I go to a

Re: Addressing Matthias Felleisen's concerns?

2016-05-09 Thread Ambrose Bonnaire-Sergeant
Josh is correct. I'm currently working on merging this work now that my courses are over. Thanks, Ambrose On Mon, May 9, 2016 at 6:32 PM, Josh Tilles wrote: > On Monday, May 9, 2016 at 5:36:53 PM UTC-4, Didier wrote: >> >> At Clojurewest 2016, Matthias Felleisen gave a great keynote about the >

Re: clojure.spec

2016-05-23 Thread Ambrose Bonnaire-Sergeant
Thanks Rich+team, this is awesome. Instrumented vars via `fdef` do not seem to add :doc metadata yet (which is advertised in the docstring for `fdef`). Am I missing something? Thanks, Ambrose On Mon, May 23, 2016 at 5:20 PM, Andrey Grin wrote: > Thank you. Yes, it seems that for recursion I c

Re: clojure.spec

2016-05-23 Thread Ambrose Bonnaire-Sergeant
t; > > https://github.com/clojure/clojure/commit/4c8efbc42efa22ec1d08a1e9fa5dd25db99766a9 > > > On May 23, 2016, at 5:26 PM, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > > > > Thanks Rich+team, this is awesome. > > > > Instrumented var

Re: clojure.spec

2016-05-23 Thread Ambrose Bonnaire-Sergeant
ing the latest master-SNAPSHOT. (ns gen-load.core (:require [clojure.spec :as s])) (s/gen integer?) ;CompilerException java.lang.NoClassDefFoundError: clojure/spec/gen$gen_for_pred, compiling:(gen_load/core.clj:4:1) Thanks, Ambrose On Mon, May 23, 2016 at 5:33 PM, Ambrose Bonnaire-Sergeant < abo

Re: clojure.spec

2016-05-23 Thread Ambrose Bonnaire-Sergeant
: > Looks like it is, in the meanwhile this patch should fix it: > http://sprunge.us/XTiA > > > > On 23 May 2016, at 23:03, Nicola Mometto wrote: > > > > Possibly CLJ-1544 related? > > > >> On 23 May 2016, at 22:59, Ambrose Bonnaire-Sergeant < >

Re: clojure.spec

2016-05-24 Thread Ambrose Bonnaire-Sergeant
t; > > (binding [s/*recursion-limit* 3] > > (time (s/gen ::a))) > > > > > >> On May 23, 2016, at 6:34 PM, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > >> > >> I'm observing mutually recursive regex op

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-24 Thread Ambrose Bonnaire-Sergeant
Thanks for the guide Alex. Is it possible to get more information in the "no method" error returned by multi-spec? (s/explain :event/event {:event/type :event/restart}) ;; val: {:event/type :event/restart} fails predicate: my.domain/event-type, no method It would be nice to mention exactly which

jvm.tools.analyzer 0.6.1

2014-02-04 Thread Ambrose Bonnaire-Sergeant
Hi, jvm.tools.analyzer 0.6.1 now supports ClojureScript 0.0-2138. [org.clojure/jvm.tools.analyzer "0.6.1"] README CHANGELOG Thanks, Ambrose -- You rece

Re: GSoC 2014: We need ideas and mentors

2014-02-07 Thread Ambrose Bonnaire-Sergeant
Thank Nikita, added. Ambrose On Fri, Feb 7, 2014 at 9:17 PM, Nikita Beloglazov wrote: > Hi > > I don't have editing rights for wiki so I post project idea here: > *Quil on ClojureScript**Brief explanation: > *Quilis a drawing and animation library for > clojure. I

Re: map semantics

2014-02-08 Thread Ambrose Bonnaire-Sergeant
On Sun, Feb 9, 2014 at 12:40 AM, Andy C wrote: > >Every persistent collection in Clojure supports conversion to the > sequence of items. This is clearly documented in the official docs and > there is no surprise here. > > Would you mind to point me to that piece where doc describes what order > s

dynalint, lein-dynalint 0.1.3

2014-02-09 Thread Ambrose Bonnaire-Sergeant
Hi, dynalint 0.1.3 has a bunch of improvements. You can now configure linting with `configure-linting!`. Stack traces now look a lot nicer, dynalint wrappers should disappear ( example ). lein-dynalint 0.1.3 has a BREAKING CHANGE. The dynalint versi

[ANN] vim-typedclojure

2014-02-09 Thread Ambrose Bonnaire-Sergeant
Hi, Good news for core.typed + vim users (which includes me)! Check out vim-typedclojurefor some fun. Big thanks to Tim Pope for vim-fireplace and all his vim plugins of which I've copied the form

lein-dynalint 0.1.4

2014-02-10 Thread Ambrose Bonnaire-Sergeant
Hi, lein-dynalint 0.1.4 is a little more robust. It now outputs results under target/dynalint-output, and always outputs results even when tests fail (writing the output is now in a try/finally). There is a nicer error message when the dynalint dependency is missing. README

[$Bounty] Emacs plugin for Typed Clojure

2014-02-11 Thread Ambrose Bonnaire-Sergeant
Hi, I need a relatively straightforward Emacs plugin for Typed Clojure written. I'm offering a $200US bounty. If you would also like to see this, please bump up the $$. If you're interested in claiming, see the bounty page

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-11 Thread Ambrose Bonnaire-Sergeant
alias prefix if available. Thanks, Ambrose On Wed, Feb 12, 2014 at 3:18 PM, john walker wrote: > I'm still on my first cup, so let me know what you think: > > https://github.com/johnwalker/typed-clojure-el > > > On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose Bo

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread Ambrose Bonnaire-Sergeant
;> I'm still on my first cup, so let me know what you think: >>> >>> https://github.com/johnwalker/typed-clojure-el >>> >>> >>> On Tuesday, February 11, 2014 12:01:36 PM UTC-5, Ambrose >>> Bonnaire-Sergeant wrote: >>>> >>&g

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread Ambrose Bonnaire-Sergeant
eresting. My first thought was to >>>> check the aliases using (ns-alias), but it turns out that re-evaluating a >>>> namespace after removing the alias leaves the original aliases in place. So >>>> I'm just going to use a regex, which is probably easier anyway.

Re: [$Bounty] Emacs plugin for Typed Clojure

2014-02-12 Thread Ambrose Bonnaire-Sergeant
ght too, > since I was planning on trying gsoc anyway. > > > On Wednesday, February 12, 2014 6:44:08 AM UTC-5, Ambrose > Bonnaire-Sergeant wrote: > >> Hi John, >> >> I gave it a whirl, it's exactly what I wanted. >> >> When you're ready please c

Re: Clojure pre assertion functions does not work with keyword?

2014-02-13 Thread Ambrose Bonnaire-Sergeant
Hi Mamun, This is the correct syntax (you're missing some parens). (defn check-keyword [v] {:pre [(keyword? v)]} v) Thanks, Ambrose On Thu, Feb 13, 2014 at 6:47 PM, Mamun wrote: > Hi > > I am just testing clojure :pre condition. But look like using keyword?, it > is not working in clojure 1.

Re: Clojure pre assertion functions does not work with keyword?

2014-02-13 Thread Ambrose Bonnaire-Sergeant
> HI Ambrose, > > Thanks for your reply. But why this one is working? > > > (defn check-nil [v] > {:pre [nil? v]} > v) > > Br, > Mamun > > > > On Thursday, February 13, 2014 11:51:31 AM UTC+1, Ambrose > Bonnaire-Sergeant wrote: &g

[ANN] typed-clojure-mode emacs plugin

2014-02-16 Thread Ambrose Bonnaire-Sergeant
Hi, Happy to announce the first version of typed-clojure-mode, an emacs minor mode for Typed Clojure. Thanks to John Walker who wrote the core functionality, he earned this open source bounty

Re: [ANN] seqspert - demystify the internals of Clojure Sequences

2014-02-20 Thread Ambrose Bonnaire-Sergeant
Nice, thanks for releasing! Ambrose On Fri, Feb 21, 2014 at 5:47 AM, Jules wrote: > I've been teaching myself a bit about the internals of various Clojure > seqs over the last week or so... maps, sets, vectors etc.. > > I started with a little Clojure to help me drill into the Seq POJOS - this

Re: Question about map destrustures

2014-02-24 Thread Ambrose Bonnaire-Sergeant
Hi, There's no core function for this (would probably be called mapply). Try calling (apply concat m) on your map, then passing with (apply a (apply concat m)). Thanks, Ambrose On Mon, Feb 24, 2014 at 10:34 PM, bob wrote: > Hi, > > There is a function a > > (defn a > [ & {:as m}] > (prin

Re: [ANN] clojure.test.check (previously, simple-check)

2014-02-27 Thread Ambrose Bonnaire-Sergeant
Congrats! Ambrose On Fri, Feb 28, 2014 at 1:22 AM, Reid Draper wrote: > I'm happy to announce the first release of the newest Clojure contrib > library: > test.check [1]. Previously named simple-check [1], test.check is a > property-based testing library, based on QuickCheck. The README has a

Re: A faster clojure startup

2014-02-28 Thread Ambrose Bonnaire-Sergeant
Sounds promising, looking forward to testing the clojure-jvm patch! Ambrose On Sat, Mar 1, 2014 at 12:08 AM, Gal Dolber wrote: > No, its a bit more than that, but it shouldn't be hard to port. The > changes already generate the right bytecode. I'm working a clean patch for > clojure-jvm that s

Re: case statement and java constants

2014-02-28 Thread Ambrose Bonnaire-Sergeant
I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clem

Re: case statement and java constants

2014-02-28 Thread Ambrose Bonnaire-Sergeant
gt; Adam > > > On Fri, Feb 28, 2014 at 4:21 PM, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > >> I'm not 100% sure if this works, but have you tried writing a macro that >> gets the >> Java field value, and inserting into the case statement?

Re: map and lazy sequence

2014-02-28 Thread Ambrose Bonnaire-Sergeant
Hi Andy, Lazy sequences are realised in chunks of 32. You can see this by running: (take 1 (map prn (range))) (0 1 .. 30 31 nil) Thanks, Ambrose On Sat, Mar 1, 2014 at 1:04 AM, Andy Smith wrote: > Hi, > > Can someone correct my misunderstanding here. I was lead to believe that > map produced

Re: [ANN] avi: A lively vi. 0.1.0

2014-03-01 Thread Ambrose Bonnaire-Sergeant
Hi Jason, Angela, Wow, looks like fun! It would be nice just have to specify the install prefix path once, instead of in the bash and install.clj file. Also the bin directory needs to be manually created (same with the prefix directory). I tried running the executable, I got this: ambrose@ambro

Re: transient map bug?

2014-03-06 Thread Ambrose Bonnaire-Sergeant
It's undefined behaviour; you should use assoc! like assoc. Ambrose On Thu, Mar 6, 2014 at 11:16 PM, Sergey Kupriyanov wrote: > Thanks for the answers. > > It's not my real code. > > It's just trivial demo for the bug report. > > I can rewrite it with no problems, but the question is - is it n

Request for Mentors for GSoC Projects

2014-03-08 Thread Ambrose Bonnaire-Sergeant
Hi, I have a handful of projects (steadily increasing) lined up for GSoC 2014. Of course at this stage they haven't been accepted, since student allocations are still a few weeks away, however there are enthusiastic students waiting in the wings. I would be grateful for help mentoring these proje

Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
No difference, but declare can take multiple vars as arguments. Thanks, Ambrose On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote: > Hi there > > Is there any difference between declare and def when I'm making a forward > declaration? > > Thanks > > Plínio > > -- > You received this messag

Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
9672baede3e0f1cc8b3e9e42b6e899927a9c09 > > > On Thu, Mar 13, 2014 at 10:57 AM, Ambrose Bonnaire-Sergeant < > abonnaireserge...@gmail.com> wrote: > >> No difference, but declare can take multiple vars as arguments. >> >> Thanks, >> Ambrose >> >>

Re: [GSoC] Codexes project

2014-03-16 Thread Ambrose Bonnaire-Sergeant
Hi Morg, There's still time left, hopefully Jamie will chime in on the list. Thanks, Ambrose On Sun, Mar 16, 2014 at 7:17 PM, Morgawr Havenlost wrote: > Hello everybody :) > I might be a bit too late, but I was interested in having a look at the > Codexes project > for the GSoC 2014 (as linked

Re: [GSoC] Mentor for self-hosting ClojureScript compiler project?

2014-03-18 Thread Ambrose Bonnaire-Sergeant
Hi Max, Seems like an interesting project. I suggest submitting a proposal on Melange and we can work out the details there, since student applications close soon. Please follow the guidelines . Thanks, Ambrose On Tue, Ma

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-18 Thread Ambrose Bonnaire-Sergeant
I think I found a difference between 1.5.1->1.6.0-RC1. (compile 'cljs.core) fails with a NPE in 1.6.0-RC1. I realise this isn't particularly supported by CLJS, but it still worked in 1.5.1. https://github.com/frenchy64/clojure-16-fail Help narrowing this is appreciated. Thanks, Ambrose On Wed

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-18 Thread Ambrose Bonnaire-Sergeant
brose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > I think I found a difference between 1.5.1->1.6.0-RC1. > > (compile 'cljs.core) fails with a NPE in 1.6.0-RC1. I realise this isn't > particularly supported > by CLJS, but it still worked in 1.5.1. > >

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-18 Thread Ambrose Bonnaire-Sergeant
> > On Tuesday, March 18, 2014 2:29:04 PM UTC-5, Ambrose Bonnaire-Sergeant > wrote: > >> I believe this is because cljs.core defines unsigned-bit-shift-right, >> which now conflicts >> with clojure.core/unsigned-bit-shift-right (added with 1.6.0). >> >> 1.6.0 d

Re: every? expected behavior

2014-04-08 Thread Ambrose Bonnaire-Sergeant
It's very common for a sequence argument to also work with nil, with the same semantics as an empty sequence. They are completely different things but Clojure is sloppy in this regard. I believe this is intended. Thanks, Ambrose On Tue, Apr 8, 2014 at 2:08 PM, Jeff Mad wrote: > Hi, > I am new

Re: The Cons in iterate's return value

2014-04-16 Thread Ambrose Bonnaire-Sergeant
Ah so it seems a "lazy sequence" implements IPending? Thanks, Ambrose On Thu, Apr 17, 2014 at 3:39 AM, gianluca torta wrote: > this issue on core.typed > http://dev.clojure.org/jira/browse/CTYP-96 > > in particular the comment: > "This is starting to make me rethink what a clojure.core docstri

Re: citing Clojure and EDN?

2014-04-23 Thread Ambrose Bonnaire-Sergeant
Here's a good citation for Clojure: http://dl.acm.org/citation.cfm?id=1408682 Thanks, Ambrose On Wed, Apr 23, 2014 at 1:46 PM, Christopher Small wrote: > I'm not disagreeing with you. When you're talking about a language, and > none of the papers specifically points to the language as a whole -

<    1   2   3   4   5   6   >