106 karma · joined Jun 26, 2015 (11y ago) · 53 submissions
comment 5y ago · link · parent
Thank you for the comments. I've learned more from reading the comments.
comment 5y ago · link · parent
> So we should keep the door open, and not pretend we have already solved errors.
Very much this. Even with errors as values, the approach languages like Go take makes composition difficult. I presented the Kleisli approach instead. That recovers compositionality. OCaml does something I find interesting. It makes exceptions performant by not capturing stack traces by default. But it's still too easy to forget handling the exception.
> btw, the article uses Rust, not Go, but anyway...
I actually used TypeScript. The Rust bit was meant to introduce the idea from Rust to TypeScript. It's not new in TypeScript, but it's not popular either. I have updated the article to clarify that.
comment 5y ago · link · parent
comment 5y ago · link · parent
Even though I like it, I find the DSL too verbose. A slimmer DSL would be great. Generating the spec from existing code worked sometimes, but it coupled the API design process to the implementation code. I'm not a fan of that.
I think OpenAPI's appeal is in tooling: provide a spec, then you get documentation, API consoles, mock servers, etc. for free. If it's for documentation only, people will continue using Postman. Postman already provides mock servers and consoles, so there you have it. It'll take more tools built on OpenAPI to make it very appealing.
5.
Away from Exceptions: Errors as Values(humanlytyped.hashnode.dev ↗)
98 points · by Jonathanks · 5y ago · 136 comments
comment 7y ago · link · parent
Edit: (in light of another reply that mentioned the lambda calculus). The addition to Real World OCaml that I suggested was to call out the implementation of the Y combinator in the section on Memoization. The explanation used the Y combinator to work up to an implementation of memoization, and it was so intuitive that I felt it should be noted, but that won't easily fit into an already dense chapter.
9.
Interfaces Define Requirements(calhoun.io ↗)
1 points · by Jonathanks · 8y ago · discuss
comment 8y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
In 2016, and through the first quarter of 2017, at the peak of the ponzi schemes frenzy that caught Nigeria (did you hear of MMM and the likes?), some friends asked me to create a similar platform for peer-to-peer donations for them. They wanted a matrix scheme with themselves at the top; they'd later take the site down suddenly after making much money; whoever came in last or invested much would be wrecked. I refused taking the job, and some other developer friends declined similar requests. I know some that took such jobs. So there are the dishonest ones, and there are the genuine ones.
While there are scammers raising the country's flag everywhere, I am certain many are not Nigerians. As Chimamanda Adichie said, the problem with stereotypes is not that they are false, but that they are only half the truth.
comment 9y ago · link · parent
comment 9y ago · link · parent
I've used Slackware before, and it was an easy look into the system; except that package management is a bit stressful on Slackware, and its packages are not so up-to-date.
I'm running a VM with FreeBSD now; how suitable it can be for a laptop, I don't know yet. Battery life matters there too.
Fedora looks good; I already have a Fedora 24 disc, so I might go from there instead of Slackware. openSUSE tumbleweed looks great too. I'll probably try it.
comment 9y ago · link · parent
I want something that's a bit stable with more recent packages. FreeBSD seems to be semi-rolling release, comparing package versions in the 'current' release with that in the snapshot versions. Debian testing has packages as recent as I can use, but I heard it's less stable than Ubuntu and bad things happen too. I'm considering Fedora, but I prefer rolling release distros to fixed release ones (I don't want Rawhide for stability sake). OpenSUSE has older packages in its repos: PHP < 7.0, gcc < 6, ...
comment 9y ago · link · parent
I have no good knowledge of neuroscience, so I'll be happy to read other thoughts on this. Personally, it seems to me that this is an evolved technique to direct us to:
act on impulses at the moment of an event, instead of contemplating rational choices that may take too much time to arrive at (thus limiting our chances of survival);
pursue rational choices in calmer times, trusting us to draw on stored memories of similar events to help make better decisions (the purpose of Deja Vu?)
For the link between the hippocampus and the cortex being required to retrieve memories; maybe those memories are useless without the emotional context, and the hippocampus is needed to relive those emotions to have a more accurate recollection of the memories.
It might not make sense (I know almost nothing about neuroscience), but it's a thought.