r/AskProgramming • • May 30 '22

Other What is a programming language that has limited use case, but is interesting nonetheless?

So are there any programming languages that interest you, but have a very limited use case?

In my case, it's a grey area, but I think it counts.

Music has always been a hobby of mine, and so is programming now, so the crossover language, Lilypond is what I'm saying. It's a markup language that allows someone to make sheet music with coding rather than a GUI. And frankly, I really like this language, even though I'd never use it for anything practical.

Any similar cases out there?

53 Upvotes

62 comments sorted by

29

u/CharacterUse May 31 '22

Forth is a stack-based language (and its compiler and shell) which uses reverse Polish notation. It's pretty much obsolete now because cpus are so much more powerful with lots of memory, but but it used to be very common on control systems, bootloaders and similar things because its design lent itself to implementaton on very limited hardware.

6

u/blackerbird May 31 '22

Also side note - the Bitcoin scripting language is based on Forth

0

u/[deleted] May 31 '22

A similar case is Ruby imo. Sure there's interesting stuff they did, other things are weird. But ultimately python took most things ruby did well and replaces it. But there's still stuff I felt ruby did better

15

u/Dlacreme May 31 '22

It's really not like Ruby. Ruby is an extremely mature language that is used worldwide in many, many companies. It has one of the biggest webframework (rails) and its syntax, while different, is praised and also an inspiration for more modern language such as Crystal or Elixir

While many company using some python for scripting, I am pretty sure there are more projects running with Rails than Django

11

u/snowe2010 May 31 '22

Huh? This is one of the strangest comments I’ve ever seen in regards to the two languages. Python is older than Ruby and has significantly more warts in it than Ruby does. Python has demonstrated quite well what not to do with a programming language.

10

u/[deleted] May 31 '22

Python predates Ruby by about 5 years. But I wouldn’t say Ruby was particularly niche. At one point, it seemed every startup was building their app in Rails. Much nicer language to work in than Python, IMHO.

2

u/hi65435 May 31 '22

Yeah at some point the Ruby developers were advertising that it had more users than Python in Japan. But that was before the popularity of Rails. I think performance, problems with Ruby 1.9 and the package manager is what stopped Ruby's explosive growth.

Actually at the time there were tons of Ruby variations like JRuby which I used on Google App Engine and Duby (later renamed to Mirah) with a smaller footprint to limit instance start times.

2

u/[deleted] May 31 '22

The whole "Ruby can't do threads" thing didn't help. But that was back when everyone thought their little hobby webapp had to scale to Twitter capacity otherwise it was useless. Thankfully we've moved on from that......

9

u/balefrost May 31 '22

I will say that, relatively speaking, Ruby is a lot like most mainstream OO languages than Forth is.

1

u/CharacterUse May 31 '22

Yes, Ruby does have some very interesting features.

1

u/[deleted] May 31 '22

Having var.each instead of foreach, or no parentheses if there's no arguments to a function for example

36

u/[deleted] May 30 '22

Pretty much any of the esoteric languages. They stretch the idea of code by a lot while still staying turing complete (most of them).

Of course they are pointless in productive terms, but very interesting if you're into DSL development.

19

u/raevnos May 31 '22

Prolog and similar logic languages. They're nifty but I rarely encounter problems they seem like a good fit for.

15

u/balefrost May 31 '22

One place I never expected to find Prolog was in Java.

Seriously, the JVM spec has CLASS file verification rules... all written in Prolog: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.10.1

Scroll down from there; each yellow box has Prolog predicates.

Wild!

17

u/Cybyss May 31 '22

GPU shader languages, like GLSL or HLSL.

They allow you to leverage the extreme level of parallelism available on a GPU. Although they were designed mainly for computer graphics - e.g, performing calculations on a per-vector or per-pixel basis to render a scene - today, more and more they're being used to perform general-purpose computations to do things like artificial intelligence & machine learning.

Learning one of these really opens up a new world of possibilities for the sort of software you can create.

12

u/flaghacker_ May 31 '22

FYI general GPU computing is usually done in C++ compiled with CUDA or HIP, not in those comperatively weaker shader languages.

8

u/Cybyss May 31 '22

I... actually didn't know that. I only just recently started learning about Vulkan and GLSL.

I'll go read up on CUDA and HIP right now. Thanks :)

1

u/TiagoTiagoT May 31 '22

