Re: CHAMP an improvement on HAMT?

2017-08-14 Thread Colin Fleming
Previous discussion from Zach Tellman about his CHAMP implementation (bifurcan): https://groups.google.com/d/topic/clojure/1m_I7IrDGb0/discussion It seems that Clojure's hashing and in particular equality semantics are relatively expensive, and this accounts for most of the performance difference.

Re: [ANN] Insn: Functional JVM bytecode generation for Clojure.

2017-08-18 Thread Colin Fleming
This looks very interesting. How would you compare this to Mage for the CLR? Are they essentially equivalent? On 19 August 2017 at 11:49, wrote: > Insn is a data-oriented API to the ASM JVM bytecode > generation library. It also provides additional utilities like generating

Re: [ANN] Clojure 1.9.0-alpha18

2017-08-23 Thread Colin Fleming
> > Tighten autoresolved keywords and autoresolved namespace map syntax to > support *only* aliases, as originally intended What does this mean? Is there a JIRA discussion about this? On 24 August 2017 at 04:03, Alex Miller wrote: > Clojure 1.9.0-alpha18 is now available. > > Try it via > > -

Re: Writing an Android application with Clojure

2017-09-06 Thread Colin Fleming
Kotlin offers a lot more than just less verbose code and fixing quirks. It's a sufficiently large step up over Java that the experience of using it is completely different, in my experience. The null-safe type system is worth the price of entry alone. I totally recommend it for Android projects. S

Re: Is it wrong that I'm thinking about this?

2017-09-25 Thread Colin Fleming
I'm pretty sure you can't use a bare colon - Clojure will attempt to read it as a keyword and will fail since there's nothing following. :- is just a normal keyword. I think you can take the minimalist syntax too far, if there were no separator at all then you'd have to be counting elements to see

Re: [ANN] JMH-Clojure: Seamless JMH benchmarking for Clojure

2017-09-28 Thread Colin Fleming
This looks really fantastic - thank you! I've used JMH recently and it's definitely awkward to use - I'll use this next time for sure. On 29 September 2017 at 09:24, wrote: > A data-oriented API to JMH > , the Java > Microbenchmark Harness. > > M

Re: SourceDebugExtension Class Attribute in clojure-1.8.0.jar

2017-10-12 Thread Colin Fleming
The other thing that would be affected is debugging using a bytecode debugger like Cursive's - that won't work without the debug info in the bytecode. pack200 is usually something that you'd use for deployment though, so perhaps this isn't a problem. On 12 October 2017 at 23:39, Alex Miller wrote

Re: [ANN] Automatically generate your specs and types

2017-10-13 Thread Colin Fleming
This looks great! Can this be used to infer macro specs based on examples of usage? On 14 October 2017 at 04:30, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Hi, > > Happy to announce a new set of tools to *automatically* > *generate* types and specs for your projects. > > *D

Re: Q: How to find out how much Clojure you use

2017-10-25 Thread Colin Fleming
IntelliJ has a nice Productivity Guide feature which works sort of like this - every time you use a certain feature it's recorded, and you can see a table of the various features, how often you used it and when you last used it. You can click on each feature to see documentation about how it works.

Re: Bazel as Clojure build tool

2018-01-30 Thread Colin Fleming
Another tool that works well for polyglot JVM projects is Gradle. I use it to build Cursive, which has Java, Kotlin and AOT'ed Clojure. I released a mostly-unsupported plugin for it, and Andrew Oberstar and others have taken it over and done a lot of work on it - it now lives at https://github.com/

Re: [?] Adding my own function to clojure.core namespace

2018-02-27 Thread Colin Fleming
On 25 February 2018 at 23:42, Gary Fredericks wrote: > For clojure (not cljs, yet) I proxy all the dev utilities I might want to > use in a namespace called `.` so I can refer to it everywhere no matter > what the local namespace setup is: https://github.com/ > gfredericks/dot-slash-2 > Note tha

Re: Bazel as Clojure build tool

2018-04-16 Thread Colin Fleming
y is far from my favourite language, but at least it's widespread which helps if you don't want to become an expert in it to just get your job done. On 15 April 2018 at 20:25, Gregg Reynolds wrote: > > > On Tue, Jan 30, 2018, 6:07 PM Colin Fleming > wrote: > >> A

Re: [ANN] editscript: a diffing library for Clojure data

