Skip to content

Instantly share code, notes, and snippets.

View fabiomcosta's full-sized avatar
:octocat:
void 0

Fabio M. Costa fabiomcosta

:octocat:
void 0
View GitHub Profile
@clarete
clarete / lispinho.py
Last active June 20, 2018 14:30
Small lisp implementation in Python
#!/usr/bin/env python3
# Licensed under GPLv3: https://www.gnu.org/licenses/gpl.txt
# Commit history available here: https://github.com/clarete/wheelbarrow/blob/master/lispinho/main.py
# no dependencies, may also work with python2
from __future__ import print_function
from pprint import pprint
import enum
import readline
import sys
@mthadley
mthadley / .projections.json
Last active October 21, 2022 16:14
A configuration for using vim-projectionist with jest. I was looking for this but couldn't find it anywhere.
{
"**/__tests__/*.js": {
"alternate": "{}.js",
"type": "test"
},
"*.js": {
"alternate": "{dirname}/__tests__/{basename}.js",
"type": "source"
}
}
@mraleph
mraleph / test.js
Last active January 7, 2016 00:03
Object.keys({a:1}) ----------------------
DebugPrint: 0x4c012f99: [JSObject]
- map = 0x5f30a2e1 [FAST_HOLEY_ELEMENTS]
- prototype = 0x24976009
{
#length: 0x24962489 <ExecutableAccessorInfo> (accessor constant)
0: 0x2492fdb1 <String[1]: a>
}
0x5f30a2e1: [Map]

I feel the need to have a little rant about MooTools and ES7 and the whole 'Array.contains' hoo-hah.

When MooTools came out in 2006, the most popular framework was Prototype. As the name suggests, it extended prototypes, as did MooTools. People still referred to making websites with JavaScript as 'DHTML', there was no trim method on strings, there wasn't even a forEach method on arrays. JavaScript was a crippled language. IE6 ruled the waves.

MooTools, Prototype, Dojo, Base2 - they made the language usable, even fun, to work with. By using an incredible feature of JavaScript, prototypical inheritance, we were able to add features to the language that made it palatable.

Be it simple methods like number.toInt, string.trim, array.forEach, or familiar programming constructs such as Class, MooTools and its ilk took JavaScript from something impossible to work with to something that you could properly use to build awesome sites, and even apps - Microsoft, IE and desktop ruled everything, and the concept of a 'we

@sebmarkbage
sebmarkbage / Move.md
Last active August 29, 2015 14:01
Object Rest Destructuring and Spread Initializer (ES7 proposal)
#include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>
#include <arpa/inet.h>
- (void)broadCast
{
int socketSD = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (socketSD <= 0) {
NSLog(@"Error: Could not open socket.");