This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-06
Channels
- # aleph (15)
- # beginners (40)
- # boot (14)
- # cider (90)
- # cljs-dev (132)
- # cljsrn (25)
- # clojars (7)
- # clojure (188)
- # clojure-chicago (4)
- # clojure-dusseldorf (1)
- # clojure-greece (9)
- # clojure-italy (43)
- # clojure-russia (16)
- # clojure-sg (7)
- # clojure-spec (39)
- # clojure-uk (81)
- # clojurescript (170)
- # component (5)
- # core-async (7)
- # cursive (49)
- # data-science (65)
- # datascript (3)
- # datomic (27)
- # graphql (3)
- # hoplon (4)
- # instaparse (56)
- # klipse (129)
- # leiningen (1)
- # lumo (28)
- # off-topic (4)
- # om (15)
- # onyx (54)
- # overtone (7)
- # pedestal (7)
- # re-frame (9)
- # reagent (72)
- # ring (33)
- # ring-swagger (2)
- # spacemacs (1)
- # untangled (19)
- # vim (2)
- # yada (12)
@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.
In https://clojure.org/about/spec
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
@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
I guess not.
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
@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.
@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.
@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
yeah, the :fn
spec is the tricky one
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)
Seems well timed for me :) https://www.reddit.com/r/Clojure/comments/6fh4a8/whats_the_vision_of_clojure_spec/
yeah, maybe I’ll have time to answer that tomorrow :)
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...
@matan I didn't have problem getting output from the following code in my nREPL session:
(defn foo []
(println "Hello")
(throw (Exception.)))
(foo)
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'm looking to try setup atom + protorepl (again) and was wondering what the general consensus is on best approach. Is this link's description (https://gist.github.com/jasongilman/d1f70507bed021b48625) 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.
@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 https://github.com/nblumoe/clj-ui-spikes , 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. https://gist.github.com/zilti/6286307
@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.