2018-05-02 Thread Colin Fleming
This looks very nice, thank you! On 1 May 2018 at 06:52, wrote: > Hello, > > I am happy to make available a diffing/patching library for Clojure data > structures. > > https://github.com/juji-io/editscript > > Two flavors of diffing algorithms are provided, with very different > performance char

Re: [ANN] CRNTL: An ANSI C reader for Clojure/EDN content

2018-06-30 Thread Colin Fleming
That's really taking Friday afternoon commits to the next level! On 30 June 2018 at 21:42, Edwin Watkeys wrote: > Hey all, > > Have you ever wanted to read Clojure or EDN without using Clojure(Script)? > If so, feel free to check out CRNTL (C Reader for the Next Thousand Lisps) > at: > > https:/

Re: Unqualified symbol resolution during evaluation

2018-08-20 Thread Colin Fleming
Note that the doc on that page says: Note that class names normally denote class objects, but are treated > specially in certain special forms, e.g. . and new. > Basically, only a class makes sense as the first argument to new, and I suspect new doesn't use the standard symbol resolution. On Mon

Re: [ANN] Clojure 1.10.0-beta1

2018-10-09 Thread Colin Fleming
> > I’m not sure a guide is needed for tap - the functions are pretty simple? > Personally, I understand the mechanics, but I have no idea how they're intended to be used. I'd love to see some examples of what they're designed to do. On Sat, 6 Oct 2018 at 12:17, Alex Miller wrote: > > > On Oct

Re: Prototype code for enhanced CIDER code completion for Java methods

2018-10-17 Thread Colin Fleming
Cursive already allows this with no syntax changes, but it does require reproducing Clojure's type inference in the editor. Cursive performs this type inference, so (modulo bugs) it knows the types of basically everything that the Clojure compiler does (and in fact in some situations can do better,

Re: Prototype code for enhanced CIDER code completion for Java methods

2018-10-20 Thread Colin Fleming
/ slightly differences from > "idiomatic" seems so important to avoid. I think something as simple as > (String:charAt obj 0) notation would be pretty simple for a third syntax > (since we already have two built in ways of doing it) -- and closer to the > static method invoca

Re: Inside Clojure Journal

2019-03-02 Thread Colin Fleming
I for one would appreciate it if you fixed it rather than removing it :-) On Wed, 30 Jan 2019 at 20:07, Alex Miller wrote: > That's never actually worked. I keep meaning to remove it. :) > > On Wednesday, January 30, 2019 at 1:41:16 PM UTC-6, puzzler wrote: >> >> +1. >> >> I can't seem to subscr

Re: [ANN] Release 0.32.0 of Counterclockwise

2015-07-30 Thread Colin Fleming
I can't believe it's come to this: https://en.wikipedia.org/wiki/Andrea "Gender Female , except in Italian , Albanian and Romansh

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-03 Thread Colin Fleming
> > For Clojure nothing beats emacs + CIDER > As a clearly biased participant here (I develop Cursive) I'd like to politely disagree with this. Lots of people are switching to Cursive from Emacs, including many that you've heard of. Obviously different strokes for different folks etc, but a lot of

Re: Reality check: EC2 + Ubuntu + Atom (from GitHub) + Clojure?

2015-08-07 Thread Colin Fleming
Note that IntelliJ will actually do Python and Clojure in the same (free, OSS) IDE if you only need the community edition of Python, i.e. you don't need support for frameworks like Django or the web stuff. If you do need the Ultimate edition of IntelliJ, you can get free licences for open source a

Re: Clojure beyond Java 6 ?

2015-08-08 Thread Colin Fleming
El Capitan (the next version of OSX) is going to be the last to support Apple's 1.6 JDK. But that still means that I'm going to be stuck supporting 1.6 until the vast majority of people have moved on from El Capitan - that's a long way off. On 8 August 2015 at 20:52, James Elliott wrote: > That

Re: What does Zach Tellman mean by "factored out for greater inlining joy"

2015-08-11 Thread Colin Fleming
That's a really interesting post, thanks for that. I actually cornered Cliff Click at Curry On because I was interested in knowing how well the JVM inlined var indirection. The short answer is "it's complicated". But if the JVM does inline your method, then the var indirection shouldn't cost you as

Re: What does Zach Tellman mean by "factored out for greater inlining joy"

