Ambrose Bonnaire-Sergeant
Ambrose Bonnaire-Sergeant
Unfortunately, Typed Clojure can only infer specs from data (not code), like malli does :) It instruments your code and then runs your tests. It does some fancy things around...
This seems right. For example, encoding a `string->int` function to be `int->string` (psuedocode): ```clojure (encode [:=> [:cat string?] int?] str->int (function-transformer (cat-transformer (int-transformer)) (string-transformer))) => (fn [& args] (encode int?...
In the hope that it would reveal an algorithm, I manually translated some schemas into `gen/recursive-gen` forms that look vaguely the same as the schemas. Here's ping-pong from the readme:...
The solution in #507 is very promising. ```clojure ;; test sizing (into (sorted-map) (frequencies (map (comp count flatten) (mg/sample [:schema {:registry {::cons [:maybe [:tuple pos-int? [:ref ::cons]]]}} ::cons] {:size 100000}))))...
```clojure (dotimes [size-pow 7] (time (prn (str "10^" size-pow) (into (sorted-map) (frequencies (map (comp count flatten) (mg/sample [:schema {:registry {::cons [:maybe [:tuple pos-int? [:ref ::cons]]]}} ::cons] {:size (Math/pow 10 size-pow)})))))))...
This [paper](http://users-cs.au.dk/amoeller/papers/tstools/paper.pdf) might bring some inspiration.
Perhaps use tools.reader's [SourceLoggingPushbackReader](https://github.com/clojure/tools.reader/blob/6918abc8b3c009228790cf091097eb3037858ad6/src/main/clojure/clojure/tools/reader/reader_types.clj#L263) and [read](https://github.com/clojure/tools.reader/blob/6918abc8b3c009228790cf091097eb3037858ad6/src/main/clojure/clojure/tools/reader.clj#L961) instead?
I had some initial trouble, but after restarting the tmux server as suggested by https://github.com/tmux/tmux/issues/2706 and [restoring my previous environment](https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_previously_saved_environment.md), tmux-resurrect seems to save correctly for me on tmux 3.2.
Along similar lines, the `No tests found` situation might also be considered a failure. https://github.com/lambdaisland/kaocha/blob/3d834940d420d6490a2290f809526fff07ef7775/src/kaocha/api.clj#L104-L106 That might also make internal bugs like https://github.com/lambdaisland/kaocha/issues/208 more apparent.
Since `__hash` is mutable and filled in later, `nil` might work better as the 3rd arg. https://github.com/clojure/clojurescript/blob/r1.10.891-1-g64435188/src/main/cljs/cljs/core.cljs#L2388