MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
# vim | |
./configure --with-features=huge \ | |
--enable-gui=qt \ | |
--prefix=/home/omer \ | |
--enable-pythoninterp \ | |
--enable-python3interp \ | |
--enable-rubyinterp \ | |
--enable-perlinterp \ | |
--with-python-config-dir=/usr/lib64/python2.7/config \ | |
--with-python3-config-dir=/usr/lib64/python3.4/config-3.4m/ |
# | |
# Configuration files for Manjaro i3 on Lenovo Yoga 2 pro | |
# to scale properly on HiDPI (3200x1800) | |
# | |
##################################################### | |
~/.profile # | |
##################################################### | |
# UI element scaling, icons | |
export GDK_SCALE=2 |
use std::fmt::Debug; | |
use std::fs::File; | |
use std::io::{BufWriter, Result}; | |
use std::io::prelude::*; | |
use std::path::Path; | |
/// A generic case-insensitive Trie map permitting only alphabetical string keys. | |
pub struct Trie<T> { | |
values: Vec<T>, | |
/// An array of twenty-six optional tries, corresponding to each letter of the alphabet. |
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module Main where | |
import Data.Functor.Identity | |
import Data.Monoid |
" Highlight Word, initial version from: | |
" https://gist.github.com/emilyst/9243544#file-vimrc-L142 | |
" | |
" This mini-plugin provides a few mappings for highlighting words temporarily. | |
" | |
" Sometimes you're looking at a hairy piece of code and would like a certain | |
" word or two to stand out temporarily. You can search for it, but that only | |
" gives you one color of highlighting. Now you can use <leader>N where N is | |
" a number from 1-6 to highlight the current word in a specific color. | |
" |
A traditional table-based DFA implementation looks like this:
uint8_t table[NUM_STATES][256]
uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
for (const uint8_t *s = start; s != end; s++)
state = table[state][*s];
return state;
}
Note to readers: This document is an early draft of a model for memory-safe references that I've been working on for the last ~2 years. While I think it is quite promising, the design is unfinished. The "regions" that I present in this document have not been given a formal semantics, and I have not explained where they originate from. My goal is merely to convince you that the design is promising, and that if seen to completion, it would advance the frontier of zero-cost memory safety.
Update March 2025: I am working on a newer version of this proposal, that aims to simplify the model substantially. When I have finished that proposal, I will put a link here.
Update August 2025: Verdagon has written an awesome blog post that explains this proposal at a high level. I recommend you check it out!
In this document, I present a novel model for memory-safe references that aims to significantly improve upon the Rust-inspired model that Mojo c