Skip to content

Instantly share code, notes, and snippets.

View ShiningRay's full-sized avatar
💭
.eth -> .gpt

代码之力 ShiningRay

💭
.eth -> .gpt
View GitHub Profile
@ShiningRay
ShiningRay / hash_deep_diff.rb
Created April 2, 2023 10:56 — forked from henrik/hash_deep_diff.rb
Recursively diff two Ruby hashes.
# Recursively diff two hashes, showing only the differing values.
# By Henrik Nyh <http://henrik.nyh.se> 2009-07-14 under the MIT license.
#
# Example:
#
# a = {
# "same" => "same",
# "diff" => "a",
# "only a" => "a",
# "nest" => {
http://chronos-st.blogspot.com/2007/12/smalltalk-in-one-page.html
http://www.csci.csusb.edu/dick/samples/smalltalk.syntax.html
Formal EBNF Specification of Smalltalk Syntax
1. Character = ? Any Unicode character ?;
2. WhitespaceCharacter = ? Any space, newline or horizontal tab character ?;
3. DecimalDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
4. Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M"
| "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
@ShiningRay
ShiningRay / lbForth.c
Created January 11, 2020 17:41 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@ShiningRay
ShiningRay / 0_reuse_code.js
Created April 23, 2016 03:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env ruby
# the stack
$stack = []
def pop() $stack.pop || ufe end
def push(f) $stack<<f end
# poor man's Exception class
def ufe() raise("Stack underflow") end
# lambda constructor helpers
@ShiningRay
ShiningRay / .vimrc
Created March 11, 2013 03:10 — forked from anonymous/.vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'