Live data from Hacker News

How much can a Clojure developer do alone?

yyhh.org

91–100 of 106 posts

Re: How much can a Clojure developer do alone?

#92

Earlier quoted context omitted.

I haven’t written any Clojure for a few years now. So my knowledge and technique is out of date, but I have a contrary opinion on “repl driven” development vs many Clojure advocates. In short: your repl compiled code is state that you now have to track in your head. Yeah, great, you can compile a single function and it hot loads. It’s pretty awesome for experimenting and debug, but the longer your repl session is ope…

To me, that's similar to waiting to save your Word document until you have finished editing your document. REPL should be used for rapid experimentation, but then the code should be transferred to a source file and saved before moving on to the next thing.

This comment reveals a view of REPL for non-image based languages.

In clojure, we usually add forms (like functions) to the editor then eval them to update the namespace hosted by a separate REPL running in background.

Often the file is already saved before

Re: How much can a Clojure developer do alone?

#94

I don't use Clojure, but I've applied some of its lessons to my work in Julia. The biggest one is the benefit of using simple, literal datatypes over classes/structs. If a function takes literals, you can just pick it up and run it, and if most of your code uses simple data types, it's more composable by default. The mini-project I'm working on now has just one custom type, if I had written it 2 years ago it would pr…

Pretty interesting topic. I am all for composability. However, I don't necessarily agree with particular benefits of pure data literals. I feel more secure when I wrap even simple types like Strings so that ItemId, UserId is a String but I cannot interchange them.

Similar level of composability with objects and structs can be achieved with generics and traits. I have a code that operates on arrays and matrices however particular implementations depend on the context - it is a DSL embedded into the application. For example I have `lazy matrices` that don't own the matrix or I can have matrices with owned data.

Re: How much can a Clojure developer do alone?

#95

Serious question: is Clojure worth getting sucked into the complicated/verbose/nested Java ecosystem? I've avoided Clojure to avoid Java. Lately digging Rust...

Yes, if you're an application developer that has to build the latest feature to come out of a spin-the-wheel product management meeting. E.g., you're tasked with adding arbitrary custom PDF functionality to your web app. For the majority of tasks, there are Clojure libs but if you need it Java has battle-tested libraries to do all of the tedious (/s) things that keep business-people happy. You can't assume the same for smaller languages/ecosystems.

Re: How much can a Clojure developer do alone?

#96
post #23
post #7

The description here of using the Clojure REPL for development is one of the best I've seen. I think part of the issue is nomenclature -- Read Eval Print Loop applies to lots of systems in lots of languages that many devs are familiar with that are not really what Clojure devs mean when they say "REPL." The actual experience is closer to something like Smalltalk where you alter a running system and experiment with it…

I guess I need to watch some of the videos he links, because this sounds horrible to me. I mostly work in Python, which has a repl (though I'm sure not as complete) and sometimes I poke around in it. But if I am working on a real project, or even just a small script, I always want to run it from the beginning on every invocation, because anything short of that is not proof that it works. "Editing a running system" so…

I do use REPL-driven development even for Python. (And why not? Like Norvig says, Python is basically lisp with traditional syntax.)

> How could you ever know things would actually work?!

Eventually you would run the project from beginning to end to make sure it works. REPL just allows you to by-pass that during development for rapid feedback. If the project takes 2-3 seconds to boot, we are talking about a difference of getting feedback in milliseconds vs several seconds - which makes a huge qualitative difference in developer workflow.

The point is precisely that you do NOT have to run it from beginning on every invocation. Doing it once in a while is enough.

Re: How much can a Clojure developer do alone?

#97
post #6

> I am not using the REPL much, am I doing something wrong? Applies to python, too. I am always surprised if developers and data scientists working with python don't know that ipython, and by extension the python Jupiter kernels, come with a repl that hotloads code changes from local installs: %load_ext autoreload %autoreload 2 Is usually my first cell in a notebook. Repls are so powerful. The repl like behavior of f…

I like Python, but the using the REPL w/ Python's indentation is not fun for me.

That's why you write code in your editor, and just ask your editor to send code to the REPL.

Re: How much can a Clojure developer do alone?

#98
post #23
post #7

The description here of using the Clojure REPL for development is one of the best I've seen. I think part of the issue is nomenclature -- Read Eval Print Loop applies to lots of systems in lots of languages that many devs are familiar with that are not really what Clojure devs mean when they say "REPL." The actual experience is closer to something like Smalltalk where you alter a running system and experiment with it…

I guess I need to watch some of the videos he links, because this sounds horrible to me. I mostly work in Python, which has a repl (though I'm sure not as complete) and sometimes I poke around in it. But if I am working on a real project, or even just a small script, I always want to run it from the beginning on every invocation, because anything short of that is not proof that it works. "Editing a running system" so…

Late to the conversation, but... I think unit vs integration testing is a good model for comparison. When I'm working in a REPL, I'm trying out individual functions to ensure that they provide the desired results (unit). Most functions are referentially transparent (if not totally pure), so this allows for fast/easy experimentation. If I want to test major code paths in a program, I can call "driver functions" or primary code paths to explore the results (integration). None of this is a substitute for real unit/integration testing, but it makes for some very rapid development. I worked in a lot of "REPL" (Python included) before I had the creme de la creme experience of using Clojure with Spacemacs and Cider. It's truly a different beast, and I'd withhold judgement until you've tried it (or something very comparable).

Re: How much can a Clojure developer do alone?

#99

Earlier quoted context omitted.

I like Python, but the using the REPL w/ Python's indentation is not fun for me.

That's why you write code in your editor, and just ask your editor to send code to the REPL.

Why not just run the file? To be more specific, I get a lot of value out of Ruby, Elixir, and JavaScript REPLs because I can type right into them to try stuff out in one long, ridiculous command. If I have to type in a file, I'm just gonna run the file & print the result.

Re: How much can a Clojure developer do alone?

#100
post #3

Great article. Even in a large enterprise, where the prevailing organizational ideology centers around building the largest headcount you can for political sway... I've kept my team small on purpose, and we were able to be very effective by adopting clojure. We have sway because we deliver- and that's a different type of leverage than headcount. We don't get thrown every hot potato, instead we're consistently aligned…

This totally makes sense in a startup context, but how does this work in a large enterprise? For instance, who signs off on "critical portfolios" being migrated to clojure, and who maintains these pieces when your team moves onto the next project?

First, if you haven't worked in a large "non-tech" enterprise, you might be surprised to find out it's just 100 startups with a common name and financing. The bigger the company, the less technical cohesion across teams. It's a blessing and a curse. I'm technically in a "business unit" as opposed to IT, so we're more focused on tangible KPIs. When you turn around innovative results in the biz domain consistently, no one really questions your tooling.

We started a new space Data Eng/ Data Sci and then it became critical. We've been able to maintain products by building long term platforms/systems that meet current and (anticipated) future needs in clojure. Initially, product and platform/system was all the same team. We've grown a little and now individuals tend to focus more on one or the other, but we're still We maintain everything we've built to date, and we planned for that going in. Clojure's other superpower is that it is stable AF over long periods of time, handles refactors and testing well.

As for signoff in adopting clojure... our VP is old hat in clojure/lisp. We got lucky.

Post reply on HN