This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-31
Channels
- # adventofcode (1)
- # beginners (24)
- # boot (10)
- # cider (3)
- # cljsrn (11)
- # clojure (83)
- # clojure-dev (8)
- # clojure-russia (1)
- # clojure-spec (6)
- # clojure-uk (3)
- # clojurescript (25)
- # cursive (6)
- # datomic (7)
- # docs (1)
- # emacs (5)
- # hoplon (14)
- # jobs (1)
- # luminus (1)
- # off-topic (13)
- # om (3)
- # onyx (10)
- # parinfer (3)
- # re-frame (1)
- # ring-swagger (1)
- # sql (1)
- # unrepl (62)
As a newcomer to Emacs, am I better off with a vanilla installation + recommended packages (CIDER etc), or Spacemacs in evil mode with the Clojure layer? Is learning Emacs for the first time in evil mode doing myself a disservice?
Depends on whether you're already used to modal editing / vim mode elsewhere. I personally run emacs with CIDER and my own custom config without evil or any of the total conversion suites but I also know a bunch of people that love them.
Spacemacs and doom-emacs are both awesome, although spacemacs is probably the best supported of them all.
Also depends on how much time you want to spend wrangling vs learning your environment.
i'd suggest go for spacemacs -- the out of box experience is a little better. I don't use EVIL (the vim layer) and i have a pretty good experience with spacemacs
Thanks for the input. I started in evil mode and immediately found myself googling for commands, but the resulting Vim keybindings didn't seem to line up with how Spacemacs works (even with taking into account SPC).
In vi wouldn’t it be : w
?
yes, space introduces nested prefixes
(I realise these are dumb questions but will ultimately help me understand which mode to invest in)
so that every command is a series of single keypresses until you hit a leaf of the tree of shortcuts
you can do something similar with vim via leader keys, the difference is that with spacemacs it's not juxt space + some-key, it's space, some-key, another,.... final
fwiw I ended up deciding after decades of usage emacs is too fiddly and I was spending too much time messing with elisp and I just switched to vim
I'm not much for integrating smart functionality into my editor though, I find it becomes difficult to know what's really happening if something breaks when there's so many tool layers
I totally get that. Atom + protorepl is another option I've considered for lightweight development. Cursive is fantastic but IntelliJ is heavy handed.
So I'm sure I'm just overlooking something here, but is there a common function equivalent to the threading macro which will feed the result of function n to n+1 in a list collection?
I switched from Emacs/CIDER to Atom/ProtoREPL a year ago and have been very happy. I was an Emacs user about twenty years ago before I went off to the land of IDEs @joshkh
@bwstearns (apply comp [f1 f2 f3 f4])
?
I was thinking about using comp, I think it works but I was wondering if there was something more threading-macro-ish for familiarity's sakes. I think I may actually have just asked for too much ergonomics from clojure
write a macro?
I'm also dynamically building the chains of functions so it'll be (apply comp (reverse func-path))
which I guess isn't too bad.
Couldn't you just build the chains in the reverse order in the first place?
I want it to be able to be used at run time. I already wrote a macro that was a pain in the ass and I don't think this one will get much performance gain for the maintainability.
The chains are made by shortest path calls on loom graphs. I guess I could just switch the start and finish but that'd just move the reverse call from one place to another.
It's not really a big issue, just that I'm worried I'm overlooking some issue with regards to the behavioral differences between ->>
and comp
It's a hobby library so I'd prefer to waste the time and solve the generic case if possible.
I think the comp idea works. Is there an agreed upon way to write a marco way and a function way of doing things for varied kinds of desired efficiencies?
what's the equivalent of [org.omcljs/om "1.0.0-beta1" :exclusions [cljsjs/react cljsjs/react-dom]]
for deps.edn
?
does anyone else find deps.edn
/`clj tools` a breath of fresh air? lein + boot have both been madness to me the past two days
thank you to everyone who worked on the clj (CLI) tools
no, you're not the only one 🙂
and IIRC, :exclusions are something that hasn't yet been added to deps code
and it's about to get better, the git stuff being worked on in master
will make it even better. I never really liked using maven artifacts anyways.
can tools.reader get me line number and column number for expresiosns / symbols / strings / numbers ?
@tbaldridge: what kind of stuff is coming down the pipe in master
?
you can use git repos as deps. So git url + sha (or something of that nature) in place of maven artifacts
cool, I think I'll be able to ditch package.json after that
tools.reader can get you line number and column number as metadata attached to data values that can have metadata in Clojure, i.e. collections and symbols, but not keywords, strings, numbers, ...
ah, Moreover, by using reader types from clojure.tools.reader.reader-types, if using an IndexingReader, column info is available and both line and column metadata is attached not only to lists, but to symbols, vectors and maps too, when additional debugging info is needed (note that the edn reader doesn't add any line/column metadata at all) among other things
Does anyone have tips for making Spacemacs more powerful for Clojure editing. I’m especially looking for things similar to what I had in cursive. Like being able to comment a few lines and have Parens move etc. Also better autocomplete for bindings etc. Essentially stuff to make it a smoother more IDE like experience?
@alexisvincent I believe you were using parinfer, and there is a parinfer plugin for emacs.
Any idea how this plays with the clojure layer?
Theres a par infer layer 😄
https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bmisc/parinfer/README.org
Thanks
hello guys
I'm working on a re-frame project and I would like to deploy it
I tried to execute lein clean
and lein uberjar
, I get 2 jar files in /target
, I try to execute project_name.jar
and it nicely boots a jetty server
the problem is that no page is served
am I doing anything wrong?
@erhardt.mundt when using your project, how do you start the server?
lein dev
is the dev command something that re-frame defines?
OK - looking at the re-frame template myself, it appears dev uses figwheel to serve your page
do you have a ring handler defined for your back-end?
yes, I do
@erhardtmundt you said you tried project_name.jar, have you tried the other jar generated by uberjar?
the one that isn't an uberjar would just die
I have, but then I saw some error about missing clojure runtime
something like that
when you say "no page is served" do you mean 404, blank page, ?
blank page
any errors in the console?
(the js console, that is)
whoops, it looks like it’s down
@erhardt.mundt do you have ^:export on your main function that gets called from the script tag?
there's a good chance you have something in your cljs that broke with advanced compilation
but there would be js console errors to confirm that if so
thanks @noisesmith, I’ll check it out
clojure-1.9.0.jar does not seem to work by itself without spec, but http://clojure.org releases page only mentions: Requirements: Java 1.6+ (recommended: Java 1.8+)
https://clojure.org/guides/getting_started is the best place to start
this page mentions “Requirements”: https://clojure.org/community/downloads