Fork me on GitHub
#nextjournal
<
2021-11-03
>
mkvlr15:11:50

๐Ÿคซ 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.

clojure-spin 5
๐ŸŽ‰ 7
mkvlr16:11:10

be sure to check out the static builds!

Carsten Behring18:11:24

@mkvlr Thanks for the new release , awsome !

Carsten Behring18:11:48

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

๐Ÿ‘ 1
Carsten Behring18:11:33

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

Carsten Behring18:11:39

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

Carsten Behring19:11:20

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

Carsten Behring19:11:16

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))

mkvlr19:11:36

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

Carsten Behring20:11:15

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)))

Carsten Behring20:11:31

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

Carsten Behring20:11:49

something like this

(def max-size 2)


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

Carsten Behring20:11:08

behvaes as well "unexpected". The

println

Carsten Behring20:11:49

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

mkvlr20:11:42

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

Carsten Behring20:11:46

wrapping the println in a def solves it as well

mkvlr09:11:36

can reproduce it and working on a fix