[ANN] defn-spec, define your specs inline with your function

2019-03-31 Thread Daniel Compton
Hi folks

I've released 0.1.0 of defn-spec
, a library that lets you
define your function specs inline with your function definitions.

A quick example, defn-spec lets you write:

(ds/defn to-zoned-dt :- ::zoned-date-time
  [instant :- ::instant
   zone-id :- ::zone-id]
  (ZonedDateTime/ofInstant instant zone-id))

instead of:

(defn to-zoned-dt
  [instant zone-id]
  (ZonedDateTime/ofInstant instant zone-id))

(s/fdef to-zoned-dt
:args (s/cat :instant ::instant :zone-id ::zone-id)
:ret ::zoned-date-time)

If you're thinking "that looks a lot like Schema's defn macro", then you'd
be right. defn-spec uses the same syntax and much of the implementation of
Schema's defn macro.

I wrote more background in the announcement post
, and there are
more details on GitHub . I hope
you find it useful!

Thanks, Daniel.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Rakhim Davletkaliyev
Hi Alex,

With this beta + ClojureScript (v. 1.10.238), when trying to "refer all", 
like so:

(:require trybeta.something :refer :all)

I get the following error:

clojure.lang.ExceptionInfo: Only [lib.ns & options] and lib.ns specs 
supported in :require / :require-macros; offending spec: :refer at line 1 
 {:file "", :line 1, :column 1, :root-source-info 
{:source-type :fragment, :source-form (ns trybeta.core (:require 
trybeta.something :refer :all))}, :tag :cljs/analysis-error}

This is much better than "Don't know how to create ISeq from: 
clojure.lang.Keyword" error present in previous versions!

While I completely agree that "require all" is bad style and should not be 
used, I think the error message could be a bit more specific still, 
considering "refer all" is quite widespread in tutorials/examples, and 
beginners like myself tend to try to use it when transitioning from Clojure 
to ClojureScript.

Maybe, isolate and display the offending part?

I apologize if this suggestion is irrelevant, as I am out of my depth when 
it comes to core Clojure and spec.

Thank you!

On Friday, 22 March 2019 06:35:32 UTC+2, Alex Miller wrote:
>
> 1.10.1-beta1 is now available. You can try it with clj using:
>   clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version 
> "1.10.1-beta1"}}}'
>
> 1.10.1-beta1 includes the following changes since 1.10.0:
>
>- CLJ-2484  - Fix Java 
>performance regression loading user.clj
>- CLJ-2463  - 
>clojure.main uncaught exception handling
>- CLJ-2491  - Fix 
>fragile tests that fail under Java 12
>
> The issue in CLJ-2484 was introduced in Java itself, specifically Java 1.8 
> u202, Java 11.0.2, and Java 12. It primarily affects loading of user.clj 
> and can cause a significant load time difference for anything done in 
> user.clj. CLJ-2463 affects how errors are reported from clojure.main. This 
> includes many Clojure uses under tools like Leiningen, such as compile, 
> test,  etc.  
>
> We would greatly appreciate feedback if you could check out this release 
> in your own project and give it a try!! 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Orestis Markou
I think the issue you are seeing is because you need to wrap the require form 
in a vector:

(:require [trybeta.foo :refer :all])

Thanks,
Orestis

31 Μαρ 2019, 4:19 μμ, ο χρήστης «Rakhim Davletkaliyev » 
έγραψε:

> Hi Alex,
> 
> With this beta + ClojureScript (v. 1.10.238), when trying to "refer all", 
> like so:
> 
> (:require trybeta.something :refer :all)
> 
> I get the following error:
> 
> clojure.lang.ExceptionInfo: Only [lib.ns & options] and lib.ns specs 
> supported in :require / :require-macros; offending spec: :refer at line 1 
>  {:file "", :line 1, :column 1, :root-source-info 
> {:source-type :fragment, :source-form (ns trybeta.core (:require 
> trybeta.something :refer :all))}, :tag :cljs/analysis-error}
> 
> This is much better than "Don't know how to create ISeq from: 
> clojure.lang.Keyword" error present in previous versions!
> 
> While I completely agree that "require all" is bad style and should not be 
> used, I think the error message could be a bit more specific still, 
> considering "refer all" is quite widespread in tutorials/examples, and 
> beginners like myself tend to try to use it when transitioning from Clojure 
> to ClojureScript.
> 
> Maybe, isolate and display the offending part?
> 
> I apologize if this suggestion is irrelevant, as I am out of my depth when it 
> comes to core Clojure and spec.
> 
> Thank you!
> 
>> On Friday, 22 March 2019 06:35:32 UTC+2, Alex Miller wrote:
>> 1.10.1-beta1 is now available. You can try it with clj using:
>> 
>>   clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version 
>> "1.10.1-beta1"}}}'
>> 
>> 
>> 1.10.1-beta1 includes the following changes since 1.10.0:
>> 
>> CLJ-2484 - Fix Java performance regression loading user.clj
>> CLJ-2463 - clojure.main uncaught exception handling
>> CLJ-2491 - Fix fragile tests that fail under Java 12
>> The issue in CLJ-2484 was introduced in Java itself, specifically Java 1.8 
>> u202, Java 11.0.2, and Java 12. It primarily affects loading of user.clj and 
>> can cause a significant load time difference for anything done in user.clj. 
>> CLJ-2463 affects how errors are reported from clojure.main. This includes 
>> many Clojure uses under tools like Leiningen, such as compile, test,  etc.  
>> 
>> We would greatly appreciate feedback if you could check out this release in 
>> your own project and give it a try!! 
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Rakhim Davletkaliyev
D'oh! Sorry, I messed up. With the correct vector present I'm getting this 
then:

Don't know how to create ISeq from: clojure.lang.Keyword

Seems like you can optionally enable spec so that you'd get:

:all - failed: coll?

which is better, at least pointing in the general direction of the problem.

On Sunday, 31 March 2019 18:50:52 UTC+3, Orestis Markou wrote:
>
> I think the issue you are seeing is because you need to wrap the require 
> form in a vector:
>
> (:require [trybeta.foo :refer :all])
>
> Thanks,
> Orestis
>
> 31 Μαρ 2019, 4:19 μμ, ο χρήστης «Rakhim Davletkaliyev  >» έγραψε:
>
> Hi Alex,
>
> With this beta + ClojureScript (v. 1.10.238), when trying to "refer all", 
> like so:
>
> (:require trybeta.something :refer :all)
>
> I get the following error:
>
> clojure.lang.ExceptionInfo: Only [lib.ns & options] and lib.ns specs 
> supported in :require / :require-macros; offending spec: :refer at line 1 
>  {:file "", :line 1, :column 1, :root-source-info 
> {:source-type :fragment, :source-form (ns trybeta.core (:require 
> trybeta.something :refer :all))}, :tag :cljs/analysis-error}
>
> This is much better than "Don't know how to create ISeq from: 
> clojure.lang.Keyword" error present in previous versions!
>
> While I completely agree that "require all" is bad style and should not be 
> used, I think the error message could be a bit more specific still, 
> considering "refer all" is quite widespread in tutorials/examples, and 
> beginners like myself tend to try to use it when transitioning from Clojure 
> to ClojureScript.
>
> Maybe, isolate and display the offending part?
>
> I apologize if this suggestion is irrelevant, as I am out of my depth when 
> it comes to core Clojure and spec.
>
> Thank you!
>
> On Friday, 22 March 2019 06:35:32 UTC+2, Alex Miller wrote:
>>
>> 1.10.1-beta1 is now available. You can try it with clj using:
>>   clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version 
>> "1.10.1-beta1"}}}'
>>
>> 1.10.1-beta1 includes the following changes since 1.10.0:
>>
>>- CLJ-2484  - Fix Java 
>>performance regression loading user.clj
>>- CLJ-2463  - 
>>clojure.main uncaught exception handling
>>- CLJ-2491  - Fix 
>>fragile tests that fail under Java 12
>>
>> The issue in CLJ-2484 was introduced in Java itself, specifically Java 
>> 1.8 u202, Java 11.0.2, and Java 12. It primarily affects loading of 
>> user.clj and can cause a significant load time difference for anything done 
>> in user.clj. CLJ-2463 affects how errors are reported from clojure.main. 
>> This includes many Clojure uses under tools like Leiningen, such as 
>> compile, test,  etc.  
>>
>> We would greatly appreciate feedback if you could check out this release 
>> in your own project and give it a try!! 
>>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com 
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clo...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clo...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Ben Brinckerhoff
I see that this handler uses `ex-str`, which is nice because `ex-str` in 
turn calls `*explain-out*` which is user-configurable. 

