Re: [ANN] test.check 0.10.0-RC1

2019-08-12 Thread Gary Fredericks
And now, due to lack of complaints, 0.10.0 proper has been released. No differences from 0.10.0-RC1. Gary Fredericks On Mon, Jul 1, 2019 at 10:42 AM Gary Fredericks wrote: > After Quite A Long Time, test.check (the property-based testing contrib > library) is in a state that I think i

[ANN] test.check 0.10.0-RC1

2019-07-01 Thread Gary Fredericks
a try, if you like trying new things. Gary Fredericks -- 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

Re: Noob question on the --> macro implementation

2019-01-26 Thread Gary Fredericks
There's probably also a difference in what happens if the form is empty. The current impl results in a compile error about calling nil, whereas the suggested implementation would result in calling the current thread value as a function, I think. On Saturday, January 26, 2019 at 5:13:23 PM

Re: (float 0.819869321599107) = 0.81986934 ?

2018-12-15 Thread Gary Fredericks
0.81986932 is not a valid float -- the next smallest one is 0.81986930, so the one you were given is the closest that can be rounded to. Try (Math/nextUp x) and (Math/nextDown x) to see what floats are possible. On Saturday, December 15, 2018 at 4:21:05 PM UTC-6, ru wrote: > > I have to use

Re: Why does interruptible-eval from tools.nrepl queue evaluations?

2018-05-03 Thread Gary Fredericks
I used the hacky tactic of just sending messages through the nrepl channels (while the eval is blocked) to implement this: https://github.com/gfredericks/debug-repl Gary Fredericks (803)-295-0195 fredericksg...@gmail.com gfredericks.com On Thu, May 3, 2018 at 4:31 PM, Carlo Zancanaro

Re: Why does interruptible-eval from tools.nrepl queue evaluations?

2018-05-03 Thread Gary Fredericks
Separately, I use this macro <https://github.com/gfredericks/repl-utils#bg> for running background things in the repl. It probably targets different concerns, but seems related at least. Gary Fredericks (803)-295-0195 fredericksg...@gmail.com gfredericks.com On Thu, May 3, 2018 at 8:01 AM,

Re: Why does interruptible-eval from tools.nrepl queue evaluations?

2018-05-03 Thread Gary Fredericks
But what happens when a user set!s a var? is it effective for all future evals but not the concurrent ones? On Wed, May 2, 2018 at 8:35 PM, Carlo Zancanaro wrote: > > > >I think dynamic vars in particular would be problematic. The repl is > built around being able to

Re: Why does interruptible-eval from tools.nrepl queue evaluations?

2018-05-02 Thread Gary Fredericks
I think dynamic vars in particular would be problematic. The repl is built around being able to set! certain vars, and you can't do that to the same binding from multiple threads. On Wednesday, May 2, 2018 at 5:48:46 AM UTC-5, Carlo Zancanaro wrote: > > Hey there! > > With tools.nrepl, if you

Re: Nesting test.check's defspec tests like deftest/testing

2018-03-29 Thread Gary Fredericks
There's nothing like that in test.check proper, but you might find this useful. On Thursday, March 29, 2018 at 7:36:15 AM UTC-5, Khalid Jebbari wrote: > > Hello everyone, > > Is there a way to nest defspec tests like

Re: [?] Adding my own function to clojure.core namespace

2018-02-25 Thread Gary Fredericks
For clojure (not cljs, yet) I proxy all the dev utilities I might want to use in a namespace called `.` so I can refer to it everywhere no matter what the local namespace setup is: https://github.com/gfredericks/dot-slash-2 On Sunday, February 25, 2018 at 11:45:41 AM UTC-6, Philos Kim wrote: >

Re: How to disable (or limit) test.check shrinking

2017-02-09 Thread Gary Fredericks
Wrapping the generator in `gen/no-shrink` will give you a generator that pretends it doesn't know how to shrink. On Thursday, February 9, 2017 at 11:55:38 AM UTC-6, Matt Bossenbroek wrote: > > I considered that, but that only partially fixes the issue. If it does > actually find a real problem,

