Fork me on GitHub
#admin-announcements
<
2015-12-17
>
seancorfield00:12:22

@markmandel: I think @alexmiller said it wasn’t deliberate… I don’t remember what the upshot of that discussion was tho’…

jethroksy01:12:57

I think that was regarding why youtube comments were disabled

anisoptera01:12:37

disabling youtube comments is a fantastic idea

anisoptera01:12:48

but im pretty sure it was about embedding

seancorfield03:12:37

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.

gabehollombe09:12:23

What’s the go-to clojure library for making HTTP calls and supports websocket connections?

jaen09:12:33

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.

sveri12:12:32

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.

mpenet12:12:09

seems like you're trying to generate JSON from an Async channel, as the error indicates

sveri12:12:52

TBH I just c&p some code from chord

robert-stuttaford12:12:31

sveri your http-kit request or response has an async channel inside it. you need to find and dissoc it before json handles it

sveri14:12:03

@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:

sveri15:12:56

Ok, I found some more middleware I was not aware of that seems to have broken it. Something in noir.util.middleware

sveri15:12:54

To be exact, it was wrap-restful-format, wasn't even aware of it

socksy16:12:29

anyone here used sente?

socksy16:12:33

(not sure which channel to ask about it)

jaen16:12:24

@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.

eyelidlessness17:12:21

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?

tim_h17:12:47

@eyelidlessness: why are you looking for something new css preprocessor wise?

eyelidlessness17:12:14

new project, first in cljs, happy with reagent so far

jaen17:12:21

I use sass, even with Clojure (through boot-middleman) and I'm pretty satisfied.

eyelidlessness17:12:48

i know sass well, have even built up a lot around it, but wondering if the grass is greener.

jaen17:12:51

I kind of miss stylus, but hardly any CSS framework targets it.

eyelidlessness17:12:18

something about s-expressions everywhere is appealing, too

jaen17:12:21

Possibly, but not having CSS frameworks/libraries for the preprocessor of choice is less appealing, unfortunately.

eyelidlessness17:12:52

in the past i've tended to build my own stuff, rather than use third party frameworks/libs

eyelidlessness17:12:09

for instance, i could not stand compass and ditched it rapidly

jaen17:12:10

Though I think I've heard of Garden having one or two libs.

jaen17:12:24

Ah yeah, Compass is weird. I prefer Bourbon if anything.

eyelidlessness17:12:48

i haven't spent as much time with bourbon, only reviewing a past project some. it did seem less awful

eyelidlessness17:12:37

anyway, it seems based on this extremely scientific poll, that garden isn't especially popular.

eyelidlessness17:12:48

i may try it out a bit just for my own education

jaen17:12:13

> something about s-expressions everywhere is appealing, too Looks like someone had a similar idea it seems - https://github.com/priyatam/mala

eyelidlessness17:12:29

mesh looks cool

eyelidlessness17:12:49

appears to be config-driven, which fits how i tended to use sass

pat17:12:51

Is there a simple way to make HTTPS post requests from a client lib?

pat17:12:33

looks like i need to try http-kit

jaen17:12:20

Hm, [clj-http](https://github.com/dakrone/clj-http) doesn't seems like it needs any special incantations for example.

rantingbob17:12:00

I realy want to do a port of Bourbon, Neat and Bitters to Garden

rantingbob17:12:27

Bourbon is easily my favourite css framework. I really dig the grid stuff being mixins rather than extra selectors

pat17:12:36

@jaen I do not know how keystore stuff works

jaen17:12:35

But don't you only need them if you self-signed the certs on the remote server?

pat17:12:35

i am trying to test an AWS endpoint, rejects everything i've tried with clj-http

jaen17:12:30

And where did you get the certificate on the endpoint from?

pat17:12:36

amazon handles all that, unless i am misunderstanding

pat17:12:45

http isnt even an option

jaen17:12:17

Don't they have anything regarding that in the documentation? Like the intermediate certificates and whatnot?

pat17:12:45

all I see is stuff pushing me towards their sdk , which for java is dreadful

pat17:12:55

doesn't support API Gateway yet

jaen17:12:44

Well, dang ; /

pat17:12:18

yeah abit bleeding edge problems, gateway+lambda is very promising though

pat17:12:22

^http-kit worked

mattly18:12:09

@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

eyelidlessness18:12:09

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?

mattly18:12:27

1) by default it’s just css. plays nicely with anyone who hasn’t learned less/sass yet

mattly18:12:47

2) vibrant plugin community that aggressively scopes plugins to a minimal feature set

mattly18:12:56

so if you want just autoprefixing, there’s a plugin for that

mattly18:12:04

if you want just css3 variables, there’s a plugin for that

mattly18:12:21

if you want sass-like “mixins” there’s a plugin for that

mattly18:12:41

additionally, there are plugins that go well beyond what less/sass have to offer

mattly18:12:19

“immutable css” enforcement, colorblindness warnings, image & font inlining

mattly18:12:46

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

mattly18:12:21

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

jaen18:12:06

You like a designer who likes hiccup? That's interesting. I'd think it would be too alien for them.

mattly18:12:24

we have a designer that likes hiccup

jaen18:12:58

Yeah, that's pretty cool.

jaen18:12:35

And lol, I used like twice there, sorry for the typo '

eyelidlessness18:12:27

@mattly: thx for all that, very helpful

sveri20:12:33

@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?

yogthos20:12:32

@sveri: yeah it should work with the latest template, I ran into this issue recently though https://github.com/ptaoussanis/sente/issues/181

yogthos20:12:59

I was using slf4j-timbre by default, but turns out that causes issues for sente, so I've removed it for now

yogthos20:12:39

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

roberto20:12:59

ha! I’ve run into issues like that before. Logging libraries dependency conflicts can be the worst

yogthos20:12:37

the worst part is that compiled classes seem to take precedence, so you can't just shuffle dependencies around or add exclusions

roberto20:12:01

yeah, it has been the source of many time sinks

sveri20:12:18

@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

roberto20:12:05

you might want to separate your handlers?

yogthos20:12:09

oh yeah websocket routes have to be defined separately so they don't get wrapped with the regular middleware

sveri20:12:27

Ah, that makes sense

yogthos20:12:35

yeah, with luminus I and up creating separate handlers for that

roberto20:12:58

I do the same, especially since I include both html handlers and rest handlers in the same app.

sveri20:12:07

Do you have by chance an example somewhere?

roberto20:12:13

was one of the things I struggled with initially when I started using ring

yogthos20:12:11

yeah you also have to be careful with compojure

roberto20:12:26

yeah, and adding OAuth is yet another tricky scenario

yogthos20:12:35

any middleware you want to apply to specific routes has to be done using wrap-routes

roberto20:12:52

spent an entire weekend once trying to get OAuth to work, and the issues was the order in which the middlewares were applied

yogthos20:12:59

I'd like to get something like +oauth in luminus, just haven't had time

sveri20:12:41

So you are wrapping defroutes into routes again?

yogthos20:12:08

yeah I end up with something like this

roberto20:12:10

not sure why I had to do that, I just know it worked

roberto20:12:23

playing around trying different things, and this finally worked.

sveri20:12:44

Ok, thank you both simple_smile

roberto20:12:44

I like that

clumsyjedi23:12:49

anyone know any open, public EDN APIs - ie web services