Re: [ANN] test.check 0.5.9

2014-08-05 Thread Colin Fleming
This looks awesome - thanks for the fix, Reid! Cheers, Colin On 5 August 2014 16:24, Reid Draper wrote: > I'm happy to announce the 0.5.9 release of clojure.test.check, a > QuickCheck inspired property-based testing library [1]. As usual, you can > view the release notes [2]. The biggest chang

Re: Cursive Plugin java integration

2014-08-06 Thread Colin Fleming
Hi Bryan, Unfortunately this is a known issue right now, not all classes generated from Clojure forms are represented by classes in IntelliJ yet. Some of them are - if you use deftype, defrecord, reify and proxy those should all work well. Unfortunately gen-class does not, yet, although I've had a

Re: FYI: for Clojure people stuck with some Java, use DCEVM

2014-08-13 Thread Colin Fleming
This looks really great. Due to limitations in Clojure's interop I'm forced to use much more Java than I'd like in Cursive itself, I'll definitely give this a go. The only problem for me might be running IntelliJ under OpenJDK, I seem to recall that this didn't work well. How well does this work f

Re: FYI: for Clojure people stuck with some Java, use DCEVM

2014-08-16 Thread Colin Fleming
On 15 August 2014 19:23, Sean Corfield wrote: > Could you elaborate on this Colin? > Sure. IntelliJ uses an IoC container, and you declare your implementations of their extensions in an XML file, like this

Re: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-21 Thread Colin Fleming
Hi Alex, Is the current feature expressions design basically what's under "Proposed Solution: feature expressions" at http://dev.clojure.org/display/design/Feature+Expressions? I read through the comments a while back and a lot of the suggestions there got fairly complicated, I'd be interested to

Using an atom for a caching map

2014-08-29 Thread Colin Fleming
Hi all, I want to use a map to cache values based on a key. I'm planning to use an atom for this. My basic operation is "give me the value for this key" - if the value exists in the map then that value should be returned, otherwise a new value should be calculated, inserted in the map and then ret

Re: Using an atom for a caching map

2014-08-30 Thread Colin Fleming
(let [v (get @cache k ::nil)] > (if (= v ::nil) > (let [v (calc-value k)] > (swap! cache assoc k v) > v) > v))) > > (let [value (lookup cache k)] > ; use value and @cache here > ) > > > суббота, 30 августа 2014 г., 9:27:05 UTC+4

Re: Using an atom for a caching map

