This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-02
Channels
- # announcements (31)
- # babashka (19)
- # beginners (90)
- # biff (1)
- # calva (172)
- # cider (3)
- # cljsrn (3)
- # clojure (84)
- # clojure-australia (1)
- # clojure-europe (11)
- # clojurescript (48)
- # css (1)
- # data-science (9)
- # datalog (3)
- # emacs (16)
- # events (2)
- # fulcro (8)
- # jackdaw (31)
- # luminus (3)
- # malli (3)
- # off-topic (13)
- # onyx (3)
- # random (1)
- # remote-jobs (2)
- # shadow-cljs (88)
- # vim (1)
- # xtdb (13)
Merging this in the next version of bb:
$ ./bb -e '(with-precision 20 :rounding CEILING (/ 1M 3))'
0.33333333333333333334M
:D@mike1452 Now alignment works for me:
https://github.com/clj-kondo/clj-kondo.lsp/blob/master/bb.edn
with (setq clojure-align-separator 'entire)
. Before it would stop aligning after blank lines.
@borkdude 👍. I continue to play with babashka
. Can't stop enjoying it after years with bash, python, groovy.
how to catch output of ?
(babashka.tasks/clojure "-Spath")
I need to build clojure project classpath from deps.edn and send it to javac utility as -cp parameter.huh! yeah, I'm a bit tired today 🙂
@borkdude, another bb.edn
example for new version of application template
https://github.com/redstarssystems/rssysapp/blob/develop/resources/clj/new/rssysapp/bb.edn
You could do this in :init
: (def cformat clojure.core/format)
and then use cformat
in the rest of your tasks, for shorter naming, or (alias 'core 'clojure.core)
yeah, good advices!
:depends
and run
are both good, but I wanted to call another task in particular place in code (or execution time), so I used run
@mike1452 Does this work?
https://github.com/redstarssystems/rssysapp/blob/0763853843973692a7594f90061c6b24d2e1cb3b/resources/clj/new/rssysapp/bb.edn#L85
The File
class is not imported anywhere?
Yes! It works!
You can try it
clojure -X:new :template org.rssys.apptemplate :name com.example/app01
Then create java/src
folder and put there some class like
package com.example;
public class Hello01{
public static void sayHello (){
System.out.println("hello from Hello01");
}
}
Then uncomment "java/src" in deps.edn and call Hello01 from mainbb -e 'File'
java.io.File
$ clj -M -e 'File'
Syntax error compiling at (REPL:0:0).
Unable to resolve symbol: File in this context
because this isn't compatible with normal Clojure, I might revert that so it would probably be better to write java.io.File
ok, I'll rewrite it tomorrow.