module Trie where | |
import Prelude hiding (lookup) | |
import Data.Maybe | |
import qualified Data.Map as M | |
data Trie = Trie (M.Map Char Trie) Bool | |
empty :: Trie | |
empty = Trie M.empty False |
I agree the point you’re making here, 100%. However, a slight correction about Node’s APIs.
First of all, process.nextTick is actually first in, first out. Proof:
$ node -e 'process.nextTick(console.log.bind(console, 1)); process.nextTick(console.log.bind(console, 2))'
1
2
{ | |
// The block has begun, we're in a new block scope. The TDZ for the "a" binding has begun | |
var f = function() { | |
// 2. Because f() is evaluated before `a` is actually declared, | |
// an exception will be thrown indicating to the author that | |
// `a` is not yet defined. | |
console.log(a); | |
}; | |
function ChatScroller(props) { | |
const ref = useRef() | |
const shouldScrollRef = useRef(true) | |
useEffect(()=> { | |
if (shouldScrollRef.current) { | |
const node = ref.current | |
node.scrollTop = node.scrollheight | |
} | |
}) | |
const handleScroll = () => { |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.
As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:
- publish
- request
- start/stop subscription
Strongly opinionated set of guides to quickly setup OS X Mavericks for web development. By default OS X hides stuff that normal people don't need to see. These settings are better defaults for developers.
I don't want: any sounds, annoying confirmation dialogs, hidden extensions, superflous animations, unnecessary things running like Dashboard, Notification center or Dock(Alfred/spotlight works better for me).
These are my opinions. Read this document through and pick up the good parts to your preferences.
<script lang="ts"> | |
import { defineComponent, onMounted, PropType, ref, watch } from "vue"; | |
type VoidFunction = () => void; | |
const isBrowser = () => { | |
return typeof window === "object"; | |
}; | |
export default defineComponent({ | |
props: { |
echo-server-epoll | |
echo-server-poll | |
talk | |
talk.dSYM |