This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-12
Channels
- # announcements (6)
- # babashka (45)
- # beginners (4)
- # calva (19)
- # cider (2)
- # clj-kondo (10)
- # clj-yaml (10)
- # clojure (25)
- # clojure-boston (1)
- # clojure-conj (3)
- # clojure-europe (34)
- # clojure-losangeles (5)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-uk (2)
- # clojurescript (84)
- # cursive (10)
- # datalevin (3)
- # figwheel-main (1)
- # fulcro (1)
- # jobs (5)
- # joyride (25)
- # lsp (17)
- # malli (18)
- # nbb (1)
- # off-topic (1)
- # re-frame (22)
- # remote-jobs (9)
- # scittle (3)
- # shadow-cljs (26)
- # sql (16)
- # tools-build (12)
- # xtdb (44)
heya @borkdude, just wanted to ping you that I was adding https://github.com/filipesilva/obsidian-babashka to the obsidian community list.
Curious what do you have in mind to do :D
So parsing files, processing them a bit, then writing a report back somewhere?
Obsidian is surprisingly flexible: The coolest thing I have setup so far is using an nfc tag + my phone to check off a habit checkbox in my daily note, for e.g. vitamins. (using obsidian advanced urls, i think it’s called?)
Thanks for sharing @UJVKWJTGE! Looks really cool. A side question, what tool do you use for those animated gifs? Looks neat.
Shift cmd 5 to record, ctrl shift esc, to stop, then gifski to convert to gif
On a Mac
Ah great, thank you!
Amazing!! I just rolled my own small bb equivalent to borkdude/quickblog where I can write MD directly in obsidian and publish with tasks. This really closes the loop lol
here’s the submission for anyone that’s waiting for it to be available https://github.com/obsidianmd/obsidian-releases/pull/1534
@borkdude Ok, only if I can take a look at your repo to poach the code for generating the xml feed 😏 I always appreciate your work!
that is pretty cool!
FYI I released 1.0.3 with support for starting a babashka nREPL and connecting to it
it’s still waiting to be merged to the obsidian community plugin list though, but it’s up
@U03M9DG0VKN can I ask you to try it? you seemed to be comfortable installing plugins from the source
Ok, did my best with cursory stress testing.
All the basic functionalities of a persisting repl work, splendidly. Setting and switching namespaces, defs, functions, requires, all flawless and across notes! Cool. This is very much an instant notebook
These two bumps hold for both clj and cljs–
I orphaned the nrepl process a few times, in two ways. (By accident at first.) Neither quitting and restarting obsidian, nor doing a hard refresh (f12) shut down the repl. The kill command says it succeeds, attempting to reconnect silently fails, and repl-dependent code doesn’t eval. Only in the verbose level electron logs did it say the address is occupied. Killing the process from a shell allows you to start over as expected, but it’s opaque what happened without digging.
Not sure how to address that as quitting the app/“force reload” might be outside the scope of plugins? Otherwise I assume the kill code could just run on shutdown.
2, a simpler bug, if I eval broken code, the error popup shows properly, then no subsequent stdout prints to file until killed and restarted. It looks like printOutput
receives nothing when given bad code, instead of a string, and passes that to capCharsAt
, then whatever else breaks down the line.
Overall, this is great and worked very intuitively until I ran up against some forced but realistic corner cases
And last thought, but lmk if I should check out more things, obsidian Execute Code plugin has a nice customizable timeout feature to preempt hanging. Here I could wait til the cows come home on the (range)
regarding the timeout, I think that could be configurable
other options include using the nrepl interrupt feature
or just killing the process (and losing the repl state)
I didn’t quite know what would be the more natural usecases so didn’t want to think too much about it
regarding the orphaned process… I saw that myself, and I thought I covered all the kill cases but obviously not
I don’t have a repro for it to find the bad situations
regarding that bad code, can you give me and example? that way I can investigate
Have been away, patience appreciated.."broken code" I just meant anything throwing exceptions, e.g undefined symbols. Example I can repro ATM, start repl and evaluate these in sequence
(+ 5 10)
;; 15
(nothing)
(exception printed to stderr notif)
(+ 10 10)
Nothing prints when evaluated@UJVKWJTGE As a heads up, in 1.1.171 (the next version) babashka will no longer automatically print results, except when executing with -e
Can you test your obsidian plugin with the current dev build, which already has this change?
bash <(curl ) --dev-build --dir ~/dev/babashka
@borkdude I always run bb -e
for eval, so I think it won’t make a difference to me
I’d like to ask you though, what do you think the output should be?
ATM what happens is:
• stdout is printed to the codeblock as a comment
• followed by value
• stderr is printed as a notification
This happens for both repl and -e
repl output messages contain the distinction between stdout msgs and value messages so I could put them in separate places… but I’m not sure if that’d be more useful to users?
https://obsidian.md/plugins?search=babashka it’s now released in the official plugin list!