Pony Lang

The other day, I watched Mark Allen‘s talk comparing Erlang and Go Concurrency and I really enjoyed it. Near the end, he mentioned a new programming language called Pony which uses the Actor Model.

What? I’ve never heard of this! So I did a search on “pony lang” and got a bunch of pictures of glamorous women. At first, I thought maybe there was an actress or model named Pony Lang. Then I realized they weren’t all pictures of the same person, though they did have similar hairstyles. It turns out “pony lang” is Dutch for “long bangs”.

Anyway, ponylang.org is where to start if you want to learn more about the Pony programming language. I installed it

sudo add-apt-repository "deb http://releases.ponylang.org/apt ponyc main"
sudo apt-get update
sudo apt-get install ponyc

added the Emacs mode for it

(use-package ponylang-mode
  :ensure t
  :config
  (progn
    (add-hook
     'ponylang-mode-hook
     (lambda ()
       (set-variable 'indent-tabs-mode nil)
       (set-variable 'tab-width 2)))))

and dashed off hello world.

actor Main
  new create(env: Env) =>
  env.out.print("Hello, World!")

Now compile and run it!

$ cd ~/pony/helloworld
$ ponyc
Building . -> /home/tim/pony/helloworld
Building builtin -> /usr/lib/pony/0.1.7/packages/builtin
Generating
Optimising
Writing ./helloworld.o
Linking ./helloworld
$ ./helloworld 
Hello, World!

Looks great! Another new language to learn! What fun!

Advertisements
Pony Lang

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s