HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Monads and Gonads

Google TechTalks2 HN recommenders · recommended in 2 months, 2013-2022
YouTube
148K views · 13 years ago · talk · evergreen

Douglas Crockford's Google Tech Talk explains monads without category theory or Haskell, implementing them in JavaScript and tying them to Ajax and promises. He also touches on odd asides such as coloring code by scope.

Often recommended as a demystifying monad talk in plain JavaScript, though some find it light on definitions.

Functional programmingWeb development#monads#javascript#douglascrockford#functionalprogramming#promises

11 comments from Hacker News

@sargstuff2022 · in “Ask HN: S/W development text editor have feature colorizing every iteration?”

combobulate (alpha quality as of 10/22): source code outline/cliff notes. from github README.rst "Emacs package that provides a standardized framework for manipulating and navigating your source code using tree sitter's concrete syntax tree " -> link link with link then write a iterator/loop query for language(s) editing per link tad less installation heavy (sorta) but also makes use of tree-sitter syntax queries : link (neovim with treesitter syntax) blockman usage examples: link Alternative examples / takes (per user interface): ### embedding a block of source code in a document: ** carrotsearch.gethub.io/apidocs/code-blocks ** link ### 'colorize blocking' (vs space endenting) : ** example code reference coloring: ▶ this video ### gui block programming : ** link ** link

CitesView on HN
@xook2021 · in “A case against syntax highlighting (2007)”

I went to find the video where I first heard him say something about syntax highlighting is for kindergartners ▶ this video It's an unfortunate comment since I struggle with word salad most days. Being able to skim and find certain blocks or aspects of a source file is preferable if I can't remember the name of something right away.

CriticalView on HN
@scotty792019 · in “Learning Haskell is no harder than learning any other programming language”

The one thing that made monads clearer for me was this thing ▶ this video Monads and Gonads It's probably condescending for haskellers because it shows that monads are not some enshrined primary concept but just a kind of dumb wrapper you can write in any language and you do when it's useful for you.

Strongly recommendsView on HN
@wenc2018 · in “Railway-Oriented Programming (2015)”

Javascript promises are a kind of monad. Douglas Crockford talks about this in his talk "Monads and Gonads" [1] [1] ▶ this video

CitesView on HN
@clusmore2016 · in “Using Haskell to Find Unused Spring MVC Code”

>The biggest real problem I’ve found with large “where” clauses is that they tend to have a lot of implicit dependencies on variables from the enclosing scope. For me it's always a toss up. I like to make things local where possible to give some indication that the definitions need not be looked over with a fine-toothed comb -- they aren't used extensively. On the other hand, it does often lead to implicit dependencies. It would be nice to have scope highlighting - color every identifier based on the distance from the scope it's defined in. This idea shamelessly stolen from Doug Crockford in ▶ this video

CitesView on HN
@nnq2016 · in “In defence of Douglas Crockford”

also, this indirectly reminded me of what I thought to be one of DC's greatest talks: Monads and Gonads ( ▶ this video )

Strongly recommendsView on HN
@fizixer2016 · in “The Monad Challenges: Jump start your understanding of monads”

> Do I need to know Haskell? Yes. This is enough for me to reject this blogpost. No you don't need a specific language to implement any functionality that can be implemented by a turing-complete language. I watched Crockford's monad talk [1]. He used javascript. The only problem with that talk is that he spent about 10 seconds or less explaining what a monad is (and the rest of the talk on implementation issues and his own perspective, etc, etc). I'm still waiting for a good monad discussion without CT or Haskell. (this [2] and this [3] look promising, both in python) [1] ▶ this video [2] link [3] link

CitesView on HN
@wmonk2015 · in “The impact of syntax colouring on program comprehension [pdf]”

In [this talk]( ▶ this video ) by Douglas Crockford he talks about syntax highlight being for kids - "that's something we put in our text editors for kindergarteners to do programming...I am more sort of a grown up and a professional programmer so I don't need to colours". I found it weird he was so deriding towards syntax highlighting.

CriticalView on HN
@nnq2015 · in “The Beauty of Clojure”

