Live data from Hacker News

(next Rich)

clojure.org

71–80 of 158 posts

Re: (next Rich)

#71

I wrote my first trading system in Clojure because a few of the libraries we relied on were in java. It was 2011 and I'd had about 3 years of lisp experience. I got a bit of side eye from people when I told them I was using a relatively new programming language but the fact that it was based on the JVM, which alot of HFT firms were using helped make the case. We didn't use if for more than a few years before it was r…

> The harder part was porting the algorithm implementation code. The reason was that I chose a common lisp trick of first writing a DSL in Clojure that was then used to write the algos. Doesn't it mean that Lisp macros should really be avoided at all costs?

Can't say for sure, given that my sample size is one.

The upsides of DSL(Domain specific languages) and macros in general is that they cut down on code duplication and give everyone using them a common language and set of tools on which to build an app. That part is awesome and I think really helped to speed up development of the algos that were built on top of the DSL.

The downside is, that you need to learn the DSL but that's a very small impact in my experience. THe larger downside as you and I point out is that those tools aren't really there for other languages so if you do plan on porting the code base to another language then maybe steer clear of macros.

But again, I wouldn't say I have anywhere near enough experience to claim to be an expert in that.

Re: (next Rich)

#72
Hey idk if Rich reads HN but if you do thank you for being a huge inspiration to me when I first started programming around 2014. You've helped change the world for the better. Cheers!

Re: (next Rich)

#73
There are 16 "talks" mentions as of this writing, yet I want to reiterate how important, insightful, useful and fun his talks are and watching them have been. They move a listener to a (next level). Good luck, Rich! Have a nice time in a hammock :)

Re: (next Rich)

#74

I wrote my first trading system in Clojure because a few of the libraries we relied on were in java. It was 2011 and I'd had about 3 years of lisp experience. I got a bit of side eye from people when I told them I was using a relatively new programming language but the fact that it was based on the JVM, which alot of HFT firms were using helped make the case. We didn't use if for more than a few years before it was r…

So you had to switch to C++ because Clojure / Java wasn't performant enough?

> So you had to switch to C++ because Clojure / Java wasn't performant enough?

Clojure yes, java no. Many HFT firms build their systems in java and run on the jvm(specialized hardware aside), its plenty fast if you avoid memory allocations.

It is also possible Clojure is more than up to the task now and its also reasonable to believe that I wasn't a strong enough clojure developer to fix those issues at the time and a more competent developer could have made it work.

But like almost all things if you chose a very out of the mainstream language and start to have issues, most developers will point fingers at the language first.

Side note, its a miracle that Jane Street kept using OCaml after the first few years and points to how strong their core tech team was.

C++ was an external dependency brought on by other systems that needed to be integrated and is a far safer language to use. I'd imagine that if you say HFT to most developers, their first thought would be C++ even if they haven't worked in the domain before.

It's like choosing Julia for your machine learning platform and then switching to python.

Re: (next Rich)

#75
post #61
post #7

FWIW the original announcements in 2020: https://cognitect.com/blog/2020/07/23/Cognitect-Joins-Nubank https://news.ycombinator.com/item?id=23926407 https://building.nubank.com.br/welcoming-cognitect-nubank/ Very interesting story!

one year ago today. I'm guessing the waiting period is over for Rich edit: not one year ago at all

What year and month are you living in? In my timeline these links are 3 years, 12 days old.

Re: (next Rich)

#76
post #46

Earlier quoted context omitted.

thanks for the lesson etymonline

> thanks for the lesson etymonline Perhaps you've never listened to a Rich Hickey talk before but he's notorious for riffing on the meaning of words.

I got downvoted heavily but I genuinely do enjoy etymology. Wasn't at all a negative remark, just a playful jab

Anyways thanks for the explanation. I wasn't in on the meme

Re: (next Rich)

#77

I wrote my first trading system in Clojure because a few of the libraries we relied on were in java. It was 2011 and I'd had about 3 years of lisp experience. I got a bit of side eye from people when I told them I was using a relatively new programming language but the fact that it was based on the JVM, which alot of HFT firms were using helped make the case. We didn't use if for more than a few years before it was r…

So you had to switch to C++ because Clojure / Java wasn't performant enough?

For extremely low latency, Clojure can be an awkward fit. By default there's a lot of sugar in the syntax, so if you need to be precise about the underlying types of your data and the exact datastructure, you need to toss out most of the standard datatypes and datastructures. It's small details like: "I definitely have an array of unboxed integers, and I need to be sure this one operation won't accidentally allocate a new list of boxed integers, and that this function I'm calling doesn't dispatch dynamically" or things like that. You start using `deftype` everywhere, sometimes dipping into Java, etc. You may as well just write java at that point. However from a pure Clojure standpoint, the author of Neanderthal has done great work on making Clojure viable for high performance numerical computing.

Re: (next Rich)

#78
I made two large projects in Clojure: One abandoned startup SaaS and one internal system. Both were a damn joy. They taught me the immense value of loosely coupled components that exchange simple data with each other, from large server components all the way down to module-level coupling. I can only ever view gigantic, monolithic, opinionated web frameworks with a strong degree of skepticism from now on.

Lisp in general was probably the most fulfilling programming rabbit hole I ever followed down, and I don't regret a moment of it. A true gold mine of skill, ability, and thought training that changed the way I program, even in imperative/procedural languages.

Re: (next Rich)

#79

Earlier quoted context omitted.

So you had to switch to C++ because Clojure / Java wasn't performant enough?

> So you had to switch to C++ because Clojure / Java wasn't performant enough? Clojure yes, java no. Many HFT firms build their systems in java and run on the jvm(specialized hardware aside), its plenty fast if you avoid memory allocations. It is also possible Clojure is more than up to the task now and its also reasonable to believe that I wasn't a strong enough clojure developer to fix those issues at the time and…

It's a shame you couldn't have pitched Common Lisp. Maybe could have ported your DSL pretty quickly and wound up having SBCL output nice compiled assembly instructions and shown x% speed improvement without much effort by using a "sister language" of sorts? ABCL in 2011 would have been a harder sell, it only had its 1.0 release that October.

A few years ago another commenter noted they had developed a trading system in Lisp and C https://news.ycombinator.com/item?id=25222297 (further comments elaborate a bit) before being asked to rewrite it in Java. What keeps less popular languages alive at companies, when there's no forcing reason to get rid of it like really unacceptable performance, is a conviction (borne out as far as I can tell) that it's ok to hire people who don't know the language -- they'll get up to speed more than fast enough.

Re: (next Rich)

#80
Well deserved, I'm looking forward to seeing what Rich does next in his free time. Clojure made me love programming again the same way Python once did (the whole Py3k fiasco soured that). I haven't used it in quite a while (switched to Common Lisp) but I'll always be happy to see more Clojure success.
Post reply on HN