Languages by features

>be sad Java programmer (yeah, I know)
But I want to expand my horizons. Which languages (other than Haskell) provide streams/monads/programmable pipes, lambdas and closures? Which ones would you recommend for general use?

Also, language by features/workflow/feel request thread, I guess.

Other urls found in this thread:

racket-lang.org
docs.racket-lang.org
iloveponies.github.io/
en.wikipedia.org/wiki/Muphry's_law
benchmarksgame.alioth.debian.org/u64q/compare.php?lang=racket&lang2=python3
common-lisp.net/project/bordeaux-threads/
twitter.com/SFWRedditGifs

Anything you can write in 10 hours in Java, you can write in 10 minutes in Perl

Take a look at racket-lang.org

Racket was indeed in my watch list (a language based on a List Processor seems pretty much the very thing I am asking for), but I am not sure how to approach Lisps. I mean, should I read SICP first, then any Lisp-like language that's not R6RS, or should I start learning that specific language right away, then get to SICP after I feel more comfortable with Lisp? How does it compare to, say, Common Lisp or Guile? How general use is it?

SICP is good for learning concepts, but if you just want to learn scheme, look at the racket tutorials here:
docs.racket-lang.org

After doing those three, work through the guide.

It is certainly a general purpose, albeit not that commonly used in industry, as you are likely aware. I would say that for anything python is used for, you could use racket (and have a lot more fun doing it).

Thanks, will do. I took a really quick look at Racket tutorials some time ago and I imagined it would be pretty good for anything webdev, or any data that could be represented as a tree.

I have never seen a Lisp job offer, although I don't look for job offers that often, to be honest. That said, I will be doing this for fun and personal projects, since I already have Java to make money, for the moment.
Well, that's kinda limited, but I guess it's better than nothing. I suppose I could make a jump to Common Lisp without having to relearn the workflow from scratch if I really needed it.

Performance-wise, how does it compare? Is Racket capable of smooth operation? What about GUI stuff?

No, it really isn't. Despite the autists on here, for most things you will be programming in the real world, even a slow language like python is fast enough. For many tasks, the speed advantages of languages like C do not offset the amount of programmer time spent creating them. Racket is almost certainly more performant than Python, and even quicker to develop in. For an operating system or a driver, or video game rendering system, obviously you want C.

Racket does have a rich GUI library, which is platform agnostic. In my opinion though, such solutions are never as good as a native GUI, but for prototyping it's perfectly fine.

I know speed is not everything, but I don't really see Python being used for anything that's not getting a job done as fast as possible (which makes it useful for prototyping). I mean, I know you can use it for stuff, because it has its areas, but there are other languages that outclass it in most of them.

