This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-03
Channels
- # beginners (37)
- # boot (5)
- # cider (3)
- # clara (19)
- # cljs-dev (188)
- # cljsrn (1)
- # clojure (104)
- # clojure-russia (5)
- # clojure-spec (1)
- # clojure-uk (3)
- # clojurescript (41)
- # core-async (1)
- # data-science (4)
- # datascript (3)
- # figwheel (7)
- # fulcro (14)
- # garden (4)
- # graphql (3)
- # jobs-discuss (2)
- # leiningen (9)
- # london-clojurians (1)
- # off-topic (5)
- # onyx (2)
- # portkey (6)
- # re-frame (9)
- # reagent (5)
- # shadow-cljs (2)
- # specter (1)
- # uncomplicate (2)
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+
I can vouch for lein ancient
thanks @radomski!
hi what's a transducer and why would i ever use one? 😄
see https://clojure.org/reference/transducers and https://www.youtube.com/watch?v=WkHdqg_DBBs 🙂
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 https://github.com/weavejester/codox
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 https://github.com/metosin/spec-tools#swagger2-integration
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 https://github.com/clojure/data.json to parse it
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")
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
whoops I edited a typo, should be good to go now
Awesome! thanks @radomski
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 http://weavejester.github.io/compojure/compojure.handler.html it says that the ns is deprecated and links me to.... a page I'm not experienced enough to understand
According to https://weavejester.github.io/compojure/compojure.core.html#var-defroutes defroutes
creates a Ring handler
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!