What about OpenCL?

2

u/flaghacker_ May 31 '22

OpenCL is purposefully being sabotaged by Nvidia, particularly OpenCL 3.0 is a badly defined interface with almost everything interesting being optional (see also this thread). The Nvidia implementation is missing many things that are available in CUDA. And in general you're still stuck with a something GLSL-like instead of full C++ like the others.

So as much as I don't like it, CUDA and HIP really are the only options currently.

12

u/TentacleYuri May 31 '22

AWK, great for those one liners that you copy paste to sum a column or extract a specific line in a text file

4

u/[deleted] May 31 '22

Give me awk over all the convoluted cut nonsense people come up with any day.

9

u/jibbit May 31 '22 edited May 31 '22

Erlang is an interesting twist on that.. made for one very specific use case (a phone system that must never go down) by clever people, relatively slow and ugly (not things they were concerned with), not even intended to be a General Purpose Language, more of a DSL for handling errors - and yet, it turned out to be more useful than many other mainstream languages

16

u/carcigenicate May 30 '22

Haskell fits that description for me. I don't think it's a very practical language to use for most things, but I'm certainly glad I learned it. It forces you to approach everything differently, and the lessons carry over to other languages.

8

u/christawful May 31 '22

I spent a winter break in college reading through the basics. Made me use python totally differently

5

u/[deleted] May 31 '22

One of my favorite reasons to learn new languages. I invariably bring some kind of new techniques or ideas back in to my general programming skillset.

6

u/IWillGetTheShovel May 31 '22

Relay ladder logic for PLCs

5

u/e1ioan May 31 '22

I made a few Roku channels and published them, one actually makes me about $1000 extra dollars a month, the rest are free, but not many have heard of Roku's own programming language: BrightScript. It's a very powerful, easy to use scripting language.

(ip camera pro and basic, check them out)

5

u/Shadow_Gabriel May 31 '22

ANSI/ISO C Specification Langage (ACSL). It's a validation language used to formally proof that your code does what the function contract says it does.

4

u/Jaune9 May 31 '22

GDScript is a Python-like langage used in the Godot game engine and probably nowhere else. You can also use C# which makes it uses cases rather limited

1

u/dotnetguy32 May 31 '22

What was the one with the turtle?

1

u/[deleted] May 31 '22

Not sure, I know I use it with a 3rd party editor called Frescobaldi.

2

u/fried_green_baloney May 31 '22

Logo? Turtle graphics in that language.

3

u/[deleted] May 31 '22

XSLT, for dark tourism.

2

u/[deleted] May 31 '22

RedBASIC.

It was a proprietary dialect that shipped with some early X10 devices, a long long time ago. Very early home automation attempt in the late 80s.

2

u/CharacterUse May 31 '22

Oh man, I'd forgotten that existed! I remember reading about it at the time (though it was far too expensive for me to play with).

1

u/JosZo May 31 '22

White Space comes to mind, this must be the least practical computer language possible

https://en.wikipedia.org/wiki/Whitespace_(programming_language)

1

u/[deleted] May 31 '22

Not QUITE what you're asking, but I've gotta bend the rules here and go with Lisp.

Getting good at lisp will do some really amazing things to your head. And, while it's technically a general purpose language, in practice it's pretty weirdly niche.

2

u/nermid May 31 '22

Took a couple of courses in college from a professor who only taught classes in Racket, a Lisp dialect. Boy, did I get tired of hearing about putting something in the caddadr.

1

u/[deleted] May 31 '22

I'd never heard of Racket. But yeah, that's gotta be right.

1

u/[deleted] Jun 01 '22

Probably Matlab. You can do a bunch of things in it, but nearly everything is geared towards math.

-3

u/[deleted] May 31 '22

Javascript and PHP are like the sacrificial stick you use the clear the cobwebs. Back when nobody knew how to do anything. Does that count?

2

u/CreativeGPX May 31 '22

I'm not a fan of using those languages at scale (I run into them a ton with web stuff though), but whenever BASH seems too complicated for a command line script I need to make, I use Javascript (Deno or Node) or PHP. Easy to crank stuff out with minimal fuss and probably already on my machine. They have a place.

1

u/canIbeMichael May 31 '22

I had a college intern butt into a conversation at work say 'php sucks'. I asked him 'Why?'

He had 0 answers.

