Live data from Hacker News

How much can a Clojure developer do alone?

yyhh.org

61–70 of 106 posts

Re: How much can a Clojure developer do alone?

#61
post #35
post #4

> There is no other language that places such an emphasis on programming directly with plain and naked data literals. Counterexamples: Erlang and Elixir. Arguably also Prolog. Also Lua. Many Schemes, and Racket. Of course, REBOL and Red. TCL probably, too. I can't help but think that people making claims of "no other language has X" are in most cases wrong, and should study a bit more before making them. There's a lo…

F# is a cleaner example of putting data first.

Does F# not put types first and data second?

Would it be idiomatic to do clojure style maps where the map keys end up being treated like pure functions that return a value.

Re: How much can a Clojure developer do alone?

#62
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…

It works much better when using immutable data and mostly side-effect-free functions as is heavily encouraged by Clojure.

Re: How much can a Clojure developer do alone?

#63

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

Depends what you're into. I basically only use Clojure and can't remember the last time I had to know anything about Java. Admittedly I mostly use Clojurescript...

But seriously, I wouldn't worry. You'll have to install Java, and then you won't have to think about Java ever again if you don't want to.

Re: How much can a Clojure developer do alone?

#64
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…

Oh dear lord yes. Autoreload is my saviour in many respects.

I suppose that I come at this from R, where REPL (sortof) driven programming/analysis is a core feature, and until I discovered %autoreload I was feeling very left out in Python.

I guess I sortof understand why it is that way, but it definitely struck me as weird that one wouldn't allow code to be reloaded into a process buffer.

Re: How much can a Clojure developer do alone?

#65
post #10

> Most people need some trainings to be able to get into something new. If they have not been taught REPL driven programming, I don't think they can discover it by themselves, despite maybe hearing others talking about it constantly. Does Emacs count? I don't know Clojure, but I learned elisp for programming emacs and I discovered myself the power of evaluating any part of the code I write on the fly, experimenting w…

Emacs definitely counts given Clojure is largely influenced by Common Lisp and the fact that Emacs is the most popular editor for editing Clojure.

Re: How much can a Clojure developer do alone?

#66
post #54

Earlier quoted context omitted.

> I imagine the developer pool is much smaller but the candidates are higher quality People always say this about their favorite niche language and it always feels a little too self serving with little evidence to back it up. Learning languages is relatively simple and enjoyable, especially when the overwhelming majority of those people never end up working on difficult problems in said language. I think it often giv…

I can see what your getting at but I think this applies beyond programming languages. If you're interviewing someone who is into a niche programming language it can be a sign they are more interested in programming than say, someone who only knows Java etc. Obviously this won't always be the case and can lead to a weird sort of credentialing where people pretend to be into obscure languages. It would be like if you w…

Sure, it's definitely something worth taking into consideration, I just wouldn't value it too highly and in many cases I think there are much better indicators of ability.

Re: How much can a Clojure developer do alone?

#67

Earlier quoted context omitted.

> [1] Why aren't we all writing in APL/K/J if it matters that much? Because most programmers aren't nearly as productive as we could be. And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.

I wonder if there’s a sweet spot for verbosity or if it doesn’t really correlate with bugs or productivity. I end up thinking about this pretty regularly. For example Kdb/q has always fascinated me, my initial reaction was that encoding meaning into fewer symbols surely causes cognitive overload and promotes programmer failure, and yet i saw some python code written by a quant converted to q by a kdb developer. The o…

> The q had exactly the same behaviour except some small changes for data ingestion. Around 500 lines of python, 16, not a typo, 16 lines of q. The performance comparison was absurd too.

I think this comes down to every symbol having a defined behavior that can be optimized around, rather than building a framework for creating your own symbols (functions). Dyalog APL has some similarly insane "beating C"-type benchmarks.

However, if you were to branch out into the more traditional constructs in Dyalog APL or J (K/Q have less of them due to being much, much less generalized), you'd probably see some significant performance decreases simply because they're more generalized. Eg. I doubt that Dyalog APL objects are as optimized as C++ objects.

Note: I have no experience designing languages or building compilers/interpreters. I just wanted to put my two cents in, rather than leave this on the somewhat vague and "mystical" note.

Re: How much can a Clojure developer do alone?

#68

Earlier quoted context omitted.

> [1] Why aren't we all writing in APL/K/J if it matters that much? Because most programmers aren't nearly as productive as we could be. And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.

>And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens. I am totally nitpicking here, but as a longtime Clojure programmer, I do have a bit of APL envy. Aaron Hsu (noted APL guy) made the point that brevity (in the linear, #-of-characters sense) let's you decrease complexity by avoiding indirection---when the body of a…

You may be interested in April[0], a version of APL embedded in Common Lisp so that it can be called as part of a CL program. Also, my own language BQN[1] is a rework of APL that comes much closer to Lisp in that it has first-class functions and closures. It's self-hosted (using a compiler that follows Aaron's strategy), allowing it to be embedded in other languages with relatively little effort, but currently poor performance. There are Javascript and C VMs with another programmer working on one in Erlang; Clojure could definitely be a possibility.

[0] https://github.com/phantomics/april

[1] https://mlochbaum.github.io/BQN/

Re: How much can a Clojure developer do alone?

#69
post #16

Earlier quoted context omitted.

If you write your code the correct way, there wouldn't be any states in your namespaces for you to keep track in your head. That only happens if your code is full of `(def some-state (atom {}))` or something like that. You are basically illustrating my point about "You probably cannot learn Clojure all by yourself". You need a mentor to show you how to do Clojure correctly, or you have the humility to learn the prope…

> If you write your code the correct way, Then you don't need a REPL. This is a very weak argument, overall: there are programming techniques to compensate for any deficiency in the environment. The fact that you need to use them is already worse than not having to worry about it at all. > Sadly, most people would rather just try something and jump onto conclusions immediately. Just a gentle reminder, you're not talk…

Repl development is great for exploration, when you don't quite know the right representation of your problem yet.

The alternatives isn't changing your development environment, it's writing on a white board

Re: How much can a Clojure developer do alone?

#70
post #4

> There is no other language that places such an emphasis on programming directly with plain and naked data literals. Counterexamples: Erlang and Elixir. Arguably also Prolog. Also Lua. Many Schemes, and Racket. Of course, REBOL and Red. TCL probably, too. I can't help but think that people making claims of "no other language has X" are in most cases wrong, and should study a bit more before making them. There's a lo…

> [1] Why aren't we all writing in APL/K/J if it matters that much? Because most programmers aren't nearly as productive as we could be. And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.

> And because "concise" should be measure in the number of tokens needed to achieve certain functionality, not by excessive use of single character tokens.

What's the difference if the symbols were meant to have specific mathematical meanings and are really meant to be the only representation?

Plus, readability is subjective.

Post reply on HN