2015-08-12 Thread Colin Fleming
gt; On Tuesday, August 11, 2015 at 2:01:59 PM UTC-7, Colin Fleming wrote: >> >> That's a really interesting post, thanks for that. I actually cornered >> Cliff Click at Curry On because I was interested in knowing how well the >> JVM inlined var indirection. The short answe

Re: [ANN] New Clojure Book: Clojure Data Structures and Algorithms Cookbook

2015-08-21 Thread Colin Fleming
Hi Rafik, Congratulations, the book looks very interesting - lots of advanced topics there. It's nice to see more diverse books for Clojure, thanks! Cheers, Colin On 20 August 2015 at 13:21, Rafik NACCACHE wrote: > Hi Guys, > > I am proud to let you know that my book dealing about advanced alg

Re: Cursive and gen-class

2015-08-22 Thread Colin Fleming
Hi William, Right, you'll need to tell Cursive to compile that namespace in *Settings->Build, Execution, Deployment->Compiler->Clojure Compiler*. Once you've done that things should work. Cursive doesn't currently pick the set of namespaces to be compiled up from lein - it probably should. Cheers

Re: Cursive and gen-class

2015-08-22 Thread Colin Fleming
t;> >>> I've set it up to compile all. No doubt this will be very helpful as I >>> will no longer need to compile using an external `lein compile`. But run >>> still dies on the call (.getClass x), when x is a gen-class compiled class >>> instance. >

Re: decoding clojure generated class names

