ITT we pretend that companies used good programming languages

ITT we pretend that companies used good programming languages.

Other urls found in this thread:

shaunlebron.github.io/parinfer/
lfe.io
twitter.com/SFWRedditImages

> pic unrelated.

Actual professional clojure programmer here. Our companies' IT division has 5 backend programmers; this language is so good that 4 of them (including myself) wrote a backend for our internal multitenant federated CRM/CMS that has really low maintenance needs in less than a year.
So, because of that one moved to another project, I went devops, and another one went frontend, leaving only two people to maintain it - which have almost nothing to do (except for when the frontend comes screaming for a new feature) and spend their time improving some marginally visible things and adding support for the new shiny meme stuff.
t. PHP brainlet

Damn, I wish ubisoft knew how to use proper design pattern:
Player player = new Player();

Clojure vs Elixir?

so which of languages on pic should I invent my time into? Already know basics of Scheme from SICP and sort of Erlang/Elixir (learned some OTP but never tried server infrastructure on multiple machines or performance-sensitive database/caching).
Everyone talks good about Clojure but I'm not really into S-expressions, although multiple types of parenthesis seems more readable. Someone already linked me the plugin to solve it automatically based on indentation so I could bear with it.
shaunlebron.github.io/parinfer/

Never used elixir, so I don't really know. Clojure feels really nice though thanks to its LISP heritage. Are you wandering in search for a new language to learn?

So we all pretend that we work at Jane Street?

On real world you had problems with memory consume,inmutability,dinamic typing?

Use STM,atoms,CSP or just plain concurrency.

no I've been learning Elixir/Erlang for the past month or two, it's god-tier but wondered what a company clojurist thought about it.

I was really into clojure for a good month, maybe two last year. Then I realized that there's no escape from the cancer known as Java and stopped. I really like lisp languages but running on the JVM isn't a plus for me.

My main professional language is Python so I'm pretty jelly, wish I had easy & automatic concurrency like in Elixir.

I get hard when I run a nontrivial elixir program and see all cores firing automatically when I check htop.

parinfer is something python programmers use when they switch to lisp-like stuff. It has a big problem - you have no autoformatting, so you get to play with indentation manually all the fucking time.

And god forbid you to use it without having a very sharp sight: I tried it once - *once* - and messed the fuck up the code on my test machine because of the parenthesis placed in a wrong location.

tl;dr: go paredit, it's slightly harder to learn but pays in a longer term

>memory consume
well, it does eat more memory than your average java application, because of the immutability. To be precise, you are often create/destroy a lot of objects under the hood, and this asks for a more aggressive GC strategy and a careful usage of the `memoize` function and the various atoms/agents/whatever. I had a caching issue when memoizing carelessly, which is why I had to extend it by adding some hard limits...

>immutability
it actually makes your shit simpler to reason about. There's a JAVA design pattern about this, but I don't remember the name right now.

> dynamic typing
Static typing is very useful for low-level programming and some performance/mission critical shit, for anything else it might actually slow you down. If you need something to work in a very precise way, you just spec that bitch up and call it a day.

>CSP
>atoms
a godsend

>there's no escape from the cancer known as Java
jesus fucking christ, that's some hard truth right there. I was a java programmer before, and I don't think I would be able to program in clojure without knowing it.

>I get hard when I run a nontrivial elixir program and see all cores firing automatically when I check htop.
I know that feel, tried LFE once... good times.

You should try this shit here, my man..

>lfe.io

a lisp erlang is my absolutely 100% perfect language, but I also don't want to spend my time with completely unemployable languages

Welp, take your time.
If you learn Elixir you will also learn Erlang (or at least you should).

Personally I had a lot of fun with Clojure, it's a pretty well designed language with actual jobs. But as you said before, it's Java. The antichrist.

So git gud with Elixir, nothing wrong with that.
But one day you might consider doing a project with LFE.
Scientists have shown that LFE is the best possible programming langauge by every standard that ever existed.

Only the facts, man.

Is there another reason to learn elixir except the syntax? I quite like the normal erlang syntax desu.

