Show me cool, obscure languages!

There are a lot of programming languages that aren't very well-known now, but may have some interesting features. I keep finding a new one every now and then.

They may have faded to obscurity, they may still be in development, they may serve a small niche, or they may just not have caught on.

Do you know any? Any language that is not too popular and has at least one cool feature is welcome!

I consider these languages to be 'established', but if you have a useful-but-obscure feature, that's welcome:

  • Bash
  • C
  • C#
  • C++
  • Coffeescript
  • Csh
  • CSS
  • Go
  • HTML
  • Java
  • Javascript
  • Julia
  • Kotlin
  • Matlab
  • Objective-C
  • Octave
  • PHP
  • Python
  • R
  • Ruby
  • Rust
  • Scala
  • SQL
  • Swift
  • Typescript
  • Visual Basic
Write your answer…

11 answers

I am a hobbyist electronics fan and in my spare time, I make small pieces of equipment which help me with my daily life. An example, as of pretty recent, was using something called a Field Programmable Gate Array (or FPGA, for short) to build a 4 DoF drone.

Many of you might be aware of something called the Arduino. It's a pretty common piece of hardware used for prototyping and the language is pretty simple to use as well. However, sometimes, that just doesn't cut it. With an FPGA, you have the option of creating your own Arduino with whatever features you like; you can have 100 digital IO pins (depending on the part number of your FPGA, of course).

