← Back to list

Perl in Jupyter Notebook: A Modern Look for a Classic Language

When tradition meets innovation — how Perl found its place again in the age of notebooks and deep learning.

Marcontk · 2025-10-25 06:57 · 5 claps · 3.1 min read
#perl #deep-learning #plotly #pdl #computer-science
Open on Medium ↗
Wiki topics: ML · Machine Learning EDU · Education & Learning 🔬 · Science · General

Perl in Jupyter Notebook: A Modern Look for a Classic Language

When tradition meets innovation — how Perl found its place again in the age of notebooks and deep learning.

Back in 2005, I had a simple but urgent task: automatically download GPS data from a remote server. I had no idea how to do it. While searching online, I discovered a module called Net::FTP. At that moment, I didn’t even know Perl existed. Three days later, the problem was solved.

That’s how it started. And I never stopped.

From Geophysics to Code

I work in geophysics, where every byte of data matters. Perl became my main tool for processing GPS (Bernese5) and InSAR (GMT + PDL) data — scripting, automating, cleaning, plotting, everything. For years, the terminal was my lab — pure efficiency, no distractions. But eventually, I wanted something more modern, more visual, more interactive.

From Terminal to Notebook

Today, Perl lives in a much more vibrant environment:

  • VS Code + Jupyter Notebook
  • Devel::IPerl for interactive Perl execution
  • Chart::Plotly for dynamic visualizations
  • PDL for fast numerical and scientific computing

Here’s a small example:

Modern Visuals with Perl and MXNet

One of the things I love most about using Perl in Jupyter is how visual it can be — even for machine learning tasks.

Here’s a simple example — a confusion matrix generated directly from a classifier built with AI::MXNet and plotted using Chart::Plotly inside an IPerl notebook. This small example represents a binary image classification task (ship vs no_ship) built entirely in Perl.

What I love about this is that the workflow feels as modern and fluid as Python’s, yet with the expressive power and elegance of Perl.

It’s clean, compact, and fully integrated into a scientific notebook environment.

One Step Further: Deep Learning in Perl

About a year ago, I took a leap into the world of artificial intelligence. I started with AI::MXNet for classification and autoencoder tasks, and soon realized that Perl could compete perfectly well with other languages — until I hit the limit of GPU support. So I made a decision: to build my own Deep Learning framework for Perl, completely from scratch, using XS (C-level interfaces) and a few secret ingredients that I’ll reveal later.

This mini framework allows me to run convolutions, activations, and full training directly on the GPU, with no external dependencies.

Yes — Deep Learning in Perl. On GPU.

Perl Was Never Dead — It Was Evolving

Every language has its rhythm. Perl remains that reliable, flexible, and expressive companion — but now it can do much more: notebooks, data visualization, and even AI workflows.

It’s not about nostalgia.

It’s about evolution — giving a classic language a modern look.

If You’re Just Starting Out

Don’t listen to those who say Perl is dead. Pick a goal — even a small one — and build it. Learning Perl will teach you structure, precision, and creativity. And when you bring it into a modern environment like Jupyter, you’ll see that Perl still has plenty to offer.

Closing Thoughts

Every language has its own rhythm.

For me, Perl has always been about elegance, clarity, and control — and seeing it come alive again inside Jupyter notebooks feels like rediscovering an old instrument that suddenly plays new music.

The tools may have changed — VS Code, Jupyter, Plotly, Deep Learning — but the mindset remains the same:

understand, create, and build.

Try It Yourself

If you’d like to see Perl in action inside Jupyter, here are a couple of live examples available on NBViewer:

A collection of interactive plots created with Chart::Plotly, showing how expressive and modern Perl can be when visualizing data.

A notebook that uses PDL and PDL::OpenCV to process and analyze medical images — all done natively in Perl.

Both notebooks run entirely in Perl, powered by modern visualization and numerical libraries.

No Python. No wrappers. Just pure Perl in Jupyter.


메타데이터
post_id
db2f3c0fd5e6
slug
perl-in-jupyter-notebook-a-modern-look-for-a-classic-language-db2f3c0fd5e6
url
https://medium.com/@marcontk/perl-in-jupyter-notebook-a-modern-look-for-a-classic-language-db2f3c0fd5e6
canonical_url
https://medium.com/@marcontk/perl-in-jupyter-notebook-a-modern-look-for-a-classic-language-db2f3c0fd5e6
author_url
https://medium.com/@marcontk
status
ok
fetched_at
2026-06-20 20:29:01