More info at https://norswap.com/nps-pkill-pgrep/
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
/** | |
* TODO | |
* | |
* @module fetch | |
*/ | |
import { sleep } from "src/utils/js-utils" | |
// ================================================================================================= | |
export type FetchParams<Result> = { |
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
// Code for lecture [7. Parsing Combinators] | |
// https://www.youtube.com/watch?v=3Cfq4i6754s&list=PLOech0kWpH8-njQpmSNGSiQBPUvl8v3IM&index=7 | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Deque; | |
import java.util.HashMap; | |
import java.util.Scanner; | |
import java.util.function.Supplier; |
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
// Code for lecture [6. Adding ASTs to Our Parser] | |
// https://www.youtube.com/watch?v=eAwRRaM-81A&list=PLOech0kWpH8-njQpmSNGSiQBPUvl8v3IM&index=6 | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Deque; | |
import java.util.HashMap; | |
import java.util.Scanner; |
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
// Code for lecture [5. Writing Parsers by Hand] | |
// https://www.youtube.com/watch?v=Ytq0GQdnChg&list=PLOech0kWpH8-njQpmSNGSiQBPUvl8v3IM&index=5 | |
import java.util.Scanner; | |
public final class Parser | |
{ | |
// === SETUP =================================================================================== | |
private static final String EXAMPLE_INPUT = |
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
// CheckStyle: start generated | |
package exni.nodes; | |
import com.oracle.truffle.api.CompilerDirectives; | |
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal; | |
import com.oracle.truffle.api.dsl.GeneratedBy; | |
import com.oracle.truffle.api.frame.VirtualFrame; | |
import com.oracle.truffle.api.nodes.NodeCost; | |
import exni.nodes.AddNode; | |
import exni.nodes.ExniNode; |
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
const assert = require('assert'); | |
// const is_even = n => | |
// (n === 0) || !is_even(n - 1); | |
const mock_is_even = (myself, n) => | |
(n === 0) || !myself(myself, n - 1); | |
const mockingbird = | |
fn => |
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
See https://norswap.com/expression-problem-java/ |
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
public final class Visitors | |
{ | |
// --------------------------------------------------------------------------------------------- | |
// 1. Initial setup. | |
interface Visitor { | |
void visit (A object); | |
void visit (B object); | |
} |
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 demo; | |
public interface Node {} |
NewerOlder