Code Monkey home page Code Monkey logo

reurl's Introduction

Hi! πŸ‘‹ I am Alwin,

Welcome to my GitHub page! This is a place where I have collected some of my work and some research projects.

I often try to develop theory and application simultaneously.

A selection of projects, listed below.

URL Specification

I am working on a number of projects around the specification of URLs. This works aims to resolve the differences between the WHATWG standard and the IETF specifications. It adds support for relative URLs in a way that agrees with the WHATWG standard.

  • URL Specification β€” An URL specification that generalises the WHATWG standard.
  • URLReference β€” An URL class that adds support for relative URLs.
  • spec-url β€” A low level, core library that implements the URL specification above.
  • reurl β€” An alternative URL library with immutable URL objects.

HTML Language

I am working on some projects around the HTML language as well. The end goal is to create an accurate and concise characterisation of the HTML5 language as parsed, together with an implementation!

  • html-parser β€” An ongoing effort to define an ever simpler and more concise HTML parsing algorithm that agrees with the HTML5 standard.
  • html-lexer β€” An html lexer that produces annotated chunks of raw input.
  • tiny-html-lexer β€” A minute html tokeniser based on the previous, but using regular expressions.

DOM Expressions

  • Domex β€” Domex (short for DOM expressions) is an algebraic language for specifying web user interfaces. Domex works by pattern-matching on input (model or viewmodel) data, and allows for recursive patterns. One way to think of it is as "recursive format strings" that produce HTML.

Logic things

  • Regex β€” A regular expression compiler that computes deterministic state machines (DFAs) by implementing (and slightly extending) the theory of derivatives of regular expressions.
  • Ess β€” Ess is a research type-language for describing properties of sem-structured data (such as JSON) and a theorem prover for that language.

Category Theory

I wrote my Master's Thesis about the generalisation of Universal Algebra and Universal Coalgebra at the Institute for Logic, Language and Computation in Amsterdam; I've separated out the introductory notes on Category Theory and patched up some typos as well.

Graphics File Formats

Some fun projects.

  • Haikon-js β€” A parser for HVIF vector icon files, in JS (and Zig).
  • XoDB β€” Some support for the reMarkable tablet database and –notebooks in JS.

Other projects

  • immutable-aatree β€” A persistent ordered dictionary datastructure.
  • tiny-css-parser β€” A CSS parser with a small code-base.
  • tm-plist β€” A parser for the ASCII property list file format (as used by TextMate).

reurl's People

Contributors

alwinb avatar jsepia avatar vwkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

reurl's Issues

Document Node.JS usage with examples

I want to use the Url class in a Node.JS project. In order to accomplish this, I need to know how to import it. This depends on how the reurl NPM module exports the Url class.

// named export
import { Url } from 'reurl'

// default export
import Url from 'reurl'

// workaround if the syntax above doesn't work
import * as Url from 'reurl'

// commonjs syntax
const Url = require('reurl').Url

The README states this:

The ReUrl library exposes an Url class and a RawUrl class with an identical API.

but does not specify how these classes are exposed to consumers. An example would be helpful.

ES module

Hi, thanks a lot for this great module!

Currently, it seems like it's a CJS module. To import it using ES module syntax is a bit clumsy.

import pkg from "reurl";
const { Url } = pkg;

Would be great to make it a native ES Modules instead, such that the following would work

import { Url } from "reurl";

I'm happy to submit a PR if desired.

Publish to NPM

It would be great if the module were published to NPM such that using it in Node would become easier. Alternatively one could maybe try out GitHub Packages which probably would be easier since the module already lives on GitHub.

I saw that there is already a make all command to build a minified dist/reurl.min.js file. It would only remain to publish it.

Currently, using reurl in Node is a bit cumbersome. One can import from GitHub though this doesn't download the minified build version but the whole GitHub repository. In NPM CLI it looks like this.

npm install alwinb/reurl

But this uses the latest commit, so to pin to a specify version, one needs to remember to use something like

npm install alwinb/reurl#v1.0.0rc

for a commit-ish hash. This works, though afaik it's not as robust as the NPM registry, because NPM CLI doesn't do integrity checks for non-NPM packages. In other words, if the content behind the URL somehow changed NPM CLI would still happily try to download it. Granted this is unlikely, and probably would only happen for commit hash collisions or garbage collected commits (not sure if GitHub does protect against that?). Also not sure if Yarn locks non-NPM dependencies?

I haven't used GitHub Registry yet, so I'm not sure how easy it is to use (I think it requires authentication for installing packages?) and if NPM properly does integrity checks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.