Now, FPGA's are also programmable. However, where they differ is what you are programming. With the Arduino (or more precisely, the ATMega family of IC's), you program logic and tell the chip what to do. With an FPGA, you tell it how to do what it should. For example, you can say tell the Arduino: switch the LED one, wait for 1s, switch it off, wait for 1s, loop. With the FPGA, you tell it something like: if the drain source is > 0V (it's in the logical ON position), send a signal to this wire; measure the current clock cycle and on the raising edge of the n-th cycle, break the loop. So, you are telling the FPGA how to switch the light on and off.

The series of gates thus generated form something called an Application Specific Integrated Circuit or ASIC (like the one used on bitcoin mining).

The Arduino uses something called the Arduino programming language which is an extension of Java along with C/C++. The obscure language here is the one used for FPGA: HDL or Hardware Description Language. Now, that's the category (much like high-level and low-level programming languages); we have two choices here: Verilog (language 1) or VHDL. I use verilog, so let's see an example (not sure if syntax highlighting is supported xD who knew, it is!)

module dip_counter (
  clock,
  enable,
  reset,
  o_counter
);

These are the ports: or a collection of both input and output channels. We later define the inputs and the outputs:

input clock;
input enable;
input reset;

Now, we get to the interesting part: outputs.

output [3:0] o_counter;

Here, the [3:0] notation signified that the o_counter output is a 4 bit output type. So, we will use four pins (in some basic designs) for it's output (+ common ground).

Now, let's define the types of the input and output. Till now, we have only told the compiler what all we want; now we need to tell it how to parse or represent the data.

wire clock;
wire enable;
wire reset;

We have two types of elements: wire and reg. You can imagine wire as a (pretty bad) stream: they can't store data but they can stream it and hence they are continuously reassigned. reg on the other hand is like a register, it stores the value which you can later read/write.

reg [3:0] o_counter;

Now, let's get into the main logic (or the block):

always @ (posedge clock)
begin: OCOUNTER

  if ( reset == 1'b1 ) begin
    o_counter <=  #1  4'b0000;
  end
  else if ( enable == 1'b1 )  begin
    o_counter <=  #1  counter_out + 1;
  end
end

So, this cryptic code tells the FPGA to execute the block only when the clock edge is rising (positive electrical gradient). The if blocks check if the reset pin is high 1'b1 means HIGH and 1'b0 means low. If it is high, then reset the counter. Else, increment it.

b0000 means 4 bits and so on.

This is a pretty simple example which I guess I got off the internet (I had it on my laptop when I got my first FPGA kit) and I tried to explain as much as I could; however, since this is used for hardware definition, you can't see anything till you either get the FPGA itself and program it; or, download the Verilog IDE and run a simulation.

Well, this is, by far, the most esoteric language I have ever encountered. What do you think? xD

Show all replies

And the code curry it gives you when you try execute a timer. I used a scope once to calculate the exact time it took for a delay call and instead of 1.000000 +- 1e-5, it was 1.004000 second. :| Had to use the old PORT fusing technique.

Reply to this…

Share your programming knowledge and learn from the best developers on Hashnode

Get started

The Elixir language is cool. It's a functional language, first released in 2011, and gaining traction lately especially in the Ruby community. Elixir's syntax is inspired by Ruby, and its popular web framework Phoenix is reminiscent of Ruby on Rails.

Elixir is built upon the Erlang virtual machine, which means it inherits many of the superpowers that Erlang is good at -- namely, building large, scalable, fault-tolerant systems. In Elixir, and in Erlang, threads are extremely lightweight and cheap, so they're used all over the place. The Phoenix web framework was able to manage 2 million websocket connections on a single (very large) server.

One of my favorite Elixir features is the pipe operator:

# The normal way:
String.ends_with?(String.reverse(String.capitalize("freddy")), "F")

# The pipe operator way:
"freddy"
|> String.capitalize()
|> String.reverse()
|> String.ends_with?("F")

My other favorite feature is pattern matching, which, among other things, lets you do things like write multiple versions of a function and let the language figure out which one to call:

defmodule Greeter do
  def hello(:jane), do: "Hello Jane"

  def hello(name) do
    "Hello #{name}"
  end
end

Pattern matching also works to pick apart data structures, similar to JavaScript's destructuring:

{result, value} = {:ok, 2}
# result will be :ok
# value will be 2

And if you've ever had to work with binary data in a language like C, shifting bits and masking to get at the bits you want, Elixir's binary pattern matching is mindblowing 😄 Here's a nice tutorial on binary pattern matching showing a function to parse PNG files in only about 40 lines of code.

I've must say, I haven't spent a ton of time using Elixir and Phoenix yet, but I'm pretty excited about both.

Show all replies

Hah, of course 😄I probably should've called that "the functional way" or something. I forgot to mention that Elixir is functional at its core, so there aren't any instance methods on strings or anything else! (it does have modules, though, which can group together related functions)

Reply to this…

I don't know if I'd call it obscure, but I spent a decade working in Ada.

Ada was created for high security high reliability mission critical software development, and was used extensively by governments and utilities. There was a time where simply mentioning you knew the language could land you on government watch lists.

I could tell you some of the projects I worked on with Ada, but then I'd have to kill you.

The Wikipedia page covers the basics:

en.wikipedia.org/wiki/Ada_(programming_lang..

I still say the dumbest thing the US government did was abandon Ada and allow C and C++ into the mix, since from a security, stability, and safety standpoint that's akin to replacing the US Army contingent at Fort Knox with two mall security rent-a-cops.

You know the old joke about shooting yourself in the foot with programming languages, where "With Pascal the compiler won't let you shoot yourself in the foot"? Well, Ada confiscates the gun, melts it down, and sends you to the nearest mental hospital for a competency assessment.

Another semi-obscure language I dealt with in the late '80's and early '90's was Eiffel.

en.wikipedia.org/wiki/Eiffel_(programming_l..

It's an inherently object based language which, well... it's kind of like Java without the needlessly cryptic garbage from C it copied and an actually well thought out object model. It's a real shame it never caught on as working with it was really nice back in the Win 3.x days.

Even so, Eiffel Studio is still actively developed.

dev.eiffel.com/Main_Page

Back in the '80's I dealt a lot with DiBOL. It is an interesting language because frankly, it's almost identical to non line-numbered BASIC in structure and syntax, with only some different function names telling the two apart.

en.wikipedia.org/wiki/DIBOL

But because it was THE go-to for anyone running DEC mainframes for serious database use, it's still supported and used in places today where the cost -- and downtime -- of migrating software and data to newer languages and systems remains impractical. A company called "Synergex" still supports and updates the language, letting these late '70's to early '80's mainframe programs continue to lumber on running atop .NET

dibol.com

Let's see... how about COMAL?

en.wikipedia.org/wiki/COMAL

Good for a laugh there was a time when the people using Commodore 64's and 128's for "business" in the mid '80's were convinced that COMAL would eventually replace all other programming languages -- something we used to laugh at since on microcomputers "no serious software could be written in anything but assembly."

Aka the days when C -- and by extension Unix -- was laughed at as a pathetic joke with needlessly pointlessly cryptic syntax, crappy compilers, piss poor memory management, and was strictly the province of "Big Iron" coders getting paid by the K-LoC. There's a reason by around 1990 C and Unix were considered technological dead-ends by anyone raised in the microcomputer "ecosystem" (I hate using that word) and only "big iron dinosaurs" cared about such. Unix and Unix-likes probably would have died off completely as a "thing" if not for Linus Torvalds.

Though I'm still not convinced this is a joke:

gnu.org/fun/jokes/unix-hoax.html

Oh, and you didn't list Pascal which is still alive and well no matter who says otherwise. Some major software packages are still made with Pascal via Delphi or FPC/Lazarus. Winzip, Winrar, Spybot Search and Destroy, Skype (well, the non UWP windows version at least), FL Studio, CloneDVD, Nero Burning Rom, Aida64, InnoSetup, Panda AV, IcoFX... Don't count it out of the running. When code clarity take precedence over "wah wah, I don't wanna type!", Object Pascal and/or Modula are still a favored go-to on many projects.

Reply to this…

Xojo fits the bill. A couple cool features:

  • Native, cross-platform desktop apps from a single project file
  • Event Handling

Animal example using events

Create a new class called Animal. Add to it a Speak method that returns String with this code:

Return SpeakSound

Now add to the Animal class an Event Definition called SpeakSound and set its return value to String.

Next, create a subclass of Animal, called Cat. Click on the button “+” button on the toolbar and select “Add Event Handler”. In the dialog, you will see the SpeakSound event handler. Select and and press OK. The code for this event handler is:

Return "Meow!"

Create another subclass of Animal, called Dog, and also add the SpeakSound event handler with this code:

Return "Woof!"

To test this, create a button on a window. In the Action event of the button add code to create an array of Animals:

Dim animals() As Animal
animals.Append(New Cat)
animals.Append(New Dog)

For Each a As Animal In animals
  MsgBox(a.Speak)
Next

When you run this code, you will see “Meow!” and then “Woof!”.

Reply to this…

No one here knows SPL, Shakespeare Programming Language ? The purpose is too have a code which look like a shakespeare play. It is a really basic language with just arithmetics and gotos but is really cool ! Shakespeare

This is the hello world ^^:

The Infamous Hello World Program.

Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.


                    Act I: Hamlet's insults and flattery.

                    Scene I: The insulting of Romeo.

[Enter Hamlet and Romeo]

Hamlet:
 You lying stupid fatherless big smelly half-witted coward!
 You are as stupid as the difference between a handsome rich brave
 hero and thyself! Speak your mind!

 You are as brave as the sum of your fat little stuffed misused dusty
 old rotten codpiece and a beautiful fair warm peaceful sunny summer's
 day. You are as healthy as the difference between the sum of the
 sweetest reddest rose and my father and yourself! Speak your mind!

 You are as cowardly as the sum of yourself and the difference
 between a big mighty proud kingdom and a horse. Speak your mind.

 Speak your mind!

[Exit Romeo]

                    Scene II: The praising of Juliet.

[Enter Juliet]

Hamlet:
 Thou art as sweet as the sum of the sum of Romeo and his horse and his
 black cat! Speak thy mind!

[Exit Juliet]

                    Scene III: The praising of Ophelia.

[Enter Ophelia]

Hamlet:
 Thou art as lovely as the product of a large rural town and my amazing
 bottomless embroidered purse. Speak thy mind!

 Thou art as loving as the product of the bluest clearest sweetest sky
 and the sum of a squirrel and a white horse. Thou art as beautiful as
 the difference between Juliet and thyself. Speak thy mind!

[Exeunt Ophelia and Hamlet]


                    Act II: Behind Hamlet's back.

                    Scene I: Romeo and Juliet's conversation.

[Enter Romeo and Juliet]

Romeo:
 Speak your mind. You are as worried as the sum of yourself and the
 difference between my small smooth hamster and my nose. Speak your
 mind!

Juliet:
 Speak YOUR mind! You are as bad as Hamlet! You are as small as the
 difference between the square of the difference between my little pony
 and your big hairy hound and the cube of your sorry little
 codpiece. Speak your mind!

[Exit Romeo]

                    Scene II: Juliet and Ophelia's conversation.

[Enter Ophelia]

Juliet:
 Thou art as good as the quotient between Romeo and the sum of a small
 furry animal and a leech. Speak your mind!

Ophelia:
 Thou art as disgusting as the quotient between Romeo and twice the
 difference between a mistletoe and an oozing infected blister! Speak
 your mind!

[Exeunt]

Reply to this…

Load more responses