2015-08-22 Thread Colin Fleming
Hi Dave, All the various stacktrace-prettifying libraries (clj-stacktrace, Aviso pretty etc) all do this - check their code out for some examples. Cheers, Colin On 23 August 2015 at 01:07, Dave Tenny wrote: > I wanted to write a function like this: > > (defn fn-name-info > "Given a function,

Re: Cursive and gen-class

2015-08-23 Thread Colin Fleming
I totally agree that some people are endlessly amazing. On 23 August 2015 at 03:14, Fluid Dynamics wrote: > On Saturday, August 22, 2015 at 8:42:42 PM UTC-4, William la Forge wrote: >> >> Loving this. I had uninstalled cursive so I could reinstall. But the >> download of the plugin fails and whe

Re: Cursive and gen-class

2015-08-23 Thread Colin Fleming
.lang.ClassLoader.loadClass (ClassLoader.java:358) >>>>> java.lang.Class.getDeclaredMethods0 (Class.java:-2) >>>>> java.lang.Class.privateGetDeclaredMethods (Class.java:2570) >>>>> java.lang.Class.privateGetPublicMethods (Class.ja

Re: Cursive and gen-class

2015-08-25 Thread Colin Fleming
On 25 August 2015 at 18:22, Fluid Dynamics wrote: > I seem to recall criticizing a piece of Clojure-relevant *technology* that > had the rather remarkable property that it could be working, be deleted and > reinstalled (exact same version), and suddenly be *not* working. > Except that's not actu

Re: Using metadata to specify how calls to a macro should be indented

2015-09-15 Thread Colin Fleming
This is an interesting proposal, and I like it in general. Everything in Cursive is based on extensions identified by the head form, like this: (style/register-formatting :clojure.core/def :only-indent) (style/register-formatting :clojure.core/defn- :only-indent) (style/register-formatting resolve

Re: Using metadata to specify how calls to a macro should be indented

2015-09-16 Thread Colin Fleming
Unfortunately as tools developers we can't force our indentation preferences on our users, although I'd be fine with it if you convinced everyone to just use two spaces for everything, even though it's not my preferred formatting. Cursive has supported this for ages (copied from Emacs) but I don't

Re: deprecation warnings?

2015-10-14 Thread Colin Fleming
Sadly Cursive doesn't show this right now - it definitely should, though. Cheers, Colin On 15 October 2015 at 06:55, William la Forge wrote: > *warn-on-deprecated* would be super! :D > > On Wed, Oct 14, 2015 at 1:44 PM, Alex Miller wrote: > >> You might wish to up-vote http://dev.clojure.org/j

Re: [ANN] pex, a powerful PEG parsing library

2015-11-19 Thread Colin Fleming
I'm really impressed by how fast it is out of the box with basically no optimisations. Tatu Saloranta is fanatical about Jackson performance, getting to within 6x on the first attempt is very promising. On 20 November 2015 at 02:43, Ghadi Shayban wrote: > Thanks for taking a look. > > User-level

Re: Reducing the pain of a clojars outage

2016-01-02 Thread Colin Fleming
I'm travelling at the moment so I don't have time to respond to everything right now, but one thing about the Java 6 issue - IntelliJ won't be fully on Java 8 until IntelliJ 16. This means that Java 6 will be around until a) everyone is on whatever comes after El Capitan (the last OSX to support Ap

Re: Clojure beyond Java 6 ?

2016-01-20 Thread Colin Fleming
> > Such project obviously don't care about bug fixes and new features, since > they are stuck with dangerously old legacy JVM versions anyways, which is > both a security risk, a risk of added defects, and prevents usage of newer > Java features. > Sigh. I feel like a broken record here, but I'd

Re: Scala/Clojure/F# - Functional Programming Advocates - New York/Chicago/San Fran

2016-02-01 Thread Colin Fleming
Just this afternoon I was looking at the HN Who's Hiring thread for February. 621 comments there, mostly job postings with the occasional question comment, so perhaps 500-550 actual postings. 15 postings mention Clojure, with 9 being what looks like a

Re: Splitting Read into 2 steps?

2016-02-08 Thread Colin Fleming
Hi Terje, This is how the parsing works in Cursive. I have a classical lexer/parser split because IntelliJ forces me to do that. That said, I like it that way, and I believe it makes things more flexible. I've been able to make a couple of special-case parsers easily on top of the lexer - I'm abou

Re: [ANN] dali SVG library 0.7.0

2016-02-10 Thread Colin Fleming
This looks really lovely, thanks! On 11 February 2016 at 13:51, Stathis Sideris wrote: > ...aaand the link to the repo: https://github.com/stathissideris/dali > > > On Thursday, 11 February 2016 00:49:54 UTC, Stathis Sideris wrote: >> >> Hello all, >> >> dali is a Clojure library for representin

Re: [ANN] Doubling down on Onyx

2016-02-24 Thread Colin Fleming
Hi Michael, Congratulations! That's fantastic - I'm really happy to see more people being able to work full time on tools :) Cheers, Colin On 25 February 2016 at 05:22, Michael Drogalis wrote: > Hi everyone, > > I'm happy to announce that, starting next week, I'll be supporting the Onyx > Plat

Re: [ClojureScript] Re: Clojure Google Summer of Code 2016 - Submit your project ideas!

2016-02-29 Thread Colin Fleming
That's a shame. Was any feedback given? On 1 March 2016 at 10:05, Alex Miller wrote: > Unfortunately, we were informed today that Clojure was not selected as a > 2016 Google Summer of Code organization. :( > > > On Thursday, February 18, 2016 at 3:47:59 PM UTC-6, David Nolen wrote: >> >> Hello,

Re: Including debugging information for Clojure code

2016-03-13 Thread Colin Fleming
I don't have much time right now, but AFAIK Cursive is the only debugger using JDI - CIDER has a source manipulation debugger. I don't generally have to do anything special to debug, although I use an IntelliJ layer on top of JDI. I can try to check if it's doing anything with that flag. You can al

Re: Including debugging information for Clojure code

2016-03-14 Thread Colin Fleming
I had looked at those sources briefly, but now I >> won't spend time on them. >> >> -James >> >> On Monday, March 14, 2016 at 2:26:11 AM UTC-4, Colin Fleming wrote: >>> >>> I don't have much time right now, but AFAIK Cursive is the only debu

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2016-03-19 Thread Colin Fleming
That sounds great Timothy, thanks! On 18 March 2016 at 06:32, Timothy Baldridge wrote: > It uses the same sort of logic that React does. Fn-fx creates a virtual > dom, and then diffs the previous virtual dom against the updated one. From > there you get a list of necessary updates. JavaFX has a

Re: Clojure as first language

2016-03-19 Thread Colin Fleming
Have you come across any *new* programmers who think in terms of bit twiddling? I agree with Mark - this tends to be intuitive once you've learned that that is all there is. This might have been the case long ago when people started programming by learning about how CPUs work, but computers are so

Re: more minimal clojurescript intro/app

2016-03-26 Thread Colin Fleming
In terms of learning a minimum about how ClojureScript itself works, I'd recommend starting from the Quick Start . It uses no external tooling so there's no house of cards effect which can be discouraging for new users. You'll end up with a

Re: Porting Clojure to Native Platforms

2016-04-26 Thread Colin Fleming
This is true of a lot of those benchmarks, especially for functional languages. I haven't looked recently, but back in the day Haskell seemed very fast on the shootout game. However the code that actually runs that fast is very very far from idiomatic. Again, I haven't looked at the Clojure version

Re: Porting Clojure to Native Platforms

2016-04-26 Thread Colin Fleming
Of course, most people using Lua seriously use LuaJit, which is surprisingly fast. However it's very prone to the branching problems you described earlier for complex application code. I believe LuaJit does optimise hashmaps when they're used as arrays etc. LuaJit really shines when used for someth

Re: Porting Clojure to Native Platforms

2016-04-27 Thread Colin Fleming
> > Unit of compilation is the module, not sure how that all plays out with > the Elixir repl, but it's not optimal. From what I can tell, re-deffing a > defn would require re-loading an entire namespace (module)... > Reloading a whole namespace on an evaluation doesn't seem like a show-stoppingly

Re: Porting Clojure to Native Platforms

2016-04-27 Thread Colin Fleming
it. On 27 April 2016 at 23:47, Stig Brautaset wrote: > Colin Fleming writes: > > > Unit of compilation is the module, not sure how that all plays out > with > > the Elixir repl, but it's not optimal. From what I can tell, > re-deffing a > > defn would r

Re: Simple memory usage tuning for clojure

2016-05-03 Thread Colin Fleming
As would I - I've used YourKit a bit but the results can often be pretty impenetrable. Also, knowing how to interpret results specifically for Clojure would be great too. Jonathon, if you're specifically interested in memory, check out Eclipse MAT - it's a great, free tool for analysing heap dumps

Re: CCW stopped working. How do I fix it?

2016-05-04 Thread Colin Fleming
On 5 May 2016 at 00:46, Fluid Dynamics wrote: > Doesn't cursive (or its host) cost money and emacs cost gray hairs? > Cursive is free but not OSS for non-commercial use, and it works fine with the IntelliJ community edition, which is Apache licensed OSS. > Also, nothing you wrote addresses the

Re: [ANN] Clojure 1.9.0-alpha1

2016-05-24 Thread Colin Fleming
I'll also need a spec translator (from s/form or s/describe, I guess - I'm not clear on the difference), and I'm very interesting in seeing any details if someone gets to it before I do. Cheers, Colin On 25 May 2016 at 12:38, Timothy Baldridge wrote: > The output of `spec/form` is helps a bit w

Re: [ANN] lein-fruit, native iOS apps in Clojure.

2014-02-21 Thread Colin Fleming
Note that you can work around the compilation problem by using a version of Clojure patched with http://dev.clojure.org/jira/browse/CLJ-1315. Cursive now uses and ships with such a patched version, and it works great. On 22 February 2014 11:31, Jean Baro wrote: > Wow! Congrats for the amazing j

Re: Proxy vs. glue class

2014-04-04 Thread Colin Fleming
FWIW, in Cursive, which is a big ball of mixed Clojure + Java, I've given up trying to use gen-class and have started using Java shims for everything. I like it a lot more than gen-class, which I always feel like I'm fighting. With the new Java->Clojure API in 1.6 (or the equivalent using RT.var()

Re: InvokeDynamic

2014-04-04 Thread Colin Fleming
My understanding is that invokedynamic was very problematic in Java 7, but is quite a different design and works much better in Java 8. I'd expect it to be much more heavily optimised in Java 8 since it's used by a core Java feature (lambdas). Unfortunately targeting Java 8 only is probably not fea

Re: Proxy vs. glue class

2014-04-05 Thread Colin Fleming
e esoteric things (multiple constructors, non-public class access, non-Clojuresque fields, static methods etc), but simple class extension along the lines of the existing interop support doesn't seem like such a bad idea. On 5 April 2014 20:20, Mikera wrote: > On Saturday, 5 April 2014 08:08:

Re: alternative syntax for Clojure? Haskell?

2014-04-07 Thread Colin Fleming
> > There's MLj http://research.microsoft.com/en-us/um/people/nick/mlj.htm > Unfortunately MLj is almost totally bit-rotted at this stage. I made a valiant attempt to get it going a couple of years back but it would be a lot of work, and once you have it working it doesn't fully support SML. It's

Re: Clojure Office Hours

2014-04-10 Thread Colin Fleming
Hi Leif, This sounds like a very interesting project, please report back and let us know how it went! I'd be very interested to know. Cheers, Colin On 11 April 2014 00:53, Leif wrote: > Hi, everybody. Inspired by the SF Bay Area clojure group, ClojureBridge, > and the great talks on communit

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

2014-04-11 Thread Colin Fleming
> > you can fight it as hard as you like but you will eventually end up using > emacs, clojure-mode, cider, paredit and magit and then wonder how you ever > lived without it, but not without spending at least a month or two cursing > anything to do with emacs :). > As the developer of Cursive, I'd

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

2014-04-11 Thread Colin Fleming
gt; On Fri, Apr 11, 2014 at 2:50 PM, Colin Fleming < > colin.mailingl...@gmail.com> wrote: > >> you can fight it as hard as you like but you will eventually end up using >>> emacs, clojure-mode, cider, paredit and magit and then wonder how you ever >>> lived wit

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

2014-04-11 Thread Colin Fleming
t :). > > It is the classical short term/long term win, and emacs is worth the > investment for us. But it absolutely is an investment. > > Disclaimer - I haven't looked at any of the other editors for months if > not years. > > > On Friday, April 11, 2014 10:20:37 A