Me and my coworker had a good laugh at that. PHP sucking must be a meme in colleges or something.

Also good luck getting rid of JS at this point. Now that it made it over to the mobile world, its never going away.

8

u/[deleted] May 31 '22 edited Jan 02 '26

head point literate dependent marry advise ink special knee aware

This post was mass deleted and anonymized with Redact

5

u/shagieIsMe May 31 '22

It’s dumb and you should use Java instead.

One of the big advantages of Groovy is that it is a JSR-223 language.

https://groovy-lang.org/integrating.html#jsr223

This means you could have a textbox on a web page that allows you to invoke groovy or database entries that you can pull out and run within a Java context - without having to go through all the hoops of compiling the Java and then injecting the new classes into the class loader.

This allows for a great deal of flexibility in adding scripting to an existing Java application.

4

u/birdsandberyllium May 31 '22

I feel like the only reason anyone encounters groovy is because of Adaptivist Scriptrunner 😅

I actually like it a lot, the syntax is nice compared to java 8 we're usually stuck with, and I really really love the built-in Collections methods. But if I was actually starting a new project I'd definitely go with modern java, kotlin or scala for sure.

6

u/snowe2010 May 31 '22

Or Jenkins pipelines.

4

u/TentacleYuri May 31 '22

Don't forget about gradle files! (for Android notably)

3

u/[deleted] May 31 '22 edited Jan 03 '26

crowd ripe mysterious quickest air squash skirt fear consider observation

This post was mass deleted and anonymized with Redact

2

u/[deleted] May 31 '22

I'm endlessly fascinated that people think Gradle was invented as the Android build tool. It was released before Android, as a general purpose Java build tool, as an alternative to Maven or Ant.

2

u/[deleted] May 31 '22

It's popular for embedding scripts in all sorts of things. The Ping Identity suite of products leans on it heavily for writing policy at various points.

4

u/[deleted] May 31 '22

I was a Groovy professional for years. Great language. All the meta weirdness of Ruby, with the JVM and it’s ecosystem into the bargain. Ridiculous name though.

3

u/that_which_is_lain May 31 '22

Groovy is like a Java-based Ruby (ignoring the existence of JRuby of course).

3

u/The_Droide May 31 '22

Gradle uses Groovy, it's a bit more dynamic and less verbose than Java, which is nice for DSLs

1

u/shagieIsMe May 31 '22

Its categories are mid blowing when you want to work with a DSL.

For example https://docs.groovy-lang.org/latest/html/api/groovy/time/TimeCategory.html

 use (groovy.time.TimeCategory) {
     // application on numbers:
     println 1.minute.from.now
     println 10.hours.ago

     // application on dates
     def someDate = new Date()
     println someDate - 3.months
 }

Being able to do a "here's a method I defined that appears to be part of an integer constant" is neat.

0

u/[deleted] May 31 '22

[deleted]

2

u/[deleted] May 31 '22

I'd seen a bit of it. Frankly the one I really enjoyed was Mark Rendle's The Worst Programming Language. Though frankly I think it's because he used his background as both a comedian and developer to great effect in the lecture. Also, not a major conference talk, but Brian Will has his whole Object Oriented Programming Sucks series that is actually amazing.

3

u/balefrost May 31 '22

Timecode link: https://www.youtube.com/watch?v=6avJHaC3C2U&t=3358s (55:58)

Midnight takes your heart and your soul

While your heart is as high as your soul

Put your heart without your soul into your heart

Give back your heart

Desire is a lovestruck ladykiller

My world is nothing

Fire is ice

Hate is water

Until my world is Desire,

Build my world up

If Midnight taking my world, Fire is nothing and Midnight taking my world, Hate is nothing

Shout "FizzBuzz!"

Take it to the top

If Midnight taking my world, Fire is nothing

Shout "Fizz!"

Take it to the top

If Midnight taking my world, Hate is nothing

Say "Buzz!"

Take it to the top

Whisper my world

0

u/[deleted] May 31 '22

[deleted]

2

u/canIbeMichael May 31 '22

I ended up going with HTML and CSS, then printing pages as a pdf.

I got this advice from someone who spent tons of time in LaTeX for academic purposes. He ended up bailing after a year of two of use.

2

u/nermid May 31 '22

Anecdotal as fuck, but I started getting more callbacks when I quit using Word to manage my resume and started using a LaTeX template I stole from somewhere online.