Email or username:

Password:

Forgot your password?
243 posts total
(λ. borkdude)

Scittle: execute Clojure(Script) directly from browser script tags via SCI!

v0.4.11 released: you can now use re-frame from scittle!

babashka.org/scittle

You can play around with re-frame here:

babashka.org/scittle/codemirro

#scittlecljs #clojurescript #clojure

(λ. borkdude)

🎉 Announcing 🎉 #babashka workshop with @lispyclouds
In this workshop you will learn all about Babashka and its ecosystem from a practical and useful perspective. See where it can fit well into your workflows.

clojure.stream/workshops/babas

#clojure

(λ. borkdude)

RT @avelinorun
another contribution to nbb, this time writing an example of how to work with redis and deal with async (using promesa) from javascript

github.com/babashka/nbb/pull/2

thanks 🐘borkdude@mastodon.social

#nbb #babashka #clojure #cljs #clj #clojurescript #opensource #foss

(λ. borkdude)

Wow, aha, apparently you can run npm deps with #deno now.

$ deno run -A npm:nbb -e 'js/Deno.version.deno'
"1.28.1"

$ deno run -A npm:nbb -e '(def response (nbb.core/await (js/fetch "clojure.org"))) (prn (.-status response))'
200

#clojure #clojurescript #nbbcljs
---
RT @uochan
$ deno run -A npm:nbb -e '(+ 1 2 3)'
6
😎 #clojure #nbb
twitter.com/uochan/status/1593

(λ. borkdude)

Here's a #babashka script to turn a #clojure file with auto-resolved keyword (::foo and ::alias/foo) into a Clojure file with normal keywords

It uses #cljKondo analysis for keywords and how they should resolve.

github.com/babashka/babashka/b

(λ. borkdude)

Also, a new version of rewrite-edn is: rewrite EDN while preserving comments and whitespace, using common Clojure functions.

Check the changelogs:

github.com/borkdude/rewrite-ed

#clojure

(λ. borkdude)

A Ramanujan-esque take on JSON validation
---
RT @Fish_CTO
I realized I can golf it further:

^(?2)({([ \n\r\t]*)(((?9)(?2):((?2)(?1)(?2)))(,(?2)(?4))*)?}|\[(?2)((?1)(?2)(,(?5))*)?\]|true|false|(\"([^"\\\p{Cc}]|\\(["\\\/bfnrt]|u[\da-fA-F]{4}))*\")|-?(0|[1-9]\d*)(\.\d+)?([eE][-+]?\d+)?|null)(?2)$
twitter.com/Fish_CTO/status/15

(λ. borkdude)

Rich Hickey's view on static types as a modeling language (similar to UML):

youtu.be/2V1FtfBDsLU?t=3965

#clojure

(λ. borkdude)

I'm still making performance improvements to SCI (Small #clojure Interpreter) which powers #babashka, #nbbcljs etc.

Things that gave me the best results:

1. Do work at analysis (compile) time instead of runtime if possible
🧵

(λ. borkdude)

2. Loop unrolling: instead of (dynamically) iterating over the length of a collection, use a fixed number (1-20) of locals that you can refer to directly

3. Implement locals using mutable arrays instead of (immutable) hash maps

4. Remove dead code (duh!)

(λ. borkdude)

Just published new releases of cherry (experimental CLJS to ES6 compiler) and squint (CLJS syntax to JS compiler):
github.com/squint-cljs/cherry
github.com/squint-cljs/squint

#clojure #clojurescript #squintcljs #cherrycljs

(λ. borkdude)

seqfind.com

SeqFind is a #clojure(script) code explorer

Powered by #cljKondo analysis ✨

(λ. borkdude)

RT @goshatch
Instead of writing a script in bash, tried Babashka today and basked in the glory of Clojure and the REPL. Thank you @borkdude! github.com/babashka/babashka

(λ. borkdude)

RT @_wilfredh
A cute project that finds Clojure stdlib functions based on an example input and output: borkdude.github.io/re-find.web

Go Up