Re: Annotations on gen-class :state

2014-04-14 Thread Colin Fleming
gen-class really isn't suitable for doing complicated interop like annotating fields. It's heavily oriented towards a single means of managing state, which is a single field generally containing an atom, which in turn contains your actual state in a map or similar. If you really need multiple field

Re: Annotations on gen-class :state

2014-04-14 Thread Colin Fleming
ke Stuart Sierra's quote (Twitter): "Using Java libraries is > idiomatic Clojure", and this is true for a lot of us using Clojure. > > jbs > > > On Monday, April 14, 2014 1:10:47 AM UTC-7, Colin Fleming wrote: > >> gen-class really isn't suitable for doing

Re: Annotations on gen-class :state

2014-04-14 Thread Colin Fleming
. > > > On Monday, April 14, 2014 7:56:21 PM UTC-5, Colin Fleming wrote: > >> Well, I'm a bit torn on this one. On the one hand, I'd love to have >> something that meets my particular use case (of course!) which I wrote >> about here: https://groups.google.com/d/to

Re: Annotations on gen-class :state

2014-04-15 Thread Colin Fleming
That was what I figured. However Clojure currently makes certain kinds of interop extremely painful, which makes it hard to integrate into existing frameworks. I'm not proposing anything that would encourage concrete derivation in pure Clojure programs, but I think that facilitating that interop is

