Fork me on GitHub

Is it possible to use format multiple times? Like

(format "text0: %s" text0) (format "text1: %s" text1)
? If it isn't, how can I achieve what I'm trying?


probably something with map-indexed over the coll of texts


Format is a function, since clojure is a functional programming language we would be in pretty bad shape of you can only call a function once


I can tell what you are trying to do

Kenneth Gitere06:01:30

Hi. I'd like to make a simple web server that renders org files as HTML. I haven't done anything web related in Clojure so I wanted to know what some of the recommended libraries for making a web server would be. (By web server I guess I mean a backend rather than something like Jetty)


Check for a simple project template or do a search in the chat, is a pretty common question.


Hi. Do clojure/script people use Postman or similar? Looking for alternatives, e.g. something that might have less features but is more open.

Ben Sless07:01:55

I often use emacs restclient

❤️ 1

Beautiful! Thanks for reminding me that restclient exists! Btw. this is a nice and quick demonstration:


Thanks. Not exactly what I had in mind, but good references!


Is there any considerable overhead in core.async/timeout? Since it creates a new channel it doesn't sound as lightweight as for example Thread.sleep. I'm curious since if I use it I will end up calling it thousands of times per second: I'm developing a broadcasting server through which multiple connected clients can send messages to each other. For optimization I'm bundling outgoing messages together with a 5ms window. To achieve this I have a go-loop per client with a 5ms timeout. This means that I will have 1000/5 * client_count timeouts instantiated per second. Of course I should also profile this, but does using timeout in this manner sound fishy? I can see ways of optimizing this by implementing some kind of a repeating timeout channel but don't want to do it prematurely.


@jahvenni timeout channels are shared at the 10ms quantum


Oh, that’s nice!


depending on your volume, you may run into an issue where there are more than 1000 processes taking from the same channel, which is an error


(if >1000 processes hit the same 10ms window)


Ah, that is actually likely to happen. Where could I find info about these details? And do you have any suggestions how this could be solved nicely? Doesn't sound like I'm using the right tool for the job. (Ok, maybe not likely after all. But still curious.)

vishal sharma14:01:48

Hi, can someone please recommend some good resources to learn about functional programming concepts (not related to a language but general concepts)? Thanks


I think the best book I've read on functional programming general was Functional Programming in Scala by Manning. Yes, it's Scala, but taken as a language agnostic text, I thought it was brilliant.

Stas Makarov14:01:11

take a look at “Grokking Simplicity” by E. Normand

👋 1
❤️ 1
vishal sharma06:01:32

Thanks everyone for the recommendations. Read first chapter of grokking simplicity yesterday. Looks nice. the video was nice too, breaking the shackles about FP and simplifying what FP actually is and not a sort of magic.