Re: Obtaining the call graph of a clojure project

2016-07-27 Thread Gary Fredericks
I have a very hacky bunch of code here that uses tools.analyzer to try to do this. It works okay and I would love for somebody to make it better. On Wednesday, July 27, 2016 at 5:51:03

Re: Thoughts on clojure.spec

2016-07-20 Thread Gary Fredericks
Here's a library you could add that functionality to: https://github.com/gfredericks/schpec Gary On Tuesday, July 19, 2016 at 1:30:27 AM UTC-5, Beau Fabry wrote: > > Right, and I don't think the "this is closed we shouldn't discuss it > anymore" line is great when people are advocating for a

Re: lein repl and own functions

2016-07-15 Thread Gary Fredericks
I use lein-shorthand , which makes arbitrary functions available to me in any project (or no project) and namespace. Gary On Thursday, July 14, 2016 at 8:53:03 AM UTC-5, Cecil Westerhof wrote: > > When I first worked with Clojure I used a Bash

Re: test.check for-all reuses generated values?

2016-06-02 Thread Gary Fredericks
The generator should definitely always generate unique values (though only because gen/uuid does that), though as you say shrinking is different case that would be problematic for what you're doing. When you say "I don't see any other error" have you accounted for the fact that test.check

Re: clojure.spec generation question

2016-05-30 Thread Gary Fredericks
At a glance, this is probably the normal increasing-size behavior of test.check, and the bias should only be present for the first few samples. E.g., if you do a (take 1000 (gen/sample ...)), it should be more uniform. Whether it's a real problem depends on how you're running your tests. I

Re: [Q] default decimal of Clojure is IEEE double, not BigDecimal

2015-12-22 Thread Gary Fredericks
Am I missing something? I realize doubles are generally faster because of hardware implementations , but that seems orthogonal from the question of syntax. I've several times thought idealistically that it could be better to have the syntaxes switched (to reduce the amount of accidental

[ANN] test.check 0.9.0

2015-11-13 Thread Gary Fredericks
I'm happy to announce the release today of version 0.9.0 of test.check, the QuickCheck-inspired property-based testing library. The changes in this release are a new minimum required version of Clojure (1.7) and a handful of new generators. Clojure 1.7 is required now as the test.check

Re: ArithmeticException while using unchecked-multiply

2015-10-26 Thread Gary Fredericks
plicit enough because they use >> little-L 'long', and it doesn't promise any behavior of any kind for >> arguments that are not 'long'. >> >> Feel free to add comments or edit the description if I've left anything >> out, vote on it, etc. >> >> Andy >>

Re: ArithmeticException while using unchecked-multiply

2015-10-25 Thread Gary Fredericks
Maybe even not warn unless that one var where you can get boxed-math-warnings is set appropriately. On Sunday, October 25, 2015 at 2:04:36 PM UTC-5, Fluid Dynamics wrote: > > On Saturday, October 24, 2015 at 8:01:05 PM UTC-4, Gary Fredericks wrote: >> >> I've always thought th

Re: ArithmeticException while using unchecked-multiply

2015-10-25 Thread Gary Fredericks
Half of the time that I use the unchecked functions it's for the math, not the speed, so getting the wrong behavior when I don't care enough about perf to do the work for primitives is pretty annoying. On Sunday, October 25, 2015 at 7:49:47 PM UTC-5, Gary Fredericks wrote: > > Mayb

Re: ArithmeticException while using unchecked-multiply

2015-10-24 Thread Gary Fredericks
I once set out to make a ticket for it, but ended up not probably because it was going to take too much effort to describe or something. I was probably busy. On Saturday, October 24, 2015 at 7:01:05 PM UTC-5, Gary Fredericks wrote: > > I've always thought this is bad behavior, sinc

Re: ArithmeticException while using unchecked-multiply

