from nonowarn
to everywhere
Posts
How do you simulate a dice? In javascript, It would be
function dice() {
return Math.floor(Math.random() * 6) + 1
}
So how about biased dices, for example returns 1 in probability 1/4, returns 2 in probability 1/9, and so on?
If you get an interest in this, read this article.
The moon from earth is about 24.3px wide, for example. The Eiffel Tower from a mile away is about 550.5px tall. That means that when you do “{ width: 24.3px }” in CSS 2.1, you’re making something as wide as the moon looks to be.
Antipodean: CSS px is an Angular Measurement
Edit: In CSS3, 1px=1/96in.
What is internet? He says Internet is not just a technology, but a set of ground rules which enables us to build network. The network has no global control.
They tune language rather than their code. They created translator (HipHop) which converts PHP into C++. To debug generated code, they wrote another interpreter for them (HPHPi). HPHPi is painfully slow, so they wrote virtual machine to run them (HPHPVM).
Several stories from frazzled and overworked programmers.
My favorite story is this.
This scene is familiar to all game developers: It’s the day we’re sending out the gold candidate for our Xbox 1 game. The whole team is playtesting the game all day long, making sure everything looks good. It’s fun, it’s solid, it’s definitely a go in our minds.
In the afternoon, we make the last build with the last few game-balancing tweaks, and do one last playthrough session when disaster strikes: The game crashes hard! We all run to our workstations, fire up the debugger, and try to figure out what’s going on. It’s not something trivial, like an assert, or even something moderately hard to track down, like a divide by zero. It looks like memory is garbage in a few places, but the memory reporting comes out clean. What’s going on?
One dinner and many hours later, our dreams of getting out on time shattered, we manage to track it down to one data file being loaded in with the wrong data. The wrong data? How’s that possible? Our resource system boiled down every asset to a 64-bit identifier made out of the CRC32 of the full filename and the CRC32 of all the data contents. That was also our way of collapsing identical resource files into a single one in the game. With tens of thousands of files, and two years of development, we never had a conflict. Never.
Until now, that is.
It turns out that one of the innocent tweaks the designers had checked in that afternoon made it so a text file had the exact same filename and data CRC as another resource file, even though they were completely different!
Our hearts sank to our feet when we recognized the problem. There’s no way we could change the resource indexing system in such a short period of time. Even if we pulled an all-nighter, there was no way to know for sure that everything would be stable in the morning.
Then, as quickly as despair swept over us, we realized how we could fix this on time for the gold candidate release. We opened up the text file responsible for the conflict, added a space at the end, and saved it. We looked at each other with huge grins on our faces and said:
“Ship it!”
– Noel Llopis
Beautiful. (via The 40th birthday of—maybe—the first microprocessor, the Intel 4004)
My Kern Type score.
Update: Better score from my MacBook Pro (above score is from iPad.)
Trying track my activities (such as liking and posting articles, pushing something to GitHub) to Google calendar using ifttt.
mosx:
Here’s how to generate a quick four-worder from the command line:
shuf -n4 /usr/share/dict/words | tr -d '\n'Source: Command Line Fu
Unfortunately this only works on Linux. On OS X we could use something like
jot(which is mentioned on Command Line Fu as well), but here’s a rather convenient Perl solution:perl -le 'chomp(@words= <>); print join " ", map {@words[rand @words]} 1..4' /usr/share/dict/words(Yes, this post took a while. I know…)
And ruby version here:
ruby -e 'puts $<.readlines.map(&:chomp).shuffle.take(4).join(" ")' < /usr/share/dict/words
Played with -webkit-font-smoothing: none. It’s ugly, but kinda cute.
I wrote a bookmarklet to remove anti-aliasing anywhere. I checked this works on Chrome, but also on Safari it should work.
Edit: Recommend to try this on Google web fonts gallery.
On Firefox. Its rendering on Chrome is still broken due to webkit’s bug but

