This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-21
Channels
- # aws (3)
- # beginners (98)
- # boot (18)
- # cider (6)
- # cljsrn (8)
- # clojure (56)
- # clojure-dev (11)
- # clojure-spec (3)
- # clojure-turkiye (1)
- # clojurescript (34)
- # core-async (42)
- # cursive (8)
- # datascript (79)
- # defnpodcast (2)
- # dirac (13)
- # emacs (14)
- # jobs-discuss (3)
- # onyx (27)
- # overtone (1)
- # pedestal (1)
- # protorepl (1)
- # re-frame (40)
- # reagent (5)
- # unrepl (29)
- # vim (3)
@noisesmith @kzeidler the problem wasn't the regex but re-find
. Use re-matches
instead with the original simple regex
+user=> (re-matches #"\d+" "1.23")
nil
qqq: what lein beanstalk does is create an uberwar. An uberwar is like an uberjar, but it makes sure not to include the classes that will be provided by tomcat.
when I used elasticbeanstalk I just used lein ring uberwar
to create the war files
@noisesmith : creating + dropping a WAR worked; thanks!
I just want a basic tutorial on how to put a hello world clojure app on elastic beanstalk.i
I’m trying to understand this blogpost. Why exactly do they need the intermediate eduction
?
https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure
@qqq as far as I can remember all you need to deploy clojure apps on beanstalk is a war. Then you can deploy manually from the beanstalk console or use whatever tools you like
hello everyone, what is the best way to stop a go-loop block from outside the loop? right now i have a boolean atom which gets checked, if its false, i omit the (recur)
call
@borkdude Note that parse-json-reducible
takes a single file, but they actually want to operate on (transform) a stream of lines. eduction returns a "reducible application of the transducers to the collection". As the author wrote, "Eduction returns a recipe for the values to come." In their case it's the collection of lines (turned to JSON) as produced by the reader. By doing this they can basically transduce over all lines of all the files.
@borkdude that post uses eduction
as a way of pre-transforming a stream of values. That way the transformation doesn't have to be applied at every use site of the stream.
I know why this post confused me. It assumes that every line in the file is a complete JSON expression. E.g. an input file like this breaks the code:
{“a”:
1}
I read this like this program was going to parse entire files, this is why it didn’t type check in my head
@plins the standard idiom is to make a poison-pill channel, that closes when you want the loop to stop
somewhere in your loop, you use alts! or one of its variants, and if you get the nil from a closed poison-pill channel, you don't recur
I really like the new http://clojure.org site. Maybe the Github README could get a new look as well (e.g. convert to Markdown instead of raw ascii)?
my understanding is the github source is not canonical, it's a clone of the canonical repo, and they don't assume people reading the README are using markdown
@noisesmith the github source is the canonical repo
oh! OK
For ClojureScript it’s different: https://github.com/clojure/clojurescript
@plins the advantage of a channel/ alts! over checking an atom, is that with channel/alts! your loop can be stopped while waiting for something else
A nil returning put/take on a channel you are using can also be used: ex if someone closed the channel upstream. In short, use channel(s) and associated ops
@mpenet definitely true - though I think of that as "the data channel is also the poison channel"
@mpenet but be aware it won't work as expected with a buffer - the go-loop will keep receiving buffered items until the buffer is empty, you want a separate or unbuffered channel if you want immediate exit
and sometimes you might want to close the consumer channel (not that people typically check the return value of channel writes...)
Here, have you ever thought about moving from Slack to gitter to fight over-zealous message archival? https://medium.freecodecamp.com/so-yeah-we-tried-slack-and-we-deeply-regretted-it-391bcc714c81
Hey all I have been out of the API/Backend loop in regards to Clojure. For an university assignment I have the task to introduce an API/Microservice outside of the JAVA EE landscape, usual tips from Uni is to either use Node or Spring. I thought about using clojure, last time I made an API was with ring/compojure. Are there any new way about serving micro services in Clojure?
@eveko You could check out https://github.com/cognitect-labs/vase . It's "microservices as data" from the cognitect guys.
There is also https://github.com/juxt/yada
But if this is just a small toy API it might be simpler to whip up a small app with Compojure. Vase is built on http://pedestal.io/ btw and you can also use it directly (without datomic).
I'm looking for something like clojure.async/pipe
, but that will close the from
channel when the to
channel is closed. any ideas?
@lilactown copy and paste this and update it to do what you want: https://github.com/clojure/core.async/blob/2afc2dc5102f60713135ffca6fab993fb35809f0/src/main/clojure/clojure/core/async.clj#L460-L473
is it possible to add a transducer
to an already created channel? using a http lib which returns a channel
and id like to filter
out non 200 requests
@plins no it's not possible, and that's one reason why it might be better to pass a channel into your function instead of having the function create it