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/o…
Solving `Passport Application` with Haskell
71–80 of 131 posts
Re: Solving `Passport Application` with Haskell
#72Re: Solving `Passport Application` with Haskell
#73I'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 someo…
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.
Re: Solving `Passport Application` with Haskell
#74For 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 translatio…
> 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.
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!
Re: Solving `Passport Application` with Haskell
#75For 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 translatio…
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 Britishne…
Re: Solving `Passport Application` with Haskell
#76I'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 someo…
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.
Re: Solving `Passport Application` with Haskell
#77Haskell 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…
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.
Re: Solving `Passport Application` with Haskell
#78Earlier quoted context omitted.
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 l…
> 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?
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.
Re: Solving `Passport Application` with Haskell
#79Re: Solving `Passport Application` with Haskell
#80Earlier 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…
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 looki…
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.