Fork me on GitHub
#clojure-dev
<
2019-03-04
>
alexmiller14:03:08

if you're interested in modifying http://clojure.org pages, there is now a link in bottom right corner of the footer directly to the github page

bronsa14:03:22

seems to be on most pages but the homepage?

bronsa14:03:41

oh I guess the homepage isn't in github

alexmiller14:03:13

well it is, but not in a public repo :)

danielneal16:03:59

clojure homepage gradually starts becoming more and more like lings cars

rodsenra16:03:01

Hi, I wanted to contribute a tiny improvement to the documentation of reify, by reusing a definition from Hallowway/Bedra's book. The docstring was in clojure src (not clojuredocs), since I was unable to upload a PR, here is the git patch

From 518653f6f947b6241d608db94f9a0b9251a2a9b6 Mon Sep 17 00:00:00 2001
From: Rodrigo Senra <[email protected]>
Date: Mon, 4 Mar 2019 11:23:42 -0500
Subject: [PATCH] Reify docs update

---
 src/clj/clojure/core_deftype.clj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/clj/clojure/core_deftype.clj b/src/clj/clojure/core_deftype.clj
index 786f0d4b..c84a81fa 100644
--- a/src/clj/clojure/core_deftype.clj
+++ b/src/clj/clojure/core_deftype.clj
@@ -68,7 +68,9 @@
     [interfaces methods opts]))

 (defmacro reify
-  "reify is a macro with the following structure:
+  "reify is a macro that lets you create an anonymous instance of a datatype that implements either a protocol or an interface.
+
+   It has the following structure:

  (reify options* specs*)

--
2.20.1
Please let me know how to best contribute with documentation in the future.

borkdude16:03:22

@rodsenra This is a pretty elaborate description of the clojure dev flow: https://clojure.org/community/workflow

1
alexmiller16:03:17

Hi @rodsenra, please file an enhancement issue at https://dev.clojure.org/jira/browse/CLJ. If you wish to supply a patch, you will need to sign the Clojure Contributor Agreement. FYI, the Adobe docusign site seems to be exhibiting a CORS issue causing a flaky experience right now - we are working to resolve that but not sure when it will be fixed. It would be sufficient just to file the ticket though and no CA is required for that.

1
rodsenra17:03:36

Thank you @alexmiller. I was able to sign the agreement (in spite of the problem), and also have created the JIRA issue with the patch attached.https://dev.clojure.org/jira/browse/CLJ-2488

rodsenra21:03:15

Sorry for the newbie question, but would make sense to change a bit the order in which the ns macro populates the new namespace in:

`(do
       (clojure.core/in-ns '~name)
       [email protected](when name-metadata
           `((.resetMeta (clojure.lang.Namespace/find '~name) ~name-metadata)))
       (with-loading-context
        [email protected](when gen-class-call (list gen-class-call))
        [email protected](when (and (not= name 'clojure.core) (not-any? #(= :refer-clojure (first %)) references))
            `((clojure.core/refer '~'clojure.core)))
        [email protected](map process-reference references))
Doing clojure.core/refer earlier (maybe right after in-ns) would allow to keep the REPL minimally instrumented even if other things fails while processing stuff from the ns being loaded? Fro a running program the order maybe does not matter, but for REPL sessions would that allow a more fault-tolerant scenario if people (like me) make silly mistakes on the definition of the newly created ns. :thinking_face: Or, maybe there is a very good reason to keep the current order?

alexmiller21:03:22

there are some tickets related to loading failures and it's an area we're planning to look at

👍 1
alexmiller21:03:21

it would take me some time to properly consider the ordering impacts here

dominicm21:03:02

@alexmiller I'm keen to watch those tickets, do you know how I can easily find them?