Top
Best
New

Posted by jameshh 3 days ago

Solving `Passport Application` with Haskell(jameshaydon.github.io)
302 points | 125 commentspage 3
imarkphillips 3 days ago|
Classic!
jasonhemann 2 days ago||
Just fantastic. Bravo.
charcircuit 3 days ago||
>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?

Jhsto 3 days ago||
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”.

hombre_fatal 3 days ago|||
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.

nkrisc 3 days ago|||
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 2 days ago|||
Arcane does not mean the same as archaic.
pbhjpbhj 2 days ago||
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.
tempodox 2 days ago||
This is so infuriating. Props to the author for sublimating it into a coding challenge.
UltraSane 3 days ago||
Haskell itself is an amazing language once it "clicks". But all the tooling around Haskell is just really bad.
jose_zap 2 days ago||
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.

whateveracct 2 days ago|||
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!

chii 2 days ago|||
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).

yakshaving_jgt 2 days ago||
> all the tooling around Haskell is just really bad.

No it isn’t. This is a stupid meme that people just dogmatically perpetuate.

UltraSane 2 days ago|||
No, this was from first hand experience. I guess Visual Studio and PyCharm have spoiled me.
yakshaving_jgt 2 days ago||
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.
azigras 1 day ago|||
[dead]
mgaunard 2 days ago||
UK is easy mode.

Try France, or maybe Germany.

b0a04gl 2 days ago|
[dead]