Fork me on GitHub
Drew Verlee00:06:07

@grzm i tried the code and got the same result. So no help there


@drewverlee Thanks for following up. I came across (boot (aot :namespace '#{ex.Example})) and that worked for me.

Drew Verlee00:06:39

In Rich talks about “Informational vs implementational” > Invariably, people will try to use a specification system to detail implementation decisions, but they do so to their detriment. The best and most useful specs (and interfaces) are related to purely information aspects. Only information specs work over wires and across systems. We will always prioritize, and where there is a conflict, prefer, the information approach. This seems like a subtle difference to me. If you specification tells you that a height can’t be negative that seems purely informational. But what if a spec told that an area had to be the height * width? Would that be implementational? And if so, how is that better/worse then telling someone the height can’t be negative? Especially when implmementing the function body of a spec i’m having trouble understanding the subtle points. I’m going through the offical docs again to understand at a deeper level what the trade offs are.


but there are many objects where the area is not height * width

Drew Verlee00:06:02

@noisesmith if were limited to universally true statements, would that put us on the same table as proofs/types?


sorry, that point isn't even relevant to what your asking

Drew Verlee00:06:11

are you suggesting that a speced keyword should be universally true though? Like if you spec ::area then it should be true for all values of what would be considered area? Wouldn’t that limit us to just mathematical functions? Like if i want to create a spec for the idea of ::name, that would meet anyones definition of what could be in a name it would just be the same as Str. Maybe what i’m missing is some Good Idea Bad Idea Implementations of Spec


yeah, that's why I apologized, the point wasn't coherent, and furthermore wasn't relevant to this issue

Drew Verlee01:06:56

@noisesmith lol. I thought you were saying my point wasn’t relevant. 🙂 I think: > if were limited to universally true statements, would that put us on the same table as proofs/types? Isn’t really true, or if it is, i don’t understand it. Which makes what i said more philosophical then,, err informed? There is a lot of material on spec i haven’t read through, ill climb through it and then come back with a bit more familiarity.

Alex Miller (Clojure team)01:06:28

@drewverlee I think you’re missing that ::area is just shorthand for :my.namespace/area and you control “my.namespace” - we can have lots of definitions of area as long as you adequately put it in a context you control/understand.

Drew Verlee01:06:33

@alexmiller thanks, that makes sense. What sparked my investigation was I was specing a greatest common divisor FN and I found myself writing the function definition in the spec :fn. I found that I had no good conceptually framework for what a spec should contain. So I'm revisiting the material and paying more attention to the why rather then the how

Alex Miller (Clojure team)01:06:43

yeah, the :fn spec is the tricky one

Alex Miller (Clojure team)01:06:39

they are good for any case where you can check a relationship between the args and the ret, in a way that doesn’t repeat the meat of the function itself (in which case the ret spec is already verifying that)

Alex Miller (Clojure team)01:06:11

yeah, maybe I’ll have time to answer that tomorrow :)

Alex Miller (Clojure team)01:06:35

or troll Rich into answering it :)


@drewverlee Seems to me that the Reddit OP is missing the point of Rich’s talk…


It wasn’t that Spec can somehow solve the dependency issue, it’s that the higher-level principle of named things being open for extension and using different names for things that are not “compatible” could be applied to artifacts (and therefore address the dependency issue). At least, that was my takeaway from Spec-ulation.


question: how do you get the output of a println in the console, even when the next line of code triggers an exception? I think that some programs frequently (or always?) abort without flushing...


(I am running in leiningen)


it seems quite idiotic debugging some exceptions in the dark like that 😕


@matan I didn't have problem getting output from the following code in my nREPL session:

(defn foo []
  (println "Hello")
  (throw (Exception.)))

mind sharing your code?


@drewverlee I always thought the Spec-ulation talk has nothing to do with clojure.spec speaking of deps and artifacts.... I used to think the artifact ID and my clojure namespaces were related (like my artifact ID had to be a prefix of my namespaces)... silly me.


hi all, Is there any tutorial or help about how to secure an API (Rest webservice) with a Certificate


I am trying to look for it; but I cannot find usable information


I'm looking to try setup atom + protorepl (again) and was wondering what the general consensus is on best approach. Is this link's description ( what most people do? Are there alternative setup steps? I'm coming from a Windows background with no previous emacs or vim experience, predominantly working with ST3 for the past couple years, so looking for the smoothest / most intuitive setup considering my background. I would like to be able to evaluate code inline with protorepl from within atom.


Yeah Jason’s description is what I used, it’s pretty straightforward.


@yogidevbear The only caveat I’d give is to disable the three “refresh” options in ProtoREPL’s settings. Jason’s recommended settings tend to cause confusion to beginners who aren’t doing absolutely everything with Component from the ground up.


But overall I highly recommend Atom/ProtoREPL. I switched completely from Emacs after the last Clojure/conj — after two solid years of daily Emacs usage (and I’d used Emacs extensively about 20 years before that). I’ve been very happy with ProtoREPL for daily usage on a large codebase.


p.s. there’s also a #protorepl channel if you get stuck.


Thanks for all the feedback 🙂


Oh there’s refresh options? Having the repl NOT refresh automatically weirded me out a lot


Hi all. Pretty new to Clojure, and on my first non-web project in it. For various reasons, I have to make a desktop GUI. My options seem to be Seesaw and fn-fx. I like fn-fx better from the look of it, but tests are failing and last commit was 3 months ago. What do you use for desktop GUIs in Clojure?


Found , which looks promisingly informative


So I've had no luck with fn-fx so far. Tried using javafx directly, per the gist below, and it worked. Not pretty, but working.


@billbarnhill: have you looked at Electron? And, for instance, Reagent?


We’re using Electron for a desktop app written in javascript and so far it’s been pretty smooth sailing.