Skip to content

Instantly share code, notes, and snippets.

@m4dc4p
m4dc4p / 2020-05-14T20_49_33_922Z-debug.log
Last active May 14, 2020 20:59
Graal npm bug when installing packages
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\graalvm-ce-java8-20.2.0-dev\\jre\\languages\\js\\bin\\node.exe',
1 verbose cli 'C:\\Program Files\\graalvm-ce-java8-20.2.0-dev\\jre\\languages\\js\\npm\\bin\\npm-cli.js',
1 verbose cli '--nodedir=C:\\Program Files\\graalvm-ce-java8-20.2.0-dev\\jre\\languages\\js',
1 verbose cli 'install'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.15.0
4 verbose npm-session 9ab14cc57f9e5560
@m4dc4p
m4dc4p / 2020-05-13T00_02_30_234Z-debug.log
Last active May 13, 2020 00:13
Graal error with npm install
12006 silly extract proto-list@1.2.4
12007 silly extract promise@7.3.1
12008 silly extract fill-range@^2.1.0 extracted to C:\Users\Justin\Source\semanticx\node_modules\.staging\fill-range-8bae42bd (432ms)
12009 silly extract center-align@^0.1.1 extracted to C:\Users\Justin\Source\semanticx\node_modules\.staging\center-align-13883114 (431ms)
12010 silly extract align-text@^0.1.3 extracted to C:\Users\Justin\Source\semanticx\node_modules\.staging\align-text-efbdcebf (399ms)
12011 silly extract repeat-string@^1.6.1 extracted to C:\Users\Justin\Source\semanticx\node_modules\.staging\repeat-string-de72e8cc (397ms)
12012 silly extract process-nextick-args@2.0.1
12013 silly extract pretty-hrtime@1.0.3
12014 silly extract preserve@0.2.0
12015 silly extract autoprefixer@9.7.6

Revisiting Tagless Final Interpreters with Dotty

Tageless Final interpreters are an alternative to the traditional Algebraic Data Type (and generalized ADT) based implementation of the interpreter pattern. This document presents the Tageless Final approach with Scala, and shows how Dotty with it's recently added implicits functions makes the approach even more appealing. All examples are direct translations of their Haskell version presented in the Typed Tagless Final Interpreters: Lecture Notes (section 2).

The interpreter pattern has recently received a lot of attention in the Scala community. A lot of efforts have been invested in trying to address the biggest shortcomings of ADT/GADT based solutions: extensibility. One can first look at cats' Inject typeclass for an implementation of [Data Type à la Carte](http://www.cs.ru.nl/~W.Swierstra/Publications

### Keybase proof
I hereby claim:
* I am m4dc4p on github.
* I am m4dc4p (https://keybase.io/m4dc4p) on keybase.
* I have a public key whose fingerprint is 5E3A E072 3359 48E3 7AC1 CE39 4B3C E45C 5A13 136A
To claim this, I am signing this object:
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="plottable/plottable.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<style type="text/css">
svg {
border: 1px solid rgba(0, 0, 0, 0.15);
@m4dc4p
m4dc4p / gist:a90aa925a500ee8d0feb
Last active September 26, 2015 00:55
An example of using the HiringThing API using ColdFusion
<!--- Set the Variable Name for the Jobs --->
<cfset jsonDoc = '' />
<!--- Call the Endpoint --->
<cfhttp method="get" url="http://{YourHost}/remote/jobs/active" username="{UserName}" password="{Password}" result="get" >
</cfhttp>
<!--- Set the Variable for the data retunred and deserialize it --->
<cfset jsonDoc = DeserializeJSON(get.filecontent) />
@m4dc4p
m4dc4p / gist:750435b04d055717717b
Last active September 26, 2015 00:54
An example of using the HiringThing API using C# and .NET
using System.Net;
using System.Web.Script.Serialization;
using System.Text;
//Method to return active jobs
protected Job[] GetJobsFromTheApplicantTracker()
{
const string API_Key = "Insert API Key Here";
const string API_Password = "Insert API Password Here";
@m4dc4p
m4dc4p / lines.py
Last active December 19, 2015 14:29
A simple programming problem - "Read lines of text, until a completely blank line is found. Eliminate redundant blanks between the words. Print the text, thirty characters to a line, without breaking words between lines." If a word is longer than 30 characters, print the word on its own line. All blanks (including tabs and newlines) are converte…
"""
This program reads lines of text from standard input, until a
completely blank line is seen. Lines are printed on standard
output,with redundant blanks between words removed. No more than 30
characters will be printed on each line, and lines are always broken
at whitespace. Only if a word is more than 30 characters long will a
line longer than 30 characters be printed.
"""
import sys
@m4dc4p
m4dc4p / README
Created December 7, 2011 00:22
TeX sample that will create a vertical rule next to a given paragraph
Justin Bailey 2011
jgbailey@codeslower.com
To use: surround paragraphs to place a rule
with \startrule and \endrule.
E.g.:
\startrule
This paragraph will have a rule around it.
@m4dc4p
m4dc4p / haskellButton.js
Created November 11, 2011 21:34 — forked from joshuasiler/robotButton.js
Javascript function that adds a little surprise to your HTML elements.
/* USAGE EXAMPLE
<style>
.example { padding:15px; border: 2px solid #888; width:100px;float:left;margin-left: 5px; font-size: 50px; margin-top: 50px; }
</style>
<div id="example1" class="example">1</div>
<div id="example2" class="example">2</div>
<div id="example3" class="example">3</div>
<div id="example4" class="example">4</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="/javascript/robotButton.js"></script>