Skip to content

Instantly share code, notes, and snippets.

View juanbono's full-sized avatar
:shipit:

Juan Bono juanbono

:shipit:
View GitHub Profile
@juanbono
juanbono / solucion.txt
Created March 21, 2016 16:42
Como solucionar el error de lite server en Angular 2
add a string:
fs.inotify.max_user_watches = 524288
into:
/etc/sysctl.conf.
and restart os or:
$ sudo sysctl -p
% Borrar todo de la consola %
clc;
clear all;
close all;
fm = input('Frecuencia mensaje = ');
fc = input('Frecuencia funcion sierra = ');
A = input('Amplitud funcion sierra = ');
tmax = input('Tiempo = ');
t = 0:0.001:tmax; % Rango del tiempo - entre 0 y un tiempo maximo %
-- The "Boolean" language from Types and Programming Languages, 3.5
-- Terms of the boolean language
data Term : Set where
true false : Term
if_then_else_ : Term → Term → Term → Term
-- A small-step semantics. Each constructor is a single reduction rule.
data _⟶_ : Term → Term → Set where
e-IfTrue : ∀ {t₂ t₃} → if true then t₂ else t₃ ⟶ t₂
@juanbono
juanbono / comonad.hs
Created May 10, 2016 17:53
comonad and monad relationship
class Monad m where
return :: a -> m a
join :: m (m a) -> m a
class Comonad m where
extract :: a <- m a
duplicate :: m (m a) <- m a
@juanbono
juanbono / Lang.mkdown
Created May 11, 2016 03:10 — forked from mamcx/Lang.mkdown
Lista de recursos sobre crear lenguajes de programacion
Mail de Conor McBride en la lista de mails de haskell (creo)
----------------------------------------------------------------------------------------------------------------------------
Hi
I'm sorry about the level of consternation this discussion seems to be
generating, so let me attempt to clarify my previous remarks.
The diagonalization argument which shows that any total language
misses some total programs is the usual one: Godel-code everything in
sight, then make the alleged universal program eat a twisted copy of
@juanbono
juanbono / lambda.hs
Last active June 1, 2016 14:30
Ejemplos de uso de expresiones lambda
-- Ejemplos de expresiones lambda
sumar1 :: Num a => a -> a
sumar1 x = x + 1
sumar1ConLambda :: Num a => a -> a
sumar1ConLambda = \x -> x + 1
noUsoArgs :: a -> b -> c -> Integer
noUsoArgs = \x y z -> 2 -- (\x y z -> 2) Devuelve 2 para toda combinacion de parametros.
@juanbono
juanbono / fix-audio.sh
Created June 27, 2016 17:53 — forked from david-christiansen/fix-audio.sh
How to fix the audio on the current crop of OPLSS videos
#!/bin/bash
for i in *.mp4; do
if [ ! -a "${i%.mp4}-fixed.mp4" ]; then
ffmpeg -i "$i" -vcodec copy -ac 1 "${i%.mp4}-fixed.mp4"
fi
done
@juanbono
juanbono / abt.hs
Created July 4, 2016 10:34 — forked from pchiusano/abt.hs
Simple abstract binding trees implementation in Haskell
-- A port of: http://semantic-domain.blogspot.com/2015/03/abstract-binding-trees.html
{-# LANGUAGE DeriveFunctor #-}
module ABT where
import qualified Data.Foldable as Foldable
import Data.Foldable (Foldable)
import Data.Set (Set)
import qualified Data.Set as Set