workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
clojurians | clojure | on top of kubernetes | 2017-10-24T07:40:07.000113 | Cecilia |
clojurians | clojure | we are doing whole bunch of stuff where AWS lambda wouldn’t be enough, especially performancewise | 2017-10-24T07:40:41.000268 | Cecilia |
clojurians | clojure | and long lived stuff which isn’t possible with that etc | 2017-10-24T07:41:00.000068 | Cecilia |
clojurians | clojure | I agree, lambda does not sound like the right use case for your project; good luck! | 2017-10-24T07:42:13.000249 | Berry |
clojurians | clojure | “project” :slightly_smiling_face: | 2017-10-24T07:42:32.000101 | Cecilia |
clojurians | clojure | and FYI, it’s Zalando. | 2017-10-24T07:42:41.000483 | Cecilia |
clojurians | clojure | and all the other stuff under the hood which isn’t the fashion store | 2017-10-24T07:43:01.000408 | Cecilia |
clojurians | clojure | and lambda could definitely be used in some parts of the system | 2017-10-24T07:43:57.000368 | Cecilia |
clojurians | clojure | as it is now it’s not being used due to unpredictable costs at this scale | 2017-10-24T07:44:31.000395 | Cecilia |
clojurians | clojure | yeah; if you are running a huge shopping site, you should probably go the Amazon route and build Zalando Web Services | 2017-10-24T07:45:08.000282 | Berry |
clojurians | clojure | well, currently everything is on top of AWS | 2017-10-24T07:45:27.000090 | Cecilia |
clojurians | clojure | but I can see the company slowly building abstraction layer between AWS and Zalando stuff | 2017-10-24T07:45:43.000161 | Cecilia |
clojurians | clojure | like the Kubernetes change from EC2 instances | 2017-10-24T07:45:52.000166 | Cecilia |
clojurians | clojure | ```
(doto (new ChromeOptions)
(.addExtensions (list (java.io.File. "chrome/my-extension.xpi"))))
```
to answer my own question, list was needed around the extensions. Undescriptive error message and strange documentation. | 2017-10-24T08:36:46.000244 | Lily |
clojurians | clojure | So, given a honey-sql statement as | 2017-10-24T09:03:40.000351 | Virgil |
clojurians | clojure | ```["UPDATE my_table SET foo = ? where id = ?", "bar", 1]``` | 2017-10-24T09:04:21.000388 | Virgil |
clojurians | clojure | is there a function in java.jdbc or honeysql which gives me | 2017-10-24T09:04:51.000313 | Virgil |
clojurians | clojure | ```"UPDATE my_table SET foo = 'bar' where id = 1"``` | 2017-10-24T09:05:17.000456 | Virgil |
clojurians | clojure | eg, a function from prepared-statement to string. | 2017-10-24T09:05:38.000604 | Virgil |
clojurians | clojure | <@Cecilia> how much of a learning curve is kubernetes | 2017-10-24T09:05:42.000452 | Corazon |
clojurians | clojure | well it has some, but it depends on which side you are looking at: user of kubernetes as a dev or ops guy keeping it up | 2017-10-24T09:06:13.000062 | Cecilia |
clojurians | clojure | no experience on the latter | 2017-10-24T09:06:19.000235 | Cecilia |
clojurians | clojure | ok | 2017-10-24T09:06:37.000023 | Corazon |
clojurians | clojure | <@Virgil> probably not, given that most db drivers don't actually do any escaping in prepared statements - they pass the values directly to the db | 2017-10-24T09:22:33.000357 | Fe |
clojurians | clojure | <@Fe> yeah, I figured as much after a while… | 2017-10-24T09:37:19.000808 | Virgil |
clojurians | clojure | hi guys | 2017-10-24T10:01:44.000502 | Mallory |
clojurians | clojure | nobody can help me | 2017-10-24T10:01:49.000165 | Mallory |
clojurians | clojure | What are you looking for help with <@Mallory>? | 2017-10-24T10:02:39.000339 | Sharlene |
clojurians | clojure | hello guys
[11:00]
i have played with core.async a bit
[11:00]
<https://gist.github.com/aibrahim/85af843ef94c6cda544e596f4ba8b50a>
[11:01]
this a code which pass lists of numbers to each process linearly then each process try to remove multipliers of one number and pass result to other process
[11:02]
the code works fine for example till 10000 odds
[11:02]
when i tried to increase more for example 100000 it's broken
[11:02]
anybody can help in this? | 2017-10-24T10:03:08.000105 | Mallory |
clojurians | clojure | How does it break? | 2017-10-24T10:04:00.000462 | Sharlene |
clojurians | clojure | <@Sharlene> (def odds (rest (filter odd? (range 1000000)))) | 2017-10-24T10:10:12.000352 | Mallory |
clojurians | clojure | <@Mallory>, excuse me, I should be more clear. What error message do you get? Or do you not get any error message at all? :slightly_smiling_face: | 2017-10-24T10:10:51.000057 | Sharlene |
clojurians | clojure | <@Sharlene> <https://gist.github.com/aibrahim/85af843ef94c6cda544e596f4ba8b50a> | 2017-10-24T10:24:44.000307 | Mallory |
clojurians | clojure | This doesn’t look like the entirety of the error output, what this everything that printed out? | 2017-10-24T10:25:43.000238 | Sharlene |
clojurians | clojure | how can i dump full trace error to file ? | 2017-10-24T10:28:48.000053 | Mallory |
clojurians | clojure | what is the builtin for "pprint but out to string rather than stdout" ? | 2017-10-24T11:40:27.000483 | Berry |
clojurians | clojure | `(with-out-str .... (pprint...))` | 2017-10-24T11:41:00.000264 | Guillermo |
clojurians | clojure | <@Guillermo>: thanks | 2017-10-24T11:41:19.000378 | Berry |
clojurians | clojure | <@Virgil> That's an oft-requested feature for `clojure.java.jdbc` but as <@Fe> notes, there's no easy way to get that from a JDBC driver under the hood, unfortunately. I guess my question would be: Why do you need/want this? | 2017-10-24T12:59:48.000068 | Daniell |
clojurians | clojure | <@Daniell> Yeah, I saw some discussion about it on the mailing list. My use case was the following. Given a csv file, I wanted to generate update statements. I wanted to have the actual statements so I could 1) have it reviewed by a teammate, and 2) add it to a migration script. | 2017-10-24T13:03:02.000057 | Virgil |
clojurians | clojure | I ended up just running the honeysql statements through jdbc. | 2017-10-24T13:03:58.000367 | Virgil |
clojurians | clojure | I realize that there are other ways of achieving this, but I had a nail and honeysql looked like a hammer at the time. | 2017-10-24T13:07:54.000624 | Virgil |
clojurians | clojure | HoneySQL is a good way to compose query fragments, and producing vectors of `["sql statement" param1 param2 .. paramN]` is a reasonable representation for review/debugging...? | 2017-10-24T13:08:48.000496 | Daniell |
clojurians | clojure | True, and it’s what I ended up using for review. Doesn’t fit so great in a migration script though. | 2017-10-24T13:10:21.000682 | Virgil |
clojurians | clojure | How can i read batch messages from channel? | 2017-10-24T13:56:45.000201 | Francene |
clojurians | clojure | <@Francene> xform w/ `partition`? | 2017-10-24T14:02:58.000298 | Ferdinand |
clojurians | clojure | another option is a debouncer that pushes all values read after a timeout (time based batching rather than count based) | 2017-10-24T14:06:47.000279 | Margaret |
clojurians | clojure | <@Ferdinand> ok, but how i can set timer to not wait when channel fill to get me full partition? | 2017-10-24T14:06:50.000516 | Francene |
clojurians | clojure | <@Francene> that’s where you want a debounce loop and not a partition | 2017-10-24T14:07:18.000304 | Margaret |
clojurians | clojure | I bet there’s a good library with a debounce in it out there, but there’s definitely gists showing how to do one in core.async | 2017-10-24T14:07:44.000757 | Margaret |
clojurians | clojure | like this <https://gist.github.com/scttnlsn/9744501> | 2017-10-24T14:08:14.000455 | Francene |
clojurians | clojure | this isn’t exactly a standard debounce (since you want to collect all the messages over some timespan, and send all together), but the logic is very similar | 2017-10-24T14:08:19.000051 | Margaret |
clojurians | clojure | ok, thanks | 2017-10-24T14:08:46.000286 | Francene |
clojurians | clojure | yeah- the modification to that would be to attach the new-val to the last-val, and make sure last-val starts as an empty coll | 2017-10-24T14:09:06.000455 | Margaret |
clojurians | clojure | should be easy enough to make and unit test though | 2017-10-24T14:09:17.000265 | Margaret |
clojurians | clojure | is it possible given a `async/chan` that returns maps say `{:foo 2 :bar xs}` where xs is a vector, to flatten transform the channel into one that yields elements of `xs`. `(async/map< #(get :bar []) ch)` gets me the vectors, but ideally I would like the flatten the whole channel (I know that `map<` is depreciated... | 2017-10-24T14:21:38.000433 | Jacob |
clojurians | clojure | so if `xs` was a vec of ints `(<!! ch)` would yield an int | 2017-10-24T14:22:34.000722 | Jacob |
clojurians | clojure | <@Jacob> a transducer should do that | 2017-10-24T14:23:03.000392 | Aldo |
clojurians | clojure | <https://clojuredocs.org/clojure.core/mapcat> ? | 2017-10-24T14:23:24.000057 | Jerry |
clojurians | clojure | (async/chan buf-size (mapcat :bar)) | 2017-10-24T14:23:44.000160 | Aldo |
clojurians | clojure | if I am given the chan (i.e I dont control its creation, should I create a pipe?) | 2017-10-24T14:25:16.000072 | Jacob |
clojurians | clojure | ^^^ Example of this being used
```(let [c (async/chan 10 (mapcat :bar))]
(async/put! c {:foo 2 :bar [1 2 3]})
(async/close! c)
(async/<!! (async/into [] c)))```
returns: ```[1 2 3]``` | 2017-10-24T14:25:16.000386 | Raul |
clojurians | clojure | <@Jacob> yes, you can pipe from the channel you have with the maps onto a channel with that reducer, or just `async/pipeline` to accomplish the same thing without the transducer directly on the channel | 2017-10-24T14:26:01.000418 | Raul |
clojurians | clojure | :+1: | 2017-10-24T14:26:19.000040 | Jacob |
clojurians | clojure | yeah pipe seems like the simplest solution there | 2017-10-24T14:26:39.000165 | Aldo |
clojurians | clojure | or pipeline | 2017-10-24T14:26:48.000363 | Aldo |
clojurians | clojure | is there a way to "perculate" the closing of the channel? can `a/close?` be made to close the channel that I have created a pipeline from? | 2017-10-24T14:39:42.000187 | Jacob |
clojurians | clojure | it tends to go in the other direction, most things in the channel library have an option to close the destination channel if the source channel is closed | 2017-10-24T14:41:12.000168 | Rebeca |
clojurians | clojure | (the docstring for pipe describes exactly this) | 2017-10-24T14:42:54.000349 | Rebeca |
clojurians | clojure | hmm... I guess I will run some tests - just don't want dangling channels | 2017-10-24T14:43:05.000234 | Jacob |
clojurians | clojure | pipe or pipeline will both propagate the close on the source channel. closing the destination channel doesn't make much sense as what do you do with the undelivered messages | 2017-10-24T14:43:46.000555 | Aldo |
clojurians | clojure | flush the channel? | 2017-10-24T14:44:20.000424 | Jacob |
clojurians | clojure | to where? | 2017-10-24T14:44:40.000022 | Aldo |
clojurians | clojure | (loop [] ...) | 2017-10-24T14:44:50.000050 | Jacob |
clojurians | clojure | to the ether | 2017-10-24T14:44:55.000642 | Jacob |
clojurians | clojure | but... | 2017-10-24T14:44:57.000160 | Aldo |
clojurians | clojure | seems bad man | 2017-10-24T14:45:02.000355 | Aldo |
clojurians | clojure | the docs for `pipe` says it'll just stop consuming anyway | 2017-10-24T14:45:34.000340 | Aldo |
clojurians | clojure | so does this look reasonable `s/scroll-chan` is out of my control. it just returns a channel. ```
(defn get-hits [response]
(get-in response [:body :hits :hits] []))
(defn search-channel
([cli index type query-map] (search-channel cli index type query-map {}))
([cli index type query-map params]
(let [ch (a/chan)]
(a/thread
(->> (s/scroll-chan cli {:url [index type "_search"]
:query-string (select-keys params [:search_type :request_cache])
:body (merge {:query query-map}
(dissoc params :search_type :request_cache))
:exception-handler exception-handler})
(a/pipeline 1 ch (mapcat get-hits))))
ch)))
``` | 2017-10-24T14:47:16.000329 | Jacob |
clojurians | clojure | sorry for the extra crud | 2017-10-24T14:47:42.000497 | Jacob |
clojurians | clojure | the a/thread seems strange there | 2017-10-24T14:48:49.000239 | Aldo |
clojurians | clojure | as far as I am aware g/blocks are a bit iffy... | 2017-10-24T14:49:17.000699 | Jacob |
clojurians | clojure | thread pool of 8 | 2017-10-24T14:49:29.000343 | Jacob |
clojurians | clojure | and not great with "long running" requests | 2017-10-24T14:49:39.000473 | Jacob |
clojurians | clojure | I don't think you need either thread or go. the function scroll-chan returns a channel so is presumably asynchronous/fast. a/pipeline starts its own asynchronous operations so returns immediately. so you're creating a new thread that does 2 tiny operations then ends | 2017-10-24T14:50:19.000524 | Aldo |
clojurians | clojure | shit... good point. | 2017-10-24T14:51:05.000279 | Jacob |
clojurians | clojure | I do kinda think `pipe` would've made more sense than pipeline here.
```
(async/pipe
(s/scroll-chan ...)
(async/chan 1 (mapcat get-hits)))
``` | 2017-10-24T14:52:10.000665 | Aldo |
clojurians | clojure | yeah - makes more sense | 2017-10-24T14:53:38.000191 | Jacob |
clojurians | clojure | `pipe` returns the to-chan btw. though it's not documented | 2017-10-24T14:56:56.000505 | Aldo |
clojurians | clojure | scroll-chan has a ch optional arg that is the ouput chan. You can pass a ch with an xform for instance | 2017-10-24T15:46:47.000180 | Weston |
clojurians | clojure | I think all of spandex async functions allow to pass custom chans | 2017-10-24T15:47:38.000199 | Weston |
clojurians | clojure | And yes, scroll-chan is safe in go blocks it returns immediately, under the hood it s all async io | 2017-10-24T15:56:25.000462 | Weston |
clojurians | clojure | is that ok to use let instead of do for else block? | 2017-10-24T15:58:01.000343 | Jerry |
clojurians | clojure | yes, let is a single expression, and it contains an implicit do block | 2017-10-24T16:05:57.000023 | Aldo |
clojurians | clojure | Hi all, I'm preparing a Clojure talk at a local meetup (yay!) and re-watching this talk <https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey> in order to *explain* Clojure.
At 52:34 Rich says "actors definitely do not" support "Point-in-time value perception", contrary to agents.
I do not understand this statement, can someone try to explain it to me? | 2017-10-24T16:33:50.000114 | Carline |
clojurians | clojure | the way to get a value from an actor is by sending it a message and then it will send you message back. agents can be derefed | 2017-10-24T16:37:30.000339 | Rebeca |
clojurians | clojure | so it's the fact that "value perception" is deferred in the case of actors? | 2017-10-24T16:38:30.000311 | Carline |
clojurians | clojure | hola - does the latest leiningen force release/deployments to https? coworker complaining that it seems to be ( our nexus isn’t on https currently ). | 2017-10-24T16:38:38.000555 | Fritz |
clojurians | clojure | you can't just read the sate of an actor right now, you have to effectively put your request in the actor's queue, and the actor will get to it when it gets to it | 2017-10-24T16:39:38.000028 | Rebeca |
clojurians | clojure | <@Carline> Unless you're specifically wanting to bring up agents, eg doing a talk about the Clojure STM, I'd leave them out of the talk. | 2017-10-24T16:39:46.000086 | Virgil |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.