Re: [Video] Game development in Clojure (with play-clj)

2014-04-15 Thread Colin Fleming
Note that you could use mapv, to perform the map but return a vector (filterv was also added at the same time). On 16 April 2014 11:46, Kris Calabio wrote: > I'm not exactly sure, but I think it's the use of 'conj'. My entities get > out of order if they are not vectors. > > All this might not

Re: Helping newcomers get involved in Clojure projects

2014-04-15 Thread Colin Fleming
That's interesting. I think such a database of common errors would be an extremely useful resource, not only for learning but also for development of linting tools (I think this is more or less what Dynalint does right now) and other tools. For example, I'd love to be able to flag these types of er

Re: Light table

2014-04-16 Thread Colin Fleming
I think LightTable is a good choice for Clojure beginners, certainly it's much more approachable than Emacs. Other options you might consider are Cursive (based on IntelliJ, at http://cursiveclojure.com) or CounterClockwise (based on Eclipse, at https://code.google.com/p/counterclockwise) which are

Re: Light table

2014-04-16 Thread Colin Fleming
better for certain use cases (LightTable for CLJS/web work and Cursive/CCW for mixed Clojure/Java projects). On 17 April 2014 13:12, Mark Engelberg wrote: > On Wed, Apr 16, 2014 at 6:01 PM, Colin Fleming < > colin.mailingl...@gmail.com> wrote: > >> Standard disclaimer: I dev

Re: Light table

2014-04-17 Thread Colin Fleming
BTW I changed the website copy a little for Cursive, since much less bravery is now required than previously. Thanks for the heads up! I'd forgotten that was still there. On 17 April 2014 13:12, Mark Engelberg wrote: > On Wed, Apr 16, 2014 at 6:01 PM, Colin Fleming < >

Re: Which linux distro has intelij ?

