Just copy content to corresponding files
Some improvements have been made for parser and lexer grammars in Jison 0.3 (demonstrated in the FlooP/BlooP example below.)
For lexers:
- Patterns may use unquoted characters instead of strings
- Two new options,
%options flex case-insensitive
flex
: the rule with the longest match is used, and no word boundary patterns are addedcase-insensitive
: all patterns are case insensitive- User code section is included in the generated module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem Do not use "echo off" to not affect any child calls. | |
@setlocal | |
@rem Get the abolute path to the parent directory, which is assumed to be the | |
@rem Git installation root. | |
@for /F "delims=" %%I in ("%~dp0..") do @set git_install_root=%%~fI | |
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%PATH% | |
@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH% | |
@if not exist "%HOME%" @set HOME=%USERPROFILE% |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use '[clojure.core.match :only [match]]) | |
(defn evaluate [env [sym x y]] | |
(match [sym] | |
['Number] x | |
['Add] (+ (evaluate env x) (evaluate env y)) | |
['Multiply] (* (evaluate env x) (evaluate env y)) | |
['Variable] (env x))) | |
(def environment {"a" 3, "b" 4, "c" 5}) |
The best place to learn more about Google Script is the official documentation available at developers.google.com. Here are other places that will help you get up to speed.
- MAKING A GMAIL BOT WITH APPS SCRIPT AND TYPESCRIPT
- Google Apps Scripts - Snippets by +Amit Agarwal
- Apps Script Starter - Create Google Apps Script projects locally inside VS Code.
- Digital Inspiration by +Amit Agarwal - Google Addons
- Awesome Google Scripts by +Amit Agarwal
- Build with Google Apps Script - Setup a local development environment for Apps Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Fixnum | |
def upto2(n) | |
(self..n).to_a.map{|k| yield k } | |
end | |
end | |
class A | |
def sum(n) | |
sum = 0 | |
1.upto(n) do |i| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kernel | |
alias require_orig_bench require | |
def require(*args) | |
from = Time.now.to_f | |
$__deep ||= 0; $__deep += 1 | |
require_orig_bench(*args) | |
$stderr.puts %Q[ #{" " * ($__deep - 1) } #{(Time.now.to_f - from)} in #{args.inspect} ] | |
$__deep -= 1 |
NewerOlder