Skip to content

Instantly share code, notes, and snippets.

Aggelos Biboudis biboudis

Block or report user

Report or block biboudis

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
#!/usr/bin/env bash
# Usage:
# RELEASE_DIR=<directory to place fresh clones of projects> ./
set -e
# TODO: clone all the projects
biboudis / Functional Unparsing.scala
Last active Jan 30, 2018
A simple type-safe formatter in Scala based on the "Functional Unparsing" paper by Olivier Danvy
View Functional Unparsing.scala
// A simple type-safe formatter in Scala based on the "Functional Unparsing" paper by Olivier Danvy
object Test {
def eol[A](k: String => A)(s: String): A = {
k(s + "\n")
biboudis / FRP.scala
Created Jun 14, 2017
Martin's complete, FRP example from coursera.
View FRP.scala
object FRP {
class Signal[T](expr: => T) {
import Signal._
private var myExpr: () => T = _
private var myValue: T = _
private var observers: Set[Signal[_]] = Set()
protected def update(expr: => T): Unit = {
biboudis / Fluent.scala
Created Apr 18, 2017
Adding a fluent API to a tagless interpreter via implicit function types
View Fluent.scala
object Fluent {
trait Foo[C[_]] {
def meth1[T]() : C[T]
trait ConcreteC[T]
class Lib[ElemT]{
View gist:52fa07ba3ea1abc7ce20
package builders;
import java.util.function.Function;
public class Cont {
interface K<A, B, C> extends Function<Function<A, B>, C>{ }
* Step 1:
* ---> just transforming continuations of type (a->r)->r to polymorphic (a->b)->c
biboudis /
Last active Oct 8, 2018
Staged power, with fixed, with staged fix.
(* in BER MetaOCaml *)
open Runcode;;
let rec fix : (('a -> 'b) -> ('a -> 'b)) -> 'a -> 'b = fun f x ->
f (fix f) x;;
let fix' : (('a -> 'b) code -> ('a -> 'b) code) -> ('a -> 'b) code = fun f ->
.< fun x -> let rec loop x = (fun f' -> .~(f .<f'>.) ) loop x in
loop x >.;;
biboudis /
Last active Aug 29, 2015
Test sequential and parallel mandelbrot in Java 8 with JMH. (
package benchmark;
import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit;
import java.util.*;
public class MyBenchmark {
biboudis / playlistmanager.cpp
Last active Dec 28, 2015
Signals in QT (class taken from clementine's playlist manager header file).
View playlistmanager.cpp
class PlaylistManagerInterface : public QObject {
PlaylistManagerInterface(Application* app, QObject* parent)
: QObject(parent) {}
// methods
public slots:
virtual void Load(const QString& filename) = 0;
biboudis /
Last active Jun 1, 2017
Playing with dbus.
# qdbus lists all service names of services that are running and you can manipulate at the moment.
# control dbus
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
qdbus org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
# and use --literal if you need to print the reply in plain text
qdbus --literal org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Playlists.ActivatePlaylist /org/mpris/MediaPlayer2/Playlists/20
You can’t perform that action at this time.