Fork me on GitHub

Just finished listening the latest 'The REPL' Podcast. It's kind of amazing how similar the stack they use is to my bank pet project. Even down to Bulma for css. Podcast:;episode=aHR0cHM6Ly93d3cudGhlcmVwbC5uZXQvZXBpc29kZXMvMzAv Pet project:

✌️ 4

It is interesting he also mentioned Adam, which is based in Vancouver here, and I know well. Small world 😃


I just updated my spacemacs distribution, it's super easy to setup linting with clj-kondo and joker and it helps my workflow a lot. Thanks to the authors! @borkdude @roman.bataev

👍 8
Denis G19:10:19

I didn’t think a lot on this topic, so maybe I am talking nonsense How does TDD and BDD work in functional programming? Are these ideas only relevant to OOP?

Denis G19:10:29

It feels like with the REPL-driven-development (which I love) there is no emphasis on writing tests, and this is why I’d like to know how does this relate to Clojure and whole FP in general


They're still relevant to languages without a repl

Alexander Heldt19:10:32

you can still do TDD while being highly interactive with the REPL. an example

Denis G19:10:36

but what about BDD and mocking and stuff. How does this work in FP? Is it even necessary?


Trying out things in REPL gives you some security but I think tests should guard again regression.. when you change some thing X and then Y breaks...


Most of the things are just functions and you can mock them...


@denisgrebennicov I don't understand why you think TDD or BDD wouldn't work in FP?

Denis G20:10:35

idk. I guess it is wired in my head, tdd. bdd. mocking with imperative OOP programming

Denis G20:10:33

I just didn’t see/read/heard about it in FP channels, articles


I mean, tdd could probably technically be an approach adapted to nearly any human endeavor where one is creating a device to serve some purpose, yes? First create the experiment that would distinguish working vs. not working, then try to make the device that passes the experiment.


I am not claiming it is necessarily a good approach for any or all such endeavors, but that is the basic idea, as I understand it.

Denis G20:10:16

I guess all this Mockito frameworks took me off-guard


I wonder if there's another takeaway to this. Could there be a interactive developer interface that makes use of the REPL while at the same time piping assertions into files to help in writing test suites?


A REPL-driven TDD of sorts, with fewer manual edits...

Drew Verlee00:10:45

It sounds like your at that stage where your exploring the interactions between new ideas. Its generally a good thing to explore how things relate. The relationship between the repl and Tests is quite flexible. Keep in mind, were just talking about READ EVAL PRINT LOOP. So you can defiantly read a new expression and then EVAL it to see how it would effect a test suite. That is, run the tests every time you evaled a new form. However, i eval a lot of forms and running the entire test sweet each time might be cumbersome. I tend to just directly run the tests from my favorite editor manually. On testing, stubs, mocks. Nothing much is new between FP and OOP. All the options are still there. Clojure.Spec has excellent support for stubs and TDD if you want. I find understanding the logic to be something i have to explore a bit more before i can create a spec for it though, and so its hard to do right up front.

Drew Verlee00:10:33

Basically, if it helps, the REPL is purely additive. You have another way to interact with the system. It means nearly everything you valued before is still there.


Thanks for the feedback, @U0DJ4T5U1. That is quite helpful, and you're right, that's exactly the stage I'm at now. I have watched a few videos on Clojure.Spec and I'm really looking forward to using it, but haven't got there yet. I also haven't actually started with unit testing, as I'm just working my way through Brave Clojure and the Fulcro3 tutorial, so I guess I'm just extrapolating the limited knowledge of Clojure that I do have. I mean, Python is my bread and butter, and I do use the REPL there, but the persistent nature of Clojure's data structures completely changes the approach for the better. I'm glad to have join Clojurians. Seems like a great community so far. Everything I've asked has received very thoughtful answers and it's making the journey smoother. Think I'll be sticking around 🙂

Drew Verlee18:10:58

Yep sounds good. I'm also working through the fulcro3 videos right now. The approach seems well thought out. I feel todo better would require a significant investment in retooling underlying ideas and tools (react, etc...). I dont really know what those would be. It might have more knobs then some applications need. But thats usually the trade off with a framework approach.


It's a bit of a struggle for me to decide whether to learn the ecosystem and tooling vs. just making a working thing using the content in the lessons. Like, I almost decided to spend a few hours reading the shadow-cljs user guide today, but then decided to stick to a top-down approach for now.

Drew Verlee18:10:20

Doing the fulcro tutorials is a great idea imo. Your a bit in the deep end, but thats good as long as you dont get stuck.


You're not the first person to mention that Fulcro is hard. What makes you say that?

Drew Verlee18:10:27

I don't mean its hard. I mean its a lot of functionality. I see it as a fullstack web solution that i assume ( i haven't used it in practice) could be applied to very complex web applications.

Drew Verlee18:10:16

complex meaning, could handle a significantly complex domain and performance requirements.

Drew Verlee18:10:21

I'm no expert here 🙂

Drew Verlee18:10:54

That being said, the ideas and methods the framework employees seem sound to me and its worth being exposed to them. Even if you realize, for one reason or another, you cant take advantage of them. I dont know what your goals are really, so i can't say its a good use of your time though .


Ah, I'm still very early in. I'm just on section 4, and deliberately taking it very slowly so it sinks in before moving on. Switching back and forth between the video and the book. Haven't even got to the fullstack stuff yet. I'm not new to web development by any means, though.


My goal is to be able to develop some product ideas that I have, and to transform the way I think about web development in the process. It's kinda working 🙂

Drew Verlee19:10:24

Yea. i would say your approach is reasonable.

Drew Verlee19:10:38

Here is a reddit post that compares fulcro to re-posh (from a year ago) i find having comparisons can be enlightening.

Drew Verlee19:10:34

Feel free to ask me questions.


Thanks very much. Hopefully I don't make you regret that offer too much heh


@alex.sheluchin Don't type into the REPL, type into your editor -- that's the "interactive developer interface" -- and then there's minimal manual editing since you're writing your test suites and just evaluating them into the REPL 🙂


heh, yeah, I suppose that's roughly what it is in the first place 🙂 I do have a tendency to try out a lot of stuff in comment forms but haven't quite gotten to writing many tests in Clojure yet. I'm just barely discover the power of Clojure's REPL and letting my imagination run away.


At work we have about 20k lines of tests compared to 70k lines of production code, and that test code is a mix of styles. Some test-first, some generative, some rely heavily on mocks, some are BDD-style...


I think @noisesmith made a library to capture repl forms into a test file. I’ve wanted to play with it but never have


the goal was to turn repl experiments when developing into tests that detect regressions