Fork me on GitHub

@pesterhazy For some reasons, it worked. Is there a bug in those middleware ? Looks like a side effect to me..


For anyone that has used Clojure Lambada for writing Jars for AWS Lambda, is there a way to decrease the size of the standalone when it's unzipped? I keep hitting the limit of lambda. I am trying to include the amazonica library, but it's quite large using the Amazon SDK.


Hey, guys. Can you suggest a topic related to clojure for my bachelor thesis? Will be grateful for any ideas.


@tom you should onlu include the amazonica stuff you actually use


@andrewtropin academic or practical?


@kidpollo I want to do something more practical, but academic is ok for me too.


Find proof that clojure spec is better than a type system 😛


I have a weird thing - I have a very simple app that reads from in and writes to out - it does this explicitly for reasons.


It works fine with “lein run” - but when run from an uberjar, I get no output


found it - bizarre, with an uberjar I have to explicitly call (.flush out) or it doesn’t write.


(.flush \out\)


@abolduc, not a bug, it's just that properly reloading everything is error-prone, so if you run into weird problems, Just Restart The Repl [TM]


@kidpollo It was my first idea, probably I'll try to do some research on that. Any other suggestions?)


@andrewtropin: how about adding negation to datascript: there is even a 300$ bounty and it is both practical as well as academic


Thx a lot @gerrit . It's another interesting topic for me. I'll take a look.


What's the easiest way to do a bounded slurp of a string from an inputstream. Basically I want to reject inputs larger than a certain size (and not consume them into memory)


could obviously write something myself - but wondering if there's anything out there I can leverage easily


Pardon my ignorance, but can I release a personal Clojure project under the GPLv3 license?

Alex Miller (Clojure team)13:08:40

(caveat: this is not legal advice and it is a generally tricky area so probably don’t trust me)

Alex Miller (Clojure team)13:08:21

you can release a Clojure project under GPLv3, however users will not be able to combine that with other Clojure EPL libraries to do anything, so it is not very useful

Alex Miller (Clojure team)13:08:53

there are exception clauses you can add that may make this permissible


Hmm, thanks. Looks like I'll have to research the details.

Alex Miller (Clojure team)13:08:00

you may also want to consider LGPL or Apache 2


slackwise: is there something wrong the EPL for your uses; or do you want to ideologically pick a Free Software License (nothing wrong with that btw).... Are you creating an opensource application or library? If you're writing a library I'd be strongly tempted to pick the EPL license - as other licenses might be unusable for many others. If you're creating an application you might be able to choose GPLv3 - but I don't know the details... for example it might require people to build it locally (rather than have you ship it pre-built etc...)


If the project is an end user app, not a library, there shouldn't be any problems though, right?


Like I said I can't remember the details but there might be problems shipping the binary directly as you will then be distributing EPL code with additional (free software) obligations.... if end users build it they're combining it not you


It would be for ideological reasons, yes. The end result would be a server app and several client apps that the user would have to run and host.


I know I've read conflicting information from just Googling around. I wonder if the EFF would be appropriate to contact to get a confirmation:


Things seem to point to "no" due to using any Clojure libraries that are EPL licensed.


Do we have an official vocabulary about the two arguments to a reducing function? I've seen result and input. I've used acc for result, but I'm not sure if I stole that or invented it.


acc is short for “accumulator”, and has come to us historically from assembler programming


@quoll That would have been why I stole it, if I stole it. 😄


Except that when I did assembly, it was just A.


My assembler was obviously a much later version, with lots of bells and whistles (like mnemonics) that made life trivial for us novice programmers of the day 😉


did not know that "accumulator" came from assembly


I feel a Four Yorkshiremen moment coming on… "Assembler, eh? You were lucky! I had one job where we had to use hexadecimal and poke it directly into memory."


i haven't dug through jira yet but is there any prospect of supporting the #: reader with the other collection literals? e.g. #:foo #{:bar :baz} => #{:foo/bar :foo/baz}.


i can't think of any corner cases off the top of my head where that would be a problem in the reader.


when using jdbc to delete an entire table, we are running (jdbc/delete conn tablename ["1 = 1"]) since it requires a where clause. Is there a better way to do this, like maybe (jdbc/execute! conn ["truncate tablename"])?


@dpsutton you can drop the table


i'd like to not drop and rebuild the table


as then i'd need a script to recreate the table which seems like extra work


it's a temp table we fill with results


so not looking to drop and recreate


@dpsutton I would probably go with truncate; but I also think you can call jdbc/delete with the where clause as just nil


yeah you can call it with nil, just didn't like the way it reads


introducing a new person to the codebase and they were confused by the presence of the "1 = 1", and wanted to see if there was a more readable way to do it


but not a huge deal


@seancorfield memory? you were lucky! we had to wire vacuum tubes.


and we were also lucky! before that, we were building with mechanical gears...


@kidpollo Thanks, I guess I'm not clear on leiningen's way of excluding parts of amazonica, are there any keywords to look up?


in scala, java, etc you have:

whats the equivalent in clojure?


(comment foo bar)


that is not entirely correct


comment is a macro, meaning the arguments to it have to be valid syntax, and it expands to a result


so the behavior can be surprisingly different from comments like //


; is the closest thing, but it is more like // in C


You can just use a multiline string literal


@wanderlustzoe there isn’t a shortcut for multiline comments


thanks everyone!


Is there a clojure http library that provides the option to submit requests with a client certificate? It's not clear to me how one could do it with clj-http.


FYI: that post should specify more clearly that you can totally do it with aleph, I just didn’t need to


or couldn’t because of other reasons


it’s not particularly difficult to do with Aleph, you just need to speak more netty


in general I prefer using http-kit over aleph, but that’s just personal preference


@tanzoniteblack Yes it does! I wasn't aware of the :keystore and :truststore options. I will have to experiment.


So I’m trying to create an image rendering service. I want to render an html page to an image and stream the image to s3. I’m assuming a headless browser is the way to go but i’m curious if people have done this type of thing and if this is in fact the best (or only) way to go about it.


Look up webkit2png


is there documentation somewhere on the format allowed in clojure logging messages and % formatters?


can i do something like: (log/debugf "My float %.1f" my-float-val)


if i want my float to be only one decimal place.


I belive it just uses java’s formatters, so you should be able to use anything specified in (or whatever version of java you’re using)


so “%.1f” will round it to 1 decimal point


cool...gotta stop smoking crack apparently!

Alex Miller (Clojure team)21:08:24

@noprompt that’s been proposed by others. Vectors would be relatively useful and straightforward but the notation fights with literal sets and things seemed less clear by the time we got to that point. So, for now, just maps.


@alexmiller that's surprising it would cause a conflict. it's been a while since i read the LispReader code but it would seem relatively forward (in principle) for #: to read the next form and then determine what to do from there.

Alex Miller (Clojure team)21:08:39

I mean conflicts wrt readability


ha! this is lisp!


i've been moonlighting in array based programming languages so it doesn't offend my eyes. but i can imagine it being a issue for others.