mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

8.1K
active users

#quickcheck

1 post1 participant0 posts today
Data Science<p>Discover the power of property-based testing in R with the <a href="https://genomic.social/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> package! Seamlessly integrates with <a href="https://genomic.social/tags/testthat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testthat</span></a> and offers a variety of generators for atomic vectors, lists, and tibbles. Perfect for ensuring your code's reliability. Check it out: <a href="https://github.com/armcn/quickcheck" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/armcn/quickcheck</span><span class="invisible"></span></a> <a href="https://genomic.social/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://genomic.social/tags/rprogramming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rprogramming</span></a> <a href="https://genomic.social/tags/testing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testing</span></a></p>
Ramin Honary<a href="https://www.well-typed.com/blog/2023/04/falsify/%20" rel="nofollow noopener" target="_blank">Property-based testing in Haskell with QuickCheck <code>falsify</code></a> <p>A few days ago, Edsko de Vries of <em>Well-Typed</em> published an in-depth article on <strong>property-based software testing,</strong> with a focus on the concept of “shrinking.”</p><p>In brief, property-based testing is sort-of like fuzz testing but for algorithms and protocols. Like fuzz testing, random test cases are procedurally generated, but unlike fuzz testing, the test cases are carefully designed to verify whether a software implementation of an algorithm satisfies a specific property of that algorithm, such as:</p><ul><li>“this function always fails if the index is larger than the array”</li><li>“this function always returns a result in <code>n*log(n)</code> number of iterations for input dataset of size <code>n</code>“</li><li><p>“the sequence of log messages is guaranteed to obey this rules of this particular finite-state automata: (connect | fail) -&gt; (send X | fail) -&gt; (receive Y | receive Z | fail) -&gt; success .”</p></li></ul><p><strong>Shrinking</strong> is the process of simplifying a failed test case. If you have found some input that makes your function return a value when it should have thrown an exception, or produce a result that does not satisfy some predicate, then that input is a “counterexample” to your assertion about the properties of that function. And you may want to be able to “shrink” that counterexample input to see if you can cause the function to behave incorrectly again but with a simpler input. The “<a href="https://hackage.haskell.org/package/QuickCheck%20" rel="nofollow noopener" target="_blank">QuickCheck</a>“ library provides a variety of useful tools to let you define property tests with shrinking.</p><p>Defining unit tests with such incredible rigor takes quite a lot of time and effort, so you would probably do not want to use property-based testing for your ordinary, every-day software engineering. If you are, for example, being scrutinized by the US Department of Government of Efficiency, you would likely be fired if you were to take so much time to write such high-quality software with such a strong guarantee of correctness.</p><p>But if you are, for example, designing a communication protocol that will be used in critical infrastructure for the next 10 or 20 years and you want to make sure the reference implementation of your protocol is without contradictions, or if you are implementing an algorithm where the mathematical properties of the algorithm fall within some proven parameters (e.g. computational complexity), property-based testing can give you a much higher degree of confidence in the correctness of your algorithm or protocol specification.</p><p><a class="hashtag" href="https://fe.disroot.org/tag/tech" rel="nofollow noopener" target="_blank">#tech</a> <a class="hashtag" href="https://fe.disroot.org/tag/software" rel="nofollow noopener" target="_blank">#software</a> <a class="hashtag" href="https://fe.disroot.org/tag/haskell" rel="nofollow noopener" target="_blank">#haskell</a> <a class="hashtag" href="https://fe.disroot.org/tag/welltyped" rel="nofollow noopener" target="_blank">#WellTyped</a> <a class="hashtag" href="https://fe.disroot.org/tag/quickcheck" rel="nofollow noopener" target="_blank">#QuickCheck</a> <a class="hashtag" href="https://fe.disroot.org/tag/unittesting" rel="nofollow noopener" target="_blank">#UnitTesting</a> <a class="hashtag" href="https://fe.disroot.org/tag/propertytesting" rel="nofollow noopener" target="_blank">#PropertyTesting</a></p>
UK<p><a href="https://www.europesays.com/uk/21913/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">europesays.com/uk/21913/</span><span class="invisible"></span></a> QuickCheck: Is there a town that uses mirrors to help combat seasonal depression? <a href="https://pubeurope.com/tags/Health" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Health</span></a> <a href="https://pubeurope.com/tags/MentalHealth" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>MentalHealth</span></a> <a href="https://pubeurope.com/tags/Mirrors" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Mirrors</span></a> <a href="https://pubeurope.com/tags/Norway" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Norway</span></a> <a href="https://pubeurope.com/tags/QuickCheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>QuickCheck</span></a> <a href="https://pubeurope.com/tags/Rjukan" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rjukan</span></a> <a href="https://pubeurope.com/tags/SeasonalDepression" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>SeasonalDepression</span></a> <a href="https://pubeurope.com/tags/StarVerified" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>StarVerified</span></a> <a href="https://pubeurope.com/tags/TrueOrNot" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TrueOrNot</span></a> <a href="https://pubeurope.com/tags/UK" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UK</span></a> <a href="https://pubeurope.com/tags/UnitedKingdom" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>UnitedKingdom</span></a> <a href="https://pubeurope.com/tags/WinterSunlight" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WinterSunlight</span></a></p>
Data Science<p>Discover the power of property-based testing in R with the <a href="https://genomic.social/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> package! Seamlessly integrates with <a href="https://genomic.social/tags/testthat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testthat</span></a> and offers a variety of generators for atomic vectors, lists, and tibbles. Perfect for ensuring your code's reliability. Check it out: <a href="https://github.com/armcn/quickcheck" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/armcn/quickcheck</span><span class="invisible"></span></a> <a href="https://genomic.social/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://genomic.social/tags/rprogramming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rprogramming</span></a> <a href="https://genomic.social/tags/testing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testing</span></a></p>
Habr<p>[Перевод] Исследуем монады в Rust через тестирование на основе свойств</p><p>В педагогике программирования монады занимают место мистического объекта из мира функционального программирования, который трудно понять и еще труднее объяснить. Стереотип о сложности объяснения монад заключается в том, что они делятся на две категории: либо сравнение с каким-то продуктом питания , либо написание сложного математического жаргона, в чем проблема?</p><p><a href="https://habr.com/ru/articles/887234/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">habr.com/ru/articles/887234/</span><span class="invisible"></span></a></p><p><a href="https://zhub.link/tags/Rust" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Rust</span></a> <a href="https://zhub.link/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> <a href="https://zhub.link/tags/monad" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>monad</span></a> <a href="https://zhub.link/tags/propertybasedtesting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>propertybasedtesting</span></a></p>
Jan Midtgaard<p>Over the past couple of days, I've been scratching a 3-year old QCheck(2) itch<br><a href="https://github.com/c-cube/qcheck/pull/319" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/c-cube/qcheck/pull/</span><span class="invisible">319</span></a><br>It's nice to finally make progress on it! 😃 <br><a href="https://types.pl/tags/ocaml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ocaml</span></a> <a href="https://types.pl/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> <a href="https://types.pl/tags/pbt" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pbt</span></a> <a href="https://types.pl/tags/fp" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>fp</span></a></p>
Data Science<p>Discover the power of property-based testing in R with the <a href="https://genomic.social/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> package! Seamlessly integrates with <a href="https://genomic.social/tags/testthat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testthat</span></a> and offers a variety of generators for atomic vectors, lists, and tibbles. Perfect for ensuring your code's reliability. Check it out: <a href="https://github.com/armcn/quickcheck" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/armcn/quickcheck</span><span class="invisible"></span></a> <a href="https://genomic.social/tags/rstats" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rstats</span></a> <a href="https://genomic.social/tags/rprogramming" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>rprogramming</span></a> <a href="https://genomic.social/tags/testing" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>testing</span></a></p>
Jan Midtgaard<p>I'll visit Paris this week to give a talk about our efforts to drill OCaml 5 with property-based tests: <a href="https://sites.google.com/view/gdr-gpl-mtv2/manifestations-mtv2/21-11-2024" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">sites.google.com/view/gdr-gpl-</span><span class="invisible">mtv2/manifestations-mtv2/21-11-2024</span></a></p><p>Ping me if we should hook up for a coffee or a beer... ☕🍺</p><p><a href="https://types.pl/tags/pbt" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pbt</span></a> <a href="https://types.pl/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> <a href="https://types.pl/tags/ocaml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ocaml</span></a></p>
Jan Midtgaard<p>This description from a crash fix PR yesterday by Stephen Dolan put a smile on my face: 😀 <br>"With the old code, the following sequence of unfortunate events can occur, if you are very, very unlucky (or you are <span class="h-card" translate="no"><a href="https://types.pl/@jmid" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>jmid</span></a></span> with multicoretests, manufacturing bad luck on an industrial scale):"<br><a href="https://github.com/ocaml/ocaml/pull/13549" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/ocaml/ocaml/pull/13</span><span class="invisible">549</span></a><br><a href="https://types.pl/tags/quickcheck" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>quickcheck</span></a> <a href="https://types.pl/tags/pbt" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pbt</span></a> <a href="https://types.pl/tags/propertybasedtesting" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>propertybasedtesting</span></a></p>

Discover the power of property-based testing in R with the #quickcheck package! Seamlessly integrates with #testthat and offers a variety of generators for atomic vectors, lists, and tibbles. Perfect for ensuring your code's reliability. Check it out: github.com/armcn/quickcheck #rstats #rprogramming #testing

GitHubGitHub - armcn/quickcheck: Property Based Testing in RProperty Based Testing in R. Contribute to armcn/quickcheck development by creating an account on GitHub.
Continued thread

I found the problem!

The default number of times QuickCheck will shrink a test case is "maxBound :: Int" or 9223372036854775807 shrinks.

One of my shrink functions was returning the same input and telling #QuickCheck the new value was smaller.

#haskell

When an exception was thrown in the test case, QuickCheck would try to find a smaller failing value, and I was never patient enough to wait for 9223372036854775807 shrinks.