clojure and elixir exist to solve two completely different problems. but they are similar in that they are both built on top of existing paradigms and, for elixir, existing architectures.

I started with learning erlang before elixir without experience in ruby so .. yeah that was fun. I thought I'd go onto elixir since maybe there might be a job out there, but it's impossible to find something like a jr elixir engineer position. All the elixir/erlang jobs are senior level expecting over 9000 years of experience with a background in distributed systems and at least a phd in quantum mechanics

if not that, then the job description will merely mention elixir as something the company also uses, likely a hook to attract better applicants, but in reality it's just something like a rails/javascript job. These mentionings of elixir often accompany elm, haskell, clojure, and other trendy but professionally obscure languages

so now learning django since I think that'll at least be employable, but it's hard to go back to python once I've seen a better language

the main reasons are

* macros
* phoenix web framework
* mix - the build tool

phoenix looks nice
I made a simple toy website in erlang some years ago and the html representation as erlang objects was quite weird

Shouldn't we pretend that companies had users interests in mind instead of exploiting and botnetting them, neglecting quality? Programming languages are a minor problem here.

/thread

The company I worked at and the place I'll be working at both use Scala.

You mean Rust?

>Dynamically typed languages
>Good
I still don't understand why people consider Common Lisp a functional PL - all it has are first-class functions, something all the modern PL have, PHP and C++ including.

Knowing OCaml, which one of those would you guys recommend? From a job opportunity point of view.

anything on JVM
learn it, and then maybe you will

I need a programming language that's fast to write in and fastish to run (luajit level is good enough, since if extra speed is needed, I can just write a C module and load it in that language). Static types are a must because the programs we deal with become complex quickly. It's important to have failures as early as possible since our programs may run for hours or days before returning any useful results, and we can't afford to only then run into a bug that crashes the program, forcing us to restart from scratch. An approach like lisps, where it's possible to live-patch the image, is good enough for this purpose, though. Finally, the GC must be very efficient: we will be performing quick, semi-large allocations and these must not leak much, thus anything based on beohm-gc is a no-go.
These properties above define "good language" for my domain. What languages qualify? The best match I could find was C++, which sacrifices fast writing for fast execution beyond our needs. The language most used in the field is used only due to convenience (library availability - in particular, every library we use is a wrapper around a C libraries that handles 99.99% of workloads, but sometimes we have to write our own C libraries for processes that would otherwise have to execute in the host language, which is too slow) and is python, which causes tons of problems in practice and wastes our time a lot (see: early failure and static typing requirements above; interface changes that break codebases for days are too common, but we can't make uncareful developers magically disappear).

>No F#

It barely has first-class functions too because of the namespace separation, it's even more awkward to use higher-order functions than in C++ or even modern java.

Hrr drr use these obscure maymay languages so I can have a false sense of entitlement! Who cares if it works, I just want to be better than normies who get their dicks wet hrr durrrr

>Who cares if it works
That's literally the opposite of what these "obscure" languages stand for actually. It's memeterprise languages which are used regardless of whether they work, because it's cheaper to have someone write compiler extensions and custom parse tools than it is to find a maintainer after the guy quits.

Captcha: STOP Customer

Give me 1 good reason to use clojure over the superior CL

- It's a functional programming language instead of being procedural like C or CL
- It gives you access to all of java's libraries, which are plenty
Bonus:
- It runs on the jvm, the best GC of all.

CL is multi-paradigm
Arguably a bad thing and if it didn't it would be another dead lisp
Wew lad

>no java
>no rust
>no python

Ok m8

CL's support for other paradigms than procedural are actually much worse than in languages like C and C++: there is significant syntax overhead not present in these languages, and unlike in these languages, many possible error types can creep up on you for trying to use e.g. functional patterns. That doesn't apply to clojure or scheme though.

>scala
>"good langauge"

Go fits but you will want better type system for sure. C++ belongs to museum, take a look at D (has GC as primary memory management model with optional manual management).

You can't disable D's gc without the standard library leaking though.

I fucked around in some lisp and found it really great and beautiful. I work as a Java code monkey. Would you recommend any good Scala tutorials/books?

Standard ML > OCaml

scala and haskell really shouldn't be up there.