nextjournal

mkvlr 2021-11-03T15:59:50.019500Z

🀫 Clerk is now open source and we have a big new release out, please check it out: πŸ™ GitHub Repo https://github.com/nextjournal/clerk 🌟 Static Build https://storage.googleapis.com/nextjournal-snapshots/clerk/build/f46b5763cb41f78d86d62718cb20a01c1079d5c7/index.html πŸ“¦ Clojars: https://clojars.org/io.github.nextjournal/clerk πŸ§ͺ Demo Repo: https://github.com/nextjournal/clerk-demo πŸ™ To everybody here who helped test it! If we haven’t missed anything bad we’ll announce it in more public channels in a bit.

5
πŸŽ‰ 7
mkvlr 2021-11-03T16:00:10.019900Z

be sure to check out the static builds!

2021-11-03T18:57:24.021400Z

@mkvlr Thanks for the new release , awsome !

2021-11-03T18:57:48.021800Z

the large file support for tech dataset works very nice now.

πŸ‘ 1
2021-11-03T18:58:33.022700Z

As I played again with dataset objects, found one simple case, where thinks get out of sync:

2021-11-03T18:59:39.024Z

max-size is 2 , but the rendering of datasets shows 10 values (the previous value of max-size)

2021-11-03T19:00:20.024700Z

and indeed, changing max-size does not change the dataset rendering.

2021-11-03T19:01:16.025200Z

Code to reproduce is this:

(ns tablecloth
  (:require [tablecloth.api :as tc]
            [nextjournal.clerk :as clerk]))

(def max-size 2)

(take max-size
      (repeat 1000 "a"))
 
(->
 (tc/dataset {:a (repeat 1000 "a")})
 (tc/head max-size))

mkvlr 2021-11-03T19:42:36.025600Z

thanks, I’ll look into this. Great to hear that large datasets work well for you know!

2021-11-03T20:41:15.027800Z

I works well, when I wrap te last expression in a def In that case, I cannot reproduce the issue:

(ns bug
  (:require [tablecloth.api :as tc]
            [nextjournal.clerk :as clerk]
            [nextjournal.clerk.hashing :as h]))



(def max-size 2)

(take max-size
      (repeat 1000 "a"))

(def y
  (->
   (tc/dataset {:a (repeat 1000 "a")})
   (tc/head max-size)))

2021-11-03T20:57:31.028Z

It is unrelated to tech.dataset. It has something to do with the last expression not being a def

2021-11-03T20:57:49.028200Z

something like this

(def max-size 2)


(println
 {:x max-size
  :y {:z (range max-size)}})
  

2021-11-03T20:58:08.028400Z

behvaes as well "unexpected". The

println

2021-11-03T20:58:49.028600Z

is not re-executed when max-size gets changed.

mkvlr 2021-11-03T20:59:42.029700Z

sounds like an issue in the hashing used for the caching, should be easy to fix with this tiny repro

2021-11-03T20:59:46.029900Z

wrapping the println in a def solves it as well

mkvlr 2021-11-04T09:15:36.030500Z

can reproduce it and working on a fix

mkvlr 2021-11-04T15:44:27.034200Z

https://clojars.org/io.github.nextjournal/clerk/versions/0.2.214 is out and fixes this issue, thanks for the report!

πŸ™Œ 1