summaryrefslogtreecommitdiff
path: root/topics
diff options
context:
space:
mode:
authorPjotr Prins2024-05-25 09:27:23 -0500
committerPjotr Prins2024-06-03 09:25:16 +0200
commit46915b1fac722fd9e00341c834e12c29c9300a5f (patch)
treef335c06231ce0a777ae98135b4926e394fce0e52 /topics
parent778817013c081480e7f84bf327ad16a8ca4fe61e (diff)
downloadgn-gemtext-46915b1fac722fd9e00341c834e12c29c9300a5f.tar.gz
Hashing in guile
Diffstat (limited to 'topics')
-rw-r--r--topics/data/precompute/steps.gmi13
1 files changed, 12 insertions, 1 deletions
diff --git a/topics/data/precompute/steps.gmi b/topics/data/precompute/steps.gmi
index dd07c0f..33915cd 100644
--- a/topics/data/precompute/steps.gmi
+++ b/topics/data/precompute/steps.gmi
@@ -62,4 +62,15 @@ At this point we can write
{"2":9.40338,"3":10.196,"4":10.1093,"5":9.42362,"6":9.8285,"7":10.0808,"8":9.17844,"9":10.1527,"10":10.1167,"11":9.88551,"13":9.58127,"15":9.82312,"17":9.88005,"19":10.0761,"20":10.2739,"21":9.54171,"22":10.1056,"23":10.5702,"25":10.1433,"26":9.68685,"28":9.98464,"29":10.132,"30":9.96049,"31":10.2055,"35":10.1406,"36":9.94794,"37":9.96864,"39":9.31048}
```
-Note that it (potentially) includes the parents. Also the strain-id is a string and we may want to plug in the strain name. To allow for easy comparison downstream. Finally we may want to store a checksum of sorts. In the next step we have to check the normal distribution of the trait values and maybe winsorize outliers.
+Note that it (potentially) includes the parents. Also the strain-id is a string and we may want to plug in the strain name. To allow for easy comparison downstream. Finally we may want to store a checksum of sorts. In Guile this can be achieved with:
+
+```scheme
+(use-modules (rnrs bytevectors)
+ (hashing sha-2))
+
+(sha-256->string (sha-256 #vu8(1 53 204)))
+```
+
+from guile-hashing and guile-gcrypt modules.
+
+In the next step we have to check the normal distribution of the trait values and maybe winsorize outliers.