Don’t you think it is beautiful somehow?
Photos
Repositories
-
a nonowarn1 fork/1 watcher/Pushed 7 days ago
-
Porting Shimeji to Mac2 forks/2 watchers/Pushed 9 days ago
-
Entity based records2 forks/6 watchers/Pushed 3 weeks ago
-
sometimes you need a repl1 watcher/Pushed 7 months ago
-
My rails project tamplates1 fork/2 watchers/Pushed 12 months ago
-
Simple Presentation Utility1 fork/1 watcher/Pushed 13 months ago
-
The missing package manager for OS X1 fork/1 watcher/Pushed 19 months ago
-
Haq! (demonstrates how to create a cabal package)1 fork/1 watcher/Pushed 2 years ago
Watched Repositories
-
The missing package manager for OS X.3450 forks/7408 watchers/Pushed 48 minutes ago
-
evented I/O for v8 javascript1473 forks/13003 watchers/Pushed 2 hours ago
-
DMCA takedowns GitHub has received9 forks/441 watchers/Pushed 5 hours ago
-
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.60 forks/690 watchers/Pushed 9 hours ago
-
A little web server in PHP2 forks/33 watchers/Pushed 32 hours ago
-
A maintenance command of Haskell cabal packages2 forks/7 watchers/Pushed 34 hours ago
-
RED checks HTTP resources. See http://redbot.org/15 forks/209 watchers/Pushed 36 hours ago
-
A wrapper program around cabal and cabal-install that maintains sandboxed build environments.12 forks/66 watchers/Pushed 41 hours ago
-
There's no I in Teamocil. At least not where you think. Teamocil helps you set up windows and splits layouts for tmux using YAML configuration files.10 forks/152 watchers/Pushed 2 days ago
-
Ruby FFI50 forks/351 watchers/Pushed 2 days ago
-
JavaScript's utility _ belt367 forks/3985 watchers/Pushed 2 days ago
-
A static website compiler library in Haskell25 forks/146 watchers/Pushed 3 days ago
-
Convert/mirror darcs repos into git repos13 forks/40 watchers/Pushed 3 days ago
-
Unfancy JavaScript368 forks/4357 watchers/Pushed 3 days ago
-
Small functional language that compiles to JavaScript.21 forks/249 watchers/Pushed 4 days ago
-
Behavior Driven Development for Haskell10 forks/35 watchers/Pushed 4 days ago
-
Primary repository for Haskell VTY library7 forks/11 watchers/Pushed 5 days ago
-
Low-level networking interface13 forks/26 watchers/Pushed 5 days ago
-
12 forks/30 watchers/Pushed 6 days ago
-
a nonowarn1 fork/1 watcher/Pushed 7 days ago
-
jQuery JavaScript Library1356 forks/11891 watchers/Pushed 8 days ago
-
Porting Shimeji to Mac2 forks/2 watchers/Pushed 9 days ago
-
A Graph Database for JRuby. It uses the java lib neo4j as storage and lucene for quering/indexing55 forks/382 watchers/Pushed 10 days ago
-
Support for serialising Haskell to and from Yaml.3 forks/6 watchers/Pushed 11 days ago
-
htty is the HTTP TTY, a console application for interacting with web servers.29 forks/528 watchers/Pushed 12 days ago
-
Generic HTTP types for Haskell (for both client and server code)6 forks/11 watchers/Pushed 2 weeks ago
-
Notes and workarounds for accessing the Mac OS X pasteboard in tmux sessions.4 forks/133 watchers/Pushed 2 weeks ago
-
Entity based records2 forks/6 watchers/Pushed 3 weeks ago
-
A cute HTML scraper / data extraction tool in under 70 lines of code4 forks/96 watchers/Pushed 3 weeks ago
-
A blazingly fast HTML combinator library for Haskell.15 forks/60 watchers/Pushed 3 weeks ago
-
Literate Programming can be Quick and Dirty.102 forks/866 watchers/Pushed 4 weeks ago
-
like strace, but for ruby code9 forks/494 watchers/Pushed 5 weeks ago
-
dynamic programming language1 fork/6 watchers/Pushed 5 weeks ago
-
A class for monads which can keep a stack trace1 fork/4 watchers/Pushed 2 months ago
-
A style guide for Haskell code.12 forks/57 watchers/Pushed 2 months ago
-
Ruby Imperative Random Data Generator and Quickcheck9 forks/35 watchers/Pushed 2 months ago
-
A collection of useful .gitignore templates515 forks/4009 watchers/Pushed 2 months ago
-
The Haskell-Scriptable Editor30 forks/160 watchers/Pushed 2 months ago
-
sometimes you need a repl12 forks/149 watchers/Pushed 2 months ago
-
Ruby library and command line utility for Tumblr16 forks/175 watchers/Pushed 2 months ago
-
A simple pure LRU cache written in Haskell2 forks/4 watchers/Pushed 3 months ago
-
~/.js68 forks/557 watchers/Pushed 3 months ago
-
Mail Checker Plus for Google Mail™ - Chrome Extension27 forks/87 watchers/Pushed 3 months ago
-
precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes190 forks/2087 watchers/Pushed 3 months ago
-
xkcd CLI + jQuery terminal implementation58 forks/311 watchers/Pushed 3 months ago
-
Little command line REST client that you can use in pipelines (bash or zsh).22 forks/608 watchers/Pushed 4 months ago
-
Yet another alternative Haskell Prelude, but this one is awesome!4 forks/29 watchers/Pushed 4 months ago
-
Resumes generated using the GitHub informations36 forks/119 watchers/Pushed 5 months ago
-
Securely store hashed, salted passwords2 forks/5 watchers/Pushed 6 months ago
-
sometimes you need a repl1 watcher/Pushed 7 months ago
-
A List monad transformer and related tools2 forks/6 watchers/Pushed 8 months ago
-
Prevent or capture output to stdout or other handles in Haskell2 forks/4 watchers/Pushed 8 months ago
-
My rails project tamplates1 fork/2 watchers/Pushed 12 months ago
-
The Rack App that pushes (aka Rack::Comet)4 forks/171 watchers/Pushed 12 months ago
-
Simple Presentation Utility1 fork/1 watcher/Pushed 13 months ago
-
Tool for soliciting comments on HTML documents1 fork/10 watchers/Pushed 13 months ago
-
Detexify Backend written in Haskell7 forks/65 watchers/Pushed 15 months ago
-
A monad transformer library for Haskell2 forks/9 watchers/Pushed 16 months ago
-
jQuery Countdown Timer4 forks/29 watchers/Pushed 17 months ago
-
A Haskell event notification library3 forks/31 watchers/Pushed 17 months ago
-
3D puzzle game written in Haskell with Yampa/GLUT3 forks/6 watchers/Pushed 18 months ago
-
GHC extension proof of concept to allow duplicate instance declarations. The best declaration is chosen for each use based on its context.1 fork/2 watchers/Pushed 18 months ago
-
Cheating is fun!30 forks/123 watchers/Pushed 18 months ago
-
Simple Ruby-style inheritance for JavaScript10 forks/172 watchers/Pushed 18 months ago
-
The missing package manager for OS X1 fork/1 watcher/Pushed 19 months ago
-
Package that holds functionality not found in base that could be there.1 fork/2 watchers/Pushed 20 months ago
-
Fast and easy to use Haskell xhtml combinators using Data.Text1 fork/5 watchers/Pushed 21 months ago
-
Tools to support multiple GHC distributions in a Bash shell environment1 fork/8 watchers/Pushed 22 months ago
-
true mixins, class_eval, macros and other syntax extensions for PHP 5.31 fork/12 watchers/Pushed 23 months ago
-
NCSA Mosaic 2.77 forks/118 watchers/Pushed 23 months ago
-
1 fork/3 watchers/Pushed 23 months ago
-
Stand-alone command-line version of the pointful plugin for lambdabot.1 fork/3 watchers/Pushed 2 years ago
-
Cheat Sheet Utility for Bash - similar to 'cheat' but much faster, not dependent on ruby, and better cheats6 forks/58 watchers/Pushed 2 years ago
-
Haq! (demonstrates how to create a cabal package)1 fork/1 watcher/Pushed 2 years ago
-
KQueue bindings for Ruby2 forks/24 watchers/Pushed 3 years ago