Solving `Passport Application` with Haskell
41–50 of 131 posts
Re: Solving `Passport Application` with Haskell
#42Haskell itself is an amazing language once it "clicks". But all the tooling around Haskell is just really bad.
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.
Re: Solving `Passport Application` with Haskell
#43Earlier quoted context omitted.
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.
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?
Re: Solving `Passport Application` with Haskell
#44Re: Solving `Passport Application` with Haskell
#45Haskell 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/o…
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 JavaSc…
yield*
function*
a?.b?.c
function f(x = 3) {
x ??= 3
...
TypeScript adds even more: a!.b
Type
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.Re: Solving `Passport Application` with Haskell
#46Earlier quoted context omitted.
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 JavaSc…
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.
It was such a great time and place for a young person interested in learning about Haskell.
Re: Solving `Passport Application` with Haskell
#47Not 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…
It is a shame that more businesses dont care about their customers enough to invest in such a well designed website. Well done HMPO.
Re: Solving `Passport Application` with Haskell
#48I 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.
Re: Solving `Passport Application` with Haskell
#49Re: Solving `Passport Application` with Haskell
#50Earlier quoted context omitted.
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 JavaSc…
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.