Fork me on GitHub

Is there a re-frame + compojure-api sample app I can look at? I’m having a hard time getting these two to work together.


can anyone recommend a good way to upgrade dependencies in a lein project?


for example, if I scaffolded a project for clojurescript clojurescript "1.8.51" but want to use clojurescript 1.9.6+

Ryan Radomski02:03:00

I can vouch for lein ancient


hi what's a transducer and why would i ever use one? 😄


Is there a guide/standard for documenting libraries? Python has styleguide for docstrings. And sphinx for generating API documentation. But I'm at a loss on how to write clojure documentation. (probably because I haven't read enough of it)


@xlevus codox is used quite often to generate api docs; looking through its featured example projects should give you relatively good set of pointers on style. For the most part, documentation is written markdown(ish) syntax


Is there a way to document data structures? Eg. The required/optional keys?


or, just chuck it in the docstring?


Another option would be to create a spec for it.


Or use plumatic schema, depending a bit on which angle you want to approach the problem from. If you're new, spec I suppose is the primary thing to learn.


Although it is also worth mentioning that you shouldn't focus on documenting data structures in text, but rather have a way to generate the documentation from actual code. Eg. if you're working in Web context, you could use spec as base for generating Swagger/OpenAPI docs using


Hi, I have a working luminus app on the default immutant setup. I build a fulcro app that does xhr calls to an /api route. It works except that the json delivered from the server to the client is ISO-8859 instead of uft8. Can anybody point me in a direction which level of the stack to debug?


@sova A transducer is a function that allows you to compose/chain it with other transducers to process data without producing intermediary datastructures. They can be used to improve performance or handle a stream/channel.


Hello Clojurians, I’m playing with Clojurescript and when I use (:body response) it returns a plain string, thus I’m unable to parse it further using keywords.


if your response is JSON you can use to parse it


or if it's in the browser, use (.parse js/JSON (:body response))


Thank you! But the latter one creates Javascript object which is not accessible using keyword, or am I doing something wrong? for example (:name body)


yeah for JavaScript objects you have to use (.-name obj) or (goog.object/get obj "name")


keywords are only for Clojure hash-maps


hi. can someone help me convert this javascript statement to clojurescript?


const Twitter = new twit({
    consumer_key:         'dsfsdfdsf7',
    consumer_secret:      'sdfsdfsdfsdf',
    access_token:         'sdf-sdfsdfasdfsdf',
    access_token_secret:  'werwerwere',


i have twit already required in the cljs file

Ryan Radomski17:03:40

whoops I edited a typo, should be good to go now


I'm building a very simple REST api. I've required ring, put in a :ring {:handler my-app.server/handler} line in my project, and got a hello world out of it. So far so good. Now I need to handle a few routes. I introduced compojure but, I'm looking at the docs and not understanding how to connect a route definition with the handler that the server uses. What do I need to change in my code?


I started thinking, oh compojure must provide a function that makes a handler that the ring plugin can call. However, when I look at it says that the ns is deprecated and links me to.... a page I'm not experienced enough to understand


so i think you should be able to do {:handler certainty-derivative.server/app}?


It looks like that does it --- I knew it had to be a case of something so easy that I was looking right past it. Thanks @U61HA86AG!


no worries!