Fork me on GitHub
#babashka
<
2020-03-04
>
Bobbi Towers12:03:51

My first ever Clojure program was a thing like that. https://github.com/porkostomus/ctrain The code is likely terrible but works. Stores answers in files. There's a problems.edn, perhaps it might come in handy.

borkdude12:03:14

I think I won't pursue this idea any further, it was just a nice thought šŸ˜‰

borkdude12:03:04

for something like this to work properly (and someone else taking this further) I'd have to add read-string, which I will probably add in the next release

borkdude12:03:58

your repo might be a good test candidate to check if the idea works in bb

Bobbi Towers12:03:25

The 4clojure website has problems that aren't in the database if you build the site locally, so I started adding them manually

borkdude12:03:16

there might be a 4clojure shell-scripting edition with bb

borkdude12:03:07

to accomplish every day scripting tasks using clojure

borkdude12:03:34

no need for a loop either btw, you can just re-start bb for every problem and read the answer from stdin or something

Bobbi Towers12:03:33

Ah, yeah. The instant startup really changes the game

Bobbi Towers13:03:39

I just got a crazy idea. I've been helping maintain some of the language tracks on Exercism, and we could probably add babashka to the list

Bobbi Towers13:03:56

We were already talking about adding Clojurescript. But why stop there?

borkdude13:03:43

Is this learning track executed on people's own computers or in a Docker image on the cloud or something?

Bobbi Towers13:03:51

Right now the students have local Leiningen projects, but we're building a new platform that will have in-browser coding

borkdude13:03:02

cool. I'm going to try it

Bobbi Towers13:03:19

This track would be particularly interesting, being at the intersection of Clojure and Bash

borkdude13:03:37

right, maybe the bash track could be translated to babashka

borkdude13:03:47

or inspired by

jeroenvandijk22:03:25

FYI, Iā€™ve added two failure cases for Sci in js interop: https://github.com/borkdude/sci/pull/282 Iā€™m not sure how or where to fix it. Iā€™ll try again tomorrow probably

borkdude09:03:48

That is difficult to get right, isn't it...

borkdude09:03:21

One way would be to avoid interop just by providing normal functions into sci which wrap the interop

jeroenvandijk09:03:31

Do you mean by passing functions in the option map? Thatā€™s how I solve it now

borkdude09:03:45

it also uses sci, to create a nodeJS library with a Clojure DSL

jeroenvandijk09:03:05

Ah cool, Iā€™ll have a look

jeroenvandijk09:03:06

Solving this ā€œissueā€ through the option map is often possible. However would be nice to get this to work as it makes things less cumbersome and you will not always be able to pass the options map (e.g. when you operate on a different level)

borkdude09:03:47

yeah, I agree, but I don't know enough about JS to fix this

jeroenvandijk09:03:39

yeah no worries. Iā€™ll wait until I find something myself or maybe some js expert sees the issues metalIā€™ll keep trying šŸ™‚

borkdude09:03:03

A little bit off topic: is it possible to set a billing limit on AWS, so that for hobby projects you don't get a $9000 bill?

jeroenvandijk09:03:57

oops, there is a Cloudwatch alarm functionality. Actually not sure about hard limits on spend. There are limits on how many instances etc

jeroenvandijk09:03:10

Where is the money going?

borkdude09:03:37

This was just a theoretical question, but something that keeps me from using AWS for hobby things

jeroenvandijk09:03:22

ok cool, Iā€™ll keep an eye out. Actually I was wondering this myself as well after reading about some datascientist spending 250k in a day by accident

borkdude09:03:30

E.g. when I would host sci as an AWS lambda thing and expose it to Clojurians slack, how do I know what this will cost me.

borkdude09:03:52

VPS is more predictable

jeroenvandijk09:03:26

definitely true. Iā€™ll see what i can find