2014-04-22 Thread Colin Fleming
The comments here are basically spot on - I'm actually not sure what JetBrains' distro coverage is like, but as far as I know IntelliJ should work on most major distros. I've personally used it on Ubuntu and Suse. It's been a while since I used Java on a linux desktop (I'm on a Mac now too) but whe

Kwargs vs explicit parameter map for APIs?

2014-04-25 Thread Colin Fleming
Hi all, I'm working on an API at the moment, and I'm balancing whether to use inline keyword args which I would destructure in the functions, or whether to just pass an explicit params map as the last parameter. Comparison of the two options in case I'm not explaining myself well: Kwargs: (class/

Re: Kwargs vs explicit parameter map for APIs?

2014-04-26 Thread Colin Fleming
, 2014 at 6:56 PM, Andrey Antukh wrote: > >> Hi! >> >> I have the same doubt! >> >> However, At this time, I prefer use a explicit map instead keywords, >> because for me is much clear that using keywords. >> >> Andrey. >> >> >> 2014-

Re: Kwargs vs explicit parameter map for APIs?

2014-04-26 Thread Colin Fleming
although these defaults don't get > merged into the value of :as - so an explicit (merge) might be better. > > ((fn [a & {:keys [misc] :or {misc :misc-default} :as d}] [d misc]) 1 :opt1 > 'blah :opt2 false) > > Hope that makes sense! > > Glen > > > On

Re: cursive plugin question

