You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Harrison Brown
hrb90
Northern Virginia. Based software developer. Math enthusiast, but a pretty wack M.C.
Type lambdas and induction with GHC 8.4.2 and singletons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some char-rnn generated Haskell based on training with the GHC HEAD source code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"For services to the PureScript Community, Gary Burgess!"
You've done it, Gary. Moore, Lineker, Coleman, and now Burgess. All the work was worth it.
The halls erupted with praise. Children dressed as Space Ghost, teens with "I only get high on
Halogen" t-shirts, a giant banner held aloft with the message, "Tuple @garyb me". Through
the noise of the crowds and Phil's uninterpretable Northern accent, he barely managed to hear
his theme tu-
async/await is just the do-notation of the Promise monad
async/await is just the do-notation of the Promise monad
CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.
In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.
First, let's illustrate the 3 styles by implementing
A proof that the Halting problem is undecidable, using JavaScript and examples
Having read a few proofs that the halting problem is undecidable,
I found that they were quite inaccessible,
or that they glossed over important details.
To counter this, I've attempted to re-hash the proof using a familiar language, JavaScript,
with numerous examples along the way.
This famous proof tells us that there is no general method
to determine whether a program will finish running.
To illustrate this, we can consider programs as JavaScript function calls,
and ask whether it is possible to write a JavaScript function which will tell us
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters