Skip to content

Instantly share code, notes, and snippets.

View FXHibon's full-sized avatar

François-Xavier Hibon FXHibon

View GitHub Profile
@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active October 14, 2023 07:23
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
@MD4
MD4 / jojoChainableForEach.js
Last active July 20, 2016 09:36
🐒 Chainable forEach monkey patch !
(function(oldForEach) {
Array.prototype.forEach = function() {
oldForEach.apply(this, arguments);
return this;
};
}(Array.prototype.forEach));
[1, 2, 3]
.forEach(item => console.log(1, item))
.forEach(item => console.log(2, item))

Principled Meta Programming for Scala

This note outlines a principled way to meta-programming in Scala. It tries to combine the best ideas from LMS and Scala macros in a minimalistic design.

  • LMS: Types matter. Inputs, outputs and transformations should all be statically typed.

  • Macros: Quotations are ultimately more easy to deal with than implicit-based type-lifting

  • LMS: Some of the most interesting and powerful applications of meta-programming