admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
seancorfield 2015-12-17T00:27:22.001968Z

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

jethroksy 2015-12-17T01:56:57.001970Z

I think that was regarding why youtube comments were disabled

2015-12-17T01:57:37.001971Z

disabling youtube comments is a fantastic idea

2015-12-17T01:57:48.001972Z

but im pretty sure it was about embedding

seancorfield 2015-12-17T03:07:37.001973Z

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.

gabehollombe 2015-12-17T09:28:23.001977Z

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

jaen 2015-12-17T09:40:33.001978Z

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.

2015-12-17T09:52:05.001979Z

@gabehollombe: I encourage you to check out jet https://github.com/mpenet/jet

👍 3
gabehollombe 2015-12-17T09:52:44.001981Z

sweet. ty

sveri 2015-12-17T12:01:32.001983Z

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.

mpenet 2015-12-17T12:17:09.001984Z

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

sveri 2015-12-17T12:17:52.001985Z

TBH I just c&p some code from chord

robert-stuttaford 2015-12-17T12:45:31.001986Z

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

sveri 2015-12-17T14:52:03.001987Z

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

sveri 2015-12-17T15:12:56.001989Z

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

sveri 2015-12-17T15:13:54.001990Z

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

socksy 2015-12-17T16:27:29.001991Z

anyone here used sente?

socksy 2015-12-17T16:28:33.001992Z

(not sure which channel to ask about it)

jaen 2015-12-17T16:37:24.001993Z

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

2015-12-17T17:18:21.001994Z

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_h 2015-12-17T17:19:47.001995Z

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

2015-12-17T17:20:14.001996Z

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

jaen 2015-12-17T17:20:21.001997Z

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

⬆️ 2
2015-12-17T17:20:48.001999Z

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

jaen 2015-12-17T17:20:51.002Z

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

2015-12-17T17:22:18.002001Z

something about s-expressions everywhere is appealing, too

jaen 2015-12-17T17:23:21.002002Z

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

2015-12-17T17:23:52.002003Z

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

2015-12-17T17:24:09.002004Z

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

jaen 2015-12-17T17:24:10.002005Z

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

jaen 2015-12-17T17:24:24.002006Z

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

2015-12-17T17:24:48.002007Z

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

2015-12-17T17:25:37.002008Z

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

2015-12-17T17:25:48.002009Z

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

jaen 2015-12-17T17:26:13.002010Z

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

2015-12-17T17:27:29.002014Z

mesh looks cool

2015-12-17T17:27:49.002015Z

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

pat 2015-12-17T17:33:51.002016Z

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

pat 2015-12-17T17:34:33.002017Z

looks like i need to try http-kit

jaen 2015-12-17T17:36:20.002018Z

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

2015-12-17T17:37:00.002022Z

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

2015-12-17T17:37:27.002023Z

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

pat 2015-12-17T17:37:36.002024Z

@jaen I do not know how keystore stuff works

jaen 2015-12-17T17:38:35.002025Z

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

pat 2015-12-17T17:39:35.002026Z

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

jaen 2015-12-17T17:40:30.002027Z

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

pat 2015-12-17T17:41:36.002028Z

amazon handles all that, unless i am misunderstanding

pat 2015-12-17T17:41:45.002029Z

http isnt even an option

jaen 2015-12-17T17:43:17.002030Z

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

pat 2015-12-17T17:44:45.002032Z

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

jaen 2015-12-17T17:45:14.002033Z

How about https://github.com/mcohen01/amazonica?

pat 2015-12-17T17:45:55.002036Z

doesn't support API Gateway yet

jaen 2015-12-17T17:46:44.002037Z

Well, dang ; /

pat 2015-12-17T17:47:18.002038Z

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

pat 2015-12-17T17:53:22.002039Z

^http-kit worked

pat 2015-12-17T17:53:42.002040Z

or not

mattly 2015-12-17T18:17:09.002042Z

@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

2015-12-17T18:18:09.002045Z

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?

mattly 2015-12-17T18:19:27.002046Z

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

mattly 2015-12-17T18:19:47.002047Z

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

mattly 2015-12-17T18:19:56.002048Z

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

mattly 2015-12-17T18:20:04.002049Z

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

mattly 2015-12-17T18:20:21.002050Z

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

mattly 2015-12-17T18:20:41.002051Z

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

mattly 2015-12-17T18:21:19.002052Z

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

mattly 2015-12-17T18:21:46.002053Z

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

mattly 2015-12-17T18:22:21.002054Z

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

jaen 2015-12-17T18:23:06.002055Z

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

mattly 2015-12-17T18:23:24.002056Z

we have a designer that likes hiccup

mattly 2015-12-17T18:23:29.002057Z

:simple_smile:

bostonaholic 2015-12-17T18:23:36.002058Z

lucky

jaen 2015-12-17T18:24:58.002059Z

Yeah, that's pretty cool.

jaen 2015-12-17T18:25:35.002060Z

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

mattly 2015-12-17T18:26:07.002061Z

heh

2015-12-17T18:31:27.002062Z

@mattly: thx for all that, very helpful

sveri 2015-12-17T20:35:33.002068Z

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

yogthos 2015-12-17T20:36:32.002069Z

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

yogthos 2015-12-17T20:36:59.002070Z

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

yogthos 2015-12-17T20:37:39.002071Z

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

roberto 2015-12-17T20:37:59.002072Z

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

yogthos 2015-12-17T20:38:37.002073Z

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

roberto 2015-12-17T20:39:01.002074Z

yeah, it has been the source of many time sinks

sveri 2015-12-17T20:39:18.002075Z

@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

roberto 2015-12-17T20:40:05.002076Z

you might want to separate your handlers?

yogthos 2015-12-17T20:40:09.002077Z

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

sveri 2015-12-17T20:40:27.002078Z

Ah, that makes sense

yogthos 2015-12-17T20:40:35.002079Z

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

roberto 2015-12-17T20:40:58.002080Z

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

sveri 2015-12-17T20:41:07.002081Z

Do you have by chance an example somewhere?

roberto 2015-12-17T20:41:13.002082Z

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

roberto 2015-12-17T20:41:50.002083Z

here is a short example https://github.com/uris77/pasmo-gigi-maps/blob/master/src/pasmo_gigi/geo/handlers.clj

yogthos 2015-12-17T20:42:11.002085Z

yeah you also have to be careful with compojure

roberto 2015-12-17T20:42:26.002086Z

yeah, and adding OAuth is yet another tricky scenario

yogthos 2015-12-17T20:42:35.002087Z

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

roberto 2015-12-17T20:42:52.002088Z

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

yogthos 2015-12-17T20:42:59.002089Z

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

👍 2
sveri 2015-12-17T20:43:41.002090Z

So you are wrapping defroutes into routes again?

roberto 2015-12-17T20:43:57.002091Z

yeah

yogthos 2015-12-17T20:44:08.002092Z

yeah I end up with something like this

roberto 2015-12-17T20:44:10.002093Z

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

roberto 2015-12-17T20:44:23.002094Z

playing around trying different things, and this finally worked.

sveri 2015-12-17T20:44:44.002096Z

Ok, thank you both :simple_smile:

roberto 2015-12-17T20:44:44.002097Z

I like that

2015-12-17T23:57:49.002102Z

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