Fork me on GitHub
#nbb
<
2022-07-25
>
chico06:07:24

Good morning! I'm trying to use https://cljdoc.org/d/funcool/promesa/8.0.450/doc/user-guide#plet from promesa without much success.

(ns example
  ;(:require-macros [promesa.core :refer [plet]])
  (:require [promesa.core :as p]))

(p/plet [a (p/resolved 1)
         b (p/resolved 2)]
  (println (+ a b)))
Running the above results in
$ nbb example.cljs
----- Error --------------------------------------
Message:  Could not resolve symbol: plet
Phase:    analysis
Could not resolve symbol: plet
All the other functions and macros from promesa seems to be available, so I'm not sure what I'm doing wrong. Any ideas?

borkdude06:07:20

Did you mean p/let?

chico06:07:56

Oh no actually plet (a combination of let with all)

borkdude06:07:10

Right. We don't have that yet but an issue + optional PR is welcome. For now I think you could just use let + p/all?

borkdude06:07:27

Or copy pasting that macro should prob also work

chico06:07:47

ahh gotcha! yes, it does! Both solutions are good for me :thumbsup: Thanks! Just thought I was doing something wrong! I will create an issue and look into a PR too. Do you think that's something feasible for a beginner in clojure/clojurescript?

borkdude06:07:21

I think so but let me know if you need any help

borkdude06:07:46

The config for promesa is shared in the sci.configs library

borkdude06:07:03

It's just a matter of copying the macro there

chico06:07:52

Thanks! I will look into it!

borkdude21:07:39

Bun + blipgloss (a CLI library built in go, via bun ffi): https://twitter.com/borkdude/status/1551685556106629125