2015-10-24 Thread Gary Fredericks
I've always thought this is bad behavior, since it's blatantly doing the opposite of what the name advertises. I think either the boxed versions should return the same result as the unboxed version, or (if the whole point is to give good performance and so we don't want want users to be able

Re: Using type hints to optimize protocol invocation

2015-09-08 Thread Gary Fredericks
I'm not an expert on this subject, but two thoughts come to mind: 1. the point of protocols is polymorphism, and if I understand you correctly, the case you're describing is narrowed enough that it is *not* polymorphic -- i.e., if the compiler can statically determine what code to

Re: [ANN] test.check 0.8.0

2015-08-16 Thread Gary Fredericks
, at 13:08, Gary Fredericks frederi...@gmail.com javascript: wrote: I'm happy to announce the release today of version 0.8.0 of test.check https://github.com/clojure/test.check, the QuickCheck-inspired property-based testing library. The release is light on new features, but has a couple

[ANN] test.check 0.8.0

2015-08-15 Thread Gary Fredericks
I'm happy to announce the release today of version 0.8.0 of test.check https://github.com/clojure/test.check, the QuickCheck-inspired property-based testing library. The release is light on new features, but has a couple important changes: - The generators now use an immutable random

Re: Need suggestions on how to write rand-interleave test.check generator.

2015-08-14 Thread Gary Fredericks
Another kind of approach that would be worth trying is adapting test.check's own shuffle generator https://github.com/clojure/test.check/blob/e3256cbaa3a98b1d688475fe190aa97ad255e08b/src/main/clojure/clojure/test/check/generators.clj#L447-465. It generates a sequence of pairs of indexes and

[ANN] new library for portable exact arithmetic

2015-08-12 Thread Gary Fredericks
Hello, I've just released a new library called exact https://github.com/gfredericks/exact for doing cross-platform arithmetic with [big]-integers and ratios. I don't anticipate it getting a whole lot of use, but I thought I would point it out here in case I'm wrong about that. The library

Re: Generating varying sized map using test.check

2015-07-25 Thread Gary Fredericks
It also might be helpful to know that there is already a subset generator available in this library https://github.com/gfredericks/test.chuck#generators. Gary On Saturday, July 25, 2015 at 6:54:59 PM UTC-5, Carlo wrote: Hey Mayank! What you've done here might appear to work, but it will

[ANN] test.check alpha release (with immutable random number generator)

2015-06-08 Thread Gary Fredericks
/test.check 0.8.0-alpha3]. Thanks! Gary Fredericks [1] https://github.com/clojure/test.check [2] https://www.youtube.com/watch?v=u0t-6lUvXHo [3] https://gist.github.com/gfredericks/c9eb5563651626626155 -- You received this message because you are subscribed to the Google Groups Clojure group

Re: eval/macros with functions with metadata

2013-08-28 Thread Gary Fredericks
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/groups/opt_out. -- Gary Fredericks (803)-295-0195 fredericksg

Re: Easiest way to map over leaf nodes of nested sequence

2013-08-28 Thread Gary Fredericks
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/groups/opt_out. -- Gary Fredericks (803)-295-0195 fredericksg...@gmail.com

Re: Easiest way to map over leaf nodes of nested sequence

2013-08-27 Thread Gary Fredericks
Clojure.walk On Aug 27, 2013 10:05 PM, JvJ kfjwhee...@gmail.com wrote: I feel like this question has been asked about a trillion times, but I was having a hard time finding a straight answer. Is there a really straightforward way in the standard library or in one of the contrib libraries to

Type hint puzzler

2013-07-22 Thread Gary Fredericks
Can anybody figure out how I can type hint this adequately? Not only does it result in reflection, but because a Fn is both a Runnable and Callable, it can result in runtime incorrectness: https://gist.github.com/fredericksgary/6058783 -- Gary Fredericks (803)-295-0195 fredericksg...@gmail.com

Re: Remove-first function

2010-07-25 Thread Gary Fredericks
-- Gary Fredericks (660)-623-1095 fredericksg...@gmail.com www.gfredericks.com -- 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