@markmandel: I think @alexmiller said it wasn’t deliberate… I don’t remember what the upshot of that discussion was tho’…
I think that was regarding why youtube comments were disabled
disabling youtube comments is a fantastic idea
but im pretty sure it was about embedding
I searched the archives. It was in #events on December 13 around 2pm. I can't get to it on my phone to read the whole discussion.
What’s the go-to clojure library for making HTTP calls and supports websocket connections?
I guess http-kit
could git that description, but it's a bit unmaintained recently. There's also aleph
that has both HTTP and websocket clients and it's well maintained.
@gabehollombe: I encourage you to check out jet https://github.com/mpenet/jet
sweet. ty
Hi, I am trying to use websockets with http-kit but get this error: com.fasterxml.jackson.core.JsonGenerationException: Cannot JSON encode object of class: class org.httpkit.server.AsyncChannel
when I try to open one from cljs to clj. I already excluded almost every middleware I found, but the error remains. I am using the latest http-kit version.
seems like you're trying to generate JSON from an Async channel, as the error indicates
TBH I just c&p some code from chord
sveri your http-kit request or response has an async channel inside it. you need to find and dissoc it before json handles it
@robert-stuttaford: I have been trying some more and tried to stay as simple as possible with javascript websocket openening and http-kit websocket endpoint, but still get the same error:
Ok, I found some more middleware I was not aware of that seems to have broken it. Something in noir.util.middleware
To be exact, it was wrap-restful-format, wasn't even aware of it
anyone here used sente?
(not sure which channel to ask about it)
@socksy: yeah, some people have used certainly (I did for one). #C03S1L9DN would probably be best bet if you have to reach those most likely to have some more practical experience.
what css preprocessors are people using? i've used Sass extensively, and Less a bit uh... less so. looking at Garden, which besides being clj is also similar to Hiccup/Reagent. anything else i should look at?
@eyelidlessness: why are you looking for something new css preprocessor wise?
new project, first in cljs, happy with reagent so far
I use sass, even with Clojure (through boot-middleman
) and I'm pretty satisfied.
i know sass well, have even built up a lot around it, but wondering if the grass is greener.
I kind of miss stylus, but hardly any CSS framework targets it.
something about s-expressions everywhere is appealing, too
Possibly, but not having CSS frameworks/libraries for the preprocessor of choice is less appealing, unfortunately.
in the past i've tended to build my own stuff, rather than use third party frameworks/libs
for instance, i could not stand compass and ditched it rapidly
Though I think I've heard of Garden having one or two libs.
Ah yeah, Compass is weird. I prefer Bourbon if anything.
i haven't spent as much time with bourbon, only reviewing a past project some. it did seem less awful
anyway, it seems based on this extremely scientific poll, that garden isn't especially popular.
i may try it out a bit just for my own education
> something about s-expressions everywhere is appealing, too Looks like someone had a similar idea it seems - https://github.com/priyatam/mala
mesh looks cool
appears to be config-driven, which fits how i tended to use sass
Is there a simple way to make HTTPS post requests from a client lib?
looks like i need to try http-kit
Hm, [clj-http](https://github.com/dakrone/clj-http) doesn't seems like it needs any special incantations for example.
I realy want to do a port of Bourbon, Neat and Bitters to Garden
Bourbon is easily my favourite css framework. I really dig the grid stuff being mixins rather than extra selectors
@jaen I do not know how keystore stuff works
But don't you only need them if you self-signed the certs on the remote server?
i am trying to test an AWS endpoint, rejects everything i've tried with clj-http
And where did you get the certificate on the endpoint from?
amazon handles all that, unless i am misunderstanding
http isnt even an option
Don't they have anything regarding that in the documentation? Like the intermediate certificates and whatnot?
all I see is stuff pushing me towards their sdk , which for java is dreadful
How about https://github.com/mcohen01/amazonica?
doesn't support API Gateway yet
Well, dang ; /
yeah abit bleeding edge problems, gateway+lambda is very promising though
^http-kit worked
or not
@eyelidlessness: I’ve been using https://github.com/postcss/postcss on several projects and am hoping to get it integrated into my clj project soon
i've not spent much time with any of the node-based preprocessors. why did you choose postcss? what does it offer over, say, sass?
1) by default it’s just css. plays nicely with anyone who hasn’t learned less/sass yet
2) vibrant plugin community that aggressively scopes plugins to a minimal feature set
so if you want just autoprefixing, there’s a plugin for that
if you want just css3 variables, there’s a plugin for that
if you want sass-like “mixins” there’s a plugin for that
additionally, there are plugins that go well beyond what less/sass have to offer
“immutable css” enforcement, colorblindness warnings, image & font inlining
3) I’ve played around with garden and while I really really want to like it, many common css-isms are very difficult in it
and while one of our designers likes hiccup templates a lot, she agreed that the same idea applied to css was just too difficult to work with
You like a designer who likes hiccup? That's interesting. I'd think it would be too alien for them.
we have a designer that likes hiccup
:simple_smile:
lucky
Yeah, that's pretty cool.
And lol, I used like twice there, sorry for the typo '
heh
@mattly: thx for all that, very helpful
@yogthos: Hi, Did you ever try to use sente with your latest luminus template? And by using sente I mean connecting with a cljs websockt to your server websocket endpoint? Or maybe even some other websocket library?
@sveri: yeah it should work with the latest template, I ran into this issue recently though https://github.com/ptaoussanis/sente/issues/181
I was using slf4j-timbre by default, but turns out that causes issues for sente, so I've removed it for now
the problem is that slf4j-timbre needs to be compiled to implement the slf4j API, and it ends up compiling the specific version of timbre along with its dependencies
ha! I’ve run into issues like that before. Logging libraries dependency conflicts can be the worst
the worst part is that compiled classes seem to take precedence, so you can't just shuffle dependencies around or add exclusions
yeah, it has been the source of many time sinks
@yogthos: Ah no, I am talking about a different problem. I described here today and also added an issue for me: https://github.com/sveri/closp/issues/15 The thing is, disabling this option will remove the params from other AJAX requests. However, I just created a new luminus template with http-kit, site and cljs profile, added sente on front and backend and get the same error
you might want to separate your handlers?
oh yeah websocket routes have to be defined separately so they don't get wrapped with the regular middleware
Ah, that makes sense
yeah, with luminus I and up creating separate handlers for that
I do the same, especially since I include both html handlers and rest handlers in the same app.
Do you have by chance an example somewhere?
was one of the things I struggled with initially when I started using ring
here is a short example https://github.com/uris77/pasmo-gigi-maps/blob/master/src/pasmo_gigi/geo/handlers.clj
yeah you also have to be careful with compojure
yeah, and adding OAuth is yet another tricky scenario
any middleware you want to apply to specific routes has to be done using wrap-routes
spent an entire weekend once trying to get OAuth to work, and the issues was the order in which the middlewares were applied
I'd like to get something like +oauth in luminus, just haven't had time
So you are wrapping defroutes into routes again?
yeah
yeah I end up with something like this
not sure why I had to do that, I just know it worked
playing around trying different things, and this finally worked.
Ok, thank you both :simple_smile:
I like that
anyone know any open, public EDN APIs - ie web services