I started learning Clojure in 2021 and there are a lot of things that I like about this language/ecosystem. I will try to summarize my experience in this thread.

If you're not familiar with Clojure, here is how the code looks like. Clojure is a Lisp-derivative which is different than most Fortran/C-derivative languages that we use today.
At first, the syntax was very off-putting (my god these parentheses!!), but then you start appreciating the elegance of the language and after sometime you stop being bothered by the syntax.
One of the things that Clojurists (I guess that's what they call themselves 😅) always talk about is how they think of everything as data even the language's syntax! Every Clojure expression is just a plain ol' Clojure list that the complier reads and executes.
And for that reason macros in Clojure are first class citizens (in fact a lot of Clojure built-in functionality is built with macros). Macros are functions that take your code as input (remember your code is just a list data structure) and it transforms your code into...
...another data structure that can be fed into the compiler, and with that you can invent your own syntax and build your own compiler tools. This alone gives you a lot of power. I will give a concrete example of using macros in a later tweet.
Clojure comes with a VERY rich standard library, think of Lodash built into the language, you will find whatever you fancy in that standard library.
Clojure also has novels tools. Two tools which helped my tremendously while writing Clojure code are Parinfer (@shaunlebron) and proto-repl (@jasongilman). Parinfer is an editor plugin that lets you focus on writing Clojure code without having to mess around parentheses...
you just write the opening parenthesis and the tool infers the closing one based on indentation. This tool is brilliant and it helped me avoid many silly mistakes. Check out the website: https://t.co/hDXhCGf3OA
Proto-repl, on the other hand, is a Clojure development environment in Atom, which allows you to execute your program inside the editor and see the results immediately. This also helped a lot while learning. I highly recommend you check it out; it works like magic ✨.
One thing that was off-putting coming from writing Typescript daily is the lack of types and therefore all the tooling that benefits from that. Clojure is a dynamic language which is mostly a great thing except for tooling IMO. Code completion is far from perfect in all major...
...editors and the fact that the editor doesn't understand/infer your program makes it difficult to catch obvious bugs before running the code. I haven't tried clojure.spec and I don't know if it interops with editors/IDEs or not.
One important fact is that Clojure compiles to the JVM, but the amazing Clojure team also built ClojureScript which compiles to JS and you can use it to build SPAs (single page applications).
In my initial testing Clojure experience beats ClojureScript's, especially when it comes to error messages. Error messages in ClojureScript are so bad and I hope that the team fixes this because it's such a showstopper for beginners trying to learn the language for the first time
I was surprised to find that @RoamResearch and @Pitch (which are both quality products) are both built using ClojureScript, I hope that folks from these teams share their experiences with the language.
Now that you know that ClojureScript exists, I want to give an example of a brilliant macro that @roman01la wrote for writing css-in-js (or css-in-cljs I guess 😅). cljss is library that allows you to write style definitions in ClojureScript and using Clojure macros...
... it compiles these definitions into class names and injects the styles in your document, all happening at build time. No need to fiddle around with Babel and ASTs, it all happens natively in the language!
There are tons of learning material out there but I attribute most of my learnings to "Clojure for the Brave and True" the amazing book written by the brilliant and humorous @nonrecursive. Also @richhickey the creator of the language has tons of great talks on YouTube...
here are the ones that I really liked:
- Simplicity Matters
- Clojure Made Simple
- Clojure for Java Programmers Part 1 & 2
@threadreaderapp unroll

More from Tech

There has been a lot of discussion about negative emissions technologies (NETs) lately. While we need to be skeptical of assumed planetary-scale engineering and wary of moral hazard, we also need much greater RD&D funding to keep our options open. A quick thread: 1/10

Energy system models love NETs, particularly for very rapid mitigation scenarios like 1.5C (where the alternative is zero global emissions by 2040)! More problematically, they also like tons of NETs in 2C scenarios where NETs are less essential.
https://t.co/M3ACyD4cv7 2/10


In model world the math is simple: very rapid mitigation is expensive today, particularly once you get outside the power sector, and technological advancement may make later NETs cheaper than near-term mitigation after a point. 3/10

This is, of course, problematic if the aim is to ensure that particular targets (such as well-below 2C) are met; betting that a "backstop" technology that does not exist today at any meaningful scale will save the day is a hell of a moral hazard. 4/10

Many models go completely overboard with CCS, seeing a future resurgence of coal and a large part of global primary energy occurring with carbon capture. For example, here is what the MESSAGE SSP2-1.9 scenario shows: 5/10
1. One of the best changes in recent years is the GOP abandoning libertarianism. Here's GOP Rep. Greg Steube: “I do think there is an appetite amongst Republicans, if the Dems wanted to try to break up Big Tech, I think there is support for that."

2. And @RepKenBuck, who offered a thoughtful Third Way report on antitrust law in 2020, weighed in quite reasonably on Biden antitrust frameworks.

3. I believe this change is sincere because it's so pervasive and beginning to result in real policy changes. Example: The North Dakota GOP is taking on Apple's app store.


4. And yet there's a problem. The GOP establishment is still pro-big tech. Trump, despite some of his instincts, appointed pro-monopoly antitrust enforcers. Antitrust chief Makan Delrahim helped big tech, and the antitrust case happened bc he was recused.

5. At the other sleepy antitrust agency, the Federal Trade Commission, Trump appointed commissioners
@FTCPhillips and @CSWilsonFTC are both pro-monopoly. Both voted *against* the antitrust case on FB. That case was 3-2, with a GOP Chair and 2 Dems teaming up against 2 Rs.

You May Also Like

"I really want to break into Product Management"

make products.

"If only someone would tell me how I can get a startup to notice me."

Make Products.

"I guess it's impossible and I'll never break into the industry."

MAKE PRODUCTS.

Courtesy of @edbrisson's wonderful thread on breaking into comics –
https://t.co/TgNblNSCBj – here is why the same applies to Product Management, too.


There is no better way of learning the craft of product, or proving your potential to employers, than just doing it.

You do not need anybody's permission. We don't have diplomas, nor doctorates. We can barely agree on a single standard of what a Product Manager is supposed to do.

But – there is at least one blindingly obvious industry consensus – a Product Manager makes Products.

And they don't need to be kept at the exact right temperature, given endless resource, or carefully protected in order to do this.

They find their own way.
The first ever world map was sketched thousands of years ago by Indian saint
“Ramanujacharya” who simply translated the following verse from Mahabharat and gave the world its real face

In Mahabharat,it is described how 'Maharishi Ved Vyasa' gave away his divine vision to Sanjay


Dhritarashtra's charioteer so that he could describe him the events of the upcoming war.

But, even before questions of war could begin, Dhritarashtra asked him to describe how the world looks like from space.

This is how he described the face of the world:

सुदर्शनं प्रवक्ष्यामि द्वीपं तु कुरुनन्दन। परिमण्डलो महाराज द्वीपोऽसौ चक्रसंस्थितः॥
यथा हि पुरुषः पश्येदादर्शे मुखमात्मनः। एवं सुदर्शनद्वीपो दृश्यते चन्द्रमण्डले॥ द्विरंशे पिप्पलस्तत्र द्विरंशे च शशो महान्।

—वेद व्यास, भीष्म पर्व, महाभारत


Meaning:-

हे कुरुनन्दन ! सुदर्शन नामक यह द्वीप चक्र की भाँति गोलाकार स्थित है, जैसे पुरुष दर्पण में अपना मुख देखता है, उसी प्रकार यह द्वीप चन्द्रमण्डल में दिखायी देता है। इसके दो अंशो मे पीपल और दो अंशो मे विशाल शश (खरगोश) दिखायी देता है।


Meaning: "Just like a man sees his face in the mirror, so does the Earth appears in the Universe. In the first part you see leaves of the Peepal Tree, and in the next part you see a Rabbit."

Based on this shloka, Saint Ramanujacharya sketched out the map, but the world laughed