Skip to content

Instantly share code, notes, and snippets.

Carlo Nucera meditans

Block or report user

Report or block meditans

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View configuration.nix
hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; };
View linuxband2.nix
{ stdenv, fetchurl, makeWrapper, pkgconfig, MMA, libjack2, libsmf, python2Packages, fetchFromGitHub, automake, autoconf, autoreconfHook }:
let
inherit (python2Packages) pyGtkGlade pygtksourceview python;
in stdenv.mkDerivation rec {
version = "master";
name = "linuxband-${version}";
src = fetchFromGitHub {
owner = "noseka1";
@meditans
meditans / mrsopLogicTerms.hs
Created Dec 7, 2018
Idea for guanxi terms with logical variables, mrsop style
View mrsopLogicTerms.hs
-- -*- eval: (med/hp '(pretty-show generics-mrsop singletons)) -*-
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
View concat-inline.nix
self: super: {
haskell.packages.ghc802 = super.haskell.packages.ghc802.extend (selfHS: superHS: {
concat-inline = self.haskell.lib.dontHaddock (selfHS.callPackage ~/code/haskell/forks/concat/inline {});
concat-satisfy = self.haskell.lib.dontHaddock (selfHS.callPackage ~/code/haskell/forks/concat/satisfy {});
});
}
View PipesMean.hs
{-# LANGUAGE ViewPatterns #-}
import Control.Monad
import Control.Monad.Trans.State.Strict
import Data.Sequence
import Pipes
import Pipes.Lift
import qualified Pipes.Prelude as P
import Prelude hiding (length)
View terzo.cpp
#include<iostream>
using namespace std;
void raddoppiaByReference(int &m)
{
m=2*m;
}
int raddoppiaByValue(int m)
{
View complesso.cpp
#include<iostream>
#include<cmath>
using namespace std;
// Codice che definisce la struct che rappresenta un numero complesso. Ricordati
// che si entra nei campi con la sintassi Variabile.Campo, quindi per esempio
// una volta definito un complesso z puoi prendere la parte reale con z.re
struct Complesso
View array.cpp
#include<iostream>
#include<cmath>
using namespace std;
// Codice che definisce nel main un array, prende gli elementi di input, e
// chiama una funzione media esterna. Nota che media prende un puntatore ad
// intero (che e' il primo elemento dell'array), e la lunghezza.
double media(int * m, int l)
View oscilloscopio.org
// Oscilloscope
// Input defined by ANALOG_IN
// SIG_OUT true puts a 2kHz wave on DIGITAL_OUT for testing.

#define ANALOG_IN 0
#define DIGITAL_OUT 13
bool SIG_OUT = true;

void setup() {
View Question1.hs
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
You can’t perform that action at this time.