This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-09
Channels
- # aleph (9)
- # bangalore-clj (1)
- # beginners (3)
- # boot (58)
- # cider (19)
- # cljs-dev (5)
- # cljsrn (31)
- # clojure (35)
- # clojure-greece (1)
- # clojure-poland (4)
- # clojure-russia (1)
- # clojure-spec (65)
- # clojure-uk (1)
- # clojurescript (41)
- # data-science (2)
- # datascript (6)
- # devcards (3)
- # emacs (2)
- # hoplon (10)
- # liberator (3)
- # numerical-computing (1)
- # off-topic (1)
- # om (18)
- # onyx (17)
- # parinfer (1)
- # planck (1)
- # re-frame (13)
- # specter (7)
- # uncomplicate (1)
- # untangled (4)
- # vim (1)
- # yada (2)
@borkdude maybe I am late but I think I have often heard "dependency vector"
Hi, I have a REST api where one endpoint takes amongst others a time field as input. Two questions: 1. what is considered idiomatic regarding the apis input. I always assumed passing around UNIX timestamps is a good thing to do. Opinions on that? 2. How do you handle these timestamps in clojure, especially if you want to store them in a relational database later. I see myself juggling JodaTime (java 8), java.sql.Time for postgres and clojure.instant right now, having clj-time in the back of my head as a fourth option.
nice puzzle question: - What’s a good way to inline a function call in a clojure file. For example suppose there was something like (+ 1 2 3) among the source, and I wanted to mutate the source file by inlining this to 6.
@sveri I give you this file:
(ns foo)
;; hello world
(println (+ 1 2 3))
. what would you do to inline (+ 1 2 3)
and maintain the rest of the file, including comments, etc.?@borkdude without some more context I would say I let it do the java compiler later and not care about it at all.
@sveri some more context then. suppose I want to give users of this library: https://github.com/borkdude/boot-bundle the possibility to inline the call to expand-keywords
, so they get a ‘normal’ build.boot
file without a dependency on my library
I could use string search/replace, paren matching, eval, but maybe there is a much better way. tools.analyzer?
@borkdude have you seen https://github.com/xsc/rewrite-clj ? i’ve seen other people suggest it in situations like yours
i'm trying to learn how to reference local maven builds. So far, I'm following the default build for maven as seen here : https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
it's correctly in my m2 directory. And I can add it to my project file [com.mycompany.app.my-app "1.0-SNAPSHOT"]
Depends what the namespace of your Clojure code is (this is totally independent from the name of artifact)
That's strange to me that the name of the artifact would vary depending upon the namespace of my code
i'm working on updating some cider documentation when using locally built and installed maven dependencies.
Hey, does anyone know any ways of bounding an InputStream so I can reference say the 4th MB of data from a large binary file as an InputStream to clj-http. I’ve used BoundedInputStream in java but wondered whether Clojure offered a better solution? Something like take would only defer realization wouldn’t it?
If efficiency is the primary consideration, I’d probably look at java.nio to mmap the large binary file: https://docs.oracle.com/javase/7/docs/api/java/nio/MappedByteBuffer.html