This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-13
Channels
- # announcements (34)
- # aws (1)
- # beginners (99)
- # boot (19)
- # calva (26)
- # cider (24)
- # cljdoc (8)
- # cljs-dev (29)
- # clojure (107)
- # clojure-dev (3)
- # clojure-europe (12)
- # clojure-finland (1)
- # clojure-italy (24)
- # clojure-nl (5)
- # clojure-spec (13)
- # clojure-sweden (3)
- # clojure-uk (36)
- # clojurescript (4)
- # community-development (14)
- # cursive (3)
- # data-science (6)
- # datascript (57)
- # figwheel-main (3)
- # fulcro (9)
- # graalvm (11)
- # hoplon (18)
- # jobs (1)
- # jobs-discuss (2)
- # joker (10)
- # leiningen (13)
- # off-topic (23)
- # other-languages (1)
- # pathom (24)
- # pedestal (5)
- # re-frame (6)
- # reagent (45)
- # reitit (3)
- # rewrite-clj (1)
- # spacemacs (2)
- # sql (23)
- # tools-deps (6)
- # vim (5)
@kari.marttila Since I’ve started using Clojure, I’ve tried finding ways to use REPLs in other languages since I now cannot imagine working any other way.
The only other system I've ever used with anything approaching Clojure's REPL experience is Smalltalk @matt.wistrand
I use the Node.js REPL all the time, but have found nothing close to Clojure’s REPL integration 😕
Emacs/Cider and IntelliJ/Cursive https://www.surveymonkey.com/results/SM-S9JVNXNQV/ (Q12)
The most commonly used editor is Emacs @thegobinath
Among traditional IDEs, I think Cursive / IntelliJ is the most common.
Atom and VS Code are also popular.
that's a popular choice if you don't want to spend months fine-tuning handcraftet emacs setup
It's minority, but yes some folks use that.
If you're learning Clojure, my advice is: use whatever editor you're most used to, as long as it has a Clojure integration.
The key thing is to develop a good REPL-based workflow.
LightTable was very cool when it appeared but it has been abandoned.
A new team is trying to get it going again but I'm not going to hold my breath...
I used Emacs for years. Now I use Atom. At first I used Atom with ProtoREPL. Now I use Atom with Chlorine. Like I say tho', use whatever you're most familiar with as long as it has a Clojure integration.
this could be old, I somehow stumbled with this small framework: https://coastonclojure.com What I like with it is it's opinionated and just uses a Makefile with deps.edn, this can be good intro to beginners who just wants to build something fast (and it's only afaik the framework that imitate rails' workflow, at least main parts of it).
What @seancorfield said: use whatever editor you feel most comfortable; develop a REPL workflow; if something feels good or feels off, address it then.
For Emacs, CIDER is solid. For IntelliJ, Cursive is solid. If you come from other IDEs/editors, use whichever extension/plugin has the best REPL support.
@seancorfield why atom over emacs tho?
I've written about it on my blog http://corfield.org -- editor choices are subjective by definition.
Or use any editor that at least has syntax highlighting capabilities for Clojure and then just the terminal. Most of the time, you just want to code then run it, for exploratory purposes; immediately trying to jump using an advanced text editor just to try a language might actually hinder your progress (and enthusiasm) to try and use the language.
That brings up a slightly different question: anyone had any issues going to a post-8 JDK?
this is a good article on that topic: https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-11/
@U06BE1L6T Cheers!
clj-java-decompiler spits exceptions but i need it for learning, and haven't looked into fixing it yet.
yes cursive + action tree + metro ui https://gyazo.com/ea735661c8b7ecbc1ce6a37a9b198fda.png
I mean, like how you can write React Native Apps, in Clojure, is it possible to Write flutter apps in Clojure?
not certain, but I doubt it. I don't think there's any interop between dart in Java or Javascript
I've written about it on my blog http://corfield.org -- editor choices are subjective by definition.
@penryu @nxtk the objective part recently is that I wanted editor integration with a socket repl rather than nrepl.
It's easy to read environment variables but is there an easy way to set environment variable using Clojure? I'm testing certain things locally with one AWS_PROFILE and with the real AWS service with another AWS_PROFILE and it would be nice to dynamically change the value of that environment variable in REPL.
I think(?) that environment variables are a snapshot of process creation
it sounds like the environment variable is being read by your Clojure program and then some behavior is changed? it would probably be easier to twiddle the value inside the Clojure program, rather than effecting environment variables
you can set environment variables but it's not portable, you can portably set system properties though, and they have a similar utility
if you are willing to restrict yourself OS wise, there are third party libs that let you change env vars
but I agree with @lilactown, if you aren't doing something that needs an env var change (eg. host shell interop...), just use a layer of indirection that lets you tweak things at runtime
eg. use a config map in a namespace, set it from env vars at startup but redefine as needed in the repl
@kari.marttila are you using the cognitect AWS API?
@lilactown: yes, I'm trying Cognitect AWS API in this new experiment.
@noisesmith: Your solution sounds good. I try that.
the docs leave a bit to be desired, but I’m pretty sure there’s a way to specify the profile to use programmatically
... ah, except Cognitect AWS library reads the credentials from AWS_PROFILE env variable...
ouch!
https://github.com/cognitect-labs/aws-api/blob/master/src/cognitect/aws/credentials.clj#L195
Yep. I could do it like that.
yeah, looks like getProperty is using a System property
(System/setProperty "foo" "bar")
Now I got an idea. I use both of your suggestions...
@kari.marttila Cursive will let you set environment vars in the REPL settings dialog
so I think you can do something like:
(aws/client {:api :s3 :credentials-provider (credentials/profile-credentials-provider "profile")})
First I check the config.edn if there is a flag - local-dynamodb, if the flag is on, I ready credentials from config.edn. If not, I use AWS_PROFILE which points to real AWS env.
I use that for dev credentials a lot
How about that?
That way I can dynamically change the flag and use either local DynamoDB for testing or occasionally test using the real AWS DynamoDB...
Yihaa!
Yes, I have set the AWS_PROFILE in REPL settings but this way you can have only one AWS_PROFILE env var in the REPL.
My wife wants to see the latest Game of Thrones episode. Got to go. 🙂
dont do ittttt. Oh no, its too late
Heh... 🙂
It was actually pretty good. Some of the rare series I and my wife like together (I'm a big fan of scifi which she doesn't stand).
But today after my corporate hours - the Clojure learning journey continues! Yihaa!