2014-08-30 Thread Colin Fleming
[v (get @cache k ::nil)] > (if (= v ::nil) > (compute cache k) > (unwrap v > > > > суббота, 30 августа 2014 г., 11:18:51 UTC+4 пользователь Colin Fleming > написал: >> >> True, but only if you don't mind possibly calculating the value more than &

Re: Using an atom for a caching map

2014-08-30 Thread Colin Fleming
In my case I can't use memoize because I need to supply the cache map - that in turn is stored on another object so it can be invalidated by events outside my control. On 30 August 2014 20:00, Ray Miller wrote: > On 30 August 2014 06:26, Colin Fleming > wrote: > > > >

Re: Using an atom for a caching map

2014-08-30 Thread Colin Fleming
specially when you have many threads > asking for different keys. > > суббота, 30 августа 2014 г., 14:09:42 UTC+4 пользователь Colin Fleming > написал: >> >> Yes, in my case the update is atomic but doesn't strictly avoid >> recomputation (since the Atom can call the ca

Re: Using an atom for a caching map

2014-09-01 Thread Colin Fleming
> v > (do > (reset! cache (assoc @cache key (calculate key))) > (get @cache key) > > > On Saturday, August 30, 2014 3:27:05 PM UTC+10, Colin Fleming wrote: >> >> Hi all, >> >> I want to use a map to cache values bas

Re: Using an atom for a caching map

2014-09-01 Thread Colin Fleming
gt; > (def lookup > (let [calc-value* (memoize calc-value)] > (fn [cache k] > (when-not (contains? @cache k) > (swap! cache assoc k (calc-value* k))) > (@cache k > > Den lördagen den 30:e augusti 2014 kl. 12:11:58 UTC+2 skrev Colin Fleming: >

Re: Using an atom for a caching map

2014-09-01 Thread Colin Fleming
<->Java interop is so good that it doesn't matter > much. > > On Saturday, August 30, 2014 7:27:05 AM UTC+2, Colin Fleming wrote: >> >> Hi all, >> >> I want to use a map to cache values based on a key. I'm planning to use >> an atom for this. My bas

Re: [ANN] Prone: Exception/debugging middleware

2014-09-01 Thread Colin Fleming
I don't do any web dev myself, but Prone looks really nice - congratulations! Great work. Cheers, Colin On 2 September 2014 02:05, Christian Johansen wrote: > Hi, > > Prone (http://clojars.org/prone - http://github.com/magnars/prone) is a > new middleware for Ring apps that replaces the defaul

Re: core.async take behaviour

2014-09-04 Thread Colin Fleming
Is there any indication of when transducers are likely to make it to a stable version of Clojure? Given that there's a long time between major releases and 1.6 just came out, are they likely to be backported to a 1.6 point release when they're done or will we have to wait for 1.7? On 5 September

Re: ECHELON: Wrangling messy political data

2014-09-16 Thread Colin Fleming
It's a shame your talk wasn't accepted - that looks fascinating and I would have loved to see it. Please let us know when you do your technical write-up! On 17 September 2014 07:14, Zack Maril wrote: > I had submitted a talk to clojure conj but it wasn't accepted. Stiff > competition this year.

Re: [ANN] tools.analyzer[.jvm] 0.6.0 release, pass scheduler

2014-09-19 Thread Colin Fleming
Congratulations Nicola, that looks really excellent! On 19 September 2014 07:06, Nicola Mometto wrote: > > Today I released version 0.6.0 of the tools.analyzer[1] and > tools.analyzer.jvm[2] contrib libraries. > > With this release comes a new feature I'm really excited about and that > I belie

Re: What is the best setup to program Clojurescript IF...

2014-10-02 Thread Colin Fleming
Hi Peter, I develop Cursive so I'm biased, but I think Cursive provides a pretty nice CLJS environment now. Unfortunately the Clojurescript functionality isn't well documented yet but it basically works like the Clojure support which is documented here . One

Re: Advice for building backend REST services from scratch using clojure

2014-10-06 Thread Colin Fleming
ers and not be able to add them back for > example), but for the 80/20 rule, it rocks. > > And IntelliJ is also a very nice place to be. > > Consider my words firmly eaten :). > > (Oh, and according to my team you still wouldn't want to work with me :). > Off to f

Re: Do this or that

2014-10-06 Thread Colin Fleming
I agree - I always use the second form. Generally I find that I often need a let-block for each branch of the if, so I nearly always avoid the need for an explicit 'do'. On 7 October 2014 14:54, wrote: > I agree with James. The first can be tempting when you're doing side > effect heavy code (wh

Re: Advice for building backend REST services from scratch using clojure

2014-10-07 Thread Colin Fleming
To be fair, Cursive doesn't yet provide a great CLJS REPL solution either, although that is coming soon. Right now, for ease of getting a CLJS REPL up and running Light Table definitely wins. On 8 October 2014 05:20, gvim wrote: > On 11/04/2014 09:17, Colin Yates wrote: > >> * you can fight it

Re: Keyword comparison performance

2014-10-11 Thread Colin Fleming
Does this mean that keywords don't have any efficiency advantages over strings when used as map keys? On 12 October 2014 02:25, David Nolen wrote: > As already mentioned use identical? In ClojureScript you must use > keyword-identical? for fast comparisons. > > > On Friday, October 10, 2014, Jon

Namespace circular dependencies

2014-10-16 Thread Colin Fleming
Hi all, I'm a little confused about circular namespace dependencies and what is allowed and not allowed. My understanding was that Clojure did not permit cycles in the namespace dependency graph. I dimly recall seeing an error about this at some point and I had seen code in e.g. tools.namespace wh

Re: Namespace circular dependencies

2014-10-17 Thread Colin Fleming
I see - thanks very much Stephen, that's very helpful. So it seems like this check should only catch circular dependencies when they appear in ns forms, since those will produce a cycle error if none of the other namespaces are currently loaded. I'll investigate doing this. I can't think of a case

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Colin Fleming
One of my goals with Cursive was to make this very thing easier, since lein on Windows does seem to be fraught with peril for newcomers and those not accustomed to the command line. Cursive, like CCW, bundles lein to avoid this sort of pain. Unfortunately I've been lazy and there is one critical pi

Re: CCW bug [SEVERE]

2014-10-26 Thread Colin Fleming
Note that any of those operations you're talking about under the general heading of "I/O tasks" are very complex in a modern IDE, and there are a lot of seemingly unrelated code paths where a bug or some sort of unexpected condition might cause an infinite loop. And as a lot of people have noted, t

Re: CCW bug [SEVERE]

2014-10-27 Thread Colin Fleming
IntelliJ definitely does this, and since it also saves automatically (on losing focus, or on events like running something, or on 5 secs of inactivity) you get a very fine-grained history. I love this feature, I don't miss manual file saving at all. It basically works like a lightweight automatic V

Re: If code is data why do we use text editors?

2014-11-14 Thread Colin Fleming
This is an interesting topic. Unfortunately I'm quite busy getting ready for the conj, but my talk on Cursive at the conj is actually quite related to this. I think text is actually a pretty good representation for programs - at least, I haven't seen anything more convincing except for very specifi

Re: If code is data why do we use text editors?

2014-11-15 Thread Colin Fleming
Hi Mike, Actually, I haven't - I probably should spend more time investigating it, there are bound to be some interesting ideas. If you have thoughts about aspects of it that might be useful, I'd be very interested in hearing about them either on or off list (co...@colinfleming.net). On 16 Novemb

Re: If code is data why do we use text editors?

2014-11-17 Thread Colin Fleming
> > there should therefore be a region annotation that tells IDEs to leave > it the hell alone when the user invokes "reindent the whole file" type > commands :-) FWIW IntelliJ has had this for a while, and I'd be surprised if other systems didn't as well. I haven't gotten around to adding suppor

Re: lein repl timeout

2014-11-22 Thread Colin Fleming
Hi Neil, This looks like an issue a user had with Cursive a while ago, which I never totally got to the bottom of. See https://groups.google.com/d/topic/clojure-tools/lmjCX3AjAfE/discussion and the associated GitHub issue. In particular, guns wrote a really useful mail which for some reason doesn'

Re: Thnx for clojureconj videos !!

2014-11-22 Thread Colin Fleming
Absolutely, the team did a really amazing job getting them up so quickly. This was surprisingly useful even being at the conference - I missed a few talks due to hallway track conversations, but I could still see them on the videos in time to talk to the speakers about them. Really great job. Chee

Re: Cursive Reloaded Workflow

2014-12-01 Thread Colin Fleming
Looks like Laurent is one ahead of me :-). Cursive can't do this right now, although it's a much-requested feature with an issue in the tracker. I'll try to add this soon. In the meantime, you can use the Search REPL History action which narrows down on typing - not ideal, but it should work for no

Re: Cursive Reloaded Workflow

2014-12-01 Thread Colin Fleming
12:14, Laurent PETIT wrote: > > > 2014-12-02 0:02 GMT+01:00 Colin Fleming : > >> Looks like Laurent is one ahead of me :-). Cursive can't do this right >> now, although it's a much-requested feature with an issue in the tracker. >> I'll try to add this soo

Re: Clojure on iOS devices - Swift as a host?

2014-12-08 Thread Colin Fleming
Also worth mentioning is Gal Dolber's project https://github.com/galdolber/clojure-objc. It's a modified version of the Clojure compiler which outputs Java source instead of bytecode, and then uses Google's J2Objc project. It's pretty neat - he has two iOS apps live which were totally written in Cl

Re: Status of lean runtime?

2014-12-11 Thread Colin Fleming
> > In a future Clojure release (post 1.7) we will drop support for Java 1.6 > Please don't. That will mean that Cursive will be stuck on Clojure 1.7 until at least Java 9, and probably later. JDK 6 is still the only recommended JVM for running IntelliJ on the Mac due to significant bugs which pre

Re: Status of lean runtime?

2014-12-11 Thread Colin Fleming
> > That said, Oxcart itself is pretty much dead unless something near my > lib-clojure proposal comes on the radar for Core. See > http://arrdem.com/2014/12/11/oxcart_going_forwards/ for more on this. I would also love to see this change, in particular because it would allow me to use parts of t

Re: Status of lean runtime?

2014-12-11 Thread Colin Fleming
ing was that invokedynamic was a train wreck from a performance point of view in JDK 7 and was significantly re-worked in JDK 8. Unless we're planning to drop support for 7 too I don't see a big win. > Sean > > On Dec 11, 2014, at 11:31 AM, Colin Fleming > wrote: > > In a f

Re: Status of lean runtime?

2014-12-11 Thread Colin Fleming
> > it runs like a dream > Possibly for you - unfortunately not for everyone. On 12 December 2014 at 12:04, Mark Derricutt wrote: > On 12 Dec 2014, at 9:11, Sean Corfield wrote: > > > I’m stunned that JetBrains don’t yet properly support Java 7 or Java 8 - > we’ve been on Java 8 for development

Re: Has the old "invalid constant tag: -57" bug been fixed?

2014-12-17 Thread Colin Fleming
I replied on Mike's issue, I'll paste that response in here. Cursive doesn't use the absolute latest nREPL but it uses one from a year or so after the CCW thread and Mike confirmed that this doesn't happen for large Clojure files, so I suspect some of the downstream CLJS tooling. There's nothing i

Clojure Style Guide

2014-12-20 Thread Colin Fleming
Hi everyone, There's been a bit of discussion recently on a couple of clojure-mode tickets that I thought were worth discussing here. The tickets are #265 and #266 , and they later

Re: Clojure Style Guide

2014-12-20 Thread Colin Fleming
Yes, perhaps just agreeing on sane defaults is a more achievable goal. Cursive currently does not indent everything exactly according to the guide by default. I would also not like to see tools' ability to implement more sophisticated formatting hampered by an overly restrictive guide either, since

Re: Contrats to Cursive!!!

2014-12-20 Thread Colin Fleming
Thanks Marcus! That was great to see. Some of my earliest beta testers are at ThoughtWorks, it's nice to see so much Clojure adoption over there. As was mentioned the other day, there's lots of Clojure goodness on the latest radar - Gorilla REPL, Om, Reagent, Core Async and of course Clojure itsel

Re: [ANN] Discontinuing 4clojure.com

2021-07-06 Thread Colin Fleming
Thanks for all the work (and money!) that's been spent over the years maintaining 4clojure, I know it's been much appreciated by many in the community. Is it possible to provide a data dump of the problem set? As far as I can tell this data isn't in the Github repo, it seems to be in a Mongo databa

Re: Deep transients

2016-06-02 Thread Colin Fleming
Have you looked at Specter? I actually don't know if it uses transients under the hood or not, or if you can make it do so, but it seems like a good fit for the data manipulation problem, at least. On 3 June 2016 at 14:43, Mark Engelberg wrote: > Let's say I have an object represented by a serie

Re: Deep transients

2016-06-02 Thread Colin Fleming
Engelberg wrote: > That's an interesting idea. Maybe there's a way to build a set of Specter > navigators that operate on transients, and then use its corresponding > eqiuvalences for assoc-in, update-in, etc. > > On Thu, Jun 2, 2016 at 9:01 PM, Colin Fleming > wro

Re: more minimal clojurescript intro/app

2016-06-11 Thread Colin Fleming
Hi Lee, Here's another recent interesting post: http://blog.klipse.tech/clojure/2016/06/07/klipse-plugin-tuto.html. This looks like it might be very useful for you. Cheers, Colin On 12 June 2016 at 11:03, 'Lee' via Clojure wrote: > > Just an update on this and thanks: > > Several people provid

Re: [ANN] Clojure 1.9.0-alpha8

2016-06-28 Thread Colin Fleming
Is there a JIRA with details on the namespaced keyword changes? On 29 June 2016 at 11:48, Leon Grapenthin wrote: > This is fantastic. Spec really seems to turn out like a "killer-feature" > for Clojure. > > On Wednesday, June 29, 2016 at 12:13:25 AM UTC+2, Alex Miller wrote: >> >> Clojure 1.9.0-

Re: [ANN] Nightcode 2: Total Rewrite

2016-07-13 Thread Colin Fleming
What I do for Leiningen in Cursive is basically mimic what the lein script does, and download the uberjars to .lein/self-installs, and then run processes with those on the classpath. Would something similar for Boot work? As I understand it, boot.sh is just a tricky wrapper around an embedded jar,

Re: [ClojureScript] ANN: The REPL, a weekly Clojure/Script newsletter

2016-07-26 Thread Colin Fleming
Thanks for The REPL, I've been enjoying it very much. I like that it also has information related to Clojure but not Clojure-specific, such as JVM performance posts. Nice work! Cheers, Colin On 27 July 2016 at 09:20, Daniel Compton wrote: > Hi folks > > I’ve started a weekly Clojure and Clojure

Re: Implementing a generic parameterized Java interface so that it satisfies (instance? ParameterizedType)

2016-08-04 Thread Colin Fleming
Hi Jakub, Yes, that is correct - Clojure interop only deals with raw classes, it has no concept of generics. Java is the way to go here. Cheers, Colin On 5 August 2016 at 09:28, Jakub Holý wrote: > I need to implement the interface javax.websocket. > MessageHandler.Whole - the type parameter i

Re: Implementing a generic parameterized Java interface so that it satisfies (instance? ParameterizedType)

2016-08-04 Thread Colin Fleming
ght be > possible to implement those interfaces as well. There's probably a way to > do this in pure Clojure. > > On Thu, Aug 4, 2016 at 4:55 PM, Colin Fleming > wrote: > >> Hi Jakub, >> >> Yes, that is correct - Clojure interop only deals with raw classe

Re: Multi-OS Engine | Intel(R) Software

2016-08-09 Thread Colin Fleming
Looks like MOSE uses Android's ART (from https://software.intel.com/en-us/node/633226): Multi-OS Engine Runtime is based on the modern Android ART*, which is the > runtime component of Android that runs Java apps. > ART has a list of features that provide optimal performance for apps on > iOS devi

Re: [ANN] Clojure 1.9.0-alpha11

2016-08-20 Thread Colin Fleming
> > (ns ... (require ...) (import ...) ) instead of (ns ... (:require ...) > (:import ...) ) Is this not intended to be allowed? The docstring implies no but it has always worked fine - I wouldn't call the code broken. Does the spec also limit the refs to refer-clojure/require/use/import/load/g

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-20 Thread Colin Fleming
With respect to preserving undocumented behaviour, while in general I'm in favour of making compilers stricter, in this case it seems like the change breaks a lot of existing code in ways that are impossible for library consumers to fix themselves - they have to wait for an update to the library, o

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-20 Thread Colin Fleming
I think there's considerable scope to produce better error messages automatically than what spec produces, and I hope that can happen for 1.9. The error message produced by the code I demoed at the conj last year would be: Unexpected symbol 'require' at while parsing namespace clauses. Expected :

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-22 Thread Colin Fleming
I agree that the ability to get a machine-readable parse failure is very important for tooling. However I feel very strongly that the error messages that are printed by default on macro validation failures should be easily understandable, and the current ones are not. If we completely punt to tooli

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-22 Thread Colin Fleming
're also the cases that everyone will encounter all the time, particularly new users trying to figure out the language syntax. On 23 August 2016 at 12:55, Alex Miller wrote: > > On Monday, August 22, 2016 at 7:43:53 PM UTC-5, Colin Fleming wrote: >> >> I agree that the ability

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-23 Thread Colin Fleming
; just disagree. There are benefits from reporting errors in a generic, >> consistent way. […] >> >> >> Do there exist examples of what is desired for error messages in >> 1.9-final? Not promises, but a “this is what we’re shooting for”? What >> would you all li

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-23 Thread Colin Fleming
8:49:38 AM UTC-5, Brian Marick wrote: >> >> >> On Aug 22, 2016, at 7:50 PM, Alex Miller wrote: >> >> >> You've complained in other channels about the "learning to read" error >> messages part and I think you've taken it entirely the wrong

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-24 Thread Colin Fleming
comes from the way that novices > confuse the ns macro with the function that pulls dependencies in at the > REPL. Cutting / pasting between the REPL and the file can allow that to > bleed in. I know it confused me. > > On Wednesday, 24 August 2016 01:09:48 UTC+2, Colin Fleming

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-24 Thread Colin Fleming
This is almost exactly the intuition behind the standard error reporting heuristic for grammars involving alternations. It is a heuristic, but it has to be since on a failure it's impossible to entirely accurately determine the user's intention. But intuitively, generally the rule that has managed

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-25 Thread Colin Fleming
> > I really don't understand how you expect anyone to take your criticism > seriously if you keep implying you're happily abandoning the language for > greener pastures. > Why would anyone developing Clojure look at anything you have to say at > this point as anything less than trolling? Because

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-25 Thread Colin Fleming
focus this in thread. > > But I'm not a moderator, so I guess take whatever I say with a grain of > salt. :) > > On Thursday, August 25, 2016 at 7:12:04 PM UTC-4, Colin Fleming wrote: >> >> I really don't understand how you expect anyone to take your criticism >

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-25 Thread Colin Fleming
Hi Rick, That looks really excellent, and is a huge improvement. Particularly in combination with Leon's proposed change which more precisely identifies the likely failing part of the grammar, this looks like a big win for not much extra effort. One thing that I think would help a lot would be if

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-26 Thread Colin Fleming
ice, it would need some experimentation to see how well it works. On 26 August 2016 at 20:24, Alex Miller wrote: > On Thursday, August 25, 2016 at 9:11:39 PM UTC-5, Colin Fleming wrote: >> >> >> One thing that I think would help a lot would be if it were possible to >>

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-26 Thread Colin Fleming
oo, one of my main goals is to make Clojure more approachable (hence the obsession with error messages), so I'm glad it's helped your co-workers! And you never know, maybe you'll like it enough one day to switch :-) On 26 August 2016 at 21:15, Rick Moynihan wrote: > On 26 Augus

[ANN] gradle-clojure 1.0.1

2016-08-30 Thread Colin Fleming
Hi all, I mentioned to several people that I’ve been using a Gradle plugin I wrote to compile Cursive. I’ve just published it here: https://github.com/cursive-ide/gradle-clojure. It’s also in the Gradle plugin repo. It’s currently very basic, but it works for what I need. If anyone needs extra f

Re: Java like static typing for Clojure?

2016-10-20 Thread Colin Fleming
I recently spent a bunch of time researching exactly this. My motivation was that my main project, Cursive, suffers from a ton of NPEs which I find very difficult to manage. I wanted to see how difficult it would be to have a typed Clojure-like thing, using something similar to Kotlin's type system

Re: Java like static typing for Clojure?

2016-10-21 Thread Colin Fleming
This is a discussion that I've had a couple of times. I don't think that interop is the main factor here, I think it's more that I'm programming against a large codebase I don't understand well (I can't since it's around 4 million LOC). I suspect that if I were programming against a large undocumen

Re: Java like static typing for Clojure?

2016-10-21 Thread Colin Fleming
gt; clojure.core, that unexpected nil colls (and colls containing nil) are > reported earlier and better (because they occur at the point they are > introduced rather than later and several layers down in some RT method). > > On Friday, October 21, 2016 at 10:15:23 AM UTC-5, Colin Fleming

Re: Java like static typing for Clojure?

2016-10-21 Thread Colin Fleming
e nil and that any Java > method may return nil. > > On Thursday, October 20, 2016 at 8:39:04 AM UTC-4, Colin Fleming wrote: >> >> I recently spent a bunch of time researching exactly this. My motivation >> was that my main project, Cursive, suffers from a ton of NPEs which

Re: Java like static typing for Clojure?

2016-10-21 Thread Colin Fleming
code with > >> types (at the top-level, at least) and I think its treatment of Java > interop > >> does what you want: unless instructed otherwise, the typechecker assumes > >> that arguments to Java methods must not be nil and that any Java method > may > >

Re: Java like static typing for Clojure?

2016-10-22 Thread Colin Fleming
Yes, that is a major selling point. Generative testing is really cool, and you should definitely not be disheartened - it's a tool like any other, with its strong points and weak points (like static typing, too). It's definitely not universally applicable, and even more than standard testing, it re

[ANN] gradle-clojure 1.1.0

2016-10-27 Thread Colin Fleming
Hi all, I've just published 1.1.0 of gradle-clojure, a Gradle plugin for compiling Clojure code and running tests. You can find it at https://github.com/cursive-ide/gradle-clojure. Changes in this version are support for JUnit XML test report generation thanks to Piotrek Bzdyl, and also support

Re: Clojure as a first programming language?

2016-12-05 Thread Colin Fleming
On 5 December 2016 at 02:56, 'Lee Spector' via Clojure < clojure@googlegroups.com> wrote: Colin Fleming has done some nice work on this in Cursive. > Sadly that work is not in Cursive proper yet, although I'm planning to get it in there soon once I work out what I'

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

2016-12-09 Thread Colin Fleming
Hi Ambrose, This looks very interesting, and I look forward to investigating it further when I have a moment. Once comment on the defrecords generated at runtime based on small keysets - I'd be very careful with this sort of optimisation, and it needs much more than micro-benchmarks to establish

Re: Kotlin null-safety in Clojure?

2016-12-30 Thread Colin Fleming
I wrote about this a bit on the ML recently: https://groups.google.com/d/msg/clojure/Dxk-rCVL5Ss/NqF-Na9ABQAJ TL;DR - you really need types for this, and it's very difficult to add types to a Clojure-like language without losing what makes it Clojure. In particular, if you want to maintain Java in

Re: Cyclic namespace dependencies!

2016-12-31 Thread Colin Fleming
As a counterpoint to this, note that ClojureScript does the same thing (for different reasons, but the same mechanism): https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/core.cljc#L91-L101 On 1 January 2017 at 05:24, Timothy Baldridge wrote: > Be really careful with Po

Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-04 Thread Colin Fleming
I'm actually planning to do exactly that in Cursive, and it's more or less what Eastwood does too per the link Ben posted. On 4 February 2017 at 14:23, Linus Ericsson wrote: > It would be great if an editor highlighted a (possibly qualified) keyword > that was used only in that particular place

FYI: Eclipse Aether moved to Apache Maven

2017-02-25 Thread Colin Fleming
Hi all, I just saw a notice about this on the Aether mailing list today, and it potentially affects some of us building tooling (especially Leiningen/boot/pomegranate etc). Aether has been developed under the Eclipse umbrella until recently, but as far as I could tell had been almost totally aband

Re: ANN: ClojureScript 1.9.456, Externs Inference & Comprehensive JS Modules Support

2017-03-08 Thread Colin Fleming
I believe that dependency is because Google Closure requires it. On 9 March 2017 at 16:45, Mike Rodriguez wrote: > Guava is often a dependency conflict when trying to put libs together that > use it. I'm surprised cljs has dependencies like this. I'd think a language > would try to avoid having

Re: No :out in my nREPL responses

2017-03-16 Thread Colin Fleming
Hi Terje, When you say the "standard" REPL in Cursive, are you referring to the "Use nREPL in normal JVM process" option, or the "Use clojure.main in normal JVM process" option? Obviously the first does use nREPL, but doesn't go through lein - Cursive just runs a JVM process, starts a bare-bones n

Re: No :out in my nREPL responses

2017-03-18 Thread Colin Fleming
#x27;t think my issue has anything to do with Cursive's way of connecting > to nREPL, but rather with nREPL itself, seeing as had the same problem in a > terminal window running `lein repl`. > > Terje > > > On Friday, March 17, 2017 at 2:11:11 AM UTC+1, Colin Fleming w

Re: java interop, `(.instanceMember Classname)`

2017-03-20 Thread Colin Fleming
Object doesn't have a getName() method. This doc is confusing - as Phill comments above, this is calling the getName() method on an instance of Class. In Clojure, a bare classname (String, ArrayList or whatever) resolves to the class itself if it has been imported (i.e. what would be String.class

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread Colin Fleming
I commented over there too - I'm still confused. On 22 March 2017 at 10:59, Alex Miller wrote: > > > On Tuesday, March 21, 2017 at 11:43:25 AM UTC-5, John Gabriele wrote: >> >> >> Erf. Sorry. I don't think I understand that after all, and as well may >> have confused java.lang.String and java.la

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-26 Thread Colin Fleming
I believe this is fixed in Clojure 1.7, see http://dev.clojure.org/jira/browse/CLJ-1315 for lots of detail. On 27 March 2017 at 08:51, lonign via Clojure wrote: > Hi David, > > It's been a long time, but have you found a solution to this problem? I > came across a StackOverflow question about a

Re: Compiling gen-class runs static initializers: workarounds, solutions?

2017-03-28 Thread Colin Fleming
Ah yes, I remember this now. It seems like this is a fix that would definitely help, too, since many (most?) people using serious interop will be type hinting. On 28 March 2017 at 23:15, Adam Clements wrote: > Potentially relevant? I posted a patch two years ago for some static > initialisers st

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Colin Fleming
> > I have longed for a statically compiled language with type inference with > the simplicity and consistency of Clojure's syntax that also supports > generative testing and works on the JVM but alas, I have not found one. > Frege and PureScript both look interesting but I am unsure of Frege's > l

Re: Derefs broken after clojure.tools.namespace.repl/refresh

2017-04-11 Thread Colin Fleming
A good debugger is indeed extremely useful for Clojure - I use one every day :-) On 12 April 2017 at 05:29, Didier wrote: > Experimentation is good. This is indeed surprising. I think it shows that > a good debugger would still sometime be useful in Clojure. I can't really > explain what's happe

Re: Derefs broken after clojure.tools.namespace.repl/refresh

2017-04-11 Thread Colin Fleming
e past? I thought Clojure didn't have a way to step >> through code interactively? >> >> On Tuesday, 11 April 2017 16:30:14 UTC-7, Colin Fleming wrote: >>> >>> A good debugger is indeed extremely useful for Clojure - I use one every >>> day :-) >>&g

Re: Derefs broken after clojure.tools.namespace.repl/refresh

2017-04-12 Thread Colin Fleming
Yes, that's correct. On 12 April 2017 at 17:56, Didier wrote: > @Colin If I understand correctly, if I buy the personal license I can use > it for my own commercial projects, but I can also use it at my work, to > work on their code base, as long as I'm the one using it. Is that correct? > I pro

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Colin Fleming
Doesn't this mean that Clojure and spec will be mutually dependent, i.e. a dependency cycle? Is that likely to cause problems for any tooling? On 27 April 2017 at 06:27, Sean Corfield wrote: > Whilst this is rather disruptive for current users of clojure.spec, I > understand and appreciate the g

Re: [ANN] huffman-keybindings 0.0.1

2017-05-08 Thread Colin Fleming
Hi Edouard, This library is indeed interesting. However one comment (without wanting to derail the conversation from the library itself) - the use of AGPL is likely problematic since Clojure and the majority of the libraries available for it use the EPL. See here

Re: slackpocalypse?

2017-05-23 Thread Colin Fleming
There's been a lot of discussion around this, there's a page about the possibility of moving to Matrix here: https://hackpad.com/The-case-for-Matrix-xRXYSO9zpyh. While it has some nice properties (decentralised, open, can be encrypted etc) it comes at a serious usability cost. I doubt the whole com

Re: slackpocalypse?

2017-05-23 Thread Colin Fleming
On 24 May 2017 at 00:13, Herwig Hochleitner wrote: > I doubt the whole community would want to move anywhere from Slack. > Perhaps this will have to wait until Slack inevitably throws us off, then. What would you need to solve your discoverability issues (a)? Isn't it as > easy as handing out a

Re: Migrating nREPL out of Clojure Contrib

2017-07-18 Thread Colin Fleming
I don't have much more to add than what others have written - I don't have very strong feelings about this, but it seems worth fixing if the contrib process is a significant barrier to contribution. And if that happens, I agree with Chas that it seems worth taking the time to reboot it properly, si

Re: Migrating nREPL out of Clojure Contrib

2017-07-22 Thread Colin Fleming
> > I'd much rather see nREPL stay within contrib and the renewed effort, that > you propose, to go into ironing out kinks in the contrib process FWIW I don't think this is a realistic option, certainly not for anyone outside of Clojure core. The contrib process is in place because some want it t

Re: Migrating nREPL out of Clojure Contrib

2017-07-22 Thread Colin Fleming
> > Are you saying the contrib process is deliberatly made to be difficult for > the community to contribute to it? No, not at all, just that it's deliberately designed to be exactly the way it is, so dedicating a lot of time to trying to change that is likely to be frustrating and fruitless. I

Re: Reducing Jar file size for AWS Lambda

2017-07-23 Thread Colin Fleming
portkey looks great, I wasn't aware of that - thanks! On 23 July 2017 at 20:35, Kimmo Koskinen wrote: > Hi! > > Although still at early stages, check out portkey > https://github.com/cgrand/portkey. > > Portkey does tree-shaking by starting from a closure to minimize resulting > jar size. Uses k

<    1   2   3   4   >