- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
This file contains 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
# -------------------------------------------------------------------- | |
# An implementation of Kruskal's algorithm for generating mazes. | |
# Fairly expensive, memory-wise, as it requires memory proportional | |
# to the size of the entire maze, and it's not the fastest of the | |
# algorithms (what with all the set and edge management is has to | |
# do). Also, the mazes it generates tend to have a lot of very short | |
# dead-ends, giving the maze a kind of "spiky" look. | |
# -------------------------------------------------------------------- | |
# NOTE: the display routine used in this script requires a terminal | |
# that supports ANSI escape sequences. Windows users, sorry. :( |
This file contains 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
var bind = function (prev, bridge) { | |
return function (input) { | |
var result = prev(input); | |
return result.length === 0 ? result : bridge(result[0])(result[1]); | |
}; | |
}; | |
var result = function (a) { | |
return function (input) { | |
return [a, input]; |
This file contains 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
>> IF = -> b { b } | |
=> #<Proc:0x007fb4e4049cc8 (lambda)> | |
>> LEFT = -> p { p[-> x { -> y { x } } ] } | |
=> #<Proc:0x007fb4e403d680 (lambda)> | |
>> RIGHT = -> p { p[-> x { -> y { y } } ] } | |
=> #<Proc:0x007fb4e4028ff0 (lambda)> | |
>> IS_EMPTY = LEFT |
This file contains 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
1331367079.48: {id:"7JLnOIfoVqzC", type:"bookmark", title:"Getting Started", parentName:"Bookmarks Toolbar", bmkUri:"http://www.mozilla.com/en-US/firefox/central/", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"toolbar"} | |
1331367079.48: {id:"CmxPKUsOViAm", type:"query", queryId:"RecentlyBookmarked", title:"Recently Bookmarked", parentName:"Bookmarks Menu", bmkUri:"place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&queryType=1&sort=12&maxResults=10&excludeQueries=1", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"menu"} | |
1331367079.48: {id:"XQOZVUA21FpS", type:"bookmark", title:"Customize Firefox", parentName:"Mozilla Firefox", bmkUri:"http://www.mozilla.com/en-US/firefox/customize/", tags:[], keyword:null, description:null, loadInSidebar:false, parentid:"Rh3DElws6CrW"} | |
1331367079.48: {id:"YBtokzk3UMOi", type:"query", queryId:"MostVisited", title:"Most Visited", parentName:"Bookmarks Toolbar", bmkUri:"place:redirectsMode=2&sort=8&maxResults=10", |
This file contains 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
If: | |
- you add and commit with the wrong email address in git, and | |
- your remote has a hook set up to prevent you from pushing with the bad address | |
Then you need to amend the author of your commit before push can succeed: | |
1. fix your email address in git config: | |
$ git config user.name "Your Name" |
This file contains 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
module AlgorithmW | |
// HINDLEY-MILNER TYPE INFERENCE | |
// Based on http://catamorph.de/documents/AlgorithmW.pdf | |
// (Now at http://web.archive.org/web/20170704013532/http://catamorph.de/documents/AlgorithmW.pdf) | |
type Lit = | |
| LInt of int | |
| LBool of bool |
Peter Naur, 1985
(copied from http://alistair.cockburn.us/ASD+book+extract%3A+%22Naur,+Ehn,+Musashi%22)
The present discussion is a contribution to the understanding of what programming is. It suggests that programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.
This file contains 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
const | |
composeN = (...fs) => y => | |
fs.reduceRight((x, f) => f(x), y) | |
, flatten = xs => | |
xs.reduce((acc, x) => acc.concat(x)) | |
, filter = pred => xs => | |
xs.filter(pred) | |