FSet is really cool and I'll probably end up using it in conjunction with https://github.com/fiddlerwoaroof/cl-edn
849 karma · joined September 2, 2015
FSet is really cool and I'll probably end up using it in conjunction with https://github.com/fiddlerwoaroof/cl-edn
However, I have started playing with Lisp (SBCL) a bit in my off time and am finding it interesting. I have a desire to write some CLI applications and think Lisp might be a better fit than Clojure. I was drawn to it for a lot of the reasons you note:
1. Native compilation
2. Reader macros
3. C FFI
4. Debugger
But it's also a bit like learning how to write with my left hand; my brain has been warped by Clojure to eschew place-oriented development and reduce mutability to a pinpoint. Lisp is completely, unabashedly mutable (which gives a lot of room for improved performance vs. immutable) and I'm struggling with it.
I am not very good, but it is definitely my greatest passion. I took a PE class on a whim after a professor talked about it and it has defined my life ever since.
I would love to write our tasks / build config out in org-mode, but running that on someone elses machine w/o Emacs, CI, etc. seems not highly supported.
1. Immutable by default (with sane escape hatches) 2. Fully qualified namespaces 3. Functional (with sane escape hatches) 4. Good interop with host platform
At the beginning of this year, my team started a green field project to replace our old system. I had the chance to steer us toward ReasonML or Clojure(Script), and we decided on Clojure.
The main reasons were:
1. The number and maturity of libraries for Clojure(Script) was much higher 2. Clojure's server-side story was much better, and we needed to write a ton of services as well as client-side code 3. The ecosystem, language & tooling was much more stable for Clojure back then
I think that ReasonML has a ton of great ideas, it just lacks maturity. I love the language itself, but I would not yet want to inflict it upon my team mates who have spent the last 10 years writing Java back-end services. Clojure(Script) ended up being a much better fit and I feel like I am just as productive, if not moreso, than when I was writing code in ReasonML.
Using JS from CLJS is incredibly easy. Like I said, shadow-cljs solved all of our problems there.
Going the other way - using code written in CLJS in JS - is another matter. This is not well supported by the ecosystem. shadow-cljs has much, much better support for this than the standard ClojureScript/closure compiler, but it doesn't hold a candle to what BuckleScript does.
IME, doing a top-down transition - where you convert the top of your app to ClojureScript, that calls everything - works best. From the top, you work your way down into each feature.
ReasonML, on the other hand, works better from the bottom up. Typing your whole app is hard, so you start with some small feature that then you export to JS land (since that's so much easier with BuckleScript). From the bottom, you work your way into writing more and more features in ReasonML.
Once you've handled local state and remote data dependencies, you have like 10% of your app state left. That can easily be solved with a global atom (a la re-frame) or something like the new React context API.
Our understanding of how to handle state, remote data fetching, etc. has grown a lot over the last few years. Both the React & ClojureScript ecosystem went all-in on global state stores like Redux because, at the time, we thought we needed it. It felt like, if we needed a global state store for one thing, that it made more sense to just put everything in there for cohesiveness. It also was hard to determine up-front what was needed globally (mostly data IME) and what was only needed locally.
It turns out that local state and something like apollo/relay/"suspense" for remote data solve the 80-90% case, and now we're getting better tools like React context to handle the last 10%. I don't think that Redux/re-frame is going away, but the number of apps that I would implement with them has gone way down over the years.
The current problem with ClojureScript interop is the Google Closure compiler's support for stuff on npm. I switched our team to using shadow-cljs[0] and it solved all of those problems. Would highly recommend.
1. A pattern to organize their state in that was testable and repeatable
2. A way to maintain global app state without prop drilling
I think that (1) is actually the reason that many people pick Redux in the first place. The amount of global, app-wide state in /most/ applications is fairly small IME. I think that the ReasonML team (which works semi-closely with the React team) is banking on things like Apollo, "suspense", the new context API and other things to further reduce the need for a global state store like Redux.
The ReasonReact devs are trying to follow the principal of least power in providing something that solves (1) for component-level state, which solves the 80%, and wait for the rest of the ecosystem to shake out for the rest.
Look at the cluster that is dependency management in JavaScript, Go, etc. Every ecosystem is solving the same problem over and over, and languages can live and die by the quality and capabilities of their package management system.
It also sucks once you start building projects that are multi-language/ecosystem. It's why so many front-end technologies have just sucked it up and adopted NPM, because it has the most market share and continuing to bifurcate the package ecosystem is too cumbersome for consumers.
It would be much better to solve it /once/, with a tool that provides the lower level constructs. Then tools could be built on top of that to serve specific needs & improve the UX.
Maybe git submodules could be that? Whether it could or not, though, I do think that providing the ability to manage the versions of my dependencies in the same tool that I manage the versions of my own project... makes a lot of sense!
On the surface, the commands are fairly verbose. And (as the article pointed out) the documentation on it could use some love.
However the biggest problem I have encountered while using it, is that what code I actually have checked out is opaque without doing the song and dance of actually checking out each submodule & inspecting the dir. This sucks when evaluating the codebase without cloning e.g. in code review on GitLab/GitHub. And the commands/UX for updating them is just painful and error prone.
Really, the difference between putting something in a git submodule and putting something in a private npm/maven/etc. repo is that I can look at a file and read:
my-dependency v1.1.5
And my human-brain can kind of know what that means.Whereas if I look at a repo with a submodule, I just see a URL and a SHA. And while actually I think that this is a better model for keeping track of versions, it's terrible from a UX perspective.
There's also a whole host of tooling around your languages chosen artifact/package/dependency management that git submodules don't have yet. It's often supported by the same tools we use for compiling and other task running. Git submodules require another thing that lives outside of that ecosystem.
I kind of wish that a mainstream language would just adopt git submodules as part of their de facto package management strategy and build the tools on top of it we need to make it livable.
Having friendly, healthy relationships with your colleagues isn't valuable? Or just with the ones who are women?
Some of my best friendships/allies/contacts have been women who I worked with. I'm very thankful for the opportunities they have provided me and the value they add to my life.
The fact that you see /zero/ value in having genuine connections with women has me even more worried than the fact that the OP was afraid of harassing someone accidentally.
The reason this is so natural for Clojure is that it's a hosted language; the standard library & language itself is decoupled from the runtime platform (JVM).
With Clojure, it's actually funny to think that I have projects on my hard drive that use 3-4 different versions of clojure (not even counting various versions of clojurescript!), without any issues. Doing this with, say, Node.js requires a lot of extra ceremony.
It's why the vim vs. Emacs "war" isn't really a fight over text editing, but an ideological battle of "one tool that does one thing well" vs. "one tool that has everything I ever need."
Personally, I find integration a huge selling point, and the Unix pipe interface leaves a lot to be desired. Writing some elisp code, or (preferably) installing a well-documented layer/package, is preferable to me. The specific tools I need also happen to be well supported in the Emacs ecosystem.
1. Text editing (obviously). spacemacs provides nearly any nifty trick that vim would give you for text editing (and like I said, I'm a believer in the way of modal editing).
2. HTTP client. Emacs has a package called "restclient" that allows you to write what amount to cURL commands - in plain text, with documentation - and execute them in-line within my editor. Other teams I've been on use Postman, which is great, but I like the fact that I can save the file and commit it alongside our services/tests/etc.
3. Note taking & task lists. Org-mode is Emacs killer app. Honestly, I'm still pretty fresh to this whole "being organized" thing. But already I'm finding myself writing more and more notes, TODOs, etc. and it's really helping me on a new project that is complete chaos right now.
4. Clojure IDE. Cursive for IntelliJ comes close, but nothing beats the experience of doing Clojure development in Emacs. Since my team adopted it as our daily workhorse language, I've never had a moment where I wanted to leave Emacs. It's integration with the REPL and LISP in general makes it the most powerful programming environment I've used to date (YMMV).
There might be more... the point is that Emacs is more like an application platform than a text editor, and it has some really powerful applications that have been developed for years. I now have this strange urge to do more and more inside of Emacs, if only because it gives me a common interface into my workflow.
EDIT: Forgot, magit for doing git operations. Great interface and I only (very very rarely) need to drop down to terminal to do things now.
Later, I tried picking it up again, but this time chose spacemacs. Hoooly crap, what a difference.
1. Discoverability. The helm UI is better than any docs, since it's there when and where I need it to find the thing. It also provides the ability to search for arbitrary commands, which is great when you're learning a new mode or layer.
2. Modal editing. I wasn't a vim user before, but spacemacs has converted me over to the modal editing camp. It makes a ton of sense now and is a joy to use alongside Emacs' power.
3. The layer system is way easier to use than ELPA directly and takes most of the pain of configuring packages away.
For someone who wanted the power of Emacs without having to touch the insides, spacemacs is wonderful and has fully converted me over to using it everyday!
I think that Elm and Elixir fit their respective development niches (UI, distributed systems) extremely well, both have similar community cultures, and both started gaining some traction at around the same time.