Skip to content

Instantly share code, notes, and snippets.

👾

Andreas Fuchs antifuchs

👾
View GitHub Profile
@antifuchs
antifuchs / Cargo.toml
Created Apr 10, 2019
An example of a failing parse error kind implementation
View Cargo.toml
[package]
edition = '2018'
name = "wtf_nom"
version = "0.0.1-dev"
authors = ["Andreas Fuchs <asf@boinkor.net>"]
license = "MIT"
[dependencies]
nom = "4.2.3"
View nonzero_uint_literals.md
  • Feature Name: nonzero_uint_literals
  • Start Date: TODO
  • RFC PR:
  • Rust Issue:

Summary

Add an extension to the INTEGER_LITERAL syntax that allows users to specify literals as non-zero unsigned integers. We introduce a new

@antifuchs
antifuchs / asf-rustdoc-edit.el
Last active Jan 17, 2020
This sets up a key binding for C-c ' in rust-mode, which acts very similarly to org-src's key binding, except the other direction: If you use it on a rustdoc comment, it'll open another buffer with the comment in it, in markdown-mode.
View asf-rustdoc-edit.el
;;; Copyright (C) 2018, 2019 Andreas Fuchs <asf@boinkor.net>
;;; Made available to you under the terms of GPLv2 or later: https://choosealicense.com/licenses/gpl-2.0/
(use-package edit-indirect
:straight t)
(defconst asf--rustdoc-line-prefixes (concat "^\\([\t ]*" (regexp-opt '("///" "//!")) "\\)"))
(defun asf--rustdoc-current-comment-block-region ()
(save-excursion
View gist:a72a47ecaf9e395bd5383a9d7583e2d4
-*- mode: cargo-process; default-directory: "~/Hacks/fibonacci_codec/" -*-
Cargo-Process started at Sat Sep 15 20:08:25
/Users/asf/.cargo/bin/cargo test --manifest-path /Users/asf/Hacks/fibonacci_codec/Cargo.toml
Compiling fibonacci_codec v0.1.2-dev (file:///Users/asf/Hacks/fibonacci_codec)
warning: unused import: `fib_decode_u64`
--> tests/decode.rs:7:23
|
7 | use fibonacci_codec::{fib_decode_u64, fib_decode_u8, DecodeError, Encode};
| ^^^^^^^^^^^^^^
View keybase.md

Keybase proof

I hereby claim:

  • I am antifuchs on github.
  • I am asf (https://keybase.io/asf) on keybase.
  • I have a public key ASBUHxa7gvyTT8vgVApa2Hby_B6ilHJhq92qZ9bLewQ20wo

To claim this, I am signing this object:

@antifuchs
antifuchs / text-search.lisp
Created Nov 19, 2017
This is the source code to the text-search visualizer I wrote about in https://boinkor.net/2007/03/simple-visualization-tool-for-string-search; it comes with a McCLIM GUI that (when I wrote it, in 2007) allowed seeing what steps were taken and which characters were visited. Hope this is still useful...
View text-search.lisp
;;; written 2007-03-15 and -16
;;; by Andreas Fuchs <asf@boinkor.net>
;;; MIT licence.
(cl:eval-when (:compile-toplevel :load-toplevel :execute)
(cl:require :mcclim))
(cl:defpackage :my-favourite-algorithm.text-search
(:use :clim-lisp :clim))
View README.md

What

errcheck intentionally warns on defer statements, but sadly a lot of idiomatic code uses un-checked defer calls, e.g.

	resp, err := httpClient.PostForm(ts.URL+"/login/", params)
	if err != nil {
		t.Fatal(err)
	}
	defer resp.Body.Close() // This is not a thing you should need to error-check!
View foo.html
<html>
<body>
<script type="application/javascript">
foo = { "bar": "</script>" };<script>alert("hi"); "}
</script>
</body>
</html>
View npm install output
Zulip-Desktop@0.4.2 /Users/asf/Hacks/zulip-electron
├─┬ assert@1.4.1
│ └─┬ util@0.10.3
│ └── inherits@2.0.1
├─┬ configstore@2.1.0
│ ├─┬ dot-prop@3.0.0
│ │ └── is-obj@1.0.1
│ ├── graceful-fs@4.1.9
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
View asar list app.asar
This file has been truncated, but you can view the full file.
/.DS_Store
/.editorconfig
/.gitattributes
/.gitignore
/.travis.yml
/app
/app/main
/app/main/domain.js
/app/main/index.js
You can’t perform that action at this time.