This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (9)
- # babashka (67)
- # beginners (62)
- # bitcoin (2)
- # clara (1)
- # clj-kondo (62)
- # cljfx (6)
- # cljs-dev (25)
- # clojars (17)
- # clojure (142)
- # clojure-australia (2)
- # clojure-europe (42)
- # clojure-gamedev (2)
- # clojure-nl (31)
- # clojure-poland (10)
- # clojure-spec (14)
- # clojure-uk (30)
- # clojurescript (3)
- # conjure (1)
- # crux (21)
- # cursive (10)
- # data-science (1)
- # datascript (4)
- # datomic (9)
- # depstar (7)
- # fulcro (17)
- # girouette (15)
- # graalvm (44)
- # honeysql (20)
- # jackdaw (3)
- # jobs (8)
- # jobs-discuss (10)
- # juxt (5)
- # lein-figwheel (1)
- # lsp (175)
- # malli (19)
- # pedestal (2)
- # reagent (31)
- # reitit (2)
- # remote-jobs (3)
- # reveal (12)
- # sci (77)
- # shadow-cljs (22)
- # specter (6)
- # startup-in-a-month (2)
- # tools-deps (1)
I'm looking for a sample repo to setup a pretty straightforward static file web server using Graal as a learning exercise I found this, which seems good, but is httpkit still the way to go for a http server? I saw the project says it's unmaintained by the owner but maintained by community users. https://github.com/yogthos/graal-web-app-example
Hi there, folks. I’ve been working on Code Academy “katas” like a good beginner, and I came across this bit of irritation: https://www.codewars.com/kata/5ce399e0047a45001c853c2b/train/clojure
> Let us consider this example (array written in general format):
ls = [0, 1, 3, 6, 10]
> Its following parts:
> ls = [0, 1, 3, 6, 10]
> ls = [1, 3, 6, 10]
> ls = [3, 6, 10]
> ls = [6, 10]
> ls = 
> ls = 
> The corresponding sums are (put together in a list): `[20, 20, 19, 16, 10, 0]`
So, I whipped up the following bit of code, which I was rather proud of!
Cue the sad trombone sounds. At the bottom of the exercise it mentions: “Take a look at performance: some lists have thousands of elements.” My solution works for smaller sets and all the test datasets, but does not work on the longer “Attempt” datasets. Grr. Thoughts on optimization?
(defn parts-sums [ls] (if (empty? ls) '(0) (cons (reduce + ls) (parts-sums (rest ls)))))
Or another question: what’s the most time-consuming part of the problem, and how can you minimize the time you spend doing that?
Hmmm… I’d never seen or tried to use the function
reductions before. One of my attempts was trying to use
reduce but that didn’t work.
Note that the correct solution to the problem given is
The corresponding sums are (put together in a list): [20, 20, 19, 16, 10, 0]
reductions! I just looked up that up. That’s exactly what I need here!
Clojure has a bunch of useful things like that. See also
frequencies, which isn’t relevant to this, but it’s also a cool function.
Team, I have service endpoint which has authentication, I am able to get the result in postman, I wanted to integrate same in my application using clojure, Which are the api I can use? I started with composure, But I did not get how to access endpoint via clojure
As a client, there are several, for example
are two that immediately come to mind.
No. If I read you correctly, you want to invoke an external 3rd party API that is secured by some type of authentication, in order to retrieve data (most likely JSON)?
Execution error (SunCertPathBuilderException) at sun.security.provider.certpath.SunCertPathBuilder/build (SunCertPathBuilder.java:141). unable to find valid certification path to requested target
@U01J3DB39R6 If you are using
clj-http, you should look at the
http-kit has the
:insecure? option but I'm not sure how it handles
Groovy. Glad that got you off the ground. Just be wary of that
:insecure? setting - it does what it says on the tin, and makes things less secure. Fine for development but if you are putting things into production I'd recommend either getting a properly signed cert, or looking into the
So in order to set a custom read timeout in a google analytics api request, I had to write https://developers.google.com/api-client-library/java/google-api-java-client/errors in clojure with java interop. I ended up using reify:
However, according to the well-known "https://raw.githubusercontent.com/cemerick/clojure-type-selection-flowchart/master/choosingtypeforms.png?" flowchart, when you want to extend an existing class, you need to use proxy. Is the flowchart outdated or could proxy really have some edge over reify in this particular case?
(defn set-http-timeout [request-initializer] (reify HttpRequestInitializer (initialize [_ http-request] (.initialize request-initializer http-request) (.setReadTimeout http-request (* 3 60000)))))
Hi, can I ask for some support? I have a Leiningen project that does not work for some reason but I don't know why. https://github.com/audriu/gorilla-rpl-try I run lein gorilla` as shown in this example http://gorilla-repl.org/start.html I just need to find out if this is problem with my setup or I am doing something stupid. The exception is here: https://pastebin.com/9B2QDtrr
The project was created with
lein new app name and just added
:plugins [[lein-gorilla "0.4.0"]] to project.clj
https://github.com/JonyEpsilon/gorilla-repl/issues/291ou are hitting this issue.
change reps in plugins section as mentioned in the comment to [org.clojars.benfb/lein-gorilla "0.6.0"]
When I publish a Clojure library to Clojars, I see allow just for “org.clojars.baader/*” to submit something, but how could I create eg [baader/library-name “0.1.0"], without org.clojars? Just I don’t understand others.. how could setup this.
There were some recent changes to prevent people from using group I'd names that they don't "own" in some sense
depstar will be getting updates this week to "strongly encourage" folks to use group IDs that comply with the new security policy that Clojars is rolling out.
If you own
.org) you should probably use
com.baader as your group name (or
org.baader) so that ownership can be verified. Or
com.github.baader if your library lives on GitHub.
I use Hungarian domain (my company domain), in this case hu.baader ok, btw during this time somebody approved to use baader name (thanks!)
hu.baader/library-name would be nice for you to use (and make sure you don't conflict with any other
baader out there 🙂 )
Good afternoon everybody, I'm back at it with more livestreaming today. We're starting in about 10 minutes if you'd like to join. Stream link here: https://www.twitch.tv/a_fry_ Per usual, I'm mostly going to be live-coding the development of this app: https://startupinamonth.net/pic-story-pitch/ But first I'm starting with a coding exercise warmup, so if you're new to the language, are trying to learn new techniques, or just curious, then feel free to join for the exercise portion! We're doing this coding challenge from the Eric Normand newsletter today, averaging RGB colors: https://purelyfunctional.tv/issues/purelyfunctional-tv-newsletter-400-is-software-design-worthless/ Hope to see you there :man-bowing:
If anybody would like to check out my solution, here it is: https://github.com/andyfry01/clojure-coding-challenges/blob/master/src/main/color-averaging.clj You should be able to copy/paste this into any old REPL and just run it. Enjoy!
Watching REPL Driven Development on http://clojure.tv to learn different programming flow with Clojure. Any other suggestions? I’m currently using Cursive since I’m most comfortable there. Any good resources for RDD in Cursive would be awesome!
@twcrone I don't know of any that use Cursive (maybe ask in #cursive?). I have a couple of videos on my YouTube channel that show my RDD workflow (with Atom/Chlorine and Cognitect's REBL) https://www.youtube.com/c/SeanCorfield_A and I did a couple of meetup talks/live coding recently with VS Code/Clover and Reveal https://www.youtube.com/watch?v=gIoadGfm5T8 (London: an hour and fifteen) and https://www.youtube.com/watch?v=skEXGSp10Xs&t=837s (Provo: the talk starts 14 minutes in and runs 2 1/2 hours).
I love Eric Normand's RDD course on http://PurelyFunctional.tv but that's a subscription service ($49/month).
There's also this from Practicalli: https://practicalli.github.io/clojure/repl-driven-devlopment.html
can’t subscribe anymore…need to pay per video although they are downloadable for free it appears
I've pinged Eric about the subscription stuff -- he still links to it in his weekly newsletter, saying subscriptions are available. I know he closed them down for a while, then opened them back up.