Fork me on GitHub
#babashka
<
2020-12-14
>
David Pham11:12:54

@borkdude how much do you think would it cost you to build bigger binaries?

borkdude11:12:57

Depends. What do you have in mind?

David Pham11:12:52

Well, I was curious how much it would cost you if you had to leave the free tier of CI.

borkdude11:12:17

I think somewhere between 150-300 dollars a month based on current usage on CircleCI. But maybe it would be possible to setup some AWS/other cloud stuff as well. Not sure.

David Pham11:12:15

(I am referring to your study on the survey).

Calum Boal17:12:30

Any tips on emacs integration with babashka?

borkdude17:12:10

Do you mean like interacting with a REPL? Or doing fun things from emacs with babashka?

Calum Boal17:12:14

Yeah, repl for one, also the linter i have doesn't like some of the implicitely included libs

borkdude17:12:28

@cgboal521 For the linter, read this: https://book.babashka.org/#style For running a REPL, read this: https://book.babashka.org/#repl

Calum Boal17:12:53

Ah okay nice one, so just include the stuff you want to use to shut up the linter

noprompt20:12:19

Tips on fixing this one?

(ns babashka-test
  (:refer-clojure :exclude [list]))

(defn list [& args])

(defn void [& args])

(defmacro * [& args]
  `(void (list ~@args)))

(prn (macroexpand '(* 1 2 3)))
;; =>
(babashka-test/void (clojure.core/list 1 2 3))

noprompt20:12:52

list is resolving to the wrong thing.

borkdude20:12:29

hmm, that seems like a bug

borkdude20:12:36

let me check

noprompt20:12:57

I can work around it for now.

noprompt20:12:19

If you file a ticket can you tag me on it?

borkdude20:12:41

yes please.

noprompt20:12:00

OK I’ll file the ticket. 🙂

borkdude20:12:47

I misread it, but then I correctly read it ;)

noprompt20:12:51

OH LOL I just filed it. 😂

noprompt20:12:23

I closed mine 🙂

borkdude20:12:08

I know where to fix it, it's not hard. If you think it's fun to fix, I can point you to it, but else I'll fix it soon

noprompt20:12:12

Looks like its a general problem with exclusion

noprompt20:12:24

I tried with vector and noticed the same

noprompt20:12:48

Point me to the source

borkdude20:12:55

it's a problem in syntax quote resolving syms. it doesn't look at exclusions

noprompt20:12:14

Am I able to REPL this project?

noprompt20:12:50

Asked another way, can I solve this from the REPL and then run the tests in the shell?

borkdude20:12:05

Yes. you clone the sci project. and then:

$ clj
Clojure 1.10.1
user=> (require '[sci.core :as sci] :reload-all)
nil
user=> (sci/eval-string "(ns foo (:refer-clojure :exclude [inc])) (defn inc []) `inc")
clojure.core/inc
user=>

borkdude20:12:10

@noprompt if you stick this in fully-qualify:

_ (prn the-current-ns)
you will see:
user=> (sci/eval-string "(ns foo (:refer-clojure :exclude [inc])) (defn inc []) `inc")
{:obj #object[sci.impl.vars.SciNamespace 0x699e81db "foo"], :refer {clojure.core {:exclude #{inc}}}, inc #'foo/inc}
clojure.core/inc

borkdude20:12:14

that should be a good hint how to fix it

borkdude20:12:58

In the analyzer.cljc I have this:

(when-not (contains?
                     (get-in the-current-ns [:refer 'clojure.core :exclude]) sym-name)
...

borkdude20:12:26

(we could probably avoid the contains call if there is no :exclude)