[HN Gopher] Solving `Passport Application` with Haskell
___________________________________________________________________
Solving `Passport Application` with Haskell
Author : jameshh
Score : 281 points
Date : 2025-06-28 23:01 UTC (23 hours ago)
(HTM) web link (jameshaydon.github.io)
(TXT) w3m dump (jameshaydon.github.io)
| ggm-at-algebras wrote:
| It's not "quite expensive" if you compare it to the Australian
| passport which is 2x as expensive and so notoriously badly bound,
| holders joke Australian Border Protection forces test for
| forgeries by checking if the blue cover curls: if not, it's a
| fake.
| yen223 wrote:
| The Australian passport curl was so disappointing. I have a
| decade-old passport from my third-world country of origin, and
| that was in far better shape than my new Australian passport
| that was freshly delivered.
| new299 wrote:
| 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 wrote:
| > 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.
| crooked-v wrote:
| I have to wonder how they would handle cases where a person
| doesn't have a legal father at all.
| lmm wrote:
| If you don't have a legal father then you can't claim
| British citizenship through your father. That's all pretty
| straightforward. (Although there's a fun case where you can
| claim citizenship by double descent because your ancestor
| wasn't able to claim citizenship because of sexist
| historical laws).
| new299 wrote:
| :(
|
| Weirdly this never came up for me (and I'm in a similar
| situation). I suspect what documents are ask for varies a lot
| by who is assessing the application.
|
| Hope it all works out!
| Cyph0n wrote:
| > Colour photocopy of every page of my childs Japanese
| passport.
|
| But why?
| davchana wrote:
| Don't know in this case, but some other countries ask for it
| to deduce your travel history (any current passport itself
| goes to them, with color copies of every page of old
| passports). Qatar wanted it because I shared name with
| somebody born 40 years before me.
| Cyph0n wrote:
| Interesting. Just out of curiosity: did you naturalize as a
| Qatari (didn't even know it was possible!), or was it a
| visa-related thing?
| qingcharles wrote:
| I just looked it up. I was dating a Qatari and didn't
| even dare to explore naturalization. The process is
| insane. As a man, you can't get citizenship through
| marriage (only women get that). So, as a guy I would have
| to live there for 25 continuous years with little time
| outside the country. Add on that they require you to be
| rich, Muslim and speak Gulf Arabic at native level. Also,
| you have to give up your birth citizenship (not always
| possible) and they can revoke your citizenship on a whim.
|
| Qatar is a fascinating country, though.
| davchana wrote:
| No, I can't ever. I was an immigrant worker there, and
| Qatar Immigration wanted all this before they give me
| work visa aka residence permit.
| enqk wrote:
| Another reason is that the UK forbids the child to have
| different names on their japanese passport and their UK
| passport, which is often (almost always?) the case
| d1sxeyes wrote:
| 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 wrote:
| > 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.
| new299 wrote:
| Parent of applicant but not grandparents, at least in my
| case.
| stevekemp wrote:
| In my case, as a British citizen married to a European living
| outside the UK, I had way fewer requests/demands for
| documentation.
|
| All I needed to do was submit my own details, and a copy of
| both the marriage certificate and birth certificate for the
| child.
|
| The assumption was made that as a married couple the child
| had me as the father, and as I'm British then so were they.
|
| No references at all to grandparents, or even the mother's
| details, in the online wizard I filled out. Quite a quick
| process, which reminds me I probably need to renew their UK
| passport since it has expired a couple of years back.
| dogmatism wrote:
| Were you born before 1983? It seems that makes it easier
| mcsniff wrote:
| Not only can you complete a UK Passport Application completely
| online (save for mailing any required documentations to HMPO),
| you can apply for a brand new passport as a "new" citizen (by
| adoption, naturalisation, or descent), online, from outside the
| UK, with just a mobile device without downloading some special
| app, including taking the photos.
|
| Sure, you can play it on "hard mode " and do it with paper and
| pen for the lulz, but my experience was extremely efficient,
| fast, and straight-forward.
| digianarchist wrote:
| Renewed recently which was my first time using the online
| system. The entire process was exceptionally fast. I got the
| passport back in less than 2 weeks from California.
|
| In comparison my Canadian passport renewal (damaged after 3
| years) from California took 4 months. Was entirely paper based
| and had ridiculous requirements such as requiring a reference
| and a photograph stamped by photographer.
|
| I know there's a digital pilot that's ongoing. That should be
| rolled out ASAP.
| kalleboo wrote:
| Just being able to do it via mail sounds like luxury, to
| renew a Swedish passport you need to visit an embassy in
| person. And then in 2 weeks go back in person to pick it up.
| Really fun when the embassy is on the other side of the
| country and it means expensive plane trips. This was even
| more of a problem during COVID when borders were closed,
| since Sweden doesn't have embassies in every single country.
|
| And they expire in 5 years, not 10 like many other countries.
| OptionOfT wrote:
| I need to renew my Belgian passport soon, and I live in the
| United States.
|
| Even though the consulate has my biometric data, I need to
| visit them in person.
|
| My only saving grace is that they sometimes visit my city.,
| and I can register there. But that registration is only valid
| for 1 year, and they don't visit every year...
|
| And that is still 2h+ one way of travel for me, for something
| they already have.
| belgiandudette wrote:
| The Belgian passport comes in exceptionally fast though.
| For me it was ready for pick up in the Belgian embassy in
| less than a week from application.
| riffraff wrote:
| > Even though the consulate has my biometric data, I need
| to visit them in person.
|
| don't they need to re-record them after X years? I thought
| that was the whole point of renewing an identity
| document/passport.
| whitehexagon wrote:
| 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.
| vixen99 wrote:
| Seconded! In my experience, Gov.UK does pretty well in
| general and am happy to say that as one who privately fumes
| about various aspects of Britain in recent years.
| icheyne wrote:
| I work with Equal Experts, who built this system for HMPO.
| Feels good to get this feedback.
| ljm wrote:
| You can easily tell the difference between services built
| under GDS, where the work favoured local contractors and
| agencies and otherwise smaller outfits, and those farmed
| out to the usual huge consultancy firms that are typically
| mired in controversy.
|
| I would have much, much lower expectations for a body shop
| like Infosys or Accenture or Thoughtworks. They probably
| wouldn't implement the design system right without billing
| extra for attention to detail.
| jameshh wrote:
| 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.
| dazc wrote:
| You make it seem much simpler than it is in reality. I accept
| the process for renewals has been streamlined with considerable
| success but, as someone who recently helped a friend apply for
| his first passport a couple of years ago, I can attest the
| process is drawn out and tedious. An in-person interview is
| required, as is a signature from a 'responsible person' that
| many people do not have access to (Doctors are not accepted,
| for instance).
| behnamoh wrote:
| Haskell has an interesting syntax: it is intuitive _after_
| someone explains it to me, but not intuitive much _before_ the
| explanation.
|
| I don't think it's because I'm used to Algol-based languages (C,
| Python, etc.). Every Haskell code I've seen is plagued with a
| plethora of operators which aim to make the code concise but it's
| not obvious what they do just by looking at them:
| https://academy.fpblock.com/haskell/tutorial/operators/
| theLiminator wrote:
| > it is intuitive after someone explains it to me, but not
| intuitive much before the explanation
|
| Isn't that pretty close to what something being intuitive
| means? Ie. something being intuitive means that it's easily
| understood or learned without requiring prior knowledge or
| instruction.
| gylterud wrote:
| With Haskell code it is often so that the code which actually
| does something is expressed in terms of combinators. These
| combinators are often very general, so one must do a bit of
| mental work to understand what they do in this particular
| context.
|
| Once you understand what the combinators do in a particular
| context the code often reads very easily, and what it does is
| very intuitive and natural.
|
| Best example I can think of is applicative parsers, where
| there are scattered <*> and <$> operators around, but if you
| just ignore them the parser just looks like a very intuitive
| description of what the expressions you want to parse look
| like.
| the_af wrote:
| Most of the operators in that link are bog standard, and among
| the _least_ interesting things to say about Haskell.
|
| If I didn't know programming and picked at random some Java
| program, I wouldn't understand much either. If I didn't take a
| single math course and I tried to read a math formula, I
| wouldn't understand the operators or anything either.
|
| The standard should be: how much can you understand once you
| learn the basics and do a couple of tutorials?
| tikhonj wrote:
| At some point, I did a rough count, and the number of operators
| you encounter in "normal" Haskell code--avoiding lens or
| domain-specific libraries--was pretty close to the number of
| operators you'd encounter in, say, JavaScript. This was a while
| ago and I don't want to redo the exercise now, but, even if
| we're being generous to JavaScript, practical Haskell needs on
| the order of 2x as many operators as practical JavaScript, not
| 10x.
|
| Haskell has some up-front incidental complexity, but it's a
| difference of degree not kind from popular starting languages.
| It's easy to underestimate how much you had to learn about
| Algol-style languages that you've just internalized so well
| that you don't even realize. I've taught some complete
| programming beginners (high or middle schoolers) Java and
| Python and, especially one-on-one, I've seen how they get
| confused by things I did not even remember required
| explanation!
|
| For example, in Python, people put : in the wrong place and
| don't understand how = works. "Basic" syntax like : and = are
| far more complex than we realize, we've just learned the basics
| so well that it's second nature. It's similar to how native
| English speakers don't even realize we have rules for adjective
| order ("big red ball" vs "red big ball"), while language
| learners run into it like a brick wall.
| dmead wrote:
| Combinator style, while good and well designed and all they
| only ended up inventing the next perl.
|
| #haskell on freenode in the 2000s was a really fun place. I
| could not for the life of me convince anyone else to use the
| language.
| eru wrote:
| Combinators (in the Haskell sense) have nothing to do with
| whether you write your functions with letters or with comic
| book swearing.
| librasteve wrote:
| err, no
|
| the perl6 guys ended up inventing the new perl (now renamed
| raku)
|
| https://rakujourney.wordpress.com/2024/10/12/raku-burritos/
|
| the first perl6 parser (pugs) was written in Haskell btw
| gylterud wrote:
| Oh, I owe a lot to freenode and #haskell and #math in
| particular. I remember one of them ran a lecture on
| category theory, live. It was also there I first heard
| about Martin-Lof type theory.
|
| It was such a great time and place for a young person
| interested in learning about Haskell.
| dmead wrote:
| Do you remember who ran it? I used to go to hack phi at
| UPenn, which attracted a significant chunk of the
| community.
| tomsmeding wrote:
| The IRC channel still exists! It's on libera.chat now,
| though.
| ngruhn wrote:
| I don't know if you just counted the JavaScript operators but
| if you count all the instances where some random symbol is
| used then it's really a ton. There is
| yield* function* a?.b?.c function f(x
| = 3) { x ??= 3 ...
|
| TypeScript adds even more: a!.b
| Type<T> type A = B extends C ? D : E ...
|
| and there are countless ECMA proposals and TypeScript feature
| request that want to pile on even more. People seem to have
| zero qualms about cryptic syntax. I think the difference is
| that this syntax is mostly very ad-hoc. If you know the
| language already, this just adds a liiiittle bit extra to
| solve some very specific problem. On the other hand, Haskell
| operators like <$>, <*>, >>= are extremely general. After
| years I still learn about new and unexpected ways that you
| can use them (e.g. what the hell is `fix <$> id`). But
| paradoxically, because they can be used in so many seemingly
| unrelated contexts, you have no idea what to use them for at
| all initially.
| skybrian wrote:
| 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 wrote:
| > 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.
| skybrian wrote:
| Yes, you could write the same thing, but defaults and
| language conventions matter. Writing curried functions in
| JavaScript is awkward enough that nobody does it by
| default. If you did, people would ask why in a review.
| IshKebab wrote:
| > practical Haskell needs on the order of 2x as many
| operators as practical JavaScript, not 10x.
|
| Yeah but the JavaScript operators are almost all universally
| understood. There are some exceptions and mistakes, like
| `===` which shouldn't exist, and `.?` which is new but fairly
| standard. But most of the operators are just standard maths
| stuff, normal array/field accesses, etc.
|
| Haskell has normal operators _plus_ a bunch of weird
| operators that you need to learn. Even if the raw number of
| operators is only 2x, the number of operators that you have
| to _learn_ is probably 10x.
|
| Especially when you consider that Javascript operators are
| fixed so you have to learn them once, whereas Haskell
| operators are user-defined and Haskell programmers _love_
| defining them.
| cbsmith wrote:
| I still don't understand equality in JavaScript. ;-)
| IshKebab wrote:
| The only thing to understand is that you need a blanket
| ban on `==` and `!=` using ESLint.
| mejutoco wrote:
| I think Larry Wall mentioned something like this regarding
| perl. Things can only be intuitive after learning them. I do
| not think it is syntax you are complaining about either. Some
| constructs in Haskell reference a certain model (monads,
| lenses) and no syntax is going to infuse any reader with that
| knowledge if they do not possess it already.
| phillipseamore wrote:
| Great read, best laugh of the day!
| tanh wrote:
| I just went through hell this with one of my daughters. She was
| born in Japan and I had a hard time getting my mother's surname
| matching what was on my birth certificate.
|
| Long story short, I demonstrated I was born in England and that I
| have citizenship (a passport) so no matter the possibility, it
| must be something that can be passed on. That doesn't match the
| guidelines of documents required but it's much less of a pain I
| reckon.
| charcircuit wrote:
| >written in arcane language, in various texts called "acts of
| parliament".
|
| >British passports are issued to those who have a claim to
| British nationality under the British Nationality Act 1981.
|
| Has the British language really evolved that much in the last 50
| years?
| hombre_fatal wrote:
| The more obvious interpretation is that it's written in a
| bureaucratic way that not everyone would understand.
|
| Legal copy written in 2025 could be considered arcane.
|
| It doesn't mean the language of the time is hard to understand.
| Jhsto wrote:
| There was a law change about European Union citizens settlement
| scheme last week. It's a UK law which is like a tutorial for
| getting to play the passport game. Anyway, the following was
| written this year. It starts off by checking if you are a Lisp
| interpreter:
|
| Changes to Appendix EU
|
| APP EU1. In Annex 1, in sub-paragraph (a) of the definition of
| 'continuous qualifying period', after "(b)(i)(ee) below",
| insert "(or unless sub- paragraph (b)(i)(ii) below applies)".
|
| APP EU2. In Annex 1, for sub-paragraph (b)(i)(ii) of the
| definition of 'continuous qualifying period', substitute:
|
| "(ii) (where the person has limited leave to enter or remain
| granted under paragraph EU3 or EU3A of this Appendix) any
| period(s) of absence which did not exceed a total of 30 months
| in the most recent 60-month period, as at the date of
| application or (as the case may be) at the date on which, under
| paragraph EU4, the Secretary of State is considering whether to
| grant them indefinite leave to enter or remain under paragraph
| EU2 or (as the case may be) EU2A, without a valid application
| under this Appendix having been made; or
|
| (jj) any period of absence due directly to an order or decision
| to which sub-paragraph (b)(iii) below refers, where that order
| or decision has been set aside or revoked; or".
|
| APP EU3. In Annex 1, for sub-paragraph (c)(v) of the definition
| of 'continuous qualifying period', substitute:
|
| "(v) a relevant reference is concerned; or
|
| (vi) sub-paragraph (b)(i)(ii) above applies, where, under
| paragraph EU4 of this Appendix, the Secretary of State is
| considering whether to grant the person indefinite leave to
| enter or remain without a valid application under this Appendix
| having been made".
| nkrisc wrote:
| It's arcane because it's technical, legal language. British
| English as a whole has not meaningfully changed that much in
| just 50 years.
| d1sxeyes wrote:
| Arcane does not mean the same as archaic.
| pbhjpbhj wrote:
| In addition to the sibling comments, this is a style of
| humourous writing. They're just saying that legislation is not
| straight forward to understand.
| agnishom wrote:
| The sarcasm here is off the charts.
|
| My First Reaction: Given that the game can be read as a
| deconstruction of the concept of Nation States and Citizenship,
| why would the UK government run such a thing?
|
| After a few minutes: Oh wait a minute...
| imarkphillips wrote:
| Classic!
| franciscop wrote:
| I have noticed in Japan the crazy bureaucratization of document
| applications in the 7-8 years I've been living here. I've had 2
| Japanese documents expire, "MyNumber" and "Driving License" in
| these years, and when trying to re-obtain them the process has
| become MUCH more complex. I'm bad at remembering all these
| processes in detail, but these are from memory:
|
| - For the mynumber, first time, it was a simple application, and
| maybe a trip or two to the City Hall. This was at a moment where
| Japan was trying everyone to have/use the mynumber system so that
| might've made it easier on purpose.
|
| - The second time I needed to book an appointment to request the
| application forms, which were (snail)mailed to me so then I could
| apply for the card. Yes, that sentence is as bad as it reads.
|
| Now the crazier one is the driving license (conversion process):
|
| - The first time I needed to get a translation, I went to JAL,
| showed my documents and paid, then received the translation. Took
| that and 2-3 documents, went to the driving license center, and
| gave the documents and passports and IDs. Waited few hours and
| had it done. Oh, I also got the Motorbike license for free.
|
| - The second time I am applying now: need to get the translation,
| first register online for the translation, for which you need to
| create an account and a 8-step process. Hard, but still doable
| [1]. Then you need to book a meeting for the driving license
| center. But it's very hard to do so, in fact I couldn't find the
| link at all. I went in person and they showed me a QR code for
| the booking, I suspect this is hard to find on purpose. Every
| place is full and cannot be booked, except for 1 of them, 2
| months later. Okay, I try to apply. First basic questions, sure,
| then asks for travel history on my passport that I need to input
| manually. Note that dates in one part of the form are on the
| shape of `YYYYMMDD` and in other they are 3 fields of "YYYY",
| "MM", "DD" (3 different inputs), having to write a dozen of them
| is maddening. Oh wait, but if I want the motorbike one, which was
| automatic before, I now need a document from the Spanish embassy
| as well, another side quest. I'm hoping they can at least provide
| it in Japanese. I guess I'm halfway that process now, got a
| meeting booked 2 months later.
|
| [1] https://english.jaf.or.jp/driving-in-japan/drive-in-
| japan/ab...
| tecleandor wrote:
| Ha! I go to Japan every now and then, as I have friends there,
| and I've though a couple times about doing the Japanese driving
| license thing, that looked super easy back at the time
| (translate your current driving license, book a meeting in the
| exam center, do a short exam, and you're almost good to go). I
| was thinking about doing it in my next trip in two weeks, but
| seems like they've raised the difficulty several levels :)
|
| (Spaniard here too...)
| franciscop wrote:
| > I go to Japan every now and then
|
| AFAIK this is only available for residents? People traveling
| can/should use the international driving permit. Both JAL
| (translation) and the center itself asked me for my resident
| card.
|
| > do a short exam
|
| Oh there's no exam needed at least! Unless you mean the eye
| test?
| klausa wrote:
| It's not, you can get a Japanese driving license without
| living here ; but the government is making some noises to
| cut back on that (some recent semi-notable accidents caused
| by foreigners).
|
| It's apparently been a loophole for Chinese and Vietnamese
| tourists to get a license that is more recognized abroad
| then their own.
|
| I think restricting this to residents makes sense; I'm more
| wary of making it more complex or difficult in other ways,
| but I also have that quest behind me so I don't really care
| to be fair.
|
| As to exam - that depends entirely as to where your
| "original" driving license is from.
|
| Some countries just need a sufficient amount of paperwork
| (which sometimes is more difficult than the exam), some
| require just a theory exam, some require both theory and
| practical exam. In case of the US, it also differs state by
| state, because of course it does; why would anything ever
| make sense.
| franciscop wrote:
| > As to exam - that depends entirely as to where your
| "original" driving license is from.
|
| Yes, that's why I was replying that since we both are
| Spaniards "(Spaniard here too...)"
| tecleandor wrote:
| The "Spaniard" was mostly for reference, as right now I
| can't remember who sent me the information about the
| exams, so it might not apply to Europe or Spain.
|
| But the documents required (at least previously to recent
| changes) for the license transfer were [0]:
| 1. Application form for Japanese Translation of foreign
| driver's license 2. A driver's license (original,
| in principle) 3. A photocopy of a residence card
| or a resident record etc [...] only required for licenses
| written in Arabic or Russian and licenses issued in
| certain countries[...]
|
| And it didn't mention any residence documents. I don't
| know how that works today...
|
| -- 0: https://english.jaf.or.jp/use-jaf-
| more/drive-in-japan/foreign-nationals-license
| munchler wrote:
| I love this. It starts as a parody, then slowly morphs into a
| serious and elegant solution to the "game". By the end, I almost
| wish I could play it myself. Bravo.
| Prcmaker wrote:
| I think you can play, just much harder to get through the end
| game stage.
| returningfory2 wrote:
| Anyone can play but only ~70 million people can win :)
| UltraSane wrote:
| Haskell itself is an amazing language once it "clicks". But all
| the tooling around Haskell is just really bad.
| chii wrote:
| i think the tooling improves with popularity, so it's a bit of
| a chicken/egg problem.
|
| But with the recent LSP decoupling of the IDE to the compiler,
| it is quite possible to make good tooling that is independent
| of any particular editor. It's just that the language's
| popularity is what induces contributors (as most are
| realistically after "fame" and "portfilio" when doing
| contributions).
| jose_zap wrote:
| That was definitely true many years ago. Nowadays Haskell has
| some really good tooling.
|
| It has a feature-rich LSP, code formatter, package manager,
| dead-code checker, configurable linter, thread debugger, memory
| debugger, vulnerabilities checker, and much more.
|
| That's just what is provided by external tooling. Then, it also
| has everything the compiler has to offer, which is bit more
| than what most languages do. For example, you can now compile
| to JavaScript or WASM.
| yakshaving_jgt wrote:
| > all the tooling around Haskell is just really bad.
|
| No it isn't. This is a stupid meme that people just
| dogmatically perpetuate.
| UltraSane wrote:
| No, this was from first hand experience. I guess Visual
| Studio and PyCharm have spoiled me.
| yakshaving_jgt wrote:
| I wasn't expecting your gripe to be about text editors.
| What exactly do you think is missing in Haskell? You can
| write Haskell in VSCode.
| whateveracct wrote:
| This isn't really true nowadays.
|
| Also, you can build pretty much everything in Haskell with a
| plain text editor and ghci. You get better code that way too!
| EngineeringStuf wrote:
| I've worked on a variety of large UK government systems for the
| past ten years.
|
| This blog encapsulates the problem of writing government
| services/software, which often results in strange outcomes.
|
| Writing software for government is essentially the codification
| of centuries worth of Acts of Parliament.
|
| Now imagine building the HMPO passport system, and then some
| underlying Law/Act is changed or repealed etc.
|
| Now someone has to find and change everything that the Law/Act
| affected in all systems.
|
| Now consider that the government frequently outsources this work
| to expensive consultancies who are motivated to elongate
| contracts and extract maximum value from the client... And
| ideally become entrenched.
|
| All whilst building systems of varying quality and inflexibility
| so that the next time that a Law/Act is changed then this whole
| process repeats.
|
| There is no central decision making authority to wrangle this
| problem (there used to be Spend Controls), which is why
| Government services delivery is so expensive.
| pbhjpbhj wrote:
| Do you have any insight as to why, seemingly, there is no
| contractual obligation on contractors to make a working system.
| They seem to make something approximating a working system,
| vastly overcharge -- like x1000 -- for output that appears to
| be 3 months of work by one junior programmer, but then get paid
| as if the system actually worked.
| dmd wrote:
| Because the people approving the contracts typically used to
| work for the consultants, and plan to work for them again in
| the future.
| dvdkon wrote:
| There's often no one to make them accountable. With a
| building, people know that having a supervisor that's not
| from the contracted company is valuable, but this hasn't
| caught on in software.
| undefeated wrote:
| It benefits no one to acknowledge that months were spent and
| the only outcome is millions of dollars wated. Sure, they
| could try to hold the contractor accountable, but that would
| put them at risk of being held accountable themselves by
| their own superiors for hiring that contractor in the first
| place. So they pretend everything works great, and pay
| accordingly
| Majromax wrote:
| > Do you have any insight as to why, seemingly, there is no
| contractual obligation on contractors to make a working
| system.
|
| Often, you'll find that procurement is handled by someone
| working off of an incomplete set of written specifications.
| The procurement officer probably has no expertise with or
| informal knowledge of the problem to identify problems in
| advance, and even if they do legal requirements (ironically
| designed to ensure fair and transparent procurement) might
| force them to disregard informal knowledge over the formal
| specifications.
|
| After the contract is signed, sunk cost fallacies and
| optimism biases take over. If the project goes over budget it
| might be easier to cut back on features than admit failure or
| demand more money, and the project _will_ go over budget once
| real users start seeing the in-progress work and change
| requests pile up. Project managers want to be seen managing a
| successful project; nobody 's rewarded for being the first to
| predict failure.
|
| This is a kind of principal/agent problem that the private
| sector partially manages with equity or deferred
| compensation, but the profit motive has a very limited role
| in government and you'd probably not want to give stock
| options anyway. Beyond that, even the political overlords
| have short time horizons of 'the next election', and
| announcing a grand new project is almost as good as
| delivering one.
|
| A high-profile example of this problem is the Canadian
| federal payroll system (https://www.oag-
| bvg.gc.ca/internet/English/att__e_43045.html), which has led
| to billions of dollars in fix-ups over a decade or so.
| michaelt wrote:
| _> This is a kind of principal /agent problem that the
| private sector partially manages with equity or deferred
| compensation_
|
| The private sector also has the option (and usually the
| motivation) to just quietly disappear failed projects.
|
| Wal-Mart buys an automation system for their distribution
| centre and it's a huge success? Tell the stock market. The
| system is a complete failure, we remove it and trash it?
| Uhhhh of course the secrets of our highly efficient
| warehouses are commercially confidential, couldn't possibly
| tell the stock market what we did or did not do.
| atmosx wrote:
| Oh dear - you should European Funds for CS research programs.
| It's a money making scheme for everyone involved without
| producing anything of substance and runs for years on end.
| There even companies "specialized" in every step of the
| process.
| miki123211 wrote:
| Three reasons, no incentives, no competition and no fraud.
|
| Unlike in private companies, government employees are often
| very hard to fire, even if they tragically underperform. If
| your salary does not depend at all on your performance, you
| play by the book, follow the rules and don't particularly
| care about putting in good work. You have _no incentives_ to
| do so. It doesn 't matter how the contractor you picked
| performs, as long as they can't prove negligence on your
| part, you're not getting fired. You won't be promoted either,
| even if they deliver under budget and months before the
| deadline.
|
| In a private company, the owner wants to make money, so
| there's an incentive to perform. Underperforming employees
| (or even entire departments) are simply cut. If a company
| fails at this _too_ badly (all companies fail to some
| extend), the entire company underperforms and loses
| customers. Ultimately, the market ensures that companies grow
| if they 're good at this and shrink if they aren't.
|
| With governments, this is, again, not the case. You aren't
| going to switch to a competing passport system and drive this
| one out of the market, no matter how badly it sucks. Metrics
| won't change much, no matter how bad the UX is, as the system
| provides a critical service which has no alternative. This is
| the _no competition_ problem.
|
| Private companies also have more freedom to pick contractors.
| It's really bad PR for the government if their employees
| choose contractors through nepotism, so laws have been passed
| that standardize the contractor selection process. This means
| that, even if you know a contractor is not the right choice,
| you may be prevented from doing anything about this. Because
| al rules can be gamed, most government contracts are won by
| companies who know how to game the rules, not those who make
| good software and would be chosen by a knowledgeable
| employee. This is the _no fraud_ problem.
| thrance wrote:
| I recently renewed my passport in France. There is a new-ish
| platform here for every document one might want to obtain. I
| had one form to complete online, that was rather easy to
| follow. I then had to go to the office once to finish the
| process. That took only 10 minutes and then the passport was
| delivered. As painless as can be, I believe.
|
| Whatever the situation is in the UK, it is not hopeless. The
| government needs to stop being afraid of hiring actual
| employees and bring all development in-house.
| moomin wrote:
| There was a group of people under the gov.uk banner who were
| actually really good. But a challenge is that if you employ
| someone, you need to fit them into your grade structure. And
| decent programmers earn "Senior Civil Servant" figures.
| mgaunard wrote:
| as a French citizen, I find that surprising.
|
| While renewing a passport is one of the easiest things you
| can do, I distinctively remember it taking a good half-day
| (most of which is waiting in line jumping from one desk to
| another until you find someone that can check all the
| documents you provided are satisfactory and sign off for
| you).
|
| Now however, if it's not a renewal but a new application, the
| difficulty sharply increases.
| atmosx wrote:
| Has outsourcing ever worked for anyone? I really haven't heard
| a success story involving a government outsourcing _something_
| like ever.
| theptip wrote:
| Is there an opportunity for reusable OSS rule systems? It seems
| that every government at every level could use an expressive
| system for defining and versioning them.
|
| I suspect part of the gap here is, as you note, everything
| technical is outsourced and so there is not enough
| institutional capacity to envision and execute what would be a
| quite revolutionary re-architecture.
|
| I find it extremely frustrating that the government is able to
| spend tens of millions on contractors for an IT project, but
| can't pay market rate for in-house engineers, even if those
| would be cheaper in the long run.
| tempodox wrote:
| This is so infuriating. Props to the author for sublimating it
| into a coding challenge.
| asimpletune wrote:
| I think an Italian version of this game could be very
| interesting.
| jasonhemann wrote:
| Just fantastic. Bravo.
| throwawayben wrote:
| 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 wrote:
| At least you got the bonus endscreen credits!
| pbhjpbhj wrote:
| I too have enjoyed a game of *Passport Application* by proxy.
|
| One of the interesting rules the OP doesn't appear to mention is
| the 'mutable history' rule. Herein, the facts contained in a
| single document can alter over even short periods of time
| requiring that a document, already scanned into the Examiners
| system of fact recording, can be required to be returned for
| subsequent scans. Verifying documents have not altered in their
| facts is, some say, tacit acknowledgement by the Examiner breed
| that a multiverse exists.
|
| The communication channel between the "NPC" telephone agents and
| the Examiners appears to be somewhat akin to prayer, only vague
| inferences can truly be received.
|
| Aside, I suspect the OP maybe be a Mornington Crescent
| aficianado; a game seemingly similar in rule-topology to the
| aforementioned Passport Application.
| tanh wrote:
| Yes and in the British system names can be fluid, changed at
| will with no declarations being made. That's how my mother was
| able to register my birth with the surname of her mother's
| third (!) marriage. Birth certificates are also immutable in
| certain ways but not entirely everything on it is immutable.
|
| Not to mention the passport office has forgotten previous
| decisions for my own passport where this sort of surname
| discrepancy has been explained away. (Including one passport
| where I am listed on a page of her passport!)
|
| The NPCs are infuriating. I called, emailed and received a
| different answer every time. It was like a poor LLM.
|
| After applying I had to explain to my mother that within the
| same batch of applications, one daughter required additional UK
| documents but the other one didn't (the passport came), purely
| because one was born in the UK and the other one wasn't. She
| rightly flipped out, raised it with an MP and it was resolved
| within a day.
| pbhjpbhj wrote:
| Similarly for us, siblings each required different treatment.
| Even when part of the same application. All born in the same
| UK hospital to the same parents and having the same home
| address. Fun.
|
| It was interesting to speculate what exactly the one child
| whose passport came months later had done that warranted the
| Examiner's extra scrutiny. Something to do with reincarnation
| I expect.
| tanh wrote:
| That's absurd! I hope it's all sorted out now. Personally
| hoping my kids won't have trouble when they turn 18 and
| have to interview.
| mgaunard wrote:
| UK is easy mode.
|
| Try France, or maybe Germany.
| ForHackernews wrote:
| This is one of many reasons why America's birthright citizenship
| is an incredible optimization: most people can prove they are
| American with a single document, a birth certificate.
| pyuser583 wrote:
| Back in the 2000s, the Justice Department prosecuted someone
| for a terrorist offense. They researched their birth and found
| out their parents were technically diplomats of a foreign
| country.
|
| It was a weird case, because the parents hadn't actually been
| working for the foreign embassy for a while, and didn't know
| they still held diplomatic status when their daughter was born.
|
| They had entered the US as diplomats and shortly after decided
| to go local. That was probably their plan all along - lots of
| diplomats from third world countries do that.
|
| It was a huge shock.
|
| Kind of a "surprise, you're not actually a citizen, even though
| both your parents and all your siblings are!"
|
| She was deported.
| goldfishgold wrote:
| Probably you're referring to those woman
| https://en.m.wikipedia.org/wiki/Hoda_Muthana
| pyuser583 wrote:
| Maybe? I remember both parents being diplomats.
| b0a04gl wrote:
| i was questioing why haskell in first place and then realised we
| can flip the whole model and treat the form as a constraint
| system where the user defines the outcome they want and the
| system solves for valid inputs so instead of users guessing what
| fields to fill the system already knows what combinations are
| legal this only works when your logic is deterministic and
| declarative which haskell supports natively, this may be one of
| the reason but suits well for this usecase
| cherryteastain wrote:
| > What are the base cases? A base case is an ancestor whose
| Britishness does not depend on a parent, e.g. someone who was
| naturalised, or born in the UK before 1983 (which makes one
| unconditionally british regardless of parents). That's right,
| further into the future we get from 1983, the taller these call-
| stacks can get.
|
| This is insane to me, coming from a country that simply has a
| central database of all citizens and foreign residents, and a
| citizenship check is probably something like a single SELECT on
| an SQL table.
| maest wrote:
| > citizenship check is probably something like a single SELECT
| on an SQL table
|
| I am willing to bet, with extremely unfavorable odds to me,
| that is not true
| pyuser583 wrote:
| Many countries simply have no way of knowing who their citizens
| are.
|
| People born abroad are often citizens.
|
| The British have had an insane number of changes in territory
| that affect citizenship.
|
| Some of their current citizens have citizenship because they
| were born in Bombay (Mumbai). Others because they were born in
| Hong Kong.
|
| Maintaining a reliable list of citizens requires regular
| registration, and loosing citizenship if you don't register.
| raron wrote:
| Even in that case it would probably enough to prove your
| citizenship once to get into the database.
| vishnugupta wrote:
| This reminds me of an article read about how DSL was used to
| automate/encode Dutch tax code.
|
| I can't recall the article I read but this is a good
| presentation.
|
| https://tomassetti.me/wp-content/uploads/2020/10/2018-04-10-...
| dbuxton wrote:
| I had to do a MN1 application for my US-born daughter as both me
| and my partner were born abroad. As OP alludes to this is a sort
| of side quest called "registration" which if you don't do it
| before the child is 18 lapses (although I think there are still
| routes to obtain citizenship in these circs).
|
| The most difficult part of the process (not dealt with in this
| version of Passport Application but maybe a future DLC pack?) was
| actually finding someone who could certify my evidence (you are
| meant to submit originals but they keep the docs including
| passports for 3-6 months which is a bit unrealistic if you are
| living abroad). I can't remember the exact rules but it wasn't
| possible to use a US notary or a normal solicitor certification
| process and instead I needed to go to a council office.
|
| After calling about 5 councils all of whom disavowed any
| knowledge of the process or its requirements I ended up finding
| someone at Islington Council who was delightfully helpful. But it
| was one of the more frustrating UK government interactions I've
| had.
| sevensor wrote:
| I seem to recall playing a version of this game as a text
| adventure. Douglas Adams was involved? But not _Hitchhiker's
| Guide_.
___________________________________________________________________
(page generated 2025-06-29 23:00 UTC)