I mean, it can do systems administration, but there will be never something as integrated with a system than its own scripting language (doesn't apply to Windows without Powershell). You can do webdev with it, but there are many other languages that can do everything Python does with much better support and tools. You can do some math stuff with it, but it's not like there aren't thousands of other languages designed for that purpose in specific. It's like it can do many things, but it isn't the best at most of them; at least I interpreted your message this way.

I most certainly don't need extreme performance (I already learned in my early days of Java that computers can take much, much more than you could possibly think before bringing them down to their knees, even in "supposedly" slow languages), just something that isn't terribly slow like bash and doesn't decide to freeze when I open a drop-down menu that hadn't been loaded into memory yet looking at you, NetBeans.

I like JavaFX and SWT's workflow, but they will never be like a native GUI and chances are that no matter how good you make them look, they will always look out of place. I was looking for some Qt bindings for Racket but they seem non-existant. There is at least one Qt binding for CL, so I guess not everything seems dark.

I just answered that it is a general purpose language, as is java. Racket has a lot of things going for it though, in that it is a meta-language which allows you to add new language constructs on the fly, as it suits you. Try it out, and see if it's beneficial to you. And yes, no language is best suited for all tasks.

Scala or Clojure, especially since you are coming from Java. They are functional and practical.

I recommend iloveponies.github.io/ for learning Clojure. Ignore the name.

If you decide to do a LISP, I also cannot recommend more using Emacs with Paredit and a repl.

C isn't a meme because of its speed.

...

Horseshit.
Racket has nothing even close to PyCharm. And Python is easier to read anyway.

retrolambda

That's certainly true for sub100 IQ programmers, you're write to point that out.

Why is it when you attempt to insult someone's intelligence, you always make a spelling mistake?

en.wikipedia.org/wiki/Muphry's_law

But all trolling aside, Racket is a highly complex language hiding behind some simple ideas. It's far more complex than python, and I wouldn't expect women and minorities to flock to it, unlike Python.

Common Lisp, it had almost every "new" language feature in the nineties and you can easily add actually new ones with macros. Don't fall for the fad language meme.

dare to find at least 1 reason to use more complex language for a task which can be done in simpler language just as good?

also why do you think women and minorities are less intelligent? show some evidence.

Please don't be serious.

These things are mostly useful for simplifying code which does conceptually simple things from the start. Nice to have, but it has little to do with real meaty stuff.
For example, these abstractions are almost useless when writing things like specialized realtime 3d rendering engine based on OpenGL, audio/video codecs or other complex shit that nobody on Holla Forums can actually do.
And simple shit can be done in any sane language.

You should get know them because it helps expanding your mind in general, that's all.

Also LoC doesn't really count, what does count is the time needed to read and fully understand the code, and it doesn't correlate with just LoC.
Neither do character count, token count, or AST node count.

Ew gross, it's an intellectual. Shoo, shoo!

SICP is good to get into the mindset, but it's not a book for learning Scheme. You could in theory read SICP and do the exercises in another language, it would just be pretty awkward. Still worth reading for the content alone.


Source for that?


Common Lisp has the disadvantage of being fucking huge and ugly. Scheme is a much more beautiful language to read, but Scheme is so minimal that you need one of its more specific implementations like Racket. Of course this also leads to ugly constructs having been bolted onto the nice Scheme language, but it's nowhere as ugly as Common Lisp.


Or Neovim with one of the myriad parenthesis plugins (delimitMate, Lexima) and a REPL running in the built-in terminal emulator. Not saying it's better or worse than your recommendation, just throwing an alternative out there.

r u larping, or yet another faggot who maintains that because C is technically capable of doing everything it is the best language for everything?

How are A/V codecs conceptually complex? It just seems tedious.

First tell me how to store the same amount of information with fewer bits and then implement it in a sane, performance-conscious way.

Well, nevermind 60% of my post since I confused compression with A/V.

Nope, there are other potent languages like Rust, D, C++.
Probably also Fortran and Ada but I didn't code in them.
You missed the point.

Rust, D and C++ all have these features. LARP harder, Fizzbuzzer.

You have a problem with it?
They have them but it's not necessary to use them when they are not needed/not applicable.

Larpfag, I know you love shitposting, but please use your two brain cells from time to time.

Just like most languages. But they are there when they are applicable and the programmer wants to use them, which is what the OP is asking for.

I don't know what the fuck is your problem. Specially closures (which imply first class functions) are a godsend to reduce code (not algorithmic) complexity and increase code reusability and modularity. Fuck, monadic operations are infinitely more readable than traditional for loops since you know you are guaranteed to iterate over the whole monad and what kind of operation you are going to perform on it, and on top of that, they are safer and more compact.


I'm not that LARPfag, I just started taking a liking for the word. Now you know there is at least two of us. Also not an argument :^)

Minorities on Holla Forums means anyone either non-white, non-Jap or non-Chinky. Does that clear it up for you now? Empirical evidence is the body of work produced by coders and academics.

Higher level abstractions leading to shorter code. Compare a fold to an explicit imperative loop. And since racket is complex enough to allow the programmer to add language constructs, one could even build their own DSL to handle a task in a far more natural and easy to comprehend way than using your given "simple" language.


Racket isn't purely interpreted, so it should be suspected from that alone. Here's a comparison if you care for this site: benchmarksgame.alioth.debian.org/u64q/compare.php?lang=racket&lang2=python3

What new features?

Overly-complex, non-message-passing "OO" which is nothing like the original Simula/Smalltalk/Beta idea of independent communicating objects, but syntactic sugar completely obsoleted by much simpler duck typing or prototypes?

Bloated "type" system that causes undefined behavior or runtime exceptions?

A complete lack of concurrency of any kind?

Complicated interactions between dynamic and regular scope, to support features nobody uses?

A LOOP macro which has a more complicated syntax than some entire programming languages?

Conditions stolen from PL/I, but made so complicated and slow that instead of being faster than unwinding the stack, people avoided the idea and actually say returning error codes is better because they only knew about stack-unwinding exceptions and the horrible Lisp implementation?

Features that require you to bundle a whole Common Lisp implementation with every program you distribute?

Not even a pseudo-intellectual, he got blow the fuck out very quickly.

A REPL in a terminal emulator's not nearly the same league as a REPL in geiser/slime/cider.

common-lisp.net/project/bordeaux-threads/

I know, but it's already a big improvement for people who are used to Vim and don't want to change to a new editor. Neovim is still young and rough, but it has the potential for proper REPLs to be implemented, give it some time for people to write them.