Fork me on GitHub
#clojure-nl
<
2019-08-13
>
thomas07:08:34

mogge... Adding some new functionality... trying to update integration tests accordingly

Stefan07:08:58

Preparing this Thursday’s Clojure coding dojo 🙂

👍 4
❤️ 2
Mno08:08:33

Morning, just working.

borkdude09:08:29

I'm considering this for a next version of babashka: https://github.com/borkdude/babashka/tree/v0.0.7#shell-commands if someone want to give it a try

thomas09:08:47

I just ran this:

thomas09:08:52

echo . | bb '(sh "ls" "-t" in)' Could not resolve symbol: sh.

skuro09:08:40

you sure you're using the version from the right branch?

borkdude09:08:04

if you want to try it, I'll provide you with an unreleased binary

borkdude09:08:20

this is not released yet, but it would be great if someone gave it a go before I do

thomas09:08:05

I did a brew install

thomas09:08:45

brew upgrade babashka Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask). No changes to formulae. Error: borkdude/brew/babashka 0.0.5 already installed

borkdude09:08:05

@U052852ES Did you read this entire thread? 🙂

thomas09:08:38

yes... but I assumed that brew would install the right thing

borkdude09:08:38

no, this is a branch which is not released

borkdude09:08:07

I did update brew to 0.0.6 now though. but it doesn't have this feature of calling shell commands yet

thomas09:08:12

aah... ok that works

borkdude09:08:03

if you find any issues, you can post them here: https://github.com/borkdude/babashka/issues/6

borkdude09:08:55

what's also new in this version is let, you can use it like in normal Clojure

thomas09:08:51

I like it!

borkdude09:08:36

$ echo hello | bb '(let [a "/Users"] (ls a))'
["Shared" "borkdude"]

skuro10:08:09

mhhhh so what's the expected behavior for extra input?

skuro10:08:25

$ echo . | ./bb '(sh "ls" *in*)' ls  
#object[babashka.main$fn__415$iter__411__416$fn__417$fn__418$fn__419 0x58863ca8 "[email protected]3058"]

skuro10:08:36

echo . | ./bb '(sh "ls" *in*)' wut
Could not resolve symbol: wut.

skuro10:08:10

(using a locally compiled version from the v0.0.7 branch)

borkdude10:08:43

What should it do with extra input?

borkdude10:08:19

What should it do with that input?

skuro10:08:52

I'd say either disregard it or fail with an error

borkdude10:08:23

good point, it's currently undefined I guess