Fork me on GitHub
#off-topic
<
2019-04-19
>
Joel02:04:09

many use Clojure on their day job?

✔️ 32
seancorfield04:04:25

@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.

seancorfield04:04:58

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

valtteri05:04:50

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

manutter5111:04:19

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?

manutter5111:04:25

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

gklijs11:04:24

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

manutter5111:04:17

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... http://eclim.org/

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.

manutter5115:04:15

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

jeroenvandijk12:04:12

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.

bronsa12:04:59

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

bronsa12:04:03

that's all that import does

bronsa12:04:36

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

👍 4
bronsa12:04:44

they are loaded on use

bronsa12:04:23

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

jeroenvandijk12:04:36

Ah cool, didn't know that. Thanks!

drone13:04:57

Ruby is joining Python with built-in syntax for type annotations. Some info on the related type system here: https://sorbet.run/talks/RubyKaigi2019/#/

code star 822:04:54

This is awesome. Type hints and generics in Python. I always thought types should be optional in a language... https://docs.python.org/3/library/typing.html

Daniel Hines13:04:24

Are these optional, like Typescript or Core.Typed?

drone13:04:59

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.

borkdude13:04:08

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

drone13:04:53

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.

borkdude13:04:42

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... https://www.typescriptlang.org/docs/handbook/generics.html

drone14:04:44

Cool! Hadn’t seen spectrum

borkdude14:04:42

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

borkdude14:04:31

(minus the extra time dimension)?

dominicm16:04:47

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

dominicm16:04:10

There's big overlap I think.

borkdude16:04:24

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

dominicm16:04:57

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

butterguns20:04:48

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?

vemv21:04:35

> 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.

mars0i05:04:52

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.

gklijs08:04:41

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