This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CompileTimeFactorial { | |
import scala.language.experimental.macros | |
// This function exposed to consumers has a normal Scala type: | |
def factorial(n: Int): Int = | |
// but it is implemented as a macro: | |
macro factorial_impl | |
import scala.reflect.macros.blackbox.Context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $windows = `wmctrl -l -G`; | |
my $processes = `ps faux`; | |
my $xrandr = `xrandr | grep " connected"`; | |
my @displays = (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package playground | |
import scala.concurrent.duration._ | |
import scala.concurrent.{ExecutionContext, Future} | |
import scala.util.{Failure, Success, Try} | |
import akka.actor.{Actor, ActorLogging, ActorRef, Props} | |
import akka.util.Timeout | |
import akka.pattern.{ask, pipe} | |
import playground.Parent.{BulkTasks, Finish, TaskCompleted, TaskFailed} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
texlive = pkgs.texlive.combined.scheme-basic; | |
python = pkgs.python3; | |
textext = python.pkgs.buildPythonPackage rec { | |
pname = "textext"; | |
version = "1.3.1"; | |
src = pkgs.fetchFromGitHub { | |
owner = "textext"; |
OlderNewer