Readit News logoReadit News
jameshh commented on Solving `Passport Application` with Haskell   jameshaydon.github.io/pas... · Posted by u/jameshh
skybrian · 2 months ago
I think that’s true as far as it goes, but there are further reasons why Haskell is more difficult. Here is one:

In Haskell, the lack of parentheses for function calls plus currying means that to read a function call, you need to already know how many arguments the function takes, which I feel adds a new level of difficulty over languages where you can often guess what a function does based on its name, without looking it up.

As a result, often Haskell reads more like math, where without knowing each symbol’s definition, you’re lost.

I’ve seen cryptic JavaScript too, but less often.

jameshh · 2 months ago
> the lack of parentheses for function calls plus currying means that to read a function call, you need to already know how many arguments the function takes

While I agree with the general sentiment of what you are saying, note that the syntax has nothing to do with it, it is purely about Haskell using currying excessively. The syntactic translation between Haskell and JS is straight-forward and 1-1:

    f x y z      ->  f(x)(y)(z)
    f x (y,z) w  ->  f(x)(y,z)(w)
I agree that excessive currying is not great, and generally push for non-curried arguments unless a curried form realy is used in practice. But for this to really be comfortable, and to still enjoy all the hgiher-order programming that's nice with Haskell, we would need good records (strucural, anonymous, extensible), which it doesn't really have right now, so we are stuck with currying.

jameshh commented on Solving `Passport Application` with Haskell   jameshaydon.github.io/pas... · Posted by u/jameshh
whitehexagon · 2 months ago
I went through the UK online passport renewal system last year, and it is the best website I have used in a very very long time. A real breath of fresh air. It worked perfectly on my old computer and 'ancient' browser. Everything very simple / accessible / clear, colours, text, buttons, fields, requirements. A simple step-by-step navigation and actually friendly.

It is a shame that more businesses dont care about their customers enough to invest in such a well designed website. Well done HMPO.

jameshh · 2 months ago
I agree, I also renewed my passport recently and the website and process is quite smooth. It's the more complex cases, first requests from abroad, etc., that lack automation.
jameshh commented on Solving `Passport Application` with Haskell   jameshaydon.github.io/pas... · Posted by u/jameshh
throwawayben · 2 months ago
I played this a few years ago.

Despite being born in the UK to a British father my character wasn't previously British due to parents being unmarried and being born after 1983 but before the 2006 rules update.

I'm not totally sure when but I think some time in the 2010s the 2006 update became retroactive so my character was allowed to play. Didn't have to do too many side quests - the main one was retrieving father's birth certificate.

My character also had to attend the endgame ceremony and swear allegiance to the queen, which seemed odd for someone born in the country and lived here all his life

jameshh · 2 months ago
At least you got the bonus endscreen credits!
jameshh commented on Solving `Passport Application` with Haskell   jameshaydon.github.io/pas... · Posted by u/jameshh
d1sxeyes · 2 months ago
That’s interesting, no requirement for parental birth certificates?

I was asked to provide (I am British, wife is Hungarian, living in Hungary) both parents’ birth certificates and all four grandparents’ birth certificates.

My wife is not in touch with her father, so we had to submit a cover letter explaining the situation, which was accepted (although I don’t really see why it was relevant anyway, my son’s Britishness is derived from my Britishness, her nationality and the nationality of her parents is essentially irrelevant).

We also didn’t have to copy the passport of anyone else, but we did have to have a family friend do the confirmation online (family friend is a lawyer in the UK, so was on the list of approved jobs for this).

jameshh · 2 months ago
> although I don’t really see why it was relevant anyway, my son’s Britishness is derived from my Britishness, her nationality and the nationality of her parents is essentially irrelevant

This is essentially happened to me, the "75% of the initial doc requests turned out to be irrelevant" was referring to this sort of thing.

jameshh commented on Solving `Passport Application` with Haskell   jameshaydon.github.io/pas... · Posted by u/jameshh
new299 · 2 months ago
For the benefit of anyone else doing this in Japan, these are the documents I had to submit. It will be different depending on circumstance, in particular I think the author may also be born outside the UK which may require other/more documents.

Anyway I had to submit:

Certified copy of my birth certificate, order from the UK general register office.

Original (not photocopy) of Japanese family register and translation.

