We want to port Remacs to use a regex crate implemented in Rust. The Rust implementations are highly optimised, and this would simplify the Remacs codebase.
The two major crates are Rust’s regex crate, and the fancy-regex crate.
(defvar use-layer-configuration-layers nil) | |
(defvar use-layer-init-hook nil) | |
(defvar use-layer-config-hook nil) | |
(defvar use-layer-excluded-packages nil) | |
(defsubst use-layer-error (msg) | |
(error "use-layer: %s" msg)) |
(defun copy-current-line-position-to-clipboard (p) | |
"Copy current line in file to clipboard as '</path/to/file>:<line-number>'" | |
(interactive "sAbsolute path y/n?: ") | |
(let ((path-with-line-number) (file-name (buffer-file-name))) | |
(when (and (not (string= p "y")) (projectile-project-root)) | |
(setq file-name (file-relative-name buffer-file-name (projectile-project-root))) | |
) | |
(setq path-with-line-number (concat file-name ":" (number-to-string (line-number-at-pos)))) | |
(x-select-text path-with-line-number) | |
(message (concat path-with-line-number " copied to clipboard")))) |
#!/bin/bash | |
[[ $UID == 0 ]] || { echo "run as sudo to install"; exit 1; } | |
if ! [ -x "$(command -v jq)" ]; then | |
echo 'Error: jq is not installed.' >&2 | |
apt install jq -y | |
fi | |
REPO="https://github.com/BurntSushi/ripgrep/releases/download/" | |
RG_LATEST=$(curl -sSL "https://api.github.com/repos/BurntSushi/ripgrep/releases/latest" | jq --raw-output .tag_name) |
;; Screenshot at https://twitter.com/swaroopch/status/903442255796633600 | |
;; Inspired by https://www.reddit.com/r/ethtrader/comments/6wxizf/single_best_feature_of_the_new_macbook/ | |
;; Code written for Spacemacs, will need adaptation to your Emacs setup | |
;; Spacemacs users: You may need to enable `spacemacs-misc` layer to ensure `request` package is installed. | |
(defun dotspacemacs/user-config () | |
"Configuration function for user code. | |
This function is called at the very end of Spacemacs initialization after | |
layers configuration. | |
This is the place where most of your configurations should be done. Unless it is |
We want to port Remacs to use a regex crate implemented in Rust. The Rust implementations are highly optimised, and this would simplify the Remacs codebase.
The two major crates are Rust’s regex crate, and the fancy-regex crate.
""" | |
First make sure you have the Python Image libraries installed | |
sudo pip install pillow | |
Down below you will need to define the absolute path to the images see "dir=..." | |
Run this by entering | |
python stitch.py |
#include <iostream> | |
using namespace std; | |
using uint = unsigned int; | |
constexpr uint kLength = 6; | |
constexpr uint kHighBit = 1 << (kLength - 1); | |
constexpr uint kTrim = ((1 << (kLength)) - 1); | |
inline void print_binary(uint v) { | |
for (uint i = 1 << (kLength - 1); i != 0; i >>= 1) { | |
cout << ((v & i) ? 1 : 0); |
This is my submission to Google Code Jam 2014 Qualification Round, using Rust programming language. The full description of problems is available at Google.
I've solved all 4 problems over the course of 5 1/2 hours (2014-04-13T05:10+09:00 through T10:40+09:00), which were longer than I've expected (possibly because I was sleepy at that time), but I've got the full credit (90 out of 90) anyway, so I guess it was not so bad move.
I tried to write the idiomatic Rust as much as possible, but not always mostly due to the time constraints. In particular, all program shares same boilerplates for the general structure and I/O which I really don't like.
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 |