Fork me on GitHub
#beginners
<
2021-01-01
>
cschep01:01:32

I am hacking on a learning project where I’m doing some data processing on fantasy baseball data 🙂 I’m currently thinking I can kind emulate a database by using some sort of ref to a map and just writing it to disk on updates - is this a total disaster? this will be used potentially as a web app by like 1-4 people, never real traffic. I’m trying to avoid the rdbms dance because it just doesn’t seem important at this point. thanks for any insight! does this approach work for anyone?

didibus01:01:42

For 4 people it sounds totally fine

didibus01:01:05

You can even use something like this to make your life easier: https://github.com/jimpil/duratom

afry20:01:03

I’ve done this before on smaller apps too! Just reading/writing JSON or CSV data to the disk is totally fine for something like that.

cschep21:01:51

awesome, thanks all!

cschep21:01:57

will check these projects out..

FHE01:01:17

@seancorfield Oof. Just heard I should have at least Win 10 v2004 (I have Win 10 Pro v1909) in order to use WSL2. Guess it'll have to wait until next year!

seancorfield01:01:02

@factorhengineering You should have had the free update by this point...

seancorfield01:01:56

2004	Semi-Annual Channel	2020-05-27
-- v2004 has been available for seven months.

seancorfield01:01:54

(that's build 19041.685 -- I'm on 20279.1 via Insider builds... and 21277.1000 just became available!)

seancorfield01:01:18

(ah, that's a prerelease of the next main Windows update -- 20279.1 must be close to the upcoming release version)

Harley Waagmeester02:01:08

is datomic only useful as a cloud service ?

seancorfield02:01:21

@codeperfect You can run it on-prem as well, I believe. And for development, there's a fully local free version.

seancorfield02:01:08

https://www.cognitect.com/dev-tools/ is where you can request a link for dev-local Datomic (and REBL).

seancorfield02:01:45

(there's a #datomic channel if you want detailed info)

zackteo08:01:02

Hi guys, I just managed to make a simple quote fetcher from bible-gateway by scrapping the site using enlive I did a fair bit of refactoring and ended up with this https://github.com/zackteo/bible-gateway-clj/blob/master/src/bible_gateway/core.clj#L24-L32 Any suggestions on how might I want to refactor bible-quote? Or any other comments ?

euccastro09:01:06

@zackteo I normally see the lower-arity versions expressed in terms of the higher-arity ones, not the other way around. you may try this

(defn search-string [book chapter verse]
  (str book "+" chapter
       (when verse (str "%3A" verse)))))
,,,

(defn bible-quote
  ([book chapter version]
   (bible-quote book chapter nil version)
  ([book chapter verse version]
   (-> (search-string book chapter verse)
       (bible-gateway-url version)
       url->quote)))
which is not a huge win, but it does remove some duplication

euccastro09:01:34

str will output nothing for nil , btw

roelof11:01:00

anyone know if the exercism clojure is active so when I submit a challenge I do not have to wait too long for a mentor

zackteo11:01:01

You can start working on the side challenges too! But realistically exercism will require some waiting. But yes it is active - not sure if the holiday session has made it more or less active

roelof11:01:40

oke, maybe I try that too to get some more xp in clojure. Just begin with the brave book

zackteo11:01:24

You can honestly target an exercism question a day - you will also get a lot of feedback and the mentors usually guide you on how to improve your solutions step by step. So sitting down and understanding that might be equally if not more important than getting the solution

zackteo11:01:04

If you want quick things to test out your knowledge, clojure (/script) koans would be better

zackteo11:01:51

And 4clojure will be where don't get feedback but you can follow a few who have completed it and compare your solutions with theirs after

zackteo11:01:16

If you haven't seen this, you might want to take a look! https://gist.github.com/yogthos/be323be0361c589570a6da4ccc85f58f

roelof15:01:50

maybe someone who knows how to solve this :

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} cider/cider-nrepl {:mvn/version "0.25.5"} clj-kondo/clj-kondo {:mvn/version "2020.04.05"}}}'  -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
/bin/sh: 1: clojure: not found
Jack-in process exited. Status: 127

roelof15:01:16

I have lein installed and it seems that this project uses clojure clj

roelof15:01:07

I use vscode with calva

borkdude15:01:23

@roelof which OS are you on?

roelof15:01:44

WSL2 , so ubuntu

borkdude15:01:43

should be good then with the linux installer script

roelof15:01:25

im trying it right now

roelof15:01:17

oke, it seems to work, thanks

seancorfield17:01:50

Just FYI: even on Linux, I use brew (linuxbrew) to install the Clojure CLI because it's easier to remember to keep it up-to-date and it also means it's easy to test against older versions that you've installed as well.

roelof17:01:18

oke, so leiningen is not the tool anymore ?

Matthew Curry17:01:11

New stuff seems to be deps now; although this is just installing clojure right? A project can still use leiningen

seancorfield18:01:45

This is the Clojure CLI that I'm talking about -- separate from Clojure-as-a-library.

seancorfield18:01:40

The CLI is the official stuff, and relatively new. Folks can still use Leiningen (or Boot). But I've been using just the Clojure CLI since some time in 2018 I think was when I switched.

FHE18:01:18

@seancorfield My Windows Update reads 'up to date' but it also refers to ' 'feature update' I could manually trigger to go to Version 20H2. 'winver' tells me my current version is 1909. What is Windows Update doing?

FHE18:01:51

I'm saving all kinds of open work and then going to trigger the update. (Restarting my computer is such a pain. It will take me ages to re-open all the things I have open now.)

seancorfield19:01:02

Windows has an option to reopen everything automatically after a restart -- that's what I rely on.

Mno21:01:56

TIL about linuxbrew… #beginners is always a treasure trove of knowledge 🙂

❤️ 3
FHE22:01:07

@seancorfield I have seen it re-open my file explorer windows under certain conditions, like a forced restart maybe, but how can you be sure it will do it?

FHE22:01:55

Also, can it reopen other things, like text files (I am not an Emacs wizard yet) and command prompt windows (with history??)?