Certificate of acceptance of notification of birth, original and translation.

Original Marriage certificate and translation.

Colour photocopy of every page of my childs Japanese passport.

Copy photocopy of the passport of an American or British citizen who confirms that child is mine.

The process is pretty unclear, and in general you seem to have to just keep submitting documents until they are satisfied.

jameshh · 2 months ago
> I think the author may also be born outside the UK which may require other/more documents

In fact `applicant's father` (me) was born in the UK in this case, but `applicant's father's father` was not, the cause of the extra complications.

jameshh commented on UK air traffic control meltdown   jameshaydon.github.io/nat... · Posted by u/jameshh
jameshh · 2 years ago
For those of you still following this story, the flight plan that triggered the chaos has been identified!

https://chaos.social/@russss/111048524540643971!

> Tonight we were wondering why nobody had identified the flight which caused the UK air traffic control crash so we worked it out. It was FBU (French Bee) 731 from LAX/KLAX to ORY/LFPO.

> It passed two waypoints called DVL on its expanded flight plan: Devil's Lake, Wisconsin, US, and Deauville, Normandy, FR (an intermediate on airway UN859).

> https://www.flightaware.com/live/flight/FBU731/history/20230...

> Credit to @marksteward and @benelsen for doing much of the legwork here.

jameshh commented on UK air traffic control meltdown   jameshaydon.github.io/nat... · Posted by u/jameshh
t0mas88 · 2 years ago
They use the ADEXP to determine which part of the route is in the UK. Because the auto generated points are ATC area handover points. So this data is the best way so see which part of the route is within the UK airspace.

Then it needs to find the ICAO part that corresponds, because the controller needs to use the ICAO plan that the pilot has.

If the controller sees other (auto generated) waypoints that the pilots don't have you get problems during operation. A simple example is that controllers can tell pilots to fly in a straight line to a specific point on their filed route (and do so quite often). The pilot is expected to continue the filed route from that point onwards.

They can also tell a pilot to fly direct to some random other point (this also happens but less often). The pilot is then not expected to pick up a route after that point.

The radio instruction for both is exactly the same, the only difference is whether the point is part of the planned route or not. So the controller needs to see the exact same route as the pilots have, not one with additional waypoints added by the IFPS system.

jameshh · 2 years ago
Thanks for this explanation. So, is the ICAO plan in some sense the "single source of truth", being the international standard and all?
jameshh commented on UK air traffic control meltdown   jameshaydon.github.io/nat... · Posted by u/jameshh
j_mo · 2 years ago
No validation, anddd this point from the article stood out to me: --- The programming style is very imperative. Furthermore, the description sounds like the procedure is working directly on the textual representation of the flight plan, rather than a data structure parsed from the text file. This would be quite worrying, but it might also just be how it is explained. --- Given that description, I'd be surprised if it wasn't just running a regex / substring matches against the text and there's no classes / objects / data structure involved. Bearing in mind this is likely decades old C code that can't be rewritten or replaced because the entirety of the UK's aviation runs on it.
jameshh · 2 years ago
> Bearing in mind this is likely decades old C code that can't be rewritten or replaced because the entirety of the UK's aviation runs on it.

It's new code, from 2018 :) Quote from the report:

> An FPRSA sub-system has existed in NATS for many years and in 2018 the previous FPRSA sub- system was replaced with new hardware and software manufactured by Frequentis AG, one of the leading global ATC System providers.

jameshh commented on UK air traffic control meltdown   jameshaydon.github.io/nat... · Posted by u/jameshh
adrianmonk · 2 years ago
Because the code classified it as a "this should never happen!" error, and then it happened. The code didn't classify it as a "flight plan has bad data" error or a "flight plan data is OK but we don't support it yet" error.

If a "this should never happen!" error occurs, then you don't know what's wrong with the system or how bad or far-reaching the effects are. Maybe it's like what happened here and you could have continued. Or maybe you're getting the error because the software has a catastrophic new bug that will silently corrupt all the other flight plans and get people killed. You don't know whether it is or isn't safe to continue, so you stop.

jameshh · 2 years ago
That's true, but then, why did engineers try to restart the system several times if they had no clue what was happening, and restarting it could have been dangerous?

u/jameshh

KarmaCake day449January 24, 2018View Original