2014-04-29 Thread Colin Fleming
Hi Roelof, I saw your message on the Cursive mailing list, I've replied over there. Cheers, Colin On 29 April 2014 23:04, Roelof Wobben wrote: > Hello, > > I installed intelij with the cursive plugin. > Now I wonder if this can be done in some way. > > Suppose I have a file with 3 functions.

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Colin Fleming
After posting this last week I decided to go down the explicit map route, and I'm already really glad I did. Amongst other things, it has allowed me to have two similar calls easily share their common options and merge in the differences. I'm generally a fan of maintaining fairly minimal APIs, I do

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Colin Fleming
But that's only true for the variables which are explicitly destructured in the function definition, which in my experience many are not - they're often later picked out of an ":as args" argument, perhaps dependent on a combination of the parameters which are explicitly destructured. Seesaw never d

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Colin Fleming
And thinking about it (after pressing "send", of course), you'd get the same benefit from destructuring an explicit map in the function parameter anyway, wouldn't you? On 30 April 2014 22:11, Colin Fleming wrote: > But that's only true for the variables which are

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Colin Fleming
I think it would because in that case you'd just pass your arg map straight through rather than having to reconstruct it. So if you weren't passed :y in g (in Mark's example), g wouldn't pass it on to f. By forcing the reconstruction of the map from explicit args, you're forced to use the value (in

Parameter order for APIs

2014-04-30 Thread Colin Fleming
Hi everyone, After the very interesting keyword argument debate, I have another question about API design. Specifically I'm interested in suggestions about parameter order. The new API guidelines, which have changed very recently to favour maps over keyword args, also changed to include a suggesti

Re: clojure code to java

2014-04-30 Thread Colin Fleming
You could also check https://github.com/galdolber/clojure-objc, which uses a modified Clojure compiler to output Java source instead of bytecode. It's been subsequently modified to work with ObjC, I'm not sure whether that affects its ability to execute the program as Java or not. On 1 May 2014 1

Re: Clojure Course on Coursera

2014-05-01 Thread Colin Fleming
There's this one here: http://mooc.cs.helsinki.fi/clojure, which is run by the University of Helsinki. I haven't done the course but I heard good things about it. On 2 May 2014 11:21, Ivan Schuetz wrote: > What happened with this? I would really love to make a Clojure course in > Coursera... St

NoClassDefFoundError when AOT compiling namespace using protocol

2014-05-03 Thread Colin Fleming
Hi all, I'm having a strange problem when AOT compiling some code I just added. I have a namespace that, amongst other things, returns qualified names of things: (ns plugin.names ...) (defprotocol QualifiedNamed (qualified-name ^String [this])) (extend-protocol QualifiedNamed nil (quali

Re: What to use use for writing GUI's

2014-05-04 Thread Colin Fleming
There's really no "only" way to do anything in Clojure, since you can always drop down to Java interop. So anything that's available to Java is available to Clojure, too. Not all the options have a nice Seesaw-like wrapper over it of course, but they're generally still quite usable. I do a reasonab

Re: NoClassDefFoundError when AOT compiling namespace using protocol

2014-05-05 Thread Colin Fleming
So it turns out this is an ordering problem. I worked around it by first compiling the namespace containing the protocol, and then the namespace using it. I guess there's a bug in the transitive compilation. Cheers, Colin On 3 May 2014 21:52, Colin Fleming wrote: > Hi all, > >

Tag classes required to be imported?

2014-05-07 Thread Colin Fleming
Hi all, I just came across a case with AOT compilation that I haven't seen before. I have the following code: (defn clojurescript? [element] (or (.isKindOf (psi/language element) (ClojurescriptLanguage/getInstance)) (.isKindOf (psi/language element) (CljxLanguage/getInstance psi/lang

Re: Tag classes required to be imported?

2014-05-07 Thread Colin Fleming
Interestingly, this does not occur if the type hint is on the var rather than the arglist. According to the IRC conversation referenced here<https://github.com/jonase/eastwood/issues/37>, this should work fine for non-primitive type hints. On 8 May 2014 16:55, Colin Fleming wrote: &g

Re: Tag classes required to be imported?

2014-05-08 Thread Colin Fleming
e >> tools.analyzer library, and there was an ensuing discussion on the >> clojure-dev email list linked in the comments of this ticket: >> >> http://dev.clojure.org/jira/browse/TANAL-24 >> >> I do not recall whether there was a Clojure ticket filed for it or n

Re: Licensing program written in Clojure under GPL

2014-05-10 Thread Colin Fleming
I've often wondered about this. This restriction seems to mean that any GPL Clojure library can only ever be for private use. There are a few examples out there, and this would seem to apply to LightTable as well, since it's GPL but uses a lot of EPL code. How do they get around this? With straigh

Re: Java API is copyright protected?

2014-05-10 Thread Colin Fleming
At the risk of getting slightly off-topic here, here's a comment on Hacker News from a well-respected commenter on legal issues - he's a lawyer specialising in startup and technology law and his analysis is uniformly excellent. He argues that while the result may be unpalatable, it's by no means th

Re: Licensing program written in Clojure under GPL

2014-05-12 Thread Colin Fleming
If you're releasing source, then I think Jozef is correct that you can use whichever licence you like. However if those sources rely on library G to work, then you're essentially releasing something that's impossible for your users to use according to the terms of the licences. From the EPL FAQ lin

Re: [ANN] Automat: better FSMs through combinators

2014-05-13 Thread Colin Fleming
I'm also very excited about Automat, although I haven't had time to look at it closely yet. Ragel is one of my favourite pieces of software. Here's an article from Zed Shaw about using state charts for networked apps: http://www.zedshaw.com/essays/ragel_state_charts.html. I read an article (or an i

Re: Idiomatic clojure on building a sequence

2014-05-21 Thread Colin Fleming
Another option that I've been using a bit recently is: (->> [(if some-condition? some-thing) (if some-other-condition? some-other-thing) ...] (filterv (complement nil?))) Which when the list of expressions is long (more than 3-4 or so) is the most readable alternative I've come u

Re: Top-down code in namspaces

2014-06-03 Thread Colin Fleming
> > (load "foo") is legal Clojure; if a tool can't handle it, that's either a > bug or a deliberate limitation in the tool. This is not true. Cursive, for example, indexes Clojure projects in order to perform its magic. In IntelliJ, index data for a file is only allowed to depend on the contents

Re: Top-down code in namspaces

2014-06-04 Thread Colin Fleming
I actually have an open issue for Cursive to do this automatically: #200 . I'm starting to think a namespace sorter that automatically manages the declares might not be such a crazy idea. On 5 June 2014 03:37, Reid McKenzie wrote: > Clearly

Re: importing a single function in ns

2014-06-07 Thread Colin Fleming
One small thing - you need a vector around the whole ns piece: (ns foo (:use [com.foo.bar :only [baz quxx]])) But yes, this is fully supported. The recommended way of doing this since 1.4 is to use :require/:refer instead, but the effect is the same: (ns foo (:require [com.foo.bar :refer [ba

Re: two pass compilation, intern and def

2013-09-19 Thread Colin Fleming
This is interesting - are there any other cases where forms are treated specially at top-level? On 20 September 2013 10:01, Gary Verhaegen wrote: > As Meikel said in his previous mail, 'do' at the top-level is treated > specially: each form is treated as a separate top-level form. This is, for

<    1   2   3   4   >