276 karma · joined Jun 19, 2020 (6y ago) · 134 submissions
comment 6y ago · link · parent
Some History of Functional Programming Languages (David Turner) https://www.cs.kent.ac.uk/people/staff/dat/tfp12/tfp12.pdf
comment 6y ago · link · parent
http://okmij.org/ftp/tagless-final/
"The so-called ``tagless-final'' style is a method of embedding domain-specific languages (DSLs) in a typed functional host language such as Haskell, OCaml, Scala or Coq. It is an alternative to the more familiar embedding as a (generalized) algebraic data type. It is centered around interpreters: Evaluator, compiler, partial evaluator, pretty-printer, multi-pass optimizer are all interpreters of DSL expressions. Doing a tagless-final embedding is literally writing a denotational semantics for the DSL -- in a host programming language rather than on paper."
comment 6y ago · link · parent
It was the worst of all worlds and you're blaming it on the wrong people.
comment 6y ago · link · parent
I don't think it's a particularly good argument that we should accept one method of accounting or another because we like or dislike its policy implications. What is an honest and clear method of accounting in your eyes?
comment 6y ago · link · parent
How did you turn a comment on method of accounting into a screed against "modern standard of living" and for living "one with nature"?
comment 6y ago · link · parent
I think you should look into domain theory it is one of the most celebrated discoveries pertaining to the semantics of functional programming languages. And maybe you'll understand that from a programming point of view, what a function is is much more flexible and subtle than you think.
> Yeah I'm not going to reply to your shit any more. HN really needs to change the policy of not letting parent posters vote others down.
Would it help if I pretended that you downvoted me? Every time I see my imaginary internet points I will subtract 5.
comment 6y ago · link · parent
> Functional programming is sometimes treated as synonymous with purely functional programming, a subset of functional programming which treats all functions as deterministic mathematical functions, or pure functions.
Well, obviously in this context the author of the submission wasn't using that definition. So you coming in and dismissing the conversation because sometimes people mean "pure functional programming" when they say "functional programming" is clearly erroneous. I know when people make this conflation, often when they're talking about Haskell. When talking about ML, no one would take that synonym. Context matters.
I just looked, you provided a set theoretic definition of functions, the wikiwand one. You chose a poor definition for the topic at hand. In most mathematical settings it would be a perfectly fine definition, but not here. Context matters.
Here are the problems with it: It assumes an interpretation in sets when there are a plurality of interpretations of functions qua functional programming which are not compatible with set theoretic models. For example, functions in homotopy type theory have higher dimensional structure than just being elements of a set. Functions in domains have more structure than just the extensional mapping from inputs to outputs. Your chosen definition also includes non-computable functions which are simply not admissible in this context.
So your definition is simultaneously too restrictive and too lax.
You seem to be confused by the existence of multiple definitions and how they are appropriate in context.
comment 6y ago · link · parent
I noted that your definition would preclude ML functions from being called functions. Your response was that ML wasn't purely functional, but that doesn't make it not functional. The pure in "pure functional" doesn't "to the exclusion of non-functional", it is simply a narrower category.
Considering that ML is one of the most impactful functional programming languages both in theory and practice, I think it's right to call that absurd and dogmatic. If you take it as a personal attack that I called your argument absurd, I don't know what to say. Maybe grow a little bit of skin?
> You on the other hand... haven't even stated your definition yet.
I don't need to provide a definition to find a flaw in yours. I did not come into this submission looking to smugly dismiss the topic at hand with my obviously irrelevant preferences for terminology. You did.
comment 6y ago · link · parent
As for calling me a junior, well, you don't know how much experience I have, do you? It's probably more than you, though. I've used and participated in the development of functional programming languages for over a decade at this point.
Unsolicited advice: Sophomoric pedantry isn't a good look.
comment 6y ago · link · parent
Edit: Ok I see. They store the PGP keys encrypted with your password. Like you said, they could just as well inject javascript to phish your password from your session.
But this does seem to mean that if one uses their API directly it would be possible to securely use their service. Thanks for the heads up. There is a third party open source bridge that reverse engineers their API. I think I will look into it to see how authentication is done.
comment 6y ago · link · parent
Which mathematical definition? A "box" is not a mathematical definition. There are multiple mathematically precise definitions of "function" possible. Yours is none of them. Some of them accommodate objects that model mutable state.
I don't think many (any?) PL theorists or functional programming practitioners would agree with your dogmatic stance. Where are you coming from with all this?
comment 6y ago · link · parent
I think we don't agree on how proton mail works. As I understand it, they already have my keys. You can't even give them just a subkey, it only works if you upload a set of PGP keys including the master secret key. What is your understanding of how it works?
As for your other concerns, unless I am conversing only with myself, the attack vector for my data is the entire e-mail ecosystem. Even if I only talk to people who use encrypted email, they are also part of my threat model, even if I don't trust a provider with my keypair. e-mail is simply not secure. It wasn't meant to be secure; security cannot be bolted on top.
What is your threat model and how do other providers or self hosting achieve your desired level of security?
comment 6y ago · link · parent
Let me also reemphasize that I don't consider email to be a secure or confidential medium of communication at all, even with PGP. I only want that my inbox is not sold to advertisers and the security practices of my provider aren't utter garbage. Maybe the fact that they're in Switzerland helps me in some ways, but if I had a state adversary I wouldn't bet on it.
comment 6y ago · link · parent
All I know is, I would hear about it very quickly as soon as Proton Mail is discovered to violate my privacy, and that's all I can expect of email. To be honest, the fact that their API is not open sourced and I have to use their web client or mediocre IMAP bridge would make me seek alternatives if I were to reconsider email providers. It would have to be one that has as strong of a privacy-conscious brand, or self-hosting.
comment 6y ago · link · parent
Inverse semigroups are used in the geometry of interaction to give a parallelizable interpretation of lambda calculus. I don't have a great introductory reference. Here's some people who have implemented a system based on the theory: https://www.cambridge.org/core/journals/mathematical-structu...
Sorry for the citation dump, I'm short on time and I thought they would be interesting to those who found this submission interesting.
References
118.
A Mathematician’s Manifesto for Rethinking Gender (Book Review)(nytimes.com ↗)
2 points · by bitdizzy · 6y ago · discuss
comment 6y ago · link · parent
I pick these two papers. The first is literally about adjunctions pertaining to combinatorial species whereas the second devotes an entire section to reviewing the theory and stating results that it uses in a way that I don't really understand. I'm going to read the first paper though because it's relevant to my interests :)
Rajan. The adjoints to the derivative functor on species
https://www.sciencedirect.com/science/article/pii/0097316593...
Panagiotou, Konstantinos; Stufler, Benedikt; Weller, Kerstin. Scaling limits of random graphs from subcritical classes.
https://projecteuclid.org/euclid.aop/1474462098
The fact that I have to go rummaging around for these examples kind of proves your point, doesn't it? I don't think category theory will lead to any fantastic new results in the fields we're discussing, but the bar is quite low for it to be useful as an organizational tool.
^ I searched for the word functor of course! :)