Fork me on GitHub
#babashka
<
2021-07-19
>
littleli09:07:25

Some time ago I was playing a bit with cryptography and I did a tiny implementation of Paillier cryptosystem which turned out also works not just in Clojure but also in Babashka. It's unlikely that I'll build a library for this, because I lose interest quickly, but it was a nice exercise. https://gist.github.com/littleli/9cf457a05fd925060d1e4a874834ad5e

๐ŸŽ‰ 6
borkdude09:07:23

Thanks for sharing! If you want, you could also share it to the "Show and tell" forum of the babashka discussions forum

littleli10:07:08

I'll join forum later today and put it there as well.

borkdude10:07:38

cool. it's just the github repo "discussions" thing

Akiz11:07:15

Hi, i am trying to create a sequence in Scittle from: (.getElementsByClassName js/document "shellcheck") I would use https://cljs.github.io/api/cljs.core/array-seq but it seems to be missing from Scittle. Do you have some tips? Thx

borkdude11:07:05

@zikajk We could add this to SCI and then we could update scittle with this function

๐Ÿ‘ 4
borkdude11:07:10

@zikajk Hmm, it seems just seq also works?

cljs.user=> (seq #js [1 2 3])
(1 2 3)

๐Ÿ‘ 4
borkdude11:07:56

in xterm-sci:

user=> (seq (.getElementsByClassName js/document "terminal"))
(#object[HTMLDivElement [object HTMLDivElement]])
https://babashka.org/xterm-sci/

Akiz11:07:15

@borkdude Yes, it does.. And this also works. So I am fine ๐Ÿ™‚

(doseq [e (js->clj (.getElementsByClassName js/document "shellcheck"))]
     (prn (.-innerHTML e)))

Akiz11:07:14

This does tooโ€ฆ

(doseq [e (.getElementsByClassName js/document "shellcheck"))]
     (.-innerHTML e))
I am confused by this as: https://stackoverflow.com/questions/23616019/why-arent-nodelist-htmlcollection-seqable

borkdude11:07:30

are you confused why it works in scittle but not in the SO question?

Akiz11:07:16

Yes ๐Ÿ™‚ TY

borkdude11:07:54

Perhaps it works with newer versions of CLJS (or shadow adds a protocol implementation for it?)

borkdude11:07:51

I don't know the answer

๐Ÿ‘ 4
borkdude11:07:39

@zikajk It seems to work with newer vanilla CLJS:

$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.866"}}}' -M -m cljs.main -p 8091 -r
ClojureScript 1.10.866
cljs.user=> (seq (.querySelectorAll js/document "div"))
(#object[HTMLDivElement [object HTMLDivElement]])

Akiz11:07:34

I was going to do some tests later. So thank you, good to know ๐Ÿ™‚.

borkdude17:07:41

if anyone's using vault, amperity just merged a PR which makes the library vault-clj compatible with bb (master) :) https://github.com/amperity/vault-clj congrats @eugen.stan on getting the PR merged

๐ŸŽ‰ 4
Eugen17:07:31

thank you @borkdude for your help and support in making that happen ๐Ÿ™‚

borkdude17:07:35

If anyone's interested, I'll be doing a talk tomorrow evening at London Clojurians about Babashka tasks.

awesome 10
๐Ÿš€ 14
๐ŸŽ‰ 8
grazfather20:07:00

Will it be streamed?

borkdude20:07:45

it will be streamed live and also published on youtube

๐ŸŽ‰ 2
borkdude20:07:55

it's an online talk