Skip to content

Instantly share code, notes, and snippets.

View tonini's full-sized avatar
💭
I may be slow to respond.

Samuel Tonini tonini

💭
I may be slow to respond.
View GitHub Profile
(benchmark-run 100000
(alchemist-project-root))
;; without cache
;; (39.897932000000004 22 1.066836)
;; with cache
;; (0.290623 0 0.0)
case asd do
<<c1::5, c2::5, c3::5, c4::5, c5::5, c6::5, c7::2>> ->
<<main::binary,
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
enc.(c5)::8, enc.(c6)::8, enc.(bsl(c7, 3))::8, ?=>>
<<c1::5, c2::5, c3::5, c4::5, c5::4>> ->
<<main::binary,
enc.(c1)::8, enc.(c2)::8, enc.(c3)::8, enc.(c4)::8,
enc.(bsl(c5, 1))::8, ?=, ?=, ?=>>
<<c1::5, c2::5, c3::5, c4::1>> ->
(defun new-line-and-insert-pipe ()
(interactive)
(end-of-line)
(newline-and-indent)
(insert "|> "))
"At the end of the day, this article is just fucking right.
The language needs to be forked; not only the source, the intent.
The language needs a vision; I never said mine, just a vision.
The intent needs to follow the vision, and the source needs to follow the intent.
There will always be people who just want to include or iterate something in an otherwise HTML file. That's just dandy, let them. We have 5.X.
To the rest of us, PHP is old, aging, yet immature; like some bizarre man-child who draws webpages. The only reason (so far as the numbers can tell me) that PHP is holding strong in the market, is because one-click-install disasters like Wordpress are at the disposal of every dog-walker and face-painter out there. I've lost confidence in PHP. I grew up on PHP, and (foolishly) learned too much from it. I've had to relearn. It wasn't fun.
<noscript>
<style>
body *{ /*hides all elements inside the body*/
display: none;
}
h1{ /* even if this h1 is inside head tags it will be first hidden, so we have to display it again after all body elements are hidden*/
display: block;
}
</style>
<h1>JavaScript is not enabled, please check your browser settings.</h1>
[[def: :delete, line: 36,
arguments: [{:list, [line: 36], nil}, {:item, [line: 36], nil}]],
[def: :duplicate, line: 54,
arguments: [{:elem, [line: 54], nil}, {:n, [line: 54], nil}]],
[def: :flatten, line: 68, arguments: [{:list, [line: 68], nil}]],
[def: :flatten, line: 84,
arguments: [{:list, [line: 84], nil}, {:tail, [line: 84], nil}]],
[def: :when, line: 102,
arguments: [{:foldl, [line: 102],
[{:list, [line: 102], nil}, {:acc, [line: 102], nil},
def parse_definitions(ast) do
acc = []
Macro.postwalk(ast, acc, fn
{:def, [line], [{name, _, _}, _]} ->
[{:def, name}, {:line, line}]
other -> other
end)
end
(define-key company-mode-map [remap indent-for-tab-command]
'company-indent-for-tab-command)
(setq tab-always-indent 'complete)
(defvar completion-at-point-functions-saved nil)
(defun company-indent-for-tab-command (&optional arg)
(interactive "P")
(let ((completion-at-point-functions-saved completion-at-point-functions)
{:use, [context: LittlePhoenix.Web, import: Kernel],
[{:__aliases__, [alias: false], [:Phoenix, :Router]}]}
@tonini
tonini / init.el
Last active October 13, 2015 14:22
Basic Emacs Config
(require 'package) ;; Simple package system for Emacs
;; Enable installation of packages from MELPA
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
;; Load Emacs Lisp packages, and activate them.