Is there a recommended way to configure `s/*explain-out*` such that this 
configuration will be run before other namespaces are loaded?

For instance, this code would set up Expound, but right now I'm not sure 
how to reliably run it before other namespaces load:

(require '[expound.alpha :as expound] '[clojure.spec.alpha :as s])
(alter-var-root #'s/*explain-out* (constantly (expound/custom-printer 
{:print-specs? false :show-valid-values? true :theme :figwheel-theme})))

Thanks,
Ben

On Thursday, March 21, 2019 at 10:35:32 PM UTC-6, Alex Miller wrote:
>
> 1.10.1-beta1 is now available. You can try it with clj using:
>   clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version 
> "1.10.1-beta1"}}}'
>
> 1.10.1-beta1 includes the following changes since 1.10.0:
>
>- CLJ-2484  - Fix Java 
>performance regression loading user.clj
>- CLJ-2463  - 
>clojure.main uncaught exception handling
>- CLJ-2491  - Fix 
>fragile tests that fail under Java 12
>
> The issue in CLJ-2484 was introduced in Java itself, specifically Java 1.8 
> u202, Java 11.0.2, and Java 12. It primarily affects loading of user.clj 
> and can cause a significant load time difference for anything done in 
> user.clj. CLJ-2463 affects how errors are reported from clojure.main. This 
> includes many Clojure uses under tools like Leiningen, such as compile, 
> test,  etc.  
>
> We would greatly appreciate feedback if you could check out this release 
> in your own project and give it a try!! 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] Clojure 1.10.1-beta1

2019-03-31 Thread Alex Miller
You could put it in user.clj, but it would be reasonable to have a ticket 
for this.

On Sunday, March 31, 2019 at 8:58:30 PM UTC-5, Ben Brinckerhoff wrote:
>
> I see that this handler uses `ex-str`, which is nice because `ex-str` in 
> turn calls `*explain-out*` which is user-configurable. 
>
> Is there a recommended way to configure `s/*explain-out*` such that this 
> configuration will be run before other namespaces are loaded?
>
> For instance, this code would set up Expound, but right now I'm not sure 
> how to reliably run it before other namespaces load:
>
> (require '[expound.alpha :as expound] '[clojure.spec.alpha :as s])
> (alter-var-root #'s/*explain-out* (constantly (expound/custom-printer 
> {:print-specs? false :show-valid-values? true :theme :figwheel-theme})))
>
> Thanks,
> Ben
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Call for Contributions: Summer BOB 2019 [Aug 21, Berlin, deadline May 17]

2019-03-31 Thread Michael Sperber
Clojure contributions are very welcome at BOB!

  Summer BOB Conference 2019
 "What happens when we use what's best for a change?"
http://bobkonf.de/2019-summer/cfc.html
  Berlin, August 21
  co-located with ICFP 2019
Call for Contributions
Deadline: May 17, 2019


You are engaged in software development or software architecture, and
have an interesting story to tell about an advanced tools, technique,
language or technology that you're using? Or a gnarly problems that
these tools fail to address but should?

Summer BOB is a one-time-only event, in the spirit of the spectacular
Winter BOB. The International Conference on Functional Programming is
coming to town, and Summer BOB will be right in the middle of it, on
the last day of ICFP proper, prior to all the workshops. Summer BOB
will feature two tracks: one from practitioners, and one from
researchers, and foster communication and cross-pollination between
these communities.

If you share our vision and want to contribute,
submit a proposal for a talk!

NOTE: The conference fee will be waived for presenters. Travel
expenses will not be covered (for exceptions see "Speaker Grants").

Topics
--

We are looking for talks about best-of-breed software technology, e.g.:

- functional programming
- persistent data structures and databases
- types
- formal methods for correctness and robustness
- abstractions for concurrency and parallelism
- metaprogramming
- probabilistic programming
- math and programming
- controlled side effects
- beyond REST and SOAP
- effective abstractions for data analytics
- … everything really that isn’t mainstream, but you think should be.

Presenters should provide the audience with information that is
practically useful for software developers.

We're especially interested in experience reports.  Other topics are
also relevant, e.g.:

- demos and how-tos
- reports on problems that cutting-edge languages and tools should address 
but don't
- overviews of a given field

Requirements


We accept proposals for presentations of 45 minutes (40 minutes talk +
5 minutes questions), as well as 90 minute tutorials for
beginners. The language of presentation should be either English.

Your proposal should include (in your presentation language of choice):

- An abstract of max. 1500 characters.
- A short bio/cv
- Contact information (including at least email address)
- A list of 3-5 concrete ideas of how your work can be applied in a 
developer's daily life
- additional material (websites, blogs, slides, videos of past 
presentations, …)
- Don't be confused: The system calls a submission event.

Submit here
---

https://bobcfc.active-group.de/bob2019-summer/cfp

Speaker Grants
--

BOB has Speaker Grants available to support speakers from groups
under-represented in technology. We specifically seek women speakers
and speakers who are not be able to attend the conference for
financial reasons.  Shepherding

The program committee offers shepherding to all speakers. Shepherding
provides speakers assistance with preparing their sessions, as well as
a review of the talk slides. 

Organisation


- Direct questions to contact at bobkonf dot de
- Proposal deadline: May 17, 2019
- Notification: May 31, 2019
- Program: June 14, 2019

Program Committee
-

- Matthias Fischmann, zerobuzz UG
- Matthias Neubauer, SICK AG
- Nicole Rauch, Softwareentwicklung und Entwicklungscoaching
- Michael Sperber, Active Group
- Stefan Wehr, factis research

Scientific Advisory Board

- Annette Bieniusa, TU Kaiserslautern
- Torsten Grust, Uni Tübingen
- Peter Thiemann, Uni Freiburg

More information here: http://bobkonf.de/2019-summer/programmkomitee.html


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


next.jdbc -- early access

2019-03-31 Thread Sean Corfield
OK, I'm finally at a place where I feel comfortable showing an early working 
draft of `next.jdbc` to the world: 
https://github.com/seancorfield/next-jdbc/blob/master/src/next/jdbc.clj -- 
although it is *not* API-compatible with `clojure.java.jdbc`, it is almost at 
feature parity at this point.

Feedback here, or via issues, or via DM is all fine. The code is substantially 
shorter and simpler than `clojure.java.jdbc` and the performance is 
substantially better.

_I have not yet decided whether this will live in Contrib or not, at this point 
so feedback on that is also useful!_

Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: next.jdbc -- early access

2019-03-31 Thread Pankaj Doharey
WoW, good to hear about pure Clojure libs being written, Is contrib still
alive?
On Mon, 1 Apr 2019 at 12:09 PM, Sean Corfield  wrote:

> OK, I'm finally at a place where I feel comfortable showing an early
> working draft of `next.jdbc` to the world:
> https://github.com/seancorfield/next-jdbc/blob/master/src/next/jdbc.clj
> -- although it is *not* API-compatible with `clojure.java.jdbc`, it is
> almost at feature parity at this point.
>
>
>
> Feedback here, or via issues, or via DM is all fine. The code is
> substantially shorter and simpler than `clojure.java.jdbc` and the
> performance is substantially better.
>
>
>
> _I have not yet decided whether this will live in Contrib or not, at this
> point so feedback on that is also useful!_
>
>
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.