Fork me on GitHub

many use Clojure on their day job?

✔️ 32

@joel380 I think quite a few of us do, yes. I've been using Clojure in production since 2011, Clojure 1.3 Alpha 7 or 8. We have 1.10.1 Beta 1 in production right now.


We have about 82,000 lines of Clojure (about 19,000 lines are tests).


I’ve been doing full-time Clojure/ClojureScript for over a year now. Good times. 😎


I’m having a weird problem and wondering if anyone else is seeing the same thing. I have a MacBookPro, and lately when I wake my laptop first thing in the morning, IntelliJ displays a dark grey window with nothing in it except a black bar on the left side that slowly grows towards the right, and after a few seconds, my fan comes on like it’s really grinding away at the CPU. I have to Force Quit and restart every day. Might be related to unplugging it from my external monitor at night, and plugging back in the next morning. Since this started happening, I’ve run Invalidate Caches/Restart, and also upgraded IntelliJ. Anybody ever see anything like that?


This only happens on my work computer. I have nearly the identical setup on my personal MBP, but I never have this problem there.


I don't have it, while I almost never power down/restart my laptop, and almost always have IntelliJ open.


Yeah, same here, sleep/wake only, for both computers. One has the problem, the other doesn’t. They even share the same external monitor, which is why I have to unplug and re-plug every day.

code star 822:04:32

It might not be a problem with your Mac. Jetbrains has had problems with memory leaks and bugs. Sounds like the fan is kicking on because of Jetbrains heating up your CPU. Probably another Jetbrains bug.

code star 822:04:41

But I also have had problems with apple USB c. But that is a different problem. Yours sounds software related. Do you have less memory on the MacBook with the problem?

code star 822:04:55

I don't want to accuse Jetbrains either. But my Rubymine started crashing after the license expired. And it was always stable during the license. Jetbrains is now a pay per yearly license, rental model.

code star 822:04:27

I think the IntelliJ pro suite is $500 per year

code star 823:04:20

Also... I might try eclim because I really am dreading using Jetbrains. One time, the internet connection failed inside it without any error on the UI. Lost a day of work...

code star 823:04:23

I do love Jetbrains. But if I pay $500 per year, I want the basic features to work like debugger, internet and no memory leaks.


Follow-up: the mysterious lock-up went away after I closed a window with an Elixir project in it. :thinking_face:


Is there a trick in Clojure 1.10 to have the import macro, not alias a class? This wasn't an issue in 1.8 E.g. (import 'com.codahale.metrics.riemann.RiemannReporter) adds an alias to the namespace that I have to remove with (ns-unmap *ns* 'RiemannReporter) to avoid conflicts.


you don't need to import if you don't want an alias


that's all that import does


java classes are not like clojure namespaces that need to be required

👍 4

they are loaded on use


if you need to force intialization (e.g. if the static initializer of the class is side-effectful) you can use a toplevel Class/forName to force it


Ah cool, didn't know that. Thanks!


Ruby is joining Python with built-in syntax for type annotations. Some info on the related type system here:

code star 822:04:54

This is awesome. Type hints and generics in Python. I always thought types should be optional in a language...

Daniel Hines13:04:24

Are these optional, like Typescript or Core.Typed?


I believe so

Daniel Hines13:04:52

Cool. I really enjoy using Typescript. Maybe with more people working on similar problems, Core.Typed will see some breakthroughs.


as long as it’s optional and doesn’t get in the way, that’s very nice


I hope so! I think structural types (similar to what spec has been attempting with map specs, but checked statically) would make core.typed much more useful. And definitely needs some saner defaults for interop with unannotated code and Java code.

code star 822:04:38

I watched a StrangeLoop video on Type Systems. They suggested structural type systems. And said to look at Typed Clojure. I do find myself wanting to add a type into the name of methods so I know what it returns.


yes, that’s what I like about PureScript as well (it’s called row polymorphism over there I believe)

code star 822:04:24

Wow. Type Script also has a structural type system with factory support for generics...


Cool! Hadn’t seen spectrum


can you do the same kind of thing with crux as Datomic?


(minus the extra time dimension)?


@borkdude I think so, yeah :) don't fully understand your question.


There's big overlap I think.


@dominicm rephrased: for OSS projects where I would normally start with Datomic Free, would Crux be a good alternative?


Definitely! It's open source after all! There's an integrant integration in edge also with a readme for documentation.


I'm prepping a repo for new people to come and code on. I'd like them to explore it on their own before I give a personal walkthrough. How do you best document a "trail" that leads them through the relevant parts of the code, in an order that I think is helpful? I.e. I would say "start with namespace A, then explore namespace B,...". Or is this futile - should I just leave people to explore in whatever way they want?


> should I just leave people to explore in whatever way they want? Maybe you can suggest try following how a HTTP request flows throughout the project structure: controller.clj -> model.clj -> system.clj (webapp-specific example, obvs) --- A pattern that might also help is separating "api" from "impl" ns's. e.g. foo.clj + foo/impl.clj That way newcomers can focus on the "api" ns's, which will have ~20% of the project's total code. That way they won't get overwhelmed with ns size and mostly irrelevant stuff

code star 822:04:28

You could use git annotations/blame. And tell them to follow a certain git user and their code.


You can give them a recommended path but say that those who want to simply explore should do so.

code star 822:04:38

I have a serious question. Do you think I could benefit from running the JVM on my own servers. Not the cloud. But servers I built. Because of the tuning capabilities of the JVM.


Not sure what your asking. There are many ways to run multiple jvm on one machine, or even on a cluster of machines. But if you want you can get vm's from amazon, just like you would your own vm. It does is often the case with the cloud that memory==cpu. So if you want more cpu you also get more memory, and if you need more memory you get more cpu. So I could imagine if you almost only need one of those, having your own servers might be 'better'.

code star 814:04:56

Ahh. I didn't think of that benefit. Running multiple Java virtual machines