Skip to content

Instantly share code, notes, and snippets.

View jponge's full-sized avatar

Julien Ponge jponge

View GitHub Profile
@headius
headius / meltdown_in_a_nutshell.md
Last active July 27, 2018 13:43
How Meltdown Works

Algorithm

  1. A secret byte you want to read is stored at inaccessible memory location priv_mem.
  2. The sender triggers an access exception by attempting to read priv_mem.
  3. Due to CPU optimization (out-of-order execution), the load of secret from priv_mem and the use of its value in (4) and (5) below may execute before the exception is triggered.
  4. Calculate an offset into a known array probe by multiplying secret by the width of a cache line (or whatever block size the CPU typically fetches, like a 4096-byte page). This guarantees each of those 256 possible offsets will cache separately.
  5. Load probe[offset], which causes the CPU to cache exactly one chunk of of our array, populating one cache line.
  6. The exception finally triggers, clearing the modified registers...but cached data is not excised.
  7. Iterate over all 256 offsets into probe to find out which one loads fast. You've determined the value of secret.
@ldez
ldez / gmail-github-filters.md
Last active May 16, 2024 11:07
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@vietj
vietj / codegen-howto.adoc
Last active August 29, 2015 14:23
Codegen howto

Codegen

An howto for codegen.

Preliminary

Codegen is able to handle model generation for different kind of models:

  • module

  • package

@jponge
jponge / proposal.md
Last active August 6, 2021 15:52
Draft of our upcoming proposal of Golo to the Eclipse Foundation

Discussion

Background

Describe where the project came from. What is the historical journey of the project; who/what company wrote the project. Did it go through any significant alterations/rewrites/language changes?

Golo comes from the research activities of the Dynamid team of the CITI-INRIA Laboratory at INSA-Lyon. After experimentations in the JooFlux dynamic aspect and code injection toolkit, we realized that we could take advantage of the invokedynamic / JSR 292 to design a small, efficient and easy to hack dynamically-typed programming language for the JVM. By "easy to hack", we mean that language and runtime experiments can be approached by students and hobbyists, not just programming language design experts.

We released the first preview of Golo at the Devoxx France conference in March 2013. The language was presented in various JUGs and conferences, including De

@isaacs
isaacs / cla-response.md
Last active September 26, 2017 18:08
Occasionally people get upset at being asked to sign a standard Apache-style CLA to contribute code to a project. This is my response. Please feel free to copy/remix/etc any or all of it regarding your own project if you like, and let me know in the comments if you have any feedback, especially if something in here is unreasonable or incorrect. …

Caveat: I am not a lawyer.

I understand that asking you to give up ownership of something may sound weird or pushy. Legal documents are scary, and can be fraught with unintended consequences if they're entered into lightly. I hope that I can shed some light on why a project would do so, since I've been through this with several projects I maintain.

You need to permit sublicensing and re-licensing so that if you die, the project doesn't have to track down your heirs to sign off on any license changes. (Sadly not an unrealistic or particularly uncommon situation.) Remember, IP laws do change, sometimes in ways that change the spirit of licenses, or make them insufficient or suboptimal to protect the freedoms that they were designed to protect. That's why licenses like the BSD 2-clause and ISC exist, because earlier licenses were no longer ideal for OSS projects using them.

It is completely reasonable for the project to require that you agree to give them – actually give them, all the way, without res

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running closure.CallClosureTest
CallClosureTest.groovy: [measured 5 out of 15 rounds, threads: 1 (sequential)]
round: 1.16 [+- 0.03], round.block: 0.00 [+- 0.00], round.gc: 0.00 [+- 0.00], GC.calls: 15, GC.time: 0.02, time.total: 18.18, time.warmup: 12.38, time.bench: 5.80
CallClosureTest.java_unboxed: [measured 5 out of 15 rounds, threads: 1 (sequential)]
round: 0.24 [+- 0.01], round.block: 0.00 [+- 0.00], round.gc: 0.00 [+- 0.00], GC.calls: 7, GC.time: 0.01, time.total: 3.58, time.warmup: 2.38, time.bench: 1.20
CallClosureTest.java_boxed: [measured 5 out of 15 rounds, threads: 1 (sequential)]
round: 0.25 [+- 0.01], round.block: 0.00 [+- 0.00], round.gc: 0.00 [+- 0.00], GC.calls: 8, GC.time: 0.01, time.total: 3.82, time.warmup: 2.55, time.bench: 1.27
@danielpetisme
danielpetisme / Singoloton.golo
Created April 28, 2013 10:44
Design patterns are commons concepts for every devlopper. So I'm trying to implement the basic ones in Golo. The very first one is the Singoloton but I'm facing some issues. 1 - Is it possible to implement it in pure Golo? 2- Without DynamicObjects ? This is my shot. Any thoughts are welcomed!
module g0l0.patterns.creationnal.Singleton
local function _instance = -> null
local function _init = -> DynamicObject():
testing(|this| -> println(this + "doing some stuff"))
function MyObject = {
if _instance() is null {
@k33g
k33g / glloq.golo
Last active December 14, 2015 16:59
le "Glloq", 1er DSL pour enfants en Golo
module glloq
function boite = -> DynamicObject():
op(""):
value(0):
nbCailloux(0):
nbAllumettes(0):
define("alumette", |this| {
if this: op(): equals("+") { this: nbAllumettes(this: nbAllumettes() + this: value())}
if this: op(): equals("-") { this: nbAllumettes(this: nbAllumettes() - this: value())}
@jponge
jponge / .vimrc
Last active October 8, 2015 05:48
My current .vimrc for MacVIM
""" General
set nocompatible
set nobackup
""" Pathogen
filetype off
call pathogen#infect()
syntax on
filetype plugin indent on