Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: EBNF Specification of the BBC Shipping Forecast (github.com/jamespwilliams)
136 points by jamespwilliams on Feb 6, 2022 | hide | past | favorite | 32 comments



A long time ago, two Canadian computer scientists published a paper where they had written a 1-page Lisp program that got a passing grade on the British Columbia written driver's exam. It relied on the fact that in those days, all questions on the exam that started with “Must...” had the answer “yes”, questions starting with “May...” had the answer “no”, any question containing “pedestrian” was answered with “stop, the pedestrian has the right of way”, and a few others. “Immediately notify the Superintendent of Motor Vehicles” was the default answer.

As I say, this program passed the exam, and the result was presented at a Canadian AI conference. They've changed the exam since then.

By the way, when I did my exam (long before this experiment), the person in front of me failed.


This is the cutest thing I have seen in weeks.

For those outside the UK who are unfamiliar, the shipping forecast is the most British thing possible. A concise forecast that reads as pure poetry, and before it, Sailing By:

https://www.youtube.com/watch?v=dFdas-kMF74


A concise forecast that reads as pure poetry, and before it, Sailing By

Followed by the National Anthem to end the day's broadcast!

It's really relaxing drifting off to sleep to the gentle tones of the forecast, but countered somewhat by the need afterwards to stand up in bed as the anthem is played.


I can imagine a few scruffy fisherman and a salty old seadog of a Captain ploughing out into the North Sea just after midnight on a thumpety-thumpety old boat, rocking and reeling, listening to this forecast, and then standing to "God save The Queen" each contemplating whether they will be able to return home at the end of the day.


Yes -- the national anthem is a perversely rude awakening at that point!


It must have been literally half my life I fell asleep to Robin Lustig on The World Tonight followed by Book at Bedtime, Today in Parliament then Sailing By and the Shipping Forecast. A habit I picked up from my mother, this same sequence of programs (I've left out a few, I know) was broadcast every weeknight from 10pm on Radio 4 since seemingly the dawn of the time until I left the UK. I'm actually surprised I can fall asleep without hearing the Shipping Forecast now!


They played the shipping forecast at the start of the London 2012 Olympics opening ceremony and it set the scene perfectly for the rest of the show.


Also the excellent Blur song This Is a Low is based on the Shipping Forecast.


Yep! Great song.


Back in the days, there were (conspiracy) theories that it had been used, during the Cold War, to pass commands to British spies in the field.


Not a ridiculous theory. Related are also “numbers stations” https://en.m.wikipedia.org/wiki/Numbers_station


This has just given me the epiphany that if the BBC is ever put out to grass, which does now seem to be in the offing, then the preservation of the shipping forecast at least, would be only a few weather APIs and some speech synthesis away.

Which would be good / occasionally moderate.


> would be only a few weather APIs and some speech synthesis away

Find me a speech synthesizer that can recreate Zeb Soanes and you might have a case.


The shipping forecast is produced by the maritime and coastguard agency.

The BBC just read it out. As do the coastguards.


The "strict" definition used here is not strict enough. Presumably it is based on the prose description in the linked Wikipedia page, which omits one crucial fact about the area forecasts: each area is included exactly once, and always in the same order (approximately clockwise starting from 'Viking' in the North East). Culturally speaking, it's an important part of the poetry that groups such as "Forth, Tyne, Dogger, German Bite" always appear in the same order, though the rhythm/groupings can be broken up differently depending on the weather patterns.

I'm still not happy that they renamed Finistere to FitzRoy, and that was 20 years ago now.


From my random forecast:

Faeroes, Wight, and FitzRoy. East hurricane force 12 to violent storm 11. Heavy snow. Poor, becoming good. Severe icing. Sole and Forties. East 2 to hurricane force 12, becoming cyclonic northeast severe gale 9 later. Wintry showers. Very poor, becoming poor. Severe icing.

Yikes! Might stay inside.


Excellent. Although the real shipping forecast is full of helpful forecasts like 'Moderate to good, occasionally very poor', which does seem to cover all the possibilities.


Is there any source that has all(or at least 1000+) of the historic shipping forecasts? I have an old tool to do probabilistic parsing that I would like to try on this.


Clip up some samples, Markov chain generator; endless fantasy SF for the insomniac …


In the meantime, here's five hours of it:

https://www.youtube.com/watch?v=CxHa5KaMBcM


So that is the sample at the end of Viking North: https://m.youtube.com/watch?v=CSNCiqbtHLA


What a brilliant idea! I had heard that people find listening to the shipping forecast very relaxing, but I didn't realise they had such a strict format


Now for a version for "professional idiot" Les Barker's Shipping Forecast variations. As well as video of Les reciting it, you can find a version read by Brian Perkins in his normal delivery.

Edit: The Perkins version is video G9QumF93PpY on youtube^Wan invidious instance. Check out more of Barker's stuff while you're at it.


This is my got to fall sleep radio. It the most British thing, it is actually (only really used it one) useful if you go sailing.

My partner complained last night I was snooring whilst this was too loud on my headphones, but I think of the map, the weather in that place - and off to sleep I got.


Any tools to generate a railroad diagram from EBNF? Preferably CLI.


Huh, great idea. Might (attempt to) do one of these for metars.


Fantastic - I wonder if any of the automated voices you could hook it up to could have the same relaxing quality as the real thing ?


Pressure tops out at 999?


Hour can only go from 0 to 19. Is this on purpose?


Whoops! Thanks, I've fixed it.


You're also missing 'soon' and 'imminent' (along with 'later' have a very specific and important meaning).

And no 'sea states'? Currently there's 'Very rough or high, occasionally very high later in northwest Rockall.'

Nice stuff!


Wonderful, thanks for sharing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: