Couldn't find the text of this for a while...
sed -E -e 's/^/ /g' -e 's/^ --- ?//g' | pandoc -o listing.pdf - | |
That expression is a cheap literate programming system for Markdown. | |
Start commentary lines with '--- ' and they will be | |
markdown-formatted, the rest will be code. (Uses Lua comment syntax.) | |
Finally the right implementation of this idea: | |
http://fresh.homeunix.net/~luke/misc/emacs/pbook.pdf (program) | |
http://fresh.homeunix.net/~luke/misc/erlang/regtest.pdf (better example) |
Since this is on Hacker News and reddit...
- No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is a good bit crazier.
- I apologize for the use of
_t
in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries". - Since people kept complaining, I've fixed the assignments of string literals to non-const
char *
s. - My use of
type * name
, however, is entirely intentional. - If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at le
import Control.Proxy | |
import Control.Proxy.TCP | |
main :: IO () | |
main = serve (Host "0.0.0.0") "8000" $ \(socket,_) -> | |
runProxy $ socketReadS 4096 socket >-> socketWriteD socket |
Sometimes it would be nice if a type system could automatically "do it's best" | |
to restrict what a value will be. For example, the type `Bool` is the compiler | |
saying the value will either be `True` or `False`, but it doesn't know which. | |
What we want is the compiler to be able to be precise when possible, so instead | |
of always saying `Bool` (or "I don't know"), it could say `True`, `False`, or | |
`Bool`. This gist shows how Hindley Milner already has this capability that can | |
be exercised by using Church or Scott encodings of simple data types. | |
> {-# LANGUAGE RankNTypes #-} | |
> import qualified Data.Maybe as M |
use std::rc::Rc; | |
trait HKT<U> { | |
type C; // Current type | |
type T; // Type with C swapped with U | |
} | |
macro_rules! derive_hkt { | |
($t:ident) => { | |
impl<T, U> HKT<U> for $t<T> { |
My name is {{.Name}} and I'm {{.Age}} years old!! |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
There are some words which carry with them the baggage of sexism and ableism and so they're words we've chosen to avoid using within our community.
We realise that sometimes SlackBot might get a bit over-eager and correct you when you intentionally chose that word and it is appropriate. That's okay, but we find that in most cases, SlackBot's reminders help us choose our words with intention and promote a more inclusive and welcoming space.
There are plenty of other words that you can use which can still convey the meaning you're looking for. Sometimes it might require a bit of creativity, but trust us – it can be done.
We don't assume you were intentionally being sexist or ableist. Our language is littered with the legacy of unfortunate cultural baggage. You might not even believe that there's a problem with the word you used. That's cool, but we don't use that word here.
port module FromReduxToElm exposing (main) | |
import Html exposing (Html) | |
port sayHello : (String -> msg) -> Sub msg | |
type alias Model = | |
{ who : String |