...that's how chaining method calls end up working in most OO languages (take the Scala example in OP's article). And also in Javascript (I can't remember if there is something like `range` in js right now...): [1,2,3,4,5,6,7,8,9,10] .map(function (x) { return x + 2 }) .reduce(function (a, b) { return a + b }) so the "." in OOP ends up working like "->" or "->>". Heck, you can make the dot in OOP code behave like anything, even like monadic bind (`>>=` or `do` notation in Haskell), if you do OOP-style-monads in JS: ▶ this video (off-topic: this is also my main problem with OOP... the "." can actually end up meaning anything practically, as program logic is concerned, it's like some kind of "infinite operator overloading" :) )

CitesView on HN
@pandler2015 · in “Show HN: Glow – Syntax highlighting for Clojure source code”

I'm unfamiliar with Clojure, but I rather liked Douglas Crockfords comment on code coloring (Lisp) based on scope rather than syntax. ▶ this video

CitesView on HN
@martinced2013 · in “Monads for Normal Programmers”

"Monads for JavaScript Programmers" Just as the talk he refers to (I've seen it and it's ok)... It's for JavaScript programmers): ▶ this video So unless there's a 1-to-1 mapping between "Normal Programmers" and "JavaScript" programmers this title is quite misleading.

CriticalView on HN
Douglas Crockford: Monads and Gonads (YUIConf Evening Keynote)54:27

Douglas Crockford: Monads and Gonads (YUIConf Evening Keynote)

YUI Library
67K views • 13 years ago
Monad - FunFunFunction #2111:25

Monad - FunFunFunction #21

Fun Fun Function
128K views • 10 years ago
Hey Underscore, You're Doing It Wrong!36:31

Hey Underscore, You're Doing It Wrong!

InfoQ
141K views • 13 years ago
Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript1:02:15

Lambda Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript

Fullstack Academy
227K views • 9 years ago
JavaScript: The Good Parts1:03:48

JavaScript: The Good Parts

Google TechTalks
589K views • 17 years ago
Brian Beckman: Don't fear the Monad1:07:10

Brian Beckman: Don't fear the Monad

jasonofthel33t
415K views • 13 years ago
Nordic.js 2014 • Douglas Crockford - The Better Parts33:52

Nordic.js 2014 • Douglas Crockford - The Better Parts

Nordic.js
73K views • 12 years ago
The Functional Programmer's Toolkit - Scott Wlaschin1:05:51

The Functional Programmer's Toolkit - Scott Wlaschin

NDC Conferences
79K views • 7 years ago
ClojureScript in the Age of TypeScript — David Nolen59:31

ClojureScript in the Age of TypeScript — David Nolen

ChariotSolutions
29K views • 5 years ago
ClojureScript for Skeptics - Derek Slager41:09

ClojureScript for Skeptics - Derek Slager

ClojureTV
72K views • 10 years ago
Crockford on JavaScript - Volume 1: The Early Years1:42:09

Crockford on JavaScript - Volume 1: The Early Years

YUI Library
252K views • 15 years ago
React.js Conf 2015 - Immutable Data and React31:11

React.js Conf 2015 - Immutable Data and React

Meta Developers
159K views • 11 years ago
JSON Parser 100% From Scratch in Haskell (only 111 lines)1:50:07

JSON Parser 100% From Scratch in Haskell (only 111 lines)

Tsoding
205K views • 6 years ago
Crockford on JavaScript - Section 8: Programming Style & Your Brain1:06:46

Crockford on JavaScript - Section 8: Programming Style & Your Brain

YUI Library
111K views • 14 years ago
The Next Five Years of ClojureScript - David Nolen1:00:58

The Next Five Years of ClojureScript - David Nolen

Metosin
19K views • 10 years ago
The Algebra of Algebraic Data Types1:04:35

The Algebra of Algebraic Data Types

London Haskell
27K views • 13 years ago
Ron Pressler - Pull Push: Please stop polluting our imperative languages with pure concepts-Curry On44:43

Ron Pressler - Pull Push: Please stop polluting our imperative languages with pure concepts-Curry On

Curry On!
25K views • 11 years ago
Web Development in Emacs, Common Lisp and Clojurescript - Emacs SG1:18:42

Web Development in Emacs, Common Lisp and Clojurescript - Emacs SG

Engineers.SG
14K views • 10 years ago
Simon Peyton-Jones: Escape from the ivory tower: the Haskell journey1:04:16

Simon Peyton-Jones: Escape from the ivory tower: the Haskell journey

Churchill College, University of Cambridge
170K views • 9 years ago
Om Next - David Nolen46:18

Om Next - David Nolen

ClojureTV
44K views • 11 years ago