This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-08
Channels
- # beginners (76)
- # boot (13)
- # cider (3)
- # clara (7)
- # cljs-dev (254)
- # cljsrn (5)
- # clojure (20)
- # clojure-austin (2)
- # clojure-chicago (4)
- # clojure-dev (7)
- # clojure-russia (5)
- # clojure-spec (18)
- # clojurescript (68)
- # cursive (8)
- # datascript (3)
- # datomic (8)
- # garden (1)
- # hoplon (3)
- # lambdaisland (4)
- # luminus (20)
- # mount (19)
- # off-topic (30)
- # om (10)
- # onyx (8)
- # parinfer (14)
- # precept (7)
- # reagent (9)
- # unrepl (3)
- # untangled (72)
- # vim (4)
- # yada (1)
@bbktsk if you end up having to get lots of data in and out of java beans you might try this: https://github.com/uwcpdx/bean-dip/
Hi! Can someone give me a hint on how to add error handling to my logic programs? I already asked in #core-logic, but it's all tumbleweeds and cricket noises there...
I'd like to receive a little more information than ()
when my program fails to produce a result 🙂
I was thinking about a fall through case that unifies an error parameter to something meaningful, but I am not sure if that is a good idea or even how to do it well
is anyone eager to help me? pretty new to clojure so the question is pretty basic 🙂
@spaszek I am new to clojure too but that might be even better as I am familiar with some of the beginner’s struggles. Shoot 🙂
Transit seems to be the way to go for transmitting clj datastructures. ... but it seems to be work in progress: > NOTE: Transit is a work in progress and may evolve based on feedback. As a result, while Transit is a great option for transferring data between applications, it should not yet be used for storing data durably over time. This recommendation will change when the specification is complete. ... and it's been over a year since there was a commit
So I wonder: is it stable? Is it still maintained? Is it still wip? ...?
What I understand from that warning is that the details of how it encodes edn as json or messagepack is subject to change, so if you save something to disk today, there's no guarantee that you can read it back with a future version of transit. If you want to transmit data, you're good.
allright, thx.
another transit question: in order to be able to read json data, it seems one has to stringify it first. Here's a function receiving a POST
request and handling the request (using express/node.js)
(->> req
.-body
(.stringify js/JSON)
(t/read (t/reader :json))
str)
It feels a bit weird to have to stringify first, but that's how it's supposed to work? (Or am I missing something?)right... my feeling as well, but how to make it work properly?
(->> req
.-body
(t/read (t/reader :json)))
doesn't work - oh, that last str
can be omitted, that's just to print it in a readable way.transit
does seem to take a json-string, not a json-object, if I'm right.
So, here’s a question I had over in #beginners about namespace-qualified keywords, if anyone has any thoughts. Thanks. https://clojurians.slack.com/archives/C053AK3F9/p1499543674615216
Just wondering where they are “tragically underused” and where/why I should be using them.
@bfabry found it: express parses json if you add (.use app (.json body-parser))
. I changed that line to: (.use app (.text body-parser #js {:type "*/*"}))
.
(I'll have to refine it a little... having type */*
doesn't seem a good idea, but at least, it works now.)
has anyone had success serving '206 partial content' responses with their favourite clojure http server? i'm trying to serve streamable videos (where 206 responses are required), however https://github.com/remvee/ring-partial-content/blob/master/src/ring/middleware/partial_content.clj doesn't seem to respond with